FabGL
ESP32 Display Controller and Graphics Library
uiApp Class Reference

Represents the whole application base class. More...

#include <fabui.h>

Inheritance diagram for uiApp:

Public Member Functions

uiWindowactiveWindow ()
 Gets a pointer to the currently active window. More...
 
uiAppapp ()
 Determines the app that owns this object. More...
 
uiAppPropsappProps ()
 Sets or gets application properties. More...
 
uiWindowcapturedMouseWindow ()
 Determines which window is capturing mouse. More...
 
void destroyWindow (uiWindow *window)
 Destroys a window. More...
 
void enableKeyboardAndMouseEvents (bool value)
 Enables or disables mouse and keyboard events. More...
 
int endModalWindow (ModalWindowState *state)
 Ends modal window processing. More...
 
uiMessageBoxResult fileDialog (char const *title, char *inOutDirectory, int maxDirNameSize, char *inOutFilename, int maxFileNameSize, char const *buttonOKText, char const *buttonCancelText, int frameWidth=200, int frameHeight=250)
 Displays a modal open/save dialog box. More...
 
uiWindowfocusedWindow ()
 Gets the focused window (control) More...
 
virtual void init ()
 Method to inherit to implement an application. More...
 
ModalWindowState * initModalWindow (uiWindow *window)
 Begins modal window processing. More...
 
uiMessageBoxResult inputBox (char const *title, char const *text, char *inOutString, int maxLength, char const *button1Text, char const *button2Text=nullptr)
 Displays a modal dialog box with a text, a text edit and up to two buttons. More...
 
bool insertEvent (uiEvent const *event)
 Inserts (first position) an event in the event queue and returns without waiting for the receiver to process the event. More...
 
void joinAsyncRun ()
 Waits for runAsync termination. More...
 
void killTimer (uiTimerHandle handle)
 Kills a timer. More...
 
int lastUserActionTime ()
 Returns time when last user action (mouse/keyboard) has been received, measured in milliseconds since boot. More...
 
void maximizeFrame (uiFrame *frame, bool value)
 Maximizes or restores a frame. More...
 
uiMessageBoxResult messageBox (char const *title, char const *text, char const *button1Text, char const *button2Text=nullptr, char const *button3Text=nullptr, uiMessageBoxIcon icon=uiMessageBoxIcon::Question)
 Displays a modal dialog box with an icon, text and some buttons. More...
 
void minimizeFrame (uiFrame *frame, bool value)
 Minimizes or restores a frame. More...
 
uiWindowmoveFocus (int delta)
 Move focus to a control with current focus index plus a delta. More...
 
void moveWindow (uiWindow *window, int x, int y)
 Moves a window. More...
 
uiObjectTypeobjectType ()
 Determines the object type. More...
 
bool postEvent (uiEvent const *event)
 Places an event in the event queue and returns without waiting for the receiver to process the event. More...
 
void processEvents ()
 Processes all events in queue. More...
 
bool processModalWindowEvents (ModalWindowState *state, int timeout)
 Processes all messages from modal window. More...
 
void quit (int exitCode)
 Terminates application and free resources. More...
 
void repaintRect (Rect const &rect)
 Repaints a screen area. More...
 
void repaintWindow (uiWindow *window)
 Repaints a window. More...
 
void reshapeWindow (uiWindow *window, Rect const &rect)
 Reshapes a window. More...
 
void resizeWindow (uiWindow *window, int width, int height)
 Resizes a window. More...
 
void resizeWindow (uiWindow *window, Size size)
 Resizes a window. More...
 
uiFramerootWindow ()
 Gets a pointer to the root window. More...
 
int run (BitmappedDisplayController *displayController, Keyboard *keyboard=nullptr, Mouse *mouse=nullptr)
 Initializes application and executes the main event loop. More...
 
uiApprunAsync (BitmappedDisplayController *displayController, int taskStack=3000, Keyboard *keyboard=nullptr, Mouse *mouse=nullptr)
 Initializes application and executes asynchronously the main event loop. More...
 
uiWindowscreenToWindow (Point &point)
 Determines which window a point belongs to. More...
 
uiWindowsetActiveWindow (uiWindow *value)
 Sets the active window. More...
 
uiWindowsetFocusedWindow (uiWindow *value)
 Sets the focused window (control) More...
 
void setStyle (uiStyle *value)
 Sets application controls style. More...
 
uiTimerHandle setTimer (uiEvtHandler *dest, int periodMS)
 Setups a timer. More...
 
int showModalWindow (uiWindow *window)
 Makes a window visible and handles it has a modal window. More...
 
void showWindow (uiWindow *window, bool value)
 Makes a window visible or invisible. More...
 
uiStyle * style ()
 Gets current application controls style. More...
 

Public Attributes

Delegate< uiTimerHandle > onTimer
 Timer event delegate. More...
 

Detailed Description

Represents the whole application base class.

FabGL UI apps must inherit from uiApp, create UI elements in uiApp.init() method, and finally call uiApp.run() to start the application. uiApp is responsible for events queue handling, windows manager, windows and controls lifecycle and memory management.

Definition at line 3105 of file fabui.h.


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