topcw_slider_pm
Compound widget
Return value
The returned value of this function is the widget ID of the
newly-created animation widget.
Parameters
parent
in
required
Keywords
MAXIMUM
MINIMUM
STRMINLEN
VALUE
UVALUE
UNAME
TITLE
Examples
See the program provided above (testwid and the associated procedure, testwid_event).
Version history
Version
$Id: cw_slider_pm.pro 327 2007-12-13 16:22:35Z pinsard $
History
Sebastien Masson (smasson@lodyc.jussieu.fr)
5/9/1999
Known issues
Todo items
seb: documenter
Restrictions
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:It is an integer which can take 3 values:
1 : If we press + when the index is already at the max
Comment: In this case, the index stay at the max
-1: If we press - when the index is already at the min
Comment: In this case, the index stay at the min
0 : In other cases
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
Send back in the result variable a structure of 2 elements whose name
are inspired from keywords we can pass at
widget_control when we use 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
Allows to modify the state of the combobox like we can do it for
WIDGET_COMBOBOX. May impose:
a) a integer: give the new position of the slider.
b) A structure which can have for elements (from 1 to 3):
VALUE: an integer which give the new 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.
Statistics
McCabe cyclic | 9 |
McCabe essential | 1 |
McCabe modular design | 1 |