version 2.8
Renderings

Detailed Description

Built-in rendering functions for the button widget.

These function may be passed to gwinSetCustomDraw() to get different button drawing styles.

Note
In your custom button drawing function you may optionally call these standard functions and then draw your extra details on top.
The standard functions below ignore the param parameter except for gwinButtonDraw_Image().
The image custom draw function gwinButtonDraw_Image() uses param to pass in the gdispImage pointer.
These custom drawing routines don't have to worry about setting clipping as the framework sets clipping to the object window prior to calling these routines.

Functions

void gwinButtonDraw_Normal (GWidgetObject *gw, void *param)
 The default rendering function for the button widget. More...
 
void gwinButtonDraw_Rounded (GWidgetObject *gw, void *param)
 Renders a rectangular button with rounded corners. More...
 
void gwinButtonDraw_Ellipse (GWidgetObject *gw, void *param)
 Renders a button with an elliptical shape. More...
 
void gwinButtonDraw_ArrowUp (GWidgetObject *gw, void *param)
 Renders a button in a shape of an arrow pointing up. More...
 
void gwinButtonDraw_ArrowDown (GWidgetObject *gw, void *param)
 Renders a button in a shape of an arrow pointing down. More...
 
void gwinButtonDraw_ArrowLeft (GWidgetObject *gw, void *param)
 Renders a button in a shape of an arrow pointing left. More...
 
void gwinButtonDraw_ArrowRight (GWidgetObject *gw, void *param)
 Renders a button in a shape of an arrow pointing right. More...
 
void gwinButtonDraw_Image (GWidgetObject *gw, void *param)
 Renders a button using individual images for each button state. More...
 

Function Documentation

void gwinButtonDraw_ArrowDown ( GWidgetObject gw,
void *  param 
)

Renders a button in a shape of an arrow pointing down.

Parameters
[in]gwThe widget object (must be a button object)
[in]paramA parameter passed in from the user. Ignored by this function.
Precondition
GDISP_NEED_CONVEX_POLYGON must be set to TRUE
Function Class:
Normal API, this function can be invoked by regular system threads.
void gwinButtonDraw_ArrowLeft ( GWidgetObject gw,
void *  param 
)

Renders a button in a shape of an arrow pointing left.

Parameters
[in]gwThe widget object (must be a button object)
[in]paramA parameter passed in from the user. Ignored by this function.
Precondition
GDISP_NEED_CONVEX_POLYGON must be set to TRUE
Function Class:
Normal API, this function can be invoked by regular system threads.
void gwinButtonDraw_ArrowRight ( GWidgetObject gw,
void *  param 
)

Renders a button in a shape of an arrow pointing right.

Parameters
[in]gwThe widget object (must be a button object)
[in]paramA parameter passed in from the user. Ignored by this function.
Precondition
GDISP_NEED_CONVEX_POLYGON must be set to TRUE
Function Class:
Normal API, this function can be invoked by regular system threads.
void gwinButtonDraw_ArrowUp ( GWidgetObject gw,
void *  param 
)

Renders a button in a shape of an arrow pointing up.

Parameters
[in]gwThe widget object (must be a button object)
[in]paramA parameter passed in from the user. Ignored by this function.
Precondition
GDISP_NEED_CONVEX_POLYGON must be set to TRUE
Function Class:
Normal API, this function can be invoked by regular system threads.
void gwinButtonDraw_Ellipse ( GWidgetObject gw,
void *  param 
)

Renders a button with an elliptical shape.

Parameters
[in]gwThe widget object (must be a button object)
[in]paramA parameter passed in from the user. Ignored by this function.
Precondition
GDISP_NEED_ELLIPSE must be set to TRUE
Function Class:
Normal API, this function can be invoked by regular system threads.
void gwinButtonDraw_Image ( GWidgetObject gw,
void *  param 
)

Renders a button using individual images for each button state.

Parameters
[in]gwThe widget object (must be a button object)
[in]paramA parameter passed in from the user. Must be an image handle. See note below.
Note
The image must be already opened before calling gwinSetCustomDraw(). The image should be 3 times the height of the button. The button image is repeated 3 times vertically, the first (top) for the "up" image, the 2nd for the "down" image, and the third (bottom) image for the disabled state. If the disabled state is never going to be used then the image can be just 2 times the button height. No checking is done to compare the size of the button to the size of the image. Note text is drawn on top of the image.
Precondition
GDISP_NEED_IMAGE must be set to TRUE
Function Class:
Normal API, this function can be invoked by regular system threads.
void gwinButtonDraw_Normal ( GWidgetObject gw,
void *  param 
)

The default rendering function for the button widget.

Parameters
[in]gwThe widget object (must be a button object)
[in]paramA parameter passed in from the user. Ignored by this function.
Function Class:
Normal API, this function can be invoked by regular system threads.
void gwinButtonDraw_Rounded ( GWidgetObject gw,
void *  param 
)

Renders a rectangular button with rounded corners.

Parameters
[in]gwThe widget object (must be a button object)
[in]paramA parameter passed in from the user. Ignored by this function.
Precondition
GDISP_NEED_ARC must be set to TRUE
Function Class:
Normal API, this function can be invoked by regular system threads.