「App:Library:FabGL:Class:InputBox」の版間の差分
提供: robot-jp wiki
ナビゲーションに移動検索に移動14行目: | 14行目: | ||
|- | |- | ||
|void '''begin''' (BitmappedDisplayController *displayController) | |void '''begin''' (BitmappedDisplayController *displayController) | ||
− | Initializes '''InputBox''' from already initialized display controller. More... | + | :Initializes '''InputBox''' from already initialized display controller. More... |
|- | |- | ||
|void '''end''' () | |void '''end''' () | ||
− | Cleanup resources and eventually disable VGA output. More... | + | :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") | + | |'''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... | + | :Selects a file and directory starting from the specified path. More... |
|- | |- | ||
|'''InputResult''' '''folderBrowser''' (char const *titleText, char const *directory="/", char const *buttonOKText="Close") | |'''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... | + | :Shows a dialog with files and folders and buttons to create new folders, delete and rename folders and files. More... |
|- | |- | ||
|'''BitmappedDisplayController *''' '''getDisplayController''' () | |'''BitmappedDisplayController *''' '''getDisplayController''' () | ||
− | Gets created or assigned display controller. More... | + | :Gets created or assigned display controller. More... |
|- | |- | ||
|'''InputResult''' '''getLastResult''' () | |'''InputResult''' '''getLastResult''' () | ||
− | Gets last dialog result. More... | + | :Gets last dialog result. More... |
|- | |- | ||
|int '''menu''' (char const *titleText, char const *messageText, char const *itemsText, char separator=';') | |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... | + | :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) | |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... | + | :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") | |'''InputResult''' '''message''' (char const *titleText, char const *messageText, char const *buttonCancelText=nullptr, char const *buttonOKText="OK") | ||
− | Shows a dialog with just a label. More... | + | :Shows a dialog with just a label. More... |
|- | |- | ||
|'''InputResult''' '''messageFmt''' (char const *titleText, char const *buttonCancelText, char const *buttonOKText, const char *format,...) | |'''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... | + | :Shows a dialog with a just a label. Allows printf like formatted text. More... |
|- | |- | ||
|template<typename Func > | |template<typename Func > | ||
|- | |- | ||
|'''InputResult''' '''progressBox''' (char const *titleText, char const *buttonCancelText, bool hasProgressBar, int '''width''', Func execFunc) | |'''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... | + | :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") | |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... | + | :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") | |'''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... | + | :Shows a dialog with a label and a list box. More... |
|- | |- | ||
|int '''selectedSubItem''' () | |int '''selectedSubItem''' () | ||
− | Gets the selected item on a multichoice button. More... | + | :Gets the selected item on a multichoice button. More... |
|- | |- | ||
|void '''setAutoOK''' (int timeout) | |void '''setAutoOK''' (int timeout) | ||
− | Specifies a timeout for the dialog. More... | + | :Specifies a timeout for the dialog. More... |
|- | |- | ||
|void '''setBackgroundColor''' ('''RGB888''' const &value) | |void '''setBackgroundColor''' ('''RGB888''' const &value) | ||
− | Sets the background color. More... | + | :Sets the background color. More... |
|- | |- | ||
|void '''setMinButtonsWidth''' (int value) | |void '''setMinButtonsWidth''' (int value) | ||
− | Sets minimum buttons size. More... | + | :Sets minimum buttons size. More... |
|- | |- | ||
|void '''setupButton''' (int index, char const *text, char const *subItems=nullptr, int subItemsHeight=80) | |void '''setupButton''' (int index, char const *text, char const *subItems=nullptr, int subItemsHeight=80) | ||
− | Setups extended button or split-button. More... | + | :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) | |'''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... | + | :Shows a dialog with a label and a text edit box. More... |
|} | |} |
2022年3月21日 (月) 21:19時点における版
InputBox
InputBox is an helper class which allows to create simple UI interfaces, like wizards or simple input boxes.
#include <inputbox.h> |
InputBox (uiApp *app=nullptr)
|
void begin (char const *modeline=nullptr, int viewPortWidth=-1, int viewPortHeight=-1, int displayColors=16)
|
void begin (BitmappedDisplayController *displayController)
|
void end ()
|
InputResult fileSelector (char const *titleText, char const *messageText, char *inOutDirectory, int maxDirectoryLength, char *inOutFilename, int :maxFilenameLength, char const *buttonCancelText="Cancel", char const *buttonOKText="OK")
|
InputResult folderBrowser (char const *titleText, char const *directory="/", char const *buttonOKText="Close")
|
BitmappedDisplayController * getDisplayController ()
|
InputResult getLastResult ()
|
int menu (char const *titleText, char const *messageText, char const *itemsText, char separator=';')
|
int menu (char const *titleText, char const *messageText, StringList *items)
|
InputResult message (char const *titleText, char const *messageText, char const *buttonCancelText=nullptr, char const *buttonOKText="OK")
|
InputResult messageFmt (char const *titleText, char const *buttonCancelText, char const *buttonOKText, const char *format,...)
|
template<typename Func > |
InputResult progressBox (char const *titleText, char const *buttonCancelText, bool hasProgressBar, int width, Func execFunc)
|
int select (char const *titleText, char const *messageText, char const *itemsText, char separator=';', char const *buttonCancelText="Cancel", char const *buttonOKText="OK")
|
InputResult select (char const *titleText, char const *messageText, StringList *items, char const *buttonCancelText="Cancel", char const *buttonOKText="OK")
|
int selectedSubItem ()
|
void setAutoOK (int timeout)
|
void setBackgroundColor (RGB888 const &value)
|
void setMinButtonsWidth (int value)
|
void setupButton (int index, char const *text, char const *subItems=nullptr, int subItemsHeight=80)
|
InputResult textInput (char const *titleText, char const *labelText, char *inOutString, int maxLength, char const *buttonCancelText="Cancel", char const *buttonOKText="OK", bool passwordMode=false)
|