Home2L - C/C++ API v1.4-2-g83f4c (2025-08-23)
Smart Tools for a Private Home
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions

Description

Push-button widgets.

Collaboration diagram for Button:

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.
 

Typedefs

typedef void FCbButtonPushed(class CButton *button, bool longPush, void *data)
 Function prototype for CButton callbacks.
 

Functions

void CbActivateScreen (class CButton *, bool, void *screen)
 Macro to create a trampoline from CButton to another class.
 
CButtonCreateMainButtonBar (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.
 

Function Documentation

◆ CbActivateScreen()

void CbActivateScreen ( class CButton ,
bool  ,
void *  screen 
)

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>)

Convenience callback for all sort of "Jump-to-screen" buttons (including home). 'data' must point to a valid CScreen object.