FabGL
ESP32 Display Controller and Graphics Library
uiButton Class Reference

Represents a button control. A button can have text and optionally a bitmap. More...

#include <fabui.h>

Inheritance diagram for uiButton:

Public Member Functions

 uiButton (uiWindow *parent, char const *text, const Point &pos, const Size &size, uiButtonKind kind=uiButtonKind::Button, bool visible=true, uint32_t styleClassID=0)
 Creates an instance of the object. More...
 
uiAnchorsanchors ()
 Allows to switch on or off anchors. More...
 
uiAppapp ()
 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...
 
uiButtonStylebuttonStyle ()
 Sets or gets button style. More...
 
Point clientPos ()
 Determines position of the client area. More...
 
virtual Rect clientRect (uiOrigin origin)
 Determines the client area bounding box. More...
 
Size clientSize ()
 Determines the client area size. More...
 
bool down ()
 Determines whether the switch button is down or up. More...
 
void exitModal (int modalResult)
 Exits from a modal window. More...
 
uiWindowfirstChild ()
 Gets first child. 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...
 
bool isActiveWindow ()
 Determines wheter this window is the active window. More...
 
bool isMouseOver ()
 Determines whether the mouse is over this window. More...
 
uiWindowlastChild ()
 Gets last child. More...
 
uiWindownext ()
 Gets next sibling. More...
 
uiObjectTypeobjectType ()
 Determines the object type. More...
 
uiWindowparent ()
 Determines the parent window. More...
 
uiWindowparentFrame ()
 Determines the parent frame. More...
 
Point pos ()
 Determines the window position relative to parent window. More...
 
uiWindowprev ()
 Gets previous sibling. More...
 
Rect rect (uiOrigin origin)
 Determines the window bounding box. More...
 
void repaint ()
 Repaints this window. More...
 
void repaint (Rect const &rect)
 Repaints a rectangle of this window. More...
 
void setDown (bool value)
 Sets button state of a switch button. More...
 
void setFocusIndex (int value)
 Sets the focus index (aka tab-index) More...
 
void setParentProcessKbdEvents (bool value)
 Enables a child window to send keyboard events to its parent. More...
 
void setStyleClassID (uint16_t value)
 Sets style class for this UI element. More...
 
void setText (char const *value)
 Sets button text. More...
 
Size size ()
 Determines the window size. More...
 
uiWindowState state ()
 Determines the window state. More...
 
uint16_t styleClassID ()
 Determines current style class for this UI element. More...
 
char const * text ()
 Determines button text. More...
 
Rect transformRect (Rect const &rect, uiWindow *baseWindow)
 Transforms rectangle origins from current window to another one. More...
 
uiWindowPropswindowProps ()
 Sets or gets window properties. More...
 
uiWindowStylewindowStyle ()
 Sets or gets window style. More...
 

Public Attributes

Delegate onChange
 Button changed event delegate. More...
 
Delegate onClick
 Mouse click event delegate. More...
 
Delegate< uiMouseEventInfo const & > onMouseDown
 Mouse down event delegate. More...
 
Delegate< uiMouseEventInfo const & > onMouseUp
 Mouse up event delegate. More...
 

Detailed Description

Represents a button control. A button can have text and optionally a bitmap.

Definition at line 1257 of file fabui.h.


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