The definition of the base dialog object, that can be used with any display type. These are designed to handle simple user informational pages and questions. More...
Go to the source code of this file.
Classes | |
class | BaseDialogController |
class | BaseDialog |
class | LocalDialogButtonMenuItem |
class | MenuBasedDialog |
Typedefs | |
typedef void(* | CompletedHandlerFn) (ButtonType buttonPressed, void *yourData) |
typedef void(* | DialogInitialiser) (MenuBasedDialog *) |
Enumerations | |
enum | ButtonType : uint8_t { BTNTYPE_OK , BTNTYPE_ACCEPT , BTNTYPE_CANCEL , BTNTYPE_CLOSE , BTNTYPE_NONE , BTNTYPE_CUSTOM0 = 15 , BTNTYPE_CUSTOM1 , BTNTYPE_CUSTOM2 , BTNTYPE_CUSTOM3 , BTNTYPE_CUSTOM4 , BTNTYPE_CUSTOM5 , BTNTYPE_CUSTOM6 , BTNTYPE_CUSTOM7 } |
Functions | |
int | dialogButtonRenderFn (RuntimeMenuItem *item, uint8_t, RenderFnMode mode, char *buffer, int bufferSize) |
void | withMenuDialogIfAvailable (DialogInitialiser dlgFn) |
The definition of the base dialog object, that can be used with any display type. These are designed to handle simple user informational pages and questions.
typedef void(* CompletedHandlerFn) (ButtonType buttonPressed, void *yourData) |
If you need to capture the finished state of the dialog, then you create a function to this spec and it will be called back once the dialog is dismissed. Example: void completedCallback(ButtonType buttonPressed);
typedef void(* DialogInitialiser) (MenuBasedDialog *) |
a callback method that is used alongside withMenuDialogIfAvailable(..)
enum ButtonType : uint8_t |
The types of button that can be passed to setButton for button 1 and button 2
int dialogButtonRenderFn | ( | RuntimeMenuItem * | item, |
uint8_t | , | ||
RenderFnMode | mode, | ||
char * | buffer, | ||
int | bufferSize | ||
) |
This is the render function that should be used with the LocalDialogButtonMenuItem
item | |
mode | |
buffer | |
bufferSize |
void withMenuDialogIfAvailable | ( | DialogInitialiser | dlgFn | ) |
A small helper that checks if we can use the dialog, and then calls the provided function if we can. Note: only works with MenuBasedDialog
dlgFn | the function to be called with the dialog object pointer, if getting the dialog was successful. |