- Timestamp:
- 08/09/06 12:12:54 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_combobox_pm.pro
r134 r150 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 ;+5 ; NAME: cw_combobox_pm6 ;7 ; PURPOSE: widget equivalent a WIDGET_COMBOBOX 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_combobox_pm(parent)13 ;14 ; INPUTS:15 ; Parent: The widget ID of the parent widget.16 ;17 ; KEYWORD PARAMETERS:tous ceux de WIDGET_COMBOBOX18 ;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 Combobox Widgets28 ;29 ; Pressing the mouse button while the mouse cursor is over an30 ; element of a combobox widget causes the widget to change the label31 ; on the combobox button and to generate an event. The appearance of32 ; any previously selected element is restored to normal at the same33 ; time. The event structure returned by the WIDGET_EVENT function is34 ; defined by the following statement:35 ;36 ; { CW_COMBOBOX_PM, ID:0L, TOP:0L, HANDLER:0L, INDEX:0L, OUT:0 }37 ;38 ; The first three fields are the standard fields found in every39 ; widget event.40 ; INDEX returns the index of the selected item. This can be used to41 ; index the array of names originally used to set the widget''s42 ; value43 ; OUT:c''est un entier qui peut prendre 3 valeurs:44 ; 1 : si on appuie sur + alors que l''index est deja aux max. rq:45 ; ds ce cas l''index reste au max46 ; -1: si on appuie sur - alors que l''index est deja aux min. rq:47 ; ds ce cas l''index reste au min48 ; 0 : ds les autres cas!49 ;50 ; Keywords to WIDGET_CONTROL51 ;52 ; A number of keywords to the WIDGET_CONTROL procedure affect the53 ; behavior of cw_slider_pm widget: GET_VALUE and SET_VALUE.54 ; 1) GET_VALUE55 ; widget_control,wid_id,get_value=resultat56 ; retourne ds la variable resultat une structure de 3 elements dont57 ; les noms sont inspires des mots cles que l''on peut passer a58 ; widget_control qd on utilise WIDGET_COMBOBOX:59 ; COMBOBOX_NUMBER: the number of elements currently60 ; contained in the specified combobox widget.61 ; COMBOBOX_SELECT: the zero-based number of the62 ; currently-selected element (i.e., the currently-displayed63 ; element) in the specified combobox widget.64 ; DYNAMIC_RESIZE: a True value (1) if the widget specified65 ; by Widget_ID is a button, combobox, or label widget that66 ; has had its DYNAMIC_RESIZE attribute set. Otherwise,67 ; False (0) is returned.68 ; 2) SET_VALUE69 ; widget_control,wid_id,set_value=impose70 ; permet de modifier l''etat de la combobox comme on peut le faire71 ; pour WIDGET_COMBOBOX Impose peut etre:72 ; a) The contents of the list widget (string or string array)73 ; b) une structure qui peut avoir comme elements (de 1 a 3):74 ; DYNAMIC_RESIZE:Set this keyword to activate (if set to 1)75 ; or deactivate (if set to 0) dynamic resizing of the76 ; specified CW_COMBOBOX_PM widget (see the documentation77 ; for the DYNAMIC_RESIZE keyword to WIDGET_COMBOBOX78 ; procedure for more information about dynamic widget79 ; resizing).80 ; COMBOBOX_SELECT:Set this keyword to return the zero-based81 ; number of the currently-selected element (i.e., the82 ; currently-displayed element) in the specified combobox83 ; widget.84 ; VALUE: The contents of the list widget (string or string85 ; array)86 ;87 ; RESTRICTIONS:88 ;89 ; EXAMPLE: cf utiliser le programme founit i-dessous: testwid et la90 ; procedure associee, testwid_event.91 ;92 ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr)93 ; 6/9/199994 ;95 ;-96 ;------------------------------------------------------------97 ;------------------------------------------------------------98 ;------------------------------------------------------------99 1 ; testwid, value=strtrim(indgen(10),2) 100 2 ; PRO testwid_event, event … … 212 114 , INDEX:index, STR:cmbbtxt, OUT:out} 213 115 end 214 ;---------------------------------------------------------------------- 116 ;------------------------------------------------------------ 117 ;------------------------------------------------------------ 118 ;------------------------------------------------------------ 119 ;+ 120 ; 121 ; @file_comments 122 ; Like WIDGET_COMBOBOX but here, their are 2 buttons + and - to move the widget from +/- 1 123 ; 124 ; @categories 125 ; compound widget 126 ; 127 ; @param PARENT {in}{required} 128 ; The widget ID of the parent widget. 129 ; 130 ; @keyword COLUMN 131 ; Buttons will be arranged in the number of columns 132 ; specified by this keyword. 133 ; 134 ; @keyword ROW 135 ; Buttons will be arranged in the number of rows 136 ; specified by this keyword. 137 ; 138 ; @keyword UVALUE 139 ; The user value to be associated with the widget. 140 ; 141 ; @keyword UNAME 142 ; The user name to be associated with the widget. 143 ; 144 ; @keyword VALUE 145 ; 146 ; 147 ; @keyword _EXTRA 148 ; Used to pass your keywords 149 ; 150 ; @returns 151 ; The returned value of this function is the widget ID of the 152 ; newly-created animation widget. 153 ; 154 ; @restrictions 155 ; 156 ; Widget Events Returned by Combobox Widgets 157 ; 158 ; Pressing the mouse button while the mouse cursor is over an 159 ; element of a combobox widget causes the widget to change the label 160 ; on the combobox button and to generate an event. The appearance of 161 ; any previously selected element is restored to normal at the same 162 ; time. The event structure returned by the WIDGET_EVENT function is 163 ; defined by the following statement: 164 ; 165 ; { CW_COMBOBOX_PM, ID:0L, TOP:0L, HANDLER:0L, INDEX:0L, OUT:0 } 166 ; 167 ; The first three fields are the standard fields found in every 168 ; widget event. 169 ; INDEX returns the index of the selected item. This can be used to 170 ; index the array of names originally used to set the widget''s 171 ; value 172 ; OUT:It is an integer which can take 3 values: 173 ; 1 : If we press + when the index is already at the max 174 ; Comment: In this case, the index stay at the max 175 ; -1: If we press - when the index is already at the min 176 ; Comment: In this case, the index stay at the min 177 ; 0 : In other cases 178 ; 179 ; Keywords to WIDGET_CONTROL 180 ; 181 ; A number of keywords to the WIDGET_CONTROL procedure affect the 182 ; behavior of cw_slider_pm widget: GET_VALUE and SET_VALUE. 183 ; 1) GET_VALUE 184 ; widget_control,wid_id,get_value=resultat 185 ; Send back, in the result variable, a structure of 3 elements whose 186 ; names are inspired by keywords we can pass at widget_control when 187 ; we use WIDGET_COMBOBOX: 188 ; COMBOBOX_NUMBER: the number of elements currently 189 ; contained in the specified combobox widget. 190 ; COMBOBOX_SELECT: the zero-based number of the 191 ; currently-selected element (i.e., the currently-displayed 192 ; element) in the specified combobox widget. 193 ; DYNAMIC_RESIZE: a True value (1) if the widget specified 194 ; by Widget_ID is a button, combobox, or label widget that 195 ; has had its DYNAMIC_RESIZE attribute set. Otherwise, 196 ; False (0) is returned. 197 ; 2) SET_VALUE 198 ; widget_control,wid_id,set_value=impose 199 ; Allows to modify the state of the combobox like we can do it for 200 ; WIDGET_COMBOBOX. May impose: 201 ; a) The contents of the list widget (string or string array) 202 ; b) A structure which can have for elements (from 1 to 3): 203 ; DYNAMIC_RESIZE:Set this keyword to activate (if set to 1) 204 ; or deactivate (if set to 0) dynamic resizing of the 205 ; specified CW_COMBOBOX_PM widget (see the documentation 206 ; for the DYNAMIC_RESIZE keyword to WIDGET_COMBOBOX 207 ; procedure for more information about dynamic widget 208 ; resizing). 209 ; COMBOBOX_SELECT:Set this keyword to return the zero-based 210 ; number of the currently-selected element (i.e., the 211 ; currently-displayed element) in the specified combobox 212 ; widget. 213 ; VALUE: The contents of the list widget (string or string 214 ; array) 215 ; 216 ; @examples 217 ; See the program provided above (testwid and the associated procedure, testwid_event). 218 ; 219 ; @history 220 ; Sebastien Masson (smasson@lodyc.jussieu.fr) 221 ; 6/9/1999 222 ; 223 ; @version 224 ; $Id$ 225 ; 226 ;- 227 ;------------------------------------------------------------ 228 ;------------------------------------------------------------ 229 ;------------------------------------------------------------ 215 230 FUNCTION cw_combobox_pm, parent, VALUE = value, UVALUE = uvalue, UNAME = uname, ROW = row, COLUMN = column, _extra = ex 216 231 ;
Note: See TracChangeset
for help on using the changeset viewer.