FabGL
ESP32 Display Controller and Graphics Library
InputBox Class Reference

InputBox is an helper class which allows to create simple UI interfaces, like wizards or simple input boxes. More...

#include <inputbox.h>

Public Member Functions

 InputBox (uiApp *app=nullptr)
 Creates a new InputBox instance. More...
 
void begin (char const *modeline=nullptr, int viewPortWidth=-1, int viewPortHeight=-1, int displayColors=16)
 Initializes InputBox from VGA modeline, using a VGA16Controller. More...
 
void begin (BitmappedDisplayController *displayController)
 Initializes InputBox from already initialized display controller. More...
 
void end ()
 Cleanup resources and eventually disable VGA output. More...
 
InputResult fileSelector (char const *titleText, char const *messageText, char *inOutDirectory, int maxDirectoryLength, char *inOutFilename, int maxFilenameLength, char const *buttonCancelText="Cancel", char const *buttonOKText="OK")
 Selects a file and directory starting from the specified path. More...
 
InputResult folderBrowser (char const *titleText, char const *directory="/", char const *buttonOKText="Close")
 Shows a dialog with files and folders and buttons to create new folders, delete and rename folders and files. More...
 
BitmappedDisplayControllergetDisplayController ()
 Gets created or assigned display controller. More...
 
InputResult getLastResult ()
 Gets last dialog result. More...
 
int menu (char const *titleText, char const *messageText, char const *itemsText, char separator=';')
 Shows a dialog with a label and a list box. The dialog exits when an item is selected, just like a menu. More...
 
int menu (char const *titleText, char const *messageText, StringList *items)
 Shows a dialog with a label and a list box. The dialog exits when an item is selected, just like a menu. More...
 
InputResult message (char const *titleText, char const *messageText, char const *buttonCancelText=nullptr, char const *buttonOKText="OK")
 Shows a dialog with just a label. More...
 
InputResult messageFmt (char const *titleText, char const *buttonCancelText, char const *buttonOKText, const char *format,...)
 Shows a dialog with a just a label. Allows printf like formatted text. More...
 
template<typename Func >
InputResult progressBox (char const *titleText, char const *buttonCancelText, bool hasProgressBar, int width, Func execFunc)
 Shows a dialog with a label and a progress bar, updated dynamically by a user function. More...
 
int select (char const *titleText, char const *messageText, char const *itemsText, char separator=';', char const *buttonCancelText="Cancel", char const *buttonOKText="OK")
 Shows a dialog with a label and a list box. More...
 
InputResult select (char const *titleText, char const *messageText, StringList *items, char const *buttonCancelText="Cancel", char const *buttonOKText="OK")
 Shows a dialog with a label and a list box. More...
 
int selectedSubItem ()
 Gets the selected item on a multichoice button. More...
 
void setAutoOK (int timeout)
 Specifies a timeout for the dialog. More...
 
void setBackgroundColor (RGB888 const &value)
 Sets the background color. More...
 
void setMinButtonsWidth (int value)
 Sets minimum buttons size. More...
 
void setupButton (int index, char const *text, char const *subItems=nullptr, int subItemsHeight=80)
 Setups extended button or split-button. More...
 
InputResult textInput (char const *titleText, char const *labelText, char *inOutString, int maxLength, char const *buttonCancelText="Cancel", char const *buttonOKText="OK", bool passwordMode=false)
 Shows a dialog with a label and a text edit box. More...
 

Public Attributes

Delegate< Canvas * > onPaint
 Paint event delegate. More...
 

Detailed Description

InputBox is an helper class which allows to create simple UI interfaces, like wizards or simple input boxes.

Definition at line 322 of file inputbox.h.


The documentation for this class was generated from the following files: