62class Browser :
public QwertyUI {
67 virtual Error getCurrentFilePath(
String* path) = 0;
68 ActionResult buttonAction(deluge::hid::Button b,
bool on,
bool inCardRoutine)
override;
69 ActionResult padAction(int32_t x, int32_t y, int32_t velocity)
override;
70 ActionResult verticalEncoderAction(int32_t offset,
bool inCardRoutine)
override;
71 void currentFileDeleted();
72 Error goIntoFolder(
char const* folderName);
74 Error createFoldersRecursiveIfNotExists(
const char* path);
75 void selectEncoderAction(int8_t offset)
override;
76 static FileItem* getCurrentFileItem();
77 Error readFileItemsForFolder(
char const* filePrefixHere,
bool allowFolders,
char const** allowedFileExtensionsHere,
78 char const* filenameToStartAt, int32_t newMaxNumFileItems,
79 int32_t newCatalogSearchDirection = CATALOG_SEARCH_BOTH);
80 Error setFileByFullPath(OutputType outputType,
char const* fullPath);
83 static void emptyFileItems();
84 static void deleteSomeFileItems(int32_t startAt, int32_t stopAt);
85 static void deleteFolderAndDuplicateItems(Availability instrumentAvailabilityRequirement = Availability::ANY);
86 Error getUnusedSlot(OutputType outputType,
String* newName,
char const* thingName);
87 bool opened()
override;
88 void cullSomeFileItems();
95 static int32_t numFileItemsDeletedAtStart;
96 static int32_t numFileItemsDeletedAtEnd;
101 static String firstFileItemRemaining;
102 static String lastFileItemRemaining;
104 static OutputType outputTypeToLoad;
105 static char const* filenameToStartSearchAt;
110 return ActionResult::ACTIONED_AND_CAUSED_CHANGE;
112 bool isFavouritesVisible()
override;
113 bool isBanksVisible()
override;
116 Error setEnteredTextFromCurrentFilename();
117 Error goUpOneDirectoryLevel();
118 virtual Error arrivedInNewFolder(int32_t direction,
char const* filenameToStartAt =
nullptr,
119 char const* defaultDir =
nullptr);
120 bool predictExtendedText()
override;
121 void goIntoDeleteFileContextMenu();
122 ActionResult mainButtonAction(
bool on);
123 virtual void exitAction();
124 virtual ActionResult backButtonAction();
125 virtual void folderContentsReady(int32_t entryDirection) {}
126 virtual void currentFileChanged(int32_t movementDirection) {}
127 void displayText(
bool blinkImmediately =
false)
override;
129 void clampFileSelectionAndScroll(
bool allowNoFileSelection =
true);
130 static Slot getSlot(
char const* displayName);
134 Error readFileItemsFromFolderAndMemory(Song* song, OutputType outputType,
char const* filePrefixHere,
135 char const* filenameToStartAt,
char const* defaultDirToAlsoTry,
136 bool allowFoldersint,
137 Availability availabilityRequirement = Availability::ANY,
138 int32_t newCatalogSearchDirection = CATALOG_SEARCH_RIGHT);
139 void favouritesChanged();
141 static int32_t fileIndexSelected;
143 static int32_t scrollPosVertical;
146 static bool qwertyVisible;
147 static bool arrivedAtFileByTyping;
148 static bool allowFoldersSharingNameWithFile;
149 static char const** allowedFileExtensions;
151 const uint8_t* fileIcon;
152 const uint8_t* fileIconPt2;
153 int32_t fileIconPt2Width;
156 static int8_t numberEditPos;
157 static NumericLayerScrollingText* scrollingText;
158 bool shouldWrapFolderContents;
160 bool mayDefaultToBrandNewNameOnEntry;
161 bool qwertyAlwaysVisible;
163 char const* filePrefix;
164 bool shouldInterpretNoteNamesForThisBrowser;