MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / FileView

Class FileView

LibLemon/include/lemon/gui/widgets.h:360–395  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

358 };
359
360 class FileView : public Container{
361 protected:
362 int pathBoxHeight = 20;
363 int sidepanelWidth = 120;
364 char** filePointer;
365
366 void(*OnFileOpened)(const char*, FileView*) = nullptr;
367
368 GridView* fileList;
369 TextBox* pathBox;
370
371 Widget* active;
372
373 ListColumn nameCol, sizeCol;
374
375 public:
376 static surface_t diskIcon;
377 static surface_t folderIcon;
378 static surface_t fileIcon;
379 static surface_t textFileIcon;
380 static surface_t jsonFileIcon;
381 static surface_t ramIcon;
382 static surface_t diskIconSml;
383 static surface_t folderIconSml;
384
385 std::string currentPath;
386 FileView(rect_t bounds, const char* path, void(*_OnFileOpened)(const char*, FileView*) = nullptr);
387
388 void Refresh();
389
390 void OnSubmit(std::string& path);
391 static void OnListSubmit(GridItem& item, GridView* list);
392 static void OnTextBoxSubmit(TextBox* textBox);
393
394 void (*OnFileSelected)(std::string& file, FileView* fv) = nullptr;
395 };
396
397 class ScrollView : public Container{
398 ScrollBar sBarVertical;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected