Home2L - C/C++ API v1.4-0-g38cc (2024-05-25)
Smart Tools for a Private Home
Classes | Macros | Typedefs | Enumerations

Description

Listbox widget.

Collaboration diagram for Listbox:

Classes

class  CListboxItem
 Listbox item. More...
 
class  CListbox
 Listbox widget. More...
 

Macros

#define LISTBOX_ITEM_BORDER   4
 Border spacing around labels in pixels.
 
#define LISTBOX_TRAMPOLINE(CB_NAME, CLASS_NAME, METHOD_NAME)
 Macro to create a trampoline to another class. More...
 

Typedefs

typedef void FCbListboxPushed(class CListbox *, int idx, bool longPush, void *data)
 Callback prototype for CListbox push events.
 

Enumerations

enum  EListboxMode { lmReadOnly , lmActivate , lmSelectSingle , lmSelectAny }
 List box mode. More...
 

Macro Definition Documentation

◆ LISTBOX_TRAMPOLINE

#define LISTBOX_TRAMPOLINE (   CB_NAME,
  CLASS_NAME,
  METHOD_NAME 
)
Value:
void CB_NAME (class CListbox *listbox, int idx, bool longPush, void *data) { \
((CLASS_NAME *) data)->METHOD_NAME (listbox, idx, longPush); \
}
Listbox widget.
Definition: ui_widgets.H:427

Macro to create a trampoline to another class.

The class must define a method:

void CLASS_NAME::METHOD_NAME (CListbox *listbox, int idx, bool longPush)

If the method is protected, the following line may be added to the class:

friend CB_NAME (CButton *, int, bool, void *);

To the list box, the trampoline must be passed by a call like:

CListbox::SetCbPushed (CB_NAME, <class object pointer>)

Definition at line 392 of file ui_widgets.H.

Enumeration Type Documentation

◆ EListboxMode

List box mode.

Enumerator
lmReadOnly 

Listbox is read-only, no selection & interaction.

lmActivate 

Items act like push-buttons, activation callback can be defined.

lmSelectSingle 

Items are exclusivly selectable (activation callback can be defined, too).

lmSelectAny 

Items are arbitrarily selectable (activation callback can be defined, too).

Definition at line 359 of file ui_widgets.H.