64class Browser :
public QwertyUI {
69 virtual Error getCurrentFilePath(
String* path) = 0;
70 ActionResult buttonAction(deluge::hid::Button b,
bool on,
bool inCardRoutine)
override;
71 ActionResult padAction(int32_t x, int32_t y, int32_t velocity)
override;
72 ActionResult verticalEncoderAction(int32_t offset,
bool inCardRoutine)
override;
73 void currentFileDeleted();
74 Error goIntoFolder(
char const* folderName);
76 Error createFoldersRecursiveIfNotExists(
const char* path);
77 void selectEncoderAction(int8_t offset)
override;
78 static FileItem* getCurrentFileItem();
79 Error readFileItemsForFolder(
char const* filePrefixHere,
bool allowFolders,
char const** allowedFileExtensionsHere,
80 char const* filenameToStartAt, int32_t newMaxNumFileItems,
81 int32_t newCatalogSearchDirection = CATALOG_SEARCH_BOTH);
82 Error setFileByFullPath(OutputType outputType,
char const* fullPath);
85 static void emptyFileItems();
86 static void deleteSomeFileItems(int32_t startAt, int32_t stopAt);
87 static void deleteFolderAndDuplicateItems(Availability instrumentAvailabilityRequirement = Availability::ANY);
88 Error getUnusedSlot(OutputType outputType,
String* newName,
char const* thingName);
89 bool opened()
override;
90 void cullSomeFileItems();
97 static int32_t numFileItemsDeletedAtStart;
98 static int32_t numFileItemsDeletedAtEnd;
99 static char const* firstFileItemRemaining;
100 static char const* lastFileItemRemaining;
102 static OutputType outputTypeToLoad;
103 static char const* filenameToStartSearchAt;
112 Error setEnteredTextFromCurrentFilename();
113 Error goUpOneDirectoryLevel();
114 virtual Error arrivedInNewFolder(int32_t direction,
char const* filenameToStartAt =
nullptr,
115 char const* defaultDir =
nullptr);
116 bool predictExtendedText()
override;
117 void goIntoDeleteFileContextMenu();
118 ActionResult mainButtonAction(
bool on);
119 virtual void exitAction();
120 virtual ActionResult backButtonAction();
121 virtual void folderContentsReady(int32_t entryDirection) {}
122 virtual void currentFileChanged(int32_t movementDirection) {}
123 void displayText(
bool blinkImmediately =
false)
override;
124 static Slot getSlot(
char const* displayName);
125 Error readFileItemsFromFolderAndMemory(Song* song, OutputType outputType,
char const* filePrefixHere,
126 char const* filenameToStartAt,
char const* defaultDirToAlsoTry,
127 bool allowFoldersint,
128 Availability availabilityRequirement = Availability::ANY,
129 int32_t newCatalogSearchDirection = CATALOG_SEARCH_RIGHT);
130 void favouritesChanged();
133 int32_t calculateNewFileIndex(int8_t offset);
134 Error handleIndexBoundsAndReload(int32_t& new_file_index, int8_t offset);
135 Error handleIndexBelowZero(int32_t& new_file_index, int8_t offset);
136 Error handleIndexAboveMax(int32_t& new_file_index, int8_t offset);
137 Error reloadItemsAndUpdateIndex(int32_t& new_file_index, int8_t offset,
bool use_entered_text,
138 int32_t original_movement = 1);
139 Error reloadFromOneEnd(int32_t& new_file_index, int32_t search_direction);
140 void updateUIState();
142 static int32_t fileIndexSelected;
144 static int32_t scrollPosVertical;
147 static bool qwertyVisible;
148 static bool arrivedAtFileByTyping;
149 static bool allowFoldersSharingNameWithFile;
150 static char const** allowedFileExtensions;
151 static int8_t previous_offset_direction;
152 static bool loading_delayed_during_fast_scroll;
153 static int32_t reversal_screen_top_index;
154 const uint8_t* fileIcon;
155 const uint8_t* fileIconPt2;
156 int32_t fileIconPt2Width;
159 static int8_t numberEditPos;
160 static NumericLayerScrollingText* scrollingText;
161 bool shouldWrapFolderContents;
163 bool mayDefaultToBrandNewNameOnEntry;
164 bool qwertyAlwaysVisible;
166 char const* filePrefix;
167 bool shouldInterpretNoteNamesForThisBrowser;