Home2L - C/C++ API v1.4-0-g38cc (2024-05-25)
Smart Tools for a Private Home
|
Push-button widgets.
Classes | |
class | CButton |
Push-button widget. More... | |
class | CFlatButton |
Flat Push-button widget. More... | |
struct | TButtonDescriptor |
Descriptor for a button on the main button bar. More... | |
Macros | |
#define | BUTTON_DEFAULT_FONT FontGet (fntNormal, 24) |
Default font for CButton labels. | |
#define | BUTTON_LABEL_BORDER 8 |
Border spacing around labels in pixels. | |
#define | BUTTON_TRAMPOLINE(CB_NAME, CLASS_NAME, METHOD_NAME) |
Macro to create a trampoline from CButton to another class. More... | |
Typedefs | |
typedef void | FCbButtonPushed(class CButton *button, bool longPush, void *data) |
Function prototype for CButton callbacks. | |
Functions | |
void | CbActivateScreen (class CButton *, bool, void *screen) |
Convenience callback for all sort of "Jump-to-screen" buttons (including home). 'data' must point to a valid CScreen object. | |
CButton * | CreateMainButtonBar (int buttons, TButtonDescriptor *descTable, CScreen *screen) |
Create a dynamic array of CButton objects for a main button bar. 'screen' is passed as the user data field to each button. If 'screen != NULL', all buttons are added to the screen as widgets. | |
#define BUTTON_TRAMPOLINE | ( | CB_NAME, | |
CLASS_NAME, | |||
METHOD_NAME | |||
) |
Macro to create a trampoline from CButton to another class.
The class must define a method:
void CLASS_NAME::METHOD_NAME (CButton *button, bool longPush)
If the method is protected, the following line may be added to the class:
friend CB_NAME (CButton *, bool, void *);
To the button, the trampoline must be passed by a call like:
CButton::SetCbPushed (CB_NAME, <class object pointer>)
Definition at line 202 of file ui_widgets.H.