Deluge Firmware 1.3.0
Build date: 2025.06.05
Loading...
Searching...
No Matches
LoadInstrumentPresetUI Class Referencefinal
Inheritance diagram for LoadInstrumentPresetUI:
Collaboration diagram for LoadInstrumentPresetUI:

Public Member Functions

bool opened () override
 
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 instrumentEdited (Instrument *instrument)
 
Error performLoad (bool doClone=false)
 
Error performLoadSynthToKit ()
 
ActionResult timerCallback () override
 
bool getGreyoutColsAndRows (uint32_t *cols, uint32_t *rows) override
 
bool renderMainPads (uint32_t whichRows, RGB image[][kDisplayWidth+kSideBarWidth]=nullptr, uint8_t occupancyMask[][kDisplayWidth+kSideBarWidth]=nullptr, bool drawUndefinedArea=true, int32_t navSys=-1)
 
bool renderSidebar (uint32_t whichRows, RGB image[][kDisplayWidth+kSideBarWidth], uint8_t occupancyMask[][kDisplayWidth+kSideBarWidth]) override
 
std::expected< FileItem *, Error > findAnUnlaunchedPresetIncludingWithinSubfolders (Song *song, OutputType outputType, Availability availabilityRequirement)
 
std::expected< FileItem *, Error > confirmPresetOrNextUnlaunchedOne (OutputType outputType, String *searchName, Availability availabilityRequirement)
 
PresetNavigationResult doPresetNavigation (int32_t offset, Instrument *oldInstrument, Availability availabilityRequirement, bool doBlink)
 
void setupLoadInstrument (OutputType newOutputType, Instrument *instrumentToReplace_, InstrumentClip *instrumentClipToLoadFor_)
 
void setupLoadSynthToKit (Instrument *kit, InstrumentClip *clip, SoundDrum *drum, NoteRow *row, int32_t rowIndex)
 
UIType getUIType () override
 What type of UI is this? e.g. UIType::ARRANGER.
 
- Public Member Functions inherited from LoadUI
void focusRegained () override
 
- Public Member Functions inherited from SlotBrowser
void focusRegained () override
 
ActionResult horizontalEncoderAction (int32_t offset) override
 
Error getCurrentFilePath (String *path) override
 
- Public Member Functions inherited from Browser
void close ()
 
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 ()
 
FileItemgetNewFileItem ()
 
Error getUnusedSlot (OutputType outputType, String *newName, char const *thingName)
 
void cullSomeFileItems ()
 
bool checkFP ()
 
void renderOLED (deluge::hid::display::oled_canvas::Canvas &canvas) override
 
bool exitUI () override
 returns whether a UI exited
 
- Public Member Functions inherited from QwertyUI
ActionResult padAction (int32_t x, int32_t y, int32_t velocity) 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 displayOrLanguageChanged ()
 
virtual bool canSeeViewUnderneath ()
 
virtual ClipMindertoClipMinder ()
 
virtual TimelineViewtoTimelineView ()
 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)
 
void close ()
 
virtual UIgetUI ()
 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 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.
 

Protected Member Functions

void enterKeyPress () override
 
void folderContentsReady (int32_t entryDirection) override
 
void currentFileChanged (int32_t movementDirection) override
 
- Protected Member Functions inherited from LoadUI
virtual void searchMemoryForBetterFile (int32_t offset, char *bestFilenameFound)
 
- Protected Member Functions inherited from SlotBrowser
Error beginSlotSession (bool shouldDrawKeys=true, bool allowIfNoFolder=false)
 
void processBackspace () override
 
virtual void predictExtendedTextFromMemory ()
 
void convertToPrefixFormatIfPossible ()
 
void enterKeyPress () override
 
Error getCurrentFilenameWithoutExtension (String *filename)
 
- Protected Member Functions inherited from Browser
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 ActionResult backButtonAction ()
 
void displayText (bool blinkImmediately=false) override
 
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 ()
 
void drawTextForOLEDEditing (int32_t textStartX, int32_t xPixelMax, int32_t yPixel, int32_t maxChars, deluge::hid::display::oled_canvas::Canvas &canvas)
 
void renderFavourites ()
 

Private Member Functions

bool showingAuditionPads ()
 
Error setupForOutputType ()
 
void changeOutputType (OutputType newOutputType)
 
void revertToInitialPreset ()
 
void exitAction () override
 
