- Timestamp:
- 08/09/06 12:12:54 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_slider_pm.pro
r134 r150 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 ;+5 ; NAME: cw_slider_pm6 ;7 ; PURPOSE: widget equivalent a WIDGET_SLIDER sauf qu'en plus on8 ; dispose de 2 bouttons + et - pour deplacer le widget de +/- 1.9 ;10 ; CATEGORY: compound widget (aide a l''ecriture des widgets)11 ;12 ; CALLING SEQUENCE: id=cw_slider_pm(parent)13 ;14 ; INPUTS:15 ; Parent: The widget ID of the parent widget.16 ;17 ; KEYWORD PARAMETERS:tous ceux de WIDGET_SLIDER18 ;19 ; OUTPUTS:20 ; The returned value of this function is the widget ID of the21 ; newly-created animation widget.22 ;23 ; COMMON BLOCKS: none24 ;25 ; SIDE EFFECTS:26 ;27 ; Widget Events Returned by the CW_SLIDER_PM Widget28 ;29 ; Slider widgets generate events when the mouse is used to change30 ; their value. The event structure returned by the WIDGET_EVENT31 ; function is defined by the following statement:32 ;33 ; {CW_SLIDER_PM, ID:0L, TOP:0L, HANDLER:0L, VALUE:0L, DRAG:0, OUT:0}34 ;35 ; ID is the widget ID of the button generating the event. TOP is the36 ; widget ID of the top level widget containing ID.37 ; HANDLER contains the widget ID of the widget associated with the38 ; handler routine.39 ; VALUE returns the new value of the slider.40 ; DRAG returns integer 1 if the slider event was generated as part of41 ; a drag operation, or zero if the event was generated when the user42 ; had finished positioning the slider. Note that the slider widget43 ; only generates events during the drag operation if the DRAG keyword44 ; is set, and if the application is running under Motif. When the45 ; DRAG keyword is set, the DRAG field can be used to avoid46 ; computationally expensive operations until the user releases the47 ; slider.48 ; OUT:c''est un entier qui peut prendre 3 valeurs:49 ; 1 : si on appuie sur + alors que le slider est deja aux max. rq:50 ; ds ce cas le slider reste au max51 ; -1: si on appuie sur - alors que le slider est deja aux min. rq:52 ; ds ce cas le slider reste au min53 ; 0 : ds les autres cas!54 ;55 ; Keywords to WIDGET_CONTROL56 ;57 ; A number of keywords to the WIDGET_CONTROL procedure affect the58 ; behavior of cw_slider_pm widget: GET_VALUE and SET_VALUE.59 ; 1) GET_VALUE60 ; widget_control,wid_id,get_value=resultat61 ; retourne ds la variable resultat une structure de 2 elements dont62 ; les noms sont inspires des mots cles que l''on peut passer a63 ; widget_control qd on utilise WIDGET_SLIDER:64 ; VALUE:the value setting of the widget65 ; SLIDER_MIN_MAX: a 2 elements array: The minimum and the66 ; maximum value of the range encompassed by the slider67 ; 2) SET_VALUE68 ; widget_control,wid_id,set_value=impose69 ; permet de modifier l''etat de la slider bar comme on peut le faire70 ; pour WIDGET_SLIDER. Impose peut etre:71 ; a) un entier: donne la nouvelle position of the slider.72 ; b) une structure qui peut avoir comme elements (de 1 a 3):73 ; VALUE:un entier qui donne la nouvelle position of the slider.74 ; SLIDER_MIN:Set to a new minimum value for the specified75 ; slider widget.76 ; SLIDER_MAX:Set to a new minimum value for the specified77 ; slider widget.78 ;79 ; RESTRICTIONS:80 ;81 ; EXAMPLE: cf utiliser le programme founit i-dessous: testwid et la82 ; procedure associee, testwid_event.83 ;84 ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr)85 ; 5/9/199986 ;-87 ;------------------------------------------------------------88 ;------------------------------------------------------------89 ;------------------------------------------------------------90 1 ; PRO testwid_event, event 91 2 ; ; help, event, /STRUCT … … 249 160 end 250 161 ;---------------------------------------------------------------------- 162 ;------------------------------------------------------------ 163 ;------------------------------------------------------------ 164 ;------------------------------------------------------------ 165 ;+ 166 ; 167 ; @file_comments 168 ; Like WIDGET_SLIDER but here, their are 2 buttons + and - to move the widget from +/- 1 169 ; 170 ; @categories 171 ; compound widget 172 ; 173 ; @param PARENT {in}{required} 174 ; The widget ID of the parent widget. 175 ; 176 ; @keyword UVALUE 177 ; The user value to be associated with the widget. 178 ; 179 ; @keyword UNAME 180 ; The user name to be associated with the widget. 181 ; 182 ; @keyword VALUE 183 ; 184 ; 185 ; @keyword MAXIMUM 186 ; 187 ; 188 ; @keyword MINIMUM 189 ; 190 ; 191 ; @keyword STRMINLEN 192 ; 193 ; 194 ; @keyword _EXTRA 195 ; Used to pass your keywords 196 ; 197 ; @returns 198 ; The returned value of this function is the widget ID of the 199 ; newly-created animation widget. 200 ; 201 ; @restrictions 202 ; 203 ; Widget Events Returned by the CW_SLIDER_PM Widget 204 ; 205 ; Slider widgets generate events when the mouse is used to change 206 ; their value. The event structure returned by the WIDGET_EVENT 207 ; function is defined by the following statement: 208 ; 209 ; {CW_SLIDER_PM, ID:0L, TOP:0L, HANDLER:0L, VALUE:0L, DRAG:0, OUT:0} 210 ; 211 ; ID is the widget ID of the button generating the event. TOP is the 212 ; widget ID of the top level widget containing ID. 213 ; HANDLER contains the widget ID of the widget associated with the 214 ; handler routine. 215 ; VALUE returns the new value of the slider. 216 ; DRAG returns integer 1 if the slider event was generated as part of 217 ; a drag operation, or zero if the event was generated when the user 218 ; had finished positioning the slider. Note that the slider widget 219 ; only generates events during the drag operation if the DRAG keyword 220 ; is set, and if the application is running under Motif. When the 221 ; DRAG keyword is set, the DRAG field can be used to avoid 222 ; computationally expensive operations until the user releases the 223 ; slider. 224 ; OUT:It is an integer which can take 3 values: 225 ; 1 : If we press + when the index is already at the max 226 ; Comment: In this case, the index stay at the max 227 ; -1: If we press - when the index is already at the min 228 ; Comment: In this case, the index stay at the min 229 ; 0 : In other cases 230 ; 231 ; Keywords to WIDGET_CONTROL 232 ; 233 ; A number of keywords to the WIDGET_CONTROL procedure affect the 234 ; behavior of cw_slider_pm widget: GET_VALUE and SET_VALUE. 235 ; 1) GET_VALUE 236 ; widget_control,wid_id,get_value=resultat 237 ; retourne ds la variable resultat une structure de 2 elements dont 238 ; les noms sont inspires des mots cles que l''on peut passer a 239 ; widget_control qd on utilise WIDGET_SLIDER: 240 ; VALUE:the value setting of the widget 241 ; SLIDER_MIN_MAX: a 2 elements array: The minimum and the 242 ; maximum value of the range encompassed by the slider 243 ; 2) SET_VALUE 244 ; widget_control,wid_id,set_value=impose 245 ; Allows to modify the state of the combobox like we can do it for 246 ; WIDGET_COMBOBOX. May impose: 247 ; a) un entier: donne la nouvelle position of the slider. 248 ; b) A structure which can have for elements (from 1 to 3): 249 ; VALUE: an integer which give the new position of the slider 250 ; SLIDER_MIN:Set to a new minimum value for the specified 251 ; slider widget. 252 ; SLIDER_MAX:Set to a new minimum value for the specified 253 ; slider widget. 254 ; 255 ; 256 ; @examples 257 ; See the program provided above (testwid and the associated procedure, testwid_event). 258 ; 259 ; @history 260 ; Sebastien Masson (smasson@lodyc.jussieu.fr) 261 ; 5/9/1999 262 ; 263 ; @version 264 ; $Id$ 265 ; 266 ; @todo 267 ; seb: documenter 268 ; 269 ;- 270 ;------------------------------------------------------------ 271 ;------------------------------------------------------------ 272 ;------------------------------------------------------------ 251 273 FUNCTION cw_slider_pm, parent, MAXIMUM = maximum, MINIMUM = minimum $ 252 274 , STRMINLEN = strminlen, VALUE = value, UVALUE = uvalue $
Note: See TracChangeset
for help on using the changeset viewer.