An interface for handling choosing a file.
More...
#include <apps/FileBrowser.h>
|
| | FileBrowser (__FlashStringHelper const *browserTitle) |
| | FileBrowser (__FlashStringHelper const *browserTitle, __FlashStringHelper const *path) |
| bool | openFile (uint8_t entryIndex, OSCR::Storage::File &selectedFile, oflag_t oflag) |
|
bool | getPath (char buffer[], size_t bufferSize=OSCR::Storage::kMaxPathLength) |
|
String | getPath () |
|
| void | setup () |
| void | onPageChange () |
|
void | chdir () |
|
void | chdir (uint8_t entryIndex) |
|
void | cwdRefresh () |
|
void | sort () |
| bool | onConfirm () |
An interface for handling choosing a file.
Create a file browser interface.
- Note
- Available memory on embedded microcontrollers is limited. You should consider using OSCR::UI::menu() instead of implementing this class directly.
◆ FileBrowser() [1/2]
| OSCR::Apps::FileBrowser::FileBrowser |
( |
__FlashStringHelper const * | browserTitle | ) |
|
Create a file browser interface for a path.
- Parameters
-
| browserTitle | A flash string to use for the menu title. |
- Todo
- Actually use the path parameter.
◆ FileBrowser() [2/2]
| OSCR::Apps::FileBrowser::FileBrowser |
( |
__FlashStringHelper const * | browserTitle, |
|
|
__FlashStringHelper const * | path ) |
Create a file browser interface for a path.
- Parameters
-
| browserTitle | A flash string to use for the menu title. |
| path | Directory path to start in. |
- Todo
- Actually use the path parameter.
◆ onConfirm()
| bool OSCR::Apps::FileBrowser::onConfirm |
( |
| ) |
|
|
protectedvirtual |
◆ onPageChange()
| void OSCR::Apps::FileBrowser::onPageChange |
( |
| ) |
|
|
protectedvirtual |
◆ openFile()
| bool OSCR::Apps::FileBrowser::openFile |
( |
uint8_t | entryIndex, |
|
|
OSCR::Storage::File & | selectedFile, |
|
|
oflag_t | oflag ) |
Get the file represented by a specific index.
- Parameters
-
| entryIndex | Index of the desired file. |
| selectedFile | Variable to store the file in. |
◆ setup()
| void OSCR::Apps::FileBrowser::setup |
( |
| ) |
|
|
protectedvirtual |
The documentation for this class was generated from the following files:
- C:/Developer/Projects/OSCR/oscr-firmware/include/apps/FileBrowser.h
- apps/FileBrowser.cpp