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 gImage 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.
◆ gwinButtonDraw_ArrowDown()
void gwinButtonDraw_ArrowDown |
( |
GWidgetObject * |
gw, |
|
|
void * |
param |
|
) |
| |
Renders a button in a shape of an arrow pointing down.
- Parameters
-
[in] | gw | The widget object (must be a button object) |
[in] | param | A parameter passed in from the user. Ignored by this function. |
- Precondition
- GDISP_NEED_CONVEX_POLYGON must be set to GFXON
- Function Class: Normal API, this function can be invoked by regular system threads.
◆ gwinButtonDraw_ArrowLeft()
void gwinButtonDraw_ArrowLeft |
( |
GWidgetObject * |
gw, |
|
|
void * |
param |
|
) |
| |
Renders a button in a shape of an arrow pointing left.
- Parameters
-
[in] | gw | The widget object (must be a button object) |
[in] | param | A parameter passed in from the user. Ignored by this function. |
- Precondition
- GDISP_NEED_CONVEX_POLYGON must be set to GFXON
- Function Class: Normal API, this function can be invoked by regular system threads.
◆ gwinButtonDraw_ArrowRight()
void gwinButtonDraw_ArrowRight |
( |
GWidgetObject * |
gw, |
|
|
void * |
param |
|
) |
| |
Renders a button in a shape of an arrow pointing right.
- Parameters
-
[in] | gw | The widget object (must be a button object) |
[in] | param | A parameter passed in from the user. Ignored by this function. |
- Precondition
- GDISP_NEED_CONVEX_POLYGON must be set to GFXON
- Function Class: Normal API, this function can be invoked by regular system threads.
◆ gwinButtonDraw_ArrowUp()
Renders a button in a shape of an arrow pointing up.
- Parameters
-
[in] | gw | The widget object (must be a button object) |
[in] | param | A parameter passed in from the user. Ignored by this function. |
- Precondition
- GDISP_NEED_CONVEX_POLYGON must be set to GFXON
- Function Class: Normal API, this function can be invoked by regular system threads.
◆ gwinButtonDraw_Ellipse()
Renders a button with an elliptical shape.
- Parameters
-
[in] | gw | The widget object (must be a button object) |
[in] | param | A parameter passed in from the user. Ignored by this function. |
- Precondition
- GDISP_NEED_ELLIPSE must be set to GFXON
- Function Class: Normal API, this function can be invoked by regular system threads.
◆ gwinButtonDraw_Image()
Renders a button using individual images for each button state.
- Parameters
-
[in] | gw | The widget object (must be a button object) |
[in] | param | A 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 GFXON
- Function Class: Normal API, this function can be invoked by regular system threads.
◆ gwinButtonDraw_Normal()
The default rendering function for the button widget.
- Parameters
-
[in] | gw | The widget object (must be a button object) |
[in] | param | A parameter passed in from the user. Ignored by this function. |
- Function Class: Normal API, this function can be invoked by regular system threads.
◆ gwinButtonDraw_Rounded()
Renders a rectangular button with rounded corners.
- Parameters
-
[in] | gw | The widget object (must be a button object) |
[in] | param | A parameter passed in from the user. Ignored by this function. |
- Precondition
- GDISP_NEED_ARC must be set to GFXON
- Function Class: Normal API, this function can be invoked by regular system threads.