FabGL
ESP32 VGA Controller and Graphics Library
|
Contains a list of selectable items. More...
#include <fabui.h>
Public Member Functions | |
uiListBox (uiWindow *parent, const Point &pos, const Size &size, bool visible=true) | |
Creates an instance of the object. More... | |
uiAnchors & | anchors () |
Allows to switch on or off anchors. More... | |
uiApp * | app () |
Determines the app that owns this object. More... | |
void | bringAfter (uiWindow *insertionPoint) |
Brings this window after another one. More... | |
void | bringOnTop () |
Brings this window on top. More... | |
Point | clientPos () |
Determines position of the client area. More... | |
Rect | clientRect (uiOrigin origin) |
Determines the client area bounding box. More... | |
Size | clientSize () |
Determines the client area size. More... | |
void | deselectAll () |
Deselects all selected items. More... | |
void | exitModal (int modalResult) |
Exits from a modal window. More... | |
uiWindow * | firstChild () |
Gets first child. More... | |
int | firstSelectedItem () |
Gets the first selected item. More... | |
int | focusIndex () |
Determines the focus index (aka tab-index) More... | |
bool | hasChildren () |
Determines whether this window has children. More... | |
bool | hasFocus () |
Determines whether this window or control has focus. More... | |
int | HScrollBarPos () |
Determines position of the horizontal scrollbar thumb. More... | |
int | HScrollBarRange () |
Determines horizontal scrollbar range. More... | |
int | HScrollBarVisible () |
Determines horizontal scrollbar visible portion (aka thumb size) of the scrollable content. More... | |
bool | isMouseOver () |
Determines whether the mouse is over this window. More... | |
StringList & | items () |
A list of strings representing the listbox content. More... | |
uiWindow * | lastChild () |
Gets last child. More... | |
int | lastSelectedItem () |
Gets the last selected item. More... | |
uiListBoxStyle & | listBoxStyle () |
Sets or gets listbox style. More... | |
Point | mouseDownPos () |
Determines mouse position when left button was down. More... | |
uiWindow * | next () |
Gets next sibling. More... | |
uiObjectType & | objectType () |
Determines the object type. More... | |
uiWindow * | parent () |
Determines the parent window. More... | |
Point | pos () |
Determines the window position relative to parent window. More... | |
uiWindow * | prev () |
Gets previous sibling. More... | |
Rect | rect (uiOrigin origin) |
Determines the window bounding box. More... | |
void | repaint (Rect const &rect) |
Repaints a rectangle of this window. More... | |
void | repaint () |
Repaints this window. More... | |
uiScrollableControlStyle & | scrollableControlStyle () |
Sets or gets control style. More... | |
void | selectItem (int index, bool add=false, bool range=false) |
Selects a listbox item. More... | |
void | setFocusIndex (int value) |
Sets the focus index (aka tab-index) More... | |
Size | size () |
Determines the window size. More... | |
uiWindowState | state () |
Determines the window state. More... | |
Rect | transformRect (Rect const &rect, uiWindow *baseWindow) |
Transforms rectangle origins from current window to another one. More... | |
int | VScrollBarPos () |
Determines position of the vertical scrollbar thumb. More... | |
int | VScrollBarRange () |
Determines vertical scrollbar range. More... | |
int | VScrollBarVisible () |
Determines vertical scrollbar visible portion (aka thumb size) of the scrollable content. More... | |
uiWindowProps & | windowProps () |
Sets or gets window properties. More... | |
uiWindowStyle & | windowStyle () |
Sets or gets window style. More... | |
Public Attributes | |
Delegate | onChange |
Change event delegate. More... | |
Delegate | onChangeHScrollBar |
Horizontal scrollbar change event delegate. More... | |
Delegate | onChangeVScrollBar |
Vertical scrollbar change event delegate. More... | |
Delegate | onClick |
Mouse click event delegate. More... | |
Delegate | onDblClick |
Mouse double click event delegate4. More... | |
Delegate< uiKeyEventInfo > | onKeyUp |
Key-up event delegate. More... | |
Delegate | onKillFocus |
Kill focus event delegate. More... | |
Protected Member Functions | |
void | setScrollBar (uiOrientation orientation, int position, int visible, int range, bool repaintScrollbar) |
Sets scrollbar position, visible portion and range. More... | |
Contains a list of selectable items.
fabgl::uiListBox::uiListBox | ( | uiWindow * | parent, |
const Point & | pos, | ||
const Size & | size, | ||
bool | visible = true |
||
) |
Creates an instance of the object.
parent | The parent window. A listbox must always have a parent window |
pos | Top-left coordinates of the listbox relative to the parent |
size | The listbox size |
visible | If true the listbox is immediately visible |
|
inlineinherited |
Allows to switch on or off anchors.
|
inlineinherited |
Determines the app that owns this object.
|
inherited |
Brings this window after another one.
insertionPoint | This window will be placed after insertionPoint window. If insertionPoint is nullptr this window will be placed at the first position (location of less visibility.). |
|
inherited |
Brings this window on top.
|
inherited |
Determines position of the client area.
Determines the client area bounding box.
origin | Decides the origin of returned rectangle |
Reimplemented from fabgl::uiWindow.
|
inherited |
Determines the client area size.
void fabgl::uiListBox::deselectAll | ( | ) |
Deselects all selected items.
|
inherited |
Exits from a modal window.
To open a modal window use uiApp.showModalWindow().
modalResult | An integer value to return to uiApp.showModalWindow(). |
|
inlineinherited |
Gets first child.
int fabgl::uiListBox::firstSelectedItem | ( | ) |
Gets the first selected item.
|
inlineinherited |
Determines the focus index (aka tab-index)
To set focus index use uiWindow.setFocusIndex().
|
inlineinherited |
Determines whether this window has children.
|
inherited |
Determines whether this window or control has focus.
To set currently focused window use uiApp.setFocusedWindow().
|
inlineinherited |
Determines position of the horizontal scrollbar thumb.
Minimum value is 0, maximum value is HScrollBarRange() - HScrollBarVisible(). Position is measured in "scroll units". A scroll unit is determined by scrollbar size.
|
inlineinherited |
Determines horizontal scrollbar range.
Range is the maximum position of the scrollbar. Maximum value of scrollbar position will HScrollBarRange() - HScrollBarVisible(). Range is measured in "scroll units". A scroll unit is determined by scrollbar size.
|
inlineinherited |
Determines horizontal scrollbar visible portion (aka thumb size) of the scrollable content.
Visible portion is measured in "scroll units". A scroll unit is determined by scrollbar size.
|
inlineinherited |
Determines whether the mouse is over this window.
This methods returns True also when the mouse is captured.
|
inline |
A list of strings representing the listbox content.
Other than actual strings, StringList indicates which items are selected. Repainting is required when the string list changes.
|
inlineinherited |
Gets last child.
int fabgl::uiListBox::lastSelectedItem | ( | ) |
Gets the last selected item.
|
inline |
Sets or gets listbox style.
|
inlineinherited |
Determines mouse position when left button was down.
|
inlineinherited |
|
inlineinherited |
Determines the object type.
|
inlineinherited |
Determines the parent window.
|
inlineinherited |
Determines the window position relative to parent window.
To change window position use uiApp.moveWindow().
|
inlineinherited |
Gets previous sibling.
Previous sibling is less visible than calling object.
Determines the window bounding box.
To set window position use uiApp.moveWindow(), to set window size use uiApp.resizeWindow() or uiApp.reshapeWindow().
origin | Decides the origin of returned rectangle |
|
inherited |
Repaints a rectangle of this window.
rect | Rectangle to repaint |
|
inherited |
Repaints this window.
|
inlineinherited |
Sets or gets control style.
void fabgl::uiListBox::selectItem | ( | int | index, |
bool | add = false , |
||
bool | range = false |
||
) |
Selects a listbox item.
index | Index of item to select |
add | If true this item is added to the selected items, otherwise all other items are deselected |
range | If true selects a range of items |
|
inlineinherited |
Sets the focus index (aka tab-index)
value | The focus index. -1 = control isn't included into the focusable controls. 0 = first focusable control. |
|
protectedvirtual |
Sets scrollbar position, visible portion and range.
orientation | Specifies which scrollbar to update |
position | Sets position of the scrollbar thumb. Minimum value is 0, maximum value is range - visible. Position is measured in "scroll units". A scroll unit is determined by scrollbar size. |
visible | Sets scrollbar visible portion (aka thumb size) of the scrollable content. Visible portion is measured in "scroll units". A scroll unit is determined by scrollbar size. |
range | Sets vertical scrollbar range. Range is the maximum position of the scrollbar. Maximum value of scrollbar position will range - visible. |
repaintScrollbar | If True the scrollbar is repainted immediately. |
Reimplemented from fabgl::uiScrollableControl.
|
inlineinherited |
|
inlineinherited |
Determines the window state.
To set window state (hidden, visible, maximized, minimized) use uiApp.showWindow(), uiApp.maximizeWindow(), uiApp.minimizeWindow().
Transforms rectangle origins from current window to another one.
rect | Rectangle to transform |
baseWindow | Window where the output rectangle will be relative to |
|
inlineinherited |
Determines position of the vertical scrollbar thumb.
Minimum value is 0, maximum value is VScrollBarRange() - VScrollBarVisible(). Position is measured in "scroll units". A scroll unit is determined by scrollbar size.
|
inlineinherited |
Determines vertical scrollbar range.
Range is the maximum position of the scrollbar. Maximum value of scrollbar position will VScrollBarRange() - VScrollBarVisible(). Range is measured in "scroll units". A scroll unit is determined by scrollbar size.
|
inlineinherited |
Determines vertical scrollbar visible portion (aka thumb size) of the scrollable content.
Visible portion is measured in "scroll units". A scroll unit is determined by scrollbar size.
|
inlineinherited |
Sets or gets window properties.
|
inlineinherited |
Sets or gets window style.
Delegate fabgl::uiListBox::onChange |
Change event delegate.
This delegate is called whenever an item is selected or deselected.
|
inherited |
Horizontal scrollbar change event delegate.
|
inherited |
Vertical scrollbar change event delegate.
|
inherited |
Mouse click event delegate.
This delegate is called when the mouse button is pressed and released on the same position.
|
inherited |
Mouse double click event delegate4.
This delegate is called when the mouse button is double pressed and released on the same position. To change double click time use uiAppProps.doubleClickTime of uiApp.appProps().
Delegate<uiKeyEventInfo> fabgl::uiListBox::onKeyUp |
Key-up event delegate.
Delegate fabgl::uiListBox::onKillFocus |
Kill focus event delegate.