µGFX  2.9
version 2.9
GWidgetInit Struct Reference

Detailed Description

The structure to initialise a widget.

Note
Some widgets may have extra parameters.
If you create this structure on the stack, you should always memset it to all zero's first in case a future version of the software add's extra fields. Alternatively you can use gwinWidgetClearInit() to clear it.
The text element must be static string (not stack allocated). If you want to use a dynamic string (eg a stack allocated string) use NULL for this member and then call gwinSetText() with useAlloc set to gTrue.

Definition at line 97 of file gwin_widget.h.

#include <gwin_widget.h>

Data Fields

GWindowInit g
 
const char * text
 
CustomWidgetDrawFunction customDraw
 
void * customParam
 
const GWidgetStylecustomStyle
 
WidgetTag tag
 

Field Documentation

◆ customDraw

CustomWidgetDrawFunction GWidgetInit::customDraw

A custom draw function - use NULL for the standard

Definition at line 100 of file gwin_widget.h.

◆ customParam

void* GWidgetInit::customParam

A parameter for the custom draw function (default = NULL)

Definition at line 101 of file gwin_widget.h.

◆ customStyle

const GWidgetStyle* GWidgetInit::customStyle

A custom style to use - use NULL for the default style

Definition at line 102 of file gwin_widget.h.

◆ g

GWindowInit GWidgetInit::g

The GWIN initializer

Definition at line 98 of file gwin_widget.h.

◆ tag

WidgetTag GWidgetInit::tag

The tag to associate with the widget

Definition at line 104 of file gwin_widget.h.

◆ text

const char* GWidgetInit::text

The initial text

Definition at line 99 of file gwin_widget.h.