NAME: cw_slider_pm
PURPOSE: widget equivalent a WIDGET_SLIDER sauf qu'en plus on
dispose de 2 bouttons + et - pour deplacer le widget de +/- 1.
CATEGORY: compound widget (aide a l''ecriture des widgets)
CALLING SEQUENCE: id=cw_slider_pm(parent)
INPUTS:
Parent: The widget ID of the parent widget.
KEYWORD PARAMETERS:tous ceux de WIDGET_SLIDER
OUTPUTS:
The returned value of this function is the widget ID of the
newly-created animation widget.
COMMON BLOCKS: none
SIDE EFFECTS:
Widget Events Returned by the CW_SLIDER_PM Widget
Slider widgets generate events when the mouse is used to change
their value. The event structure returned by the WIDGET_EVENT
function is defined by the following statement:
{CW_SLIDER_PM, ID:0L, TOP:0L, HANDLER:0L, VALUE:0L, DRAG:0, OUT:0}
ID is the widget ID of the button generating the event. TOP is the
widget ID of the top level widget containing ID.
HANDLER contains the widget ID of the widget associated with the
handler routine.
VALUE returns the new value of the slider.
DRAG returns integer 1 if the slider event was generated as part of
a drag operation, or zero if the event was generated when the user
had finished positioning the slider. Note that the slider widget
only generates events during the drag operation if the DRAG keyword
is set, and if the application is running under Motif. When the
DRAG keyword is set, the DRAG field can be used to avoid
computationally expensive operations until the user releases the
slider.
OUT:c''est un entier qui peut prendre 3 valeurs:
1 : si on appuie sur + alors que le slider est deja aux max. rq:
ds ce cas le slider reste au max
-1: si on appuie sur - alors que le slider est deja aux min. rq:
ds ce cas le slider reste au min
0 : ds les autres cas!
Keywords to WIDGET_CONTROL
A number of keywords to the WIDGET_CONTROL procedure affect the
behavior of cw_slider_pm widget: GET_VALUE and SET_VALUE.
1) GET_VALUE
widget_control,wid_id,get_value=resultat
retourne ds la variable resultat une structure de 2 elements dont
les noms sont inspires des mots cles que l''on peut passer a
widget_control qd on utilise WIDGET_SLIDER:
VALUE:the value setting of the widget
SLIDER_MIN_MAX: a 2 elements array: The minimum and the
maximum value of the range encompassed by the slider
2) SET_VALUE
widget_control,wid_id,set_value=impose
permet de modifier l''etat de la slider bar comme on peut le faire
pour WIDGET_SLIDER. Impose peut etre:
a) un entier: donne la nouvelle position of the slider.
b) une structure qui peut avoir comme elements (de 1 a 3):
VALUE:un entier qui donne la nouvelle position of the slider.
SLIDER_MIN:Set to a new minimum value for the specified
slider widget.
SLIDER_MAX:Set to a new minimum value for the specified
slider widget.
RESTRICTIONS:
EXAMPLE: cf utiliser le programme founit i-dessous: testwid et la
procedure associee, testwid_event.