version 2.8
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 TRUE.

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

CustomWidgetDrawFunction GWidgetInit::customDraw

A custom draw function - use NULL for the standard

Definition at line 100 of file gwin_widget.h.

void* GWidgetInit::customParam

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

Definition at line 101 of file gwin_widget.h.

const GWidgetStyle* GWidgetInit::customStyle

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

Definition at line 102 of file gwin_widget.h.

GWindowInit GWidgetInit::g

The GWIN initializer

Definition at line 98 of file gwin_widget.h.

Referenced by gwinGCheckboxCreate(), gwinGProgressbarCreate(), and gwinGSliderCreate().

WidgetTag GWidgetInit::tag

The tag to associate with the widget

Definition at line 104 of file gwin_widget.h.

const char* GWidgetInit::text

The initial text

Definition at line 99 of file gwin_widget.h.