Deluge Firmware 1.3.0
Build date: 2026.10.14
Loading...
Searching...
No Matches
Browser Class Referenceabstract
Inheritance diagram for Browser:
Collaboration diagram for Browser:

Public Member Functions

void close ()
virtual Error getCurrentFilePath (String *path)=0
ActionResult buttonAction (deluge::hid::Button b, bool on, bool inCardRoutine) override
ActionResult padAction (int32_t x, int32_t y, int32_t velocity) override
ActionResult verticalEncoderAction (int32_t offset, bool inCardRoutine) override
void currentFileDeleted ()
Error goIntoFolder (char const *folderName)
Error createFolder ()
Error createFoldersRecursiveIfNotExists (const char *path)
void selectEncoderAction (int8_t offset) override
Error readFileItemsForFolder (char const *filePrefixHere, bool allowFolders, char const **allowedFileExtensionsHere, char const *filenameToStartAt, int32_t newMaxNumFileItems, int32_t newCatalogSearchDirection=CATALOG_SEARCH_BOTH)
Error setFileByFullPath (OutputType outputType, char const *fullPath)
void sortFileItems ()
FileItem * getNewFileItem ()
Error getUnusedSlot (OutputType outputType, String *newName, char const *thingName)
bool opened () override
void cullSomeFileItems ()
bool checkFP ()
void renderOLED (deluge::hid::display::oled_canvas::Canvas &canvas) override
ActionResult exitUI () override
 returns whether a UI exited
bool isFavouritesVisible () override
bool isBanksVisible () override
Public Member Functions inherited from QwertyUI
ActionResult padAction (int32_t x, int32_t y, int32_t velocity) override
ActionResult horizontalEncoderAction (int32_t offset) override
ActionResult timerCallback () override
bool renderMainPads (uint32_t whichRows, RGB image[][kDisplayWidth+kSideBarWidth]=nullptr, uint8_t occupancyMask[][kDisplayWidth+kSideBarWidth]=nullptr, bool drawUndefinedArea=true) override
Public Member Functions inherited from UI
virtual void modEncoderAction (int32_t whichModEncoder, int32_t offset)
virtual void modButtonAction (uint8_t whichButton, bool on)
virtual void modEncoderButtonAction (uint8_t whichModEncoder, bool on)
virtual void graphicsRoutine ()
virtual void focusRegained ()
virtual void displayOrLanguageChanged ()
virtual bool canSeeViewUnderneath ()
virtual ClipMinder * toClipMinder ()
virtual TimelineView * toTimelineView ()
 Convert this view to a TimelineView.
virtual void scrollFinished ()
virtual bool pcReceivedForMidiLearn (MIDICable &fromCable, int32_t channel, int32_t program)
virtual bool noteOnReceivedForMidiLearn (MIDICable &fromCable, int32_t channel, int32_t note, int32_t velocity)
virtual bool getGreyoutColsAndRows (uint32_t *cols, uint32_t *rows)
virtual bool renderSidebar (uint32_t whichRows=0, RGB image[][kDisplayWidth+kSideBarWidth]=nullptr, uint8_t occupancyMask[][kDisplayWidth+kSideBarWidth]=nullptr)
void close ()
virtual UI * getUI ()
 When entering a UI (e.g. automationView), you may wish to open a different UI based on the current context (e.g. automationViewArranger, automationViewAudioClip, etc.).
virtual UIType getUIType ()=0
 What type of UI is this? e.g. UIType::ARRANGER.
virtual UIType getUIContextType ()
 What context does UI relate to? e.g. UIType could be AUTOMATION but UIContextType could be ARRANGER, AUDIO CLIP, INSTRUMENT CLIP.
virtual UIModControllableContext getUIModControllableContext ()
 What mod controllable context is this UI using? E.g. Automation View can use the Song ModControllable when in Arranger but the Clip ModControllable when in a Clip.
virtual bool canDisplayFavourites ()

Static Public Member Functions

static FileItem * getCurrentFileItem ()
static void emptyFileItems ()
static void deleteSomeFileItems (int32_t startAt, int32_t stopAt)
static void deleteFolderAndDuplicateItems (Availability instrumentAvailabilityRequirement=Availability::ANY)
static Error surveyNameVariations (char const *stem, String *highestNumbered, uint32_t *takenLetters)
 Surveys currentDir in one pass for the existing variations of a name.
static bool fileItemsAreComplete ()
 Whether fileItems holds every file the folder listed, rather than a culled window of them.

Static Public Attributes

static String currentDir {}
static CStringArray fileItems {sizeof(FileItem)}
static int32_t numFileItemsDeletedAtStart
static int32_t numFileItemsDeletedAtEnd
static String firstFileItemRemaining {}
static String lastFileItemRemaining {}
static OutputType outputTypeToLoad
static char const * filenameToStartSearchAt
Static Public Attributes inherited from QwertyUI
static bool predictionInterrupted
static String enteredText {}

Protected Member Functions

Error setEnteredTextFromCurrentFilename ()
Error goUpOneDirectoryLevel ()
virtual Error arrivedInNewFolder (int32_t direction, char const *filenameToStartAt=nullptr, char const *defaultDir=nullptr)
bool predictExtendedText () override
void goIntoDeleteFileContextMenu ()
ActionResult mainButtonAction (bool on)
virtual void exitAction ()
virtual ActionResult backButtonAction ()
virtual void folderContentsReady (int32_t entryDirection)
virtual void currentFileChanged (int32_t movementDirection)
void displayText (bool blinkImmediately=false) override
void clampFileSelectionAndScroll (bool allowNoFileSelection=true)
char const * nameAfterPrefix (char const *name) const
Error readFileItemsFromFolderAndMemory (Song *song, OutputType outputType, char const *filePrefixHere, char const *filenameToStartAt, char const *defaultDirToAlsoTry, bool allowFoldersint, Availability availabilityRequirement=Availability::ANY, int32_t newCatalogSearchDirection=CATALOG_SEARCH_RIGHT)
void favouritesChanged ()
Protected Member Functions inherited from QwertyUI
bool opened () override
void drawKeys ()
virtual void processBackspace ()
virtual void enterKeyPress ()=0
void drawTextForOLEDEditing (int32_t textStartX, int32_t xPixelMax, int32_t yPixel, int32_t maxChars, deluge::hid::display::oled_canvas::Canvas &canvas)
void renderFavourites ()

Static Protected Member Functions

static Slot getSlot (char const *displayName)

Protected Attributes

const uint8_t * fileIcon
const uint8_t * fileIconPt2
int32_t fileIconPt2Width
bool shouldWrapFolderContents
bool mayDefaultToBrandNewNameOnEntry
bool qwertyAlwaysVisible
char const * filePrefix
bool shouldInterpretNoteNamesForThisBrowser
Protected Attributes inherited from QwertyUI
char const * title
Protected Attributes inherited from UI
UIType uiType

Static Protected Attributes

static int32_t fileIndexSelected
static int32_t scrollPosVertical
static int32_t numCharsInPrefix
static bool qwertyVisible
static bool arrivedAtFileByTyping
static bool allowFoldersSharingNameWithFile
static char const ** allowedFileExtensions
static int8_t numberEditPos
static NumericLayerScrollingText * scrollingText
Static Protected Attributes inherited from QwertyUI
static uint8_t favouriteRow = 6
static constexpr uint8_t favouriteBankRow = 7
static int16_t enteredTextEditPos
static int32_t scrollPosHorizontal

Additional Inherited Members

Public Attributes inherited from UI
bool oledShowsUIUnderneath

Member Function Documentation

◆ buttonAction()

ActionResult Browser::buttonAction ( deluge::hid::Button b,
bool on,
bool inCardRoutine )
overridevirtual

Reimplemented from UI.

◆ displayText()

void Browser::displayText ( bool blinkImmediately = false)
overrideprotectedvirtual

Reimplemented from QwertyUI.

◆ exitUI()

ActionResult Browser::exitUI ( )
inlineoverridevirtual

returns whether a UI exited

Reimplemented from UI.

◆ fileItemsAreComplete()

bool Browser::fileItemsAreComplete ( )
inlinestatic

Whether fileItems holds every file the folder listed, rather than a culled window of them.

Returns
True when questions about the whole folder can be answered from fileItems alone, without going back to the card.

◆ isBanksVisible()

bool Browser::isBanksVisible ( )
overridevirtual

Reimplemented from UI.

◆ isFavouritesVisible()

bool Browser::isFavouritesVisible ( )
overridevirtual

Reimplemented from UI.

◆ nameAfterPrefix()

char const * Browser::nameAfterPrefix ( char const * name) const
protected

Returns the character just past filePrefix within name, or nullptr if name does not start with filePrefix. Names always carry the prefix; only rendering strips it.

◆ opened()

bool Browser::opened ( )
overridevirtual

Reimplemented from UI.

◆ padAction()

ActionResult Browser::padAction ( int32_t x,
int32_t y,
int32_t velocity )
overridevirtual

Reimplemented from UI.

◆ predictExtendedText()

bool Browser::predictExtendedText ( )
overrideprotectedvirtual

Reimplemented from QwertyUI.

◆ renderOLED()

void Browser::renderOLED ( deluge::hid::display::oled_canvas::Canvas & canvas)
overridevirtual

Implements UI.

◆ selectEncoderAction()

void Browser::selectEncoderAction ( int8_t offset)
overridevirtual

Reimplemented from UI.

◆ surveyNameVariations()

Error Browser::surveyNameVariations ( char const * stem,
String * highestNumbered,
uint32_t * takenLetters )
static

Surveys currentDir in one pass for the existing variations of a name.

Reads the folder directly rather than fileItems, keeping only the two summaries. fileItems is a window around whichever file the browser is sitting on (FILE_ITEMS_MAX_NUM_ELEMENTS), and a member of a name family can be any distance from that in sort order, so it cannot answer this.

Precondition
currentDir names the folder to survey.
Parameters
stemThe name the variations extend.
highestNumberedIf non-null, receives the greatest name of the form "<stem><digits>", or is left empty when the folder holds none.
takenLettersIf non-null, receives a bit per existing "<stem><letter>", bit 0 meaning 'A'.
Returns
Error::NONE, or the card error that cut the pass short - in which case both outputs still hold what had been found so far, neither of which can overstate the truth.
See also
fileItemsAreComplete(), which says when this pass can be skipped entirely.

◆ verticalEncoderAction()

ActionResult Browser::verticalEncoderAction ( int32_t offset,
bool inCardRoutine )
overridevirtual

Reimplemented from UI.


The documentation for this class was generated from the following files:
  • src/deluge/gui/ui/browser/browser.h
  • src/deluge/gui/ui/browser/browser.cpp