Sliders library SlidAttach()
Programming guideline of WinDom

SlidCreate()

NAME

SlidCreate - Initialise a slider structure.

PROTOTYPAGE

void *SlidCreate( float min, float max, float value, float line, float page, int dir, int upd);

PARAMETERS

min:
minimal value,

max:
maximal value,

value:
current value,

line:
small incremental step,

page:
large incremental step,

dir:
direction of slider :

SLD_HORI
horizontal slider,

SLD_VERT
vertical slider.

upd:
kind of slider update :

SLD_IMME
slider is immediatly updated,

SLD_DIFF
slider is updated after the user action.

return:
slider structure created.

DESCRIPTION

The function creates a slider structure. It is not an AES object tree in a formular but only some variables to handle a set of objects representing and acting as a slider.

The object slider should be creating in a resource editor (or in other way). Then this object slider must to attached to the slider structure created by SlidCreate(). The function SlidAttach() performs this link.

Values given to SlidCreate() are flotting numbers because you can handle a decimal variable in a slider. Min, max and value are respectively the minimal value, the maximal value and the current value of the internal slider variable. To read or eventually to change the internal variable use functions SlidGetValue() and SlidSetValue().

Parameters line and page addresses the user interaction in the slider object. line represents a small incrementation or decrementation of the slider value and page represents a large incrementation or decrementation (see SlidAttach()).

Parameter upd is usefull if you attach an update function to the slider (see SlidSetFunc()). This function is called when the slider value is changed.

SEE ALSO

SlidAttach(), SlidSetValue(), SlidGetValue(), SlidSetFunc().