version 2.8
Renderings

Detailed Description

Built-in rendering functions for the slider widget.

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

Note
In your custom slider drawing function you may optionally call these standard functions and then draw your extra details on top.
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 gwinSliderDraw_Std (GWidgetObject *gw, void *param)
 The default rendering function for the slider widget. More...
 
void gwinSliderDraw_Image (GWidgetObject *gw, void *param)
 The default rendering function. More...
 

Function Documentation

void gwinSliderDraw_Image ( GWidgetObject gw,
void *  param 
)

The default rendering function.

Parameters
[in]gwThe widget object (must be a slider 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. No 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.

Referenced by gwinSliderDraw_Std().

void gwinSliderDraw_Std ( GWidgetObject gw,
void *  param 
)

The default rendering function for the slider widget.

Parameters
[in]gwThe widget object (must be a slider 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.

Definition at line 343 of file gwin_slider.c.

References GWidgetStyle::disabled, GWindowObject::display, GColorSet::edge, GWidgetStyle::enabled, GColorSet::fill, GWindowObject::flags, GWidgetObject::g, gdispGDrawBox(), gdispGDrawLine(), gdispGDrawStringBox(), gdispGFillArea(), gdispGImageDraw(), gwinSliderDraw_Image(), GWindowObject::height, justifyCenter, GColorSet::progress, GWidgetObject::pstyle, GColorSet::text, GWidgetObject::text, GWindowObject::vmt, GWindowObject::width, GWindowObject::x, and GWindowObject::y.