37 #include "freertos/FreeRTOS.h" 38 #include "freertos/queue.h" 39 #include "freertos/timers.h" 87 #define FABGLIB_UI_EVENTS_QUEUE_SIZE 256 104 UIEVT_MOUSEBUTTONDOWN,
129 UIEVT_CHILDKILLFOCUS,
138 typedef void * uiTimerHandle;
169 union uiEventParams {
171 uiMouseEventInfo mouse;
179 char const * debugMsg;
183 uiTimerHandle timerHandle;
189 uiFocusInfo focusInfo;
194 uiEvent() : dest(nullptr), id(UIEVT_NULL) { }
195 uiEvent(uiEvent
const & e) { dest = e.dest;
id = e.id; params = e.params; }
196 uiEvent(uiEvtHandler * dest_, uiEventID id_) : dest(dest_), id(id_) { }
282 virtual void processEvent(uiEvent * event);
294 void setApp(
uiApp * value) { m_app = value; }
360 #define UIWINDOW_PARENTCENTER Point(-1000, -1000) 383 virtual void processEvent(uiEvent * event);
385 void setCanvas(
Canvas * canvas) { m_canvas = canvas; }
606 Canvas * canvas() {
return m_canvas; }
655 void removeChild(
uiWindow * child,
bool freeChild =
true);
656 void moveChildOnTop(
uiWindow * child);
660 Size sizeAtMouseDown() {
return m_sizeAtMouseDown; }
661 Point posAtMouseDown() {
return m_posAtMouseDown; }
663 virtual Size minWindowSize() {
return Size(0, 0); }
665 void beginPaint(uiEvent * paintEvent, Rect
const & clippingRect);
667 void generatePaintEvents(Rect
const & paintRect);
668 void reshape(Rect
const & r);
687 Rect m_savedScreenRect;
689 uiWindowState m_state;
691 uiWindowProps m_windowProps;
693 uiWindowStyle m_windowStyle;
695 Point m_mouseDownPos;
697 Point m_posAtMouseDown;
698 Size m_sizeAtMouseDown;
704 int16_t m_focusIndex;
712 uint32_t m_styleClassID;
715 bool m_parentProcessKbdEvents;
763 enum class uiFrameItem : uint8_t {
803 virtual void processEvent(uiEvent * event);
810 char const *
title() {
return m_title; }
846 int getNextFreeFocusIndex() {
return m_nextFreeFocusIndex++; }
898 Size minWindowSize();
899 int titleBarHeight();
905 int paintButtons(
Rect const & bkgRect);
906 void movingCapturedMouse(
int mouseX,
int mouseY,
bool mouseIsDown);
907 void movingFreeMouse(
int mouseX,
int mouseY);
908 uiFrameItem getFrameItemAt(
int x,
int y);
909 Rect getBtnRect(
int buttonIndex);
910 void handleButtonsClick(
int x,
int y,
bool doubleClick);
911 void drawTextWithEllipsis(FontInfo
const * fontInfo,
int X,
int Y,
char const * text,
int maxX);
912 void drawReshapingBox(
Rect boxRect);
915 static constexpr
int CORNERSENSE = 10;
925 uiFrameItem m_mouseDownFrameItem;
926 uiFrameItem m_mouseMoveFrameItem;
928 Rect m_lastReshapingBox;
930 int m_nextFreeFocusIndex;
960 virtual void processEvent(uiEvent * event);
978 enum class uiScrollBarItem {
1013 virtual void processEvent(uiEvent * event);
1107 virtual void setScrollBar(
uiOrientation orientation,
int position,
int visible,
int range,
bool repaintScrollbar =
true);
1112 void paintScrollableControl();
1113 void paintScrollBars();
1114 Rect getVScrollBarRects(
Rect * topButton =
nullptr,
Rect * bottonButton =
nullptr,
Rect * bar =
nullptr);
1115 Rect getHScrollBarRects(
Rect * leftButton =
nullptr,
Rect * rightButton =
nullptr,
Rect * bar =
nullptr);
1116 uiScrollBarItem getItemAt(
int x,
int y);
1118 void handleFreeMouseMove(
int mouseX,
int mouseY);
1119 void handleCapturedMouseMove(
int mouseX,
int mouseY);
1120 void handleButtonsScroll();
1121 void handlePageScroll();
1125 int16_t m_HScrollBarPosition;
1126 int16_t m_HScrollBarVisible;
1127 int16_t m_HScrollBarRange;
1128 int16_t m_VScrollBarPosition;
1129 int16_t m_VScrollBarVisible;
1130 int16_t m_VScrollBarRange;
1136 int16_t m_mouseDownHScrollBarPosition;
1137 int16_t m_mouseDownVScrollBarPosition;
1139 uiScrollBarItem m_mouseOverItem;
1142 uiTimerHandle m_scrollTimer;
1194 virtual void processEvent(uiEvent * event);
1203 void setText(
char const * value);
1210 char const *
text() {
return m_text; }
1251 void paintContent(
Rect const &
rect);
1326 virtual void processEvent(uiEvent * event);
1349 void setText(
char const * value);
1356 char const *
text() {
return m_text; }
1369 virtual Rect getEditRect();
1373 void paintTextEdit();
1374 void paintContent();
1376 uint8_t
const * getCharInfo(
char ch,
int *
width);
1377 int charColumnToWindowX(
int col);
1379 void moveCursor(
int col,
int selCol);
1380 int getColFromMouseX(
int mouseX);
1382 void checkAllocatedSpace(
int requiredLength);
1383 void insert(
char c);
1385 int getWordPosAtLeft();
1386 int getWordPosAtRight();
1387 void selectWordAt(
int mouseX);
1444 virtual void processEvent(uiEvent * event);
1453 void setText(
char const * value);
1469 char const *
text() {
return m_text; }
1495 uint16_t m_textExtent;
1532 virtual void processEvent(uiEvent * event);
1601 virtual void processEvent(uiEvent * event);
1649 virtual void processEvent(uiEvent * event);
1672 void paintPaintBox();
1702 virtual void processEvent(uiEvent * event);
1720 void paintColorBox();
1763 virtual void processEvent(uiEvent * event);
1793 void selectItem(
int index,
bool add =
false,
bool range =
false);
1826 virtual int items_getCount() = 0;
1827 virtual void items_deselectAll() = 0;
1828 virtual void items_select(
int index,
bool select) = 0;
1829 virtual bool items_selected(
int index) = 0;
1830 virtual void items_draw(
int index,
const Rect & itemRect) = 0;
1834 void paintListBox();
1835 int getItemAtMousePos(
int mouseX,
int mouseY);
1836 void handleMouseDown(
int mouseX,
int mouseY);
1838 void makeItemVisible(
int index);
1842 int m_firstVisibleItem;
1874 StringList &
items() {
return m_items; }
1878 virtual int items_getCount() {
return m_items.count(); }
1879 virtual void items_deselectAll() { m_items.deselectAll(); }
1880 virtual void items_select(
int index,
bool select) { m_items.select(index, select); }
1881 virtual bool items_selected(
int index) {
return m_items.selected(index); }
1882 virtual void items_draw(
int index,
const Rect & itemRect);
1956 void processEvent(uiEvent * event);
1973 virtual int items_getCount() {
return m_dir.
count(); }
1974 virtual void items_deselectAll() { m_selected = -1; }
1975 virtual void items_select(
int index,
bool select);
1976 virtual bool items_selected(
int index) {
return index == m_selected; }
1977 virtual void items_draw(
int index,
const Rect & itemRect);
2018 virtual int items_getCount() {
return 16; }
2019 virtual void items_deselectAll() { }
2020 virtual void items_select(
int index,
bool select) {
if (select) m_selectedColor = (
Color)index; }
2021 virtual bool items_selected(
int index) {
return index == (int)m_selectedColor; }
2022 virtual void items_draw(
int index,
const Rect & itemRect);
2027 Color m_selectedColor;
2074 virtual void processEvent(uiEvent * event);
2126 virtual void updateEditControl() = 0;
2128 Size getEditControlSize();
2132 void paintComboBox();
2133 Rect getButtonRect();
2135 void closeListBox();
2136 void switchListBox();
2215 uiControl * editcontrol() {
return m_textEdit; }
2216 void updateEditControl();
2219 uiTextEdit * m_textEdit;
2220 uiListBox * m_listBox;
2268 uiControl * editcontrol() {
return m_colorBox; }
2269 void updateEditControl();
2272 uiColorBox * m_colorBox;
2273 uiColorListBox * m_colorListBox;
2325 virtual void processEvent(uiEvent * event);
2377 void paintCheckBox();
2379 void unCheckGroup();
2385 int16_t m_groupIndex;
2424 virtual void processEvent(uiEvent * event);
2483 void moveGripTo(
int x,
int y);
2493 int16_t m_ticksFrequency;
2502 virtual void setStyle(
uiObject *
object, uint32_t styleClassID) = 0;
2542 struct ModalWindowState {
2544 uiWindow * prevFocusedWindow;
2545 uiWindow * prevActiveWindow;
2546 uiWindow * prevModal;
2597 void quit(
int exitCode);
2617 void postDebugMsg(
char const * msg);
2619 virtual void processEvent(uiEvent * event);
2697 void captureMouse(
uiWindow * window);
2837 void combineMouseMoveEvents(
bool value) { m_combineMouseMoveEvents = value; }
2839 void showCaret(uiWindow * window);
2841 void setCaret(
bool value);
2843 void setCaret(Point
const & pos);
2845 void setCaret(Rect
const & rect);
2858 uiTimerHandle
setTimer(uiEvtHandler * dest,
int periodMS);
2883 void cleanWindowReferences(
uiWindow * window);
2923 uiMessageBoxResult inputBox(
char const * title,
char const * text,
char * inOutString,
int maxLength,
char const * button1Text,
char const * button2Text =
nullptr);
2928 virtual void init();
2955 Keyboard * keyboard() {
return m_keyboard; }
2957 Mouse * mouse() {
return m_mouse; }
2959 BitmappedDisplayController * displayController() {
return m_displayController; }
2961 Canvas * canvas() {
return m_canvas; }
2966 bool getEvent(uiEvent * event,
int timeOutMS);
2967 bool peekEvent(uiEvent * event,
int timeOutMS);
2972 void preprocessEvent(uiEvent * event);
2973 void preprocessMouseEvent(uiEvent * event);
2974 void preprocessKeyboardEvent(uiEvent * event);
2975 void filterModalEvent(uiEvent * event);
2977 static void timerFunc(TimerHandle_t xTimer);
2979 static void asyncRunTask(
void * arg);
2981 void blinkCaret(
bool forceOFF =
false);
2982 void suspendCaret(
bool value);
2985 BitmappedDisplayController * m_displayController;
2989 Keyboard * m_keyboard;
2993 uiAppProps m_appProps;
2995 QueueHandle_t m_eventsQueue;
2997 uiFrame * m_rootWindow;
2999 uiWindow * m_activeWindow;
3001 uiWindow * m_focusedWindow;
3003 uiWindow * m_capturedMouseWindow;
3005 uiWindow * m_freeMouseWindow;
3007 uiWindow * m_modalWindow;
3009 bool m_combineMouseMoveEvents;
3011 uiWindow * m_caretWindow;
3013 uiTimerHandle m_caretTimer;
3014 int m_caretInvertState;
3016 int m_lastMouseUpTimeMS;
3017 Point m_lastMouseUpPos;
Represents a 24 bit RGB color.
uiLabelStyle & labelStyle()
Sets or gets label style.
uiWindow * setActiveWindow(uiWindow *value)
Sets the active window.
uiWindowStyle & windowStyle()
Sets or gets window style.
void selectItem(int index, bool add=false, bool range=false)
Selects a listbox item.
Delegate onChange
Change event delegate.
uiTextEditStyle & textEditStyle()
Sets or gets text edit style.
int selectedItem()
Represents currently selected item.
A class with a set of drawing methods.
uiComboBoxStyle & comboBoxStyle()
Sets or gets combobox style.
Delegate onDblClick
Mouse double click event delegate.
Shows a list of 16 colors, one selectable.
A frame is a window with a title bar, maximize/minimize/close buttons and that is resizeable or movea...
int lastSelectedItem()
Gets the last selected item.
Contains details about the key event.
Rect rect(uiOrigin origin)
Determines the window bounding box.
ModalWindowState * initModalWindow(uiWindow *window)
Begins modal window processing.
uiTextEditStyle & textEditStyle()
Sets or gets text edit style.
uiTextEdit(uiWindow *parent, char const *text, const Point &pos, const Size &size, bool visible=true, uint32_t styleClassID=0)
Creates an instance of the object.
uiOrientation
Item direction/orientation.
void setScrollBar(uiOrientation orientation, int position, int visible, int range, bool repaintScrollbar)
Sets scrollbar position, visible portion and range.
int firstSelectedItem()
Gets the first selected item.
Represents the whole application base class.
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.
bool insertEvent(uiEvent const *event)
Inserts (first position) an event in the event queue and returns without waiting for the receiver to ...
This is a combination of a listbox and another component, base of all combobox components.
uiStyle * style()
Gets current application controls style.
void setText(char const *value)
Sets label text.
char const * text()
Gets current content of the text edit.
void selectItem(int index)
Selects an item.
Base class for all visible UI elements (Frames and Controls)
void update()
Reloads current directory content and repaints.
FileBrowser & content()
Contains current directory representation.
int run(BitmappedDisplayController *displayController, Keyboard *keyboard=nullptr, Mouse *mouse=nullptr)
Initializes application and executes the main event loop.
char const * directory()
Determines current directory.
void setup(int min, int max, int ticksFrequency)
Sets minimum, maximum position and ticks frequency.
A color box is a control that shows a single color.
void setParentProcessKbdEvents(bool value)
Enables a child window to send keyboard events to its parent.
uiColorBox(uiWindow *parent, const Point &pos, const Size &size, Color color=Color::BrightWhite, bool visible=true, uint32_t styleClassID=0)
Creates an instance of the object.
uiColorComboBox(uiWindow *parent, const Point &pos, const Size &size, int listHeight, bool visible=true, uint32_t styleClassID=0)
Creates an instance of the object.
FontInfo const * textFont
Shows a list of selectable string items.
Bitmap const * bitmap()
Gets image bitmap.
void bringAfter(uiWindow *insertionPoint)
Brings this window after another one.
Size size()
Determines the window size.
RGB888 mouseOverBackgroundButtonColor
uiPanelStyle & panelStyle()
Sets or gets panel style.
virtual void init()
Method to inherit to implement an application.
Contains the listbox style.
Contains the slider style.
uiWindow * parent()
Determines the parent window.
void setFocusIndex(int value)
Sets the focus index (aka tab-index)
int count()
Determines number of files in current directory.
uiAppProps & appProps()
Sets or gets application properties.
uiImage(uiWindow *parent, Bitmap const *bitmap, const Point &pos, const Size &size=Size(0, 0), bool visible=true, uint32_t styleClassID=0)
Creates an instance of the object.
This file contains fabgl::BitmappedDisplayController definition.
Base class of all UI elements that can receive events.
Sets or gets text edit style.
void quit(int exitCode)
Terminates application and free resources.
Contains the paintbox style.
Color
This enum defines named colors.
uiLabel(uiWindow *parent, char const *text, const Point &pos, const Size &size=Size(0, 0), bool visible=true, uint32_t styleClassID=0)
Creates an instance of the object.
uiColorListBox(uiWindow *parent, const Point &pos, const Size &size, bool visible=true, uint32_t styleClassID=0)
Creates an instance of the object.
int showModalWindow(uiWindow *window)
Makes a window visible and handles it has a modal window.
Properties of the combobox.
int position()
Determines slider position.
The PS2 Keyboard controller class.
Represents the base abstract class for bitmapped display controllers.
Delegate onClick
Mouse click event delegate.
Color color()
Currently selected color.
This file contains fabgl::Canvas definition.
Size clientSize()
Determines the client area size.
uiWindow * lastChild()
Gets last child.
A panel is used to contain and to group some controls.
Represents a checkbox or a radiobutton.
VirtualKey
Represents each possible real or derived (SHIFT + real) key.
void moveWindow(uiWindow *window, int x, int y)
Moves a window.
void destroyWindow(uiWindow *window)
Destroys a window.
uint16_t caretBlinkingTime
Delegate onResize
Resize window event delegate.
uiCheckBoxKind
Specifies the combobox behaviour.
void setTitleFmt(const char *format,...)
Sets window title as formatted text.
Color selectedColor()
Determines current selected color.
void update()
Updates the label content.
void setColor(Color value)
Sets current colorbox color.
uiWindowProps & windowProps()
Sets or gets window properties.
Properties of the application.
void setTextFmt(const char *format,...)
Sets label formatted text.
uiCustomComboBox(uiWindow *parent, const Point &pos, const Size &size, int listHeight, bool visible, uint32_t styleClassID)
Creates an instance of the object.
void setStyle(uiStyle *value)
Sets application controls style.
Point mouseDownPos()
Determines mouse position when left button was down.
bool processModalWindowEvents(ModalWindowState *state, int timeout)
Processes all messages from modal window.
RGB888 focusedSelectedBackgroundColor
uiButtonKind
Specifies the button kind.
Delegate< Rect > onPaint
Paint event delegate.
uiWindow * parentFrame()
Determines the parent frame.
Contains the label style.
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.
Describes mouse absolute position, scroll wheel delta and buttons status.
void deselectAll()
Deselects all selected items.
uiFrameProps & frameProps()
Sets or gets frame properties.
Delegate onChange
Change event delegate.
uiCustomListBox(uiWindow *parent, const Point &pos, const Size &size, bool visible=true, uint32_t styleClassID=0)
Creates an instance of the object.
uiTextEditProps & textEditProps()
Sets or gets text edit properties.
RGB888 buttonBackgroundColor
int groupIndex()
Determines radiobutton group index.
uiFrameStyle & frameStyle()
Sets or gets frame style.
uiListBoxStyle & listBoxStyle()
Sets or gets listbox style.
Represents the coordinate of a point.
uiAnchors & anchors()
Allows to switch on or off anchors.
Contains the window style.
void setPosition(int value)
Sets the slider position.
This is a combination of a color listbox and a colorbox.
This file contains some utility classes and functions.
Delegate< uiTimerHandle > onTimer
Timer event delegate.
RGB888 mouseOverBackgroundColor
uiSliderStyle & sliderStyle()
Sets or gets slider style.
uiSlider(uiWindow *parent, const Point &pos, const Size &size, uiOrientation orientation, bool visible=true, uint32_t styleClassID=0)
Creates an instance of the object.
uiPaintBoxStyle & paintBoxStyle()
Sets or gets paintbox style.
uiFrame(uiWindow *parent, char const *title, const Point &pos, const Size &size, bool visible=true, uint32_t styleClassID=0)
Creates an instance of the object.
uiControl(uiWindow *parent, const Point &pos, const Size &size, bool visible, uint32_t styleClassID=0)
Creates an instance of the object.
uiOrigin
Specifies window rectangle origin.
Rect transformRect(Rect const &rect, uiWindow *baseWindow)
Transforms rectangle origins from current window to another one.
Specifies the object type.
Contains some window options.
Color color()
Gets current colorbox color.
uiPaintBox(uiWindow *parent, const Point &pos, const Size &size, bool visible=true, uint32_t styleClassID=0)
Creates an instance of the object.
char const * filename()
Currently selected filename.
uiMessageBoxResult
Return values from uiApp.messageBox() method.
uiWindow * screenToWindow(Point &point)
Determines which window a point belongs to.
uint8_t focusedBorderSize
void maximizeWindow(uiWindow *window, bool value)
Maximizes or restores a window.
Delegate< uiTimerHandle > onTimer
Timer event delegate.
Represents a text edit control.
void minimizeWindow(uiWindow *window, bool value)
Minimizes or restores a window.
uiWindow * prev()
Gets previous sibling.
void repaintWindow(uiWindow *window)
Repaints a window.
uiTextEditProps & textEditProps()
Sets or gets text edit properties.
Contains details about the mouse event.
RGB888 mouseOverButtonColor
CursorName
This enum defines a set of predefined mouse cursors.
int focusIndex()
Determines the focus index (aka tab-index)
RGB888 mouseOverBackgroundColor
FontInfo const * textFont
uiWindow * firstChild()
Gets first child.
uiCheckBoxStyle & checkBoxStyle()
Sets or gets checkbox style.
char const * directory()
Determines absolute path of current directory.
uint8_t hasMaximizeButton
void reshapeWindow(uiWindow *window, Rect const &rect)
Reshapes a window.
FontInfo const * titleFont
StringList & items()
A list of strings representing items of the combobox.
RGB888 activeTitleBackgroundColor
uiWindow * setFocusedWindow(uiWindow *value)
Sets the focused window (control)
This file contains FabGL library configuration settings, like number of supported colors...
Base class of all UI elements like windows and controls.
void setBitmap(Bitmap const *bitmap)
Sets image bitmap.
A paintbox control allows applications to perform custom drawings providing uiPaintBox.onPaint delegate. A paintbox can have horizontal and vertical scrollbars.
StringList & items()
A list of strings representing the listbox content.
Point pos()
Determines the window position relative to parent window.
virtual Rect clientRect(uiOrigin origin)
Determines the client area bounding box.
void setChecked(bool value)
Sets current checkbox or radiobutton checked status.
Represents a bidimensional size.
uiCheckBox(uiWindow *parent, const Point &pos, const Size &size, uiCheckBoxKind kind=uiCheckBoxKind::CheckBox, bool visible=true, uint32_t styleClassID=0)
Creates an instance of the object.
Delegate onKillFocus
Kill focus event delegate.
uiComboBoxProps & comboBoxProps()
Sets or gets combobox properties.
uiObjectType & objectType()
Determines the object type.
bool hasChildren()
Determines whether this window has children.
Delegate< uiKeyEventInfo > onKeyUp
Key-up event delegate.
RGB888 focusedBorderColor
Delegate onShow
Show window event delegate.
uiTimerHandle setTimer(uiEvtHandler *dest, int periodMS)
Setups a timer.
bool isDirectory()
Determines whether currently selected item is a directory.
int max()
Gets maximum position.
uiApp * app()
Determines the app that owns this object.
Contains the listbox style.
FontInfo const * textFont
void resizeWindow(uiWindow *window, int width, int height)
Resizes a window.
int endModalWindow(ModalWindowState *state)
Ends modal window processing.
bool postEvent(uiEvent const *event)
Places an event in the event queue and returns without waiting for the receiver to process the event...
uint32_t styleClassID()
Determines current style class for this UI element.
A label is a static text UI element.
void processEvents()
Processes all events in queue.
Properties of the text edit.
uiComboBox(uiWindow *parent, const Point &pos, const Size &size, int listHeight, bool visible=true, uint32_t styleClassID=0)
Creates an instance of the object.
uiListBox(uiWindow *parent, const Point &pos, const Size &size, bool visible=true, uint32_t styleClassID=0)
Creates an instance of the object.
void bringOnTop()
Brings this window on top.
Contains the image style.
uiWindowState state()
Determines the window state.
uiPanel(uiWindow *parent, const Point &pos, const Size &size, bool visible=true, uint32_t styleClassID=0)
Creates an instance of the object.
void setGroupIndex(int value)
Sets radiobutton group index.
Rect clientRect(uiOrigin origin)
Determines the client area bounding box.
uiWindow * moveFocus(int delta)
Move focus to a control with current focus index plus a delta.
RGB888 checkedBackgroundColor
void repaintRect(Rect const &rect)
Repaints a screen area.
This is the base class for all controls. A control can have focus and is not activable.
RGB888 titleBackgroundColor
bool hasFocus()
Determines whether this window or control has focus.
uiWindow * capturedMouseWindow()
Determines which window is capturing mouse.
char const * text()
Gets current content of the text edit.
void repaint()
Repaints this window.
uiFileBrowser(uiWindow *parent, const Point &pos, const Size &size, bool visible=true, uint32_t styleClassID=0)
Creates an instance of the object.
Contains anchors enable/disable switches.
char const * title()
Determines the window title.
RGB888 selectedBackgroundColor
Delegate onPaint
Paint event delegate.
RGB888 focusedBackgroundColor
Shows generic a list of selectable items.
uiWindow * next()
Gets next sibling.
Delegate onHide
Hide window event delegate.
void setDirectory(char const *path)
Sets current directory as absolute path.
uiListBoxStyle & listBoxStyle()
Sets or gets listbox style.
Delegate onChange
Change event delegate.
void setStyleClassID(uint32_t value)
Sets style class for this UI element.
Delegate< uiKeyEventInfo > onKeyUp
Key-up event delegate.
void setText(char const *value)
Replaces current text.
void selectColor(Color value)
Sets current selected color.
uiWindow * activeWindow()
Gets a pointer to the currently active window.
Delegate< uiKeyEventInfo > onKeyDown
Key-down event delegate.
A slider or track bar is a graphical control element with which a user may set a value by moving an i...
Point clientPos()
Determines position of the client area.
uiWindow(uiWindow *parent, const Point &pos, const Size &size, bool visible, uint32_t styleClassID=0)
Creates an instance of the object.
uiFrame * rootWindow()
Gets a pointer to the root window.
Specifies current window state.
void runAsync(BitmappedDisplayController *displayController, int taskStack=3000, Keyboard *keyboard=nullptr, Mouse *mouse=nullptr)
Initializes application and executes asynchronously the main event loop.
void setText(char const *value)
Replaces current text.
This is a combination of a listbox and a single-line editable textbox.
Shows and navigates Virtual Filesystem content.
The PS2 Mouse controller class.
uiImageStyle & imageStyle()
Sets or gets image style.
int count()
Determines number of files in current directory.
Contains the checkbox style.
Delegate onChange
Text edit event delegate.
bool isMouseOver()
Determines whether the mouse is over this window.
void showWindow(uiWindow *window, bool value)
Makes a window visible or invisible.
uint8_t hasMinimizeButton
RGB888 focusedBackgroundColor
void exitModal(int modalResult)
Exits from a modal window.
Contains the panel style.
uiWindow * focusedWindow()
Gets the focused window (control)
void changeDirectory(char const *path)
Changes current directory as relative path.
char const * text()
Determines label text.
void setTitle(char const *value)
Sets window title.
uiMessageBoxIcon
Icon displayed by the uiApp.messageBox() method.
void enableKeyboardAndMouseEvents(bool value)
Enables or disables mouse and keyboard events.
bool checked()
Determines whether the checkbox or radiobutton is checked.
int min()
Gets minimum position.
Image control to display a static bitmap.
void killTimer(uiTimerHandle handle)
Kills a timer.
FileBrowser allows basic file system operations (dir, mkdir, remove and rename)
Delegate onChange
Slider changed event delegate.