bool isInstrumentInList (Instrument *searchInstrument, Output *list)
 
bool findUnusedSlotVariation (String *oldName, String *newName)
 

Private Attributes

InstrumentClipinstrumentClipToLoadFor
 
InstrumentinstrumentToReplace
 
bool loadingSynthToKitRow
 
SoundDrumsoundDrumToReplace
 
int32_t noteRowIndex
 
NoteRownoteRow
 
Error currentInstrumentLoadError
 
int16_t initialChannel
 
int8_t initialChannelSuffix
 
OutputType initialOutputType
 
bool changedInstrumentForClip
 
bool replacedWholeInstrument
 
String initialName
 
String initialDirPath
 

Additional Inherited Members

- Static Public Member Functions inherited from Browser
static FileItemgetCurrentFileItem ()
 
static void emptyFileItems ()
 
static void deleteSomeFileItems (int32_t startAt, int32_t stopAt)
 
static void deleteFolderAndDuplicateItems (Availability instrumentAvailabilityRequirement=Availability::ANY)
 
- Public Attributes inherited from UI
bool oledShowsUIUnderneath
 
- Static Public Attributes inherited from Browser
static String currentDir {}
 
static CStringArray fileItems {sizeof(FileItem)}
 
static int32_t numFileItemsDeletedAtStart
 
static int32_t numFileItemsDeletedAtEnd
 
static char const * firstFileItemRemaining
 
static char const * lastFileItemRemaining
 
static OutputType outputTypeToLoad
 
static char const * filenameToStartSearchAt
 
- Static Public Attributes inherited from QwertyUI
static bool predictionInterrupted
 
static String enteredText {}
 
- Static Protected Member Functions inherited from Browser
static Slot getSlot (char const *displayName)
 
- Protected Attributes inherited from SlotBrowser
InstrumentcurrentInstrument = nullptr
 
- Protected Attributes inherited from Browser
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 inherited from SlotBrowser
static bool currentFileHasSuffixFormatNameImplied
 
- Static Protected Attributes inherited from Browser
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 NumericLayerScrollingTextscrollingText
 
- 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
 
static bool favouritesVisible = false
 
static bool banksVisible = false
 

Member Function Documentation

◆ buttonAction()

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

Reimplemented from Browser.

◆ currentFileChanged()

void LoadInstrumentPresetUI::currentFileChanged ( int32_t movementDirection)
overrideprotectedvirtual

Reimplemented from Browser.

◆ doPresetNavigation()

PresetNavigationResult LoadInstrumentPresetUI::doPresetNavigation ( int32_t offset,
Instrument * oldInstrument,
Availability availabilityRequirement,
bool doBlink )

Caller must call emptyFileItems() at some point after calling this function - unless an error is returned Caller must remove OLED working animation after calling this too.

◆ enterKeyPress()

void LoadInstrumentPresetUI::enterKeyPress ( )
overrideprotectedvirtual

Implements QwertyUI.

◆ exitAction()

void LoadInstrumentPresetUI::exitAction ( )
overrideprivatevirtual

Reimplemented from Browser.

◆ folderContentsReady()

void LoadInstrumentPresetUI::folderContentsReady ( int32_t entryDirection)
overrideprotectedvirtual

Reimplemented from Browser.

◆ getGreyoutColsAndRows()

bool LoadInstrumentPresetUI::getGreyoutColsAndRows ( uint32_t * cols,
uint32_t * rows )
overridevirtual

Reimplemented from UI.

◆ getUIType()

UIType LoadInstrumentPresetUI::getUIType ( )
inlineoverridevirtual

What type of UI is this? e.g. UIType::ARRANGER.

Implements UI.

◆ opened()

bool LoadInstrumentPresetUI::opened ( )
overridevirtual

Reimplemented from Browser.

◆ padAction()

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

Reimplemented from Browser.

◆ renderSidebar()

bool LoadInstrumentPresetUI::renderSidebar ( uint32_t whichRows,
RGB image[][kDisplayWidth+kSideBarWidth],
uint8_t occupancyMask[][kDisplayWidth+kSideBarWidth] )
overridevirtual

Reimplemented from UI.

◆ timerCallback()

ActionResult LoadInstrumentPresetUI::timerCallback ( )
overridevirtual

Reimplemented from UI.

◆ verticalEncoderAction()

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

Reimplemented from Browser.


The documentation for this class was generated from the following files: