maug
Quick and dirty C mini-augmentation library.
Loading...
Searching...
No Matches
RetroGUI Controls
Collaboration diagram for RetroGUI Controls:

Data Structures

struct  RETROGUI_CTL_BASE
 Fields common to ALL RETROGUI_CTL types. More...
 
union  RETROGUI_CTL
 

Macros

#define RETROGUI_CTL_TABLE_BASE(f)
 Table defining all control types and their specific fields in RETROGUI_CTL.
 
#define RETROGUI_CTL_TABLE(f)
 
#define RETROGUI_CTL_TABLE_FIELDS(idx, c_name, c_fields)
 Creates the corresponding RETROGUI_* structs from RETROGUI_CTL_TABLE that populate union RETROGUI_CTL.
 
#define RETROGUI_CTL_TABLE_TYPES(idx, c_name, c_fields)
 Adds the structs created by RETROGUI_CTL_TABLE_FIELDS to union RETROGUI_CTL.
 

Detailed Description

Macro Definition Documentation

◆ RETROGUI_CTL_TABLE

#define RETROGUI_CTL_TABLE ( f)
Value:
f( 4, TEXTBOX, MAUG_MHANDLE text_h; char* text; size_t text_sz; size_t text_sz_max; size_t text_cur; int16_t blink_frames; )
#define RETROGUI_CTL_TABLE_BASE(f)
Table defining all control types and their specific fields in RETROGUI_CTL.
Definition retrogui.h:107

◆ RETROGUI_CTL_TABLE_BASE

#define RETROGUI_CTL_TABLE_BASE ( f)
Value:
f( 0, NONE, void* none; ) \
f( 1, LISTBOX, MAUG_MHANDLE list_h; char* list; size_t list_sz; size_t list_sz_max; size_t sel_idx; ) \
f( 2, BUTTON, MAUG_MHANDLE label_h; char* label; size_t label_sz; int16_t push_frames; uint8_t font_flags; ) \
f( 3, LABEL, MAUG_MHANDLE label_h; char* label; size_t label_sz; uint8_t font_flags; )

Table defining all control types and their specific fields in RETROGUI_CTL.

All entries in this table have corresponding retrogui_redraw_*, retrogui_poll_*, retrogui_init_*, and retrogui_push_* functions which are called internally from retrogui_redraw_ctls(), retrogui_poll_ctls(), retrogui_init_ctl(), and retrogui_push_ctl(), respectively.

◆ RETROGUI_CTL_TABLE_FIELDS

#define RETROGUI_CTL_TABLE_FIELDS ( idx,
c_name,
c_fields )
Value:
struct RETROGUI_CTL_ ## c_name { \
struct RETROGUI_CTL_BASE base; \
c_fields \
};
Fields common to ALL RETROGUI_CTL types.
Definition retrogui.h:125

Creates the corresponding RETROGUI_* structs from RETROGUI_CTL_TABLE that populate union RETROGUI_CTL.

◆ RETROGUI_CTL_TABLE_TYPES

#define RETROGUI_CTL_TABLE_TYPES ( idx,
c_name,
c_fields )
Value:
struct RETROGUI_CTL_ ## c_name c_name;

Adds the structs created by RETROGUI_CTL_TABLE_FIELDS to union RETROGUI_CTL.