43 #include "freertos/FreeRTOS.h" 44 #include "freertos/queue.h" 45 #include "freertos/timers.h" 95 #define FABGLIB_UI_EVENTS_QUEUE_SIZE 300 109 UIEVT_GENPAINTEVENTS,
115 UIEVT_MOUSEBUTTONDOWN,
140 UIEVT_CHILDKILLFOCUS,
149 typedef void * uiTimerHandle;
181 union uiEventParams {
183 uiMouseEventInfo mouse;
191 char const * debugMsg;
195 uiTimerHandle timerHandle;
201 uiFocusInfo focusInfo;
206 uiEvent() : dest(nullptr), id(UIEVT_NULL) { }
207 uiEvent(uiEvent
const & e) { dest = e.dest;
id = e.id; params = e.params; }
208 uiEvent(uiEvtHandler * dest_, uiEventID id_) : dest(dest_), id(id_) { }
305 virtual void processEvent(uiEvent * event);
317 void setApp(
uiApp * value) { m_app = value; }
383 #define UIWINDOW_PARENTCENTER Point(-1000, -1000) 406 virtual void processEvent(uiEvent * event);
408 void setCanvas(
Canvas * canvas) { m_canvas = canvas; }
629 Canvas * canvas() {
return m_canvas; }
678 void removeChild(
uiWindow * child,
bool freeChild =
true);
679 void moveChildOnTop(
uiWindow * child);
683 Size sizeAtMouseDown() {
return m_sizeAtMouseDown; }
684 Point posAtMouseDown() {
return m_posAtMouseDown; }
686 virtual Size minWindowSize() {
return Size(0, 0); }
688 void beginPaint(uiEvent * paintEvent, Rect
const & clippingRect);
690 void generatePaintEvents(Rect
const & paintRect);
691 void reshape(Rect
const & r);
710 Rect m_savedScreenRect;
712 uiWindowState m_state;
714 uiWindowProps m_windowProps;
716 uiWindowStyle m_windowStyle;
718 Point m_mouseDownPos;
720 Point m_posAtMouseDown;
721 Size m_sizeAtMouseDown;
727 int16_t m_focusIndex;
735 uint32_t m_styleClassID;
738 bool m_parentProcessKbdEvents;
789 enum class uiFrameItem : uint8_t {
829 virtual void processEvent(uiEvent * event);
836 char const *
title() {
return m_title; }
872 int getNextFreeFocusIndex() {
return m_nextFreeFocusIndex++; }
924 Size minWindowSize();
925 int titleBarHeight();
931 int paintButtons(
Rect const & bkgRect);
932 void movingCapturedMouse(
int mouseX,
int mouseY,
bool mouseIsDown);
933 void movingFreeMouse(
int mouseX,
int mouseY);
934 uiFrameItem getFrameItemAt(
int x,
int y);
935 Rect getBtnRect(
int buttonIndex);
936 void handleButtonsClick(
int x,
int y,
bool doubleClick);
937 void drawTextWithEllipsis(FontInfo
const * fontInfo,
int X,
int Y,
char const * text,
int maxX);
938 void drawReshapingBox(
Rect boxRect);
941 static constexpr
int CORNERSENSE = 10;
951 uiFrameItem m_mouseDownFrameItem;
952 uiFrameItem m_mouseMoveFrameItem;
954 Rect m_lastReshapingBox;
956 int m_nextFreeFocusIndex;
986 virtual void processEvent(uiEvent * event);
1007 enum class uiScrollBarItem {
1042 virtual void processEvent(uiEvent * event);
1136 virtual void setScrollBar(
uiOrientation orientation,
int position,
int visible,
int range,
bool repaintScrollbar =
true);
1141 void paintScrollableControl();
1142 void paintScrollBars();
1143 Rect getVScrollBarRects(
Rect * topButton =
nullptr,
Rect * bottonButton =
nullptr,
Rect * bar =
nullptr);
1144 Rect getHScrollBarRects(
Rect * leftButton =
nullptr,
Rect * rightButton =
nullptr,
Rect * bar =
nullptr);
1145 uiScrollBarItem getItemAt(
int x,
int y);
1147 void handleFreeMouseMove(
int mouseX,
int mouseY);
1148 void handleCapturedMouseMove(
int mouseX,
int mouseY);
1149 void handleButtonsScroll();
1150 void handlePageScroll();
1154 int16_t m_HScrollBarPosition;
1155 int16_t m_HScrollBarVisible;
1156 int16_t m_HScrollBarRange;
1157 int16_t m_VScrollBarPosition;
1158 int16_t m_VScrollBarVisible;
1159 int16_t m_VScrollBarRange;
1165 int16_t m_mouseDownHScrollBarPosition;
1166 int16_t m_mouseDownVScrollBarPosition;
1168 uiScrollBarItem m_mouseOverItem;
1171 uiTimerHandle m_scrollTimer;
1223 virtual void processEvent(uiEvent * event);
1232 void setText(
char const * value);
1239 char const *
text() {
return m_text; }
1280 void paintContent(
Rect const &
rect);
1357 virtual void processEvent(uiEvent * event);
1380 void setText(
char const * value);
1387 char const *
text() {
return m_text; }
1400 virtual Rect getEditRect();
1404 void paintTextEdit();
1405 void paintContent();
1407 uint8_t
const * getCharInfo(
char ch,
int *
width);
1408 int charColumnToWindowX(
int col);
1410 void moveCursor(
int col,
int selCol);
1411 int getColFromMouseX(
int mouseX);
1413 void checkAllocatedSpace(
int requiredLength);
1414 void insert(
char c);
1416 int getWordPosAtLeft();
1417 int getWordPosAtRight();
1418 void selectWordAt(
int mouseX);
1441 CodePage
const * m_codepage;
1479 virtual void processEvent(uiEvent * event);
1488 void setText(
char const * value);
1504 char const *
text() {
return m_text; }
1530 uint16_t m_textExtent;
1567 virtual void processEvent(uiEvent * event);
1636 virtual void processEvent(uiEvent * event);
1684 virtual void processEvent(uiEvent * event);
1707 void paintPaintBox();
1737 virtual void processEvent(uiEvent * event);
1755 void paintColorBox();
1813 virtual void processEvent(uiEvent * event);
1850 void selectItem(
int index,
bool add =
false,
bool range =
false);
1883 virtual int items_getCount() = 0;
1884 virtual void items_deselectAll() = 0;
1885 virtual void items_select(
int index,
bool select) = 0;
1886 virtual bool items_selected(
int index) = 0;
1887 virtual void items_draw(
int index,
const Rect & itemRect) = 0;
1891 void paintListBox();
1892 int getItemAtMousePos(
int mouseX,
int mouseY);
1893 void mouseDownSelect(
int mouseX,
int mouseY);
1894 void mouseMoveSelect(
int mouseX,
int mouseY);
1896 void makeItemVisible(
int index);
1901 int m_firstVisibleItem;
1934 StringList &
items() {
return m_items; }
1938 virtual int items_getCount() {
return m_items.count(); }
1939 virtual void items_deselectAll() { m_items.deselectAll(); }
1940 virtual void items_select(
int index,
bool select) { m_items.select(index, select); }
1941 virtual bool items_selected(
int index) {
return m_items.selected(index); }
1942 virtual void items_draw(
int index,
const Rect & itemRect);
2016 void processEvent(uiEvent * event);
2033 virtual int items_getCount() {
return m_dir.
count(); }
2034 virtual void items_deselectAll() { m_selected = -1; }
2035 virtual void items_select(
int index,
bool select);
2036 virtual bool items_selected(
int index) {
return index == m_selected; }
2037 virtual void items_draw(
int index,
const Rect & itemRect);
2078 virtual int items_getCount() {
return 16; }
2079 virtual void items_deselectAll() { }
2080 virtual void items_select(
int index,
bool select) {
if (select) m_selectedColor = (
Color)index; }
2081 virtual bool items_selected(
int index) {
return index == (int)m_selectedColor; }
2082 virtual void items_draw(
int index,
const Rect & itemRect);
2087 Color m_selectedColor;
2134 virtual void processEvent(uiEvent * event);
2186 virtual void updateEditControl() = 0;
2188 Size getEditControlSize();
2192 void paintComboBox();
2193 Rect getButtonRect();
2195 void closeListBox();
2196 void switchListBox();
2275 uiControl * editcontrol() {
return m_textEdit; }
2276 void updateEditControl();
2279 uiTextEdit * m_textEdit;
2280 uiListBox * m_listBox;
2328 uiControl * editcontrol() {
return m_colorBox; }
2329 void updateEditControl();
2332 uiColorBox * m_colorBox;
2333 uiColorListBox * m_colorListBox;
2385 virtual void processEvent(uiEvent * event);
2437 void paintCheckBox();
2439 void unCheckGroup();
2445 int16_t m_groupIndex;
2484 virtual void processEvent(uiEvent * event);
2543 void moveGripTo(
int x,
int y);
2553 int16_t m_ticksFrequency;
2600 virtual void processEvent(uiEvent * event);
2626 void paintProgressBar();
2641 virtual void setStyle(uiObject *
object, uint32_t styleClassID) = 0;
2681 struct ModalWindowState {
2683 uiWindow * prevFocusedWindow;
2684 uiWindow * prevActiveWindow;
2685 uiWindow * prevModal;
2690 typedef pair<uiEvtHandler *, TimerHandle_t> uiTimerAssoc;
2739 void quit(
int exitCode);
2759 void postDebugMsg(
char const * msg);
2761 virtual void processEvent(uiEvent * event);
2839 void captureMouse(
uiWindow * window);
2979 void combineMouseMoveEvents(
bool value) { m_combineMouseMoveEvents = value; }
2981 void showCaret(uiWindow * window);
2983 void setCaret(
bool value);
2985 void setCaret(Point
const & pos);
2987 void setCaret(Rect
const & rect);
3000 uiTimerHandle
setTimer(uiEvtHandler * dest,
int periodMS);
3011 void killEvtHandlerTimers(uiEvtHandler * dest);
3027 void cleanWindowReferences(
uiWindow * window);
3067 uiMessageBoxResult inputBox(
char const * title,
char const * text,
char * inOutString,
int maxLength,
char const * button1Text,
char const * button2Text =
nullptr);
3072 virtual void init();
3088 Keyboard * keyboard() {
return m_keyboard; }
3090 Mouse * mouse() {
return m_mouse; }
3092 BitmappedDisplayController * displayController() {
return m_displayController; }
3094 Canvas * canvas() {
return m_canvas; }
3117 bool getEvent(uiEvent * event,
int timeOutMS);
3118 bool peekEvent(uiEvent * event,
int timeOutMS);
3123 void preprocessEvent(uiEvent * event);
3124 void preprocessMouseEvent(uiEvent * event);
3125 void preprocessKeyboardEvent(uiEvent * event);
3126 void filterModalEvent(uiEvent * event);
3128 static void timerFunc(TimerHandle_t xTimer);
3130 static void asyncRunTask(
void * arg);
3132 void blinkCaret(
bool forceOFF =
false);
3133 void suspendCaret(
bool value);
3146 QueueHandle_t m_eventsQueue;
3160 bool m_combineMouseMoveEvents;
3164 uiTimerHandle m_caretTimer;
3165 int m_caretInvertState;
3167 int m_lastMouseUpTimeMS;
3168 Point m_lastMouseUpPos;
3172 int m_lastUserActionTimeMS;
3175 list<uiTimerAssoc> m_timers;
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.
int lastUserActionTime()
Returns time when last user action (mouse/keyboard) has been received, measured in milliseconds since...
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.
uiListBoxProps & listBoxProps()
Sets or gets list box properties.
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.
uiProgressBarProps & progressBarProps()
Sets or gets progress bar properties.
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.
Contains the progress bar style.
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
This file contains codepages declarations.
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.
uiHAlign
Text horizontal alignment.
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.
void setPercentage(int value)
Sets percentage.
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.
uiProgressBar(uiWindow *parent, const Point &pos, const Size &size, bool visible=true, uint32_t styleClassID=0)
Creates an instance of the object.
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
Properties of the progress bar.
bool hasFocus()
Determines whether this window or control has focus.
uiWindow * capturedMouseWindow()
Determines which window is capturing mouse.
Properties of the list box.
uint8_t selectOnMouseOver
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.
uiProgressBarStyle & progressBarStyle()
Sets or gets progress bar style.
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.
A progress bar shows progress percentage using a colored bar.
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.
FontInfo const * textFont
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.