Ignore:
Timestamp:
08/09/06 12:12:54 (18 years ago)
Author:
navarro
Message:

english and nicer header (3a)

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_pm 
    6 ; 
    7 ; PURPOSE: widget equivalent a WIDGET_COMBOBOX sauf qu'en plus on 
    8 ; 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_COMBOBOX 
    18 ; 
    19 ; OUTPUTS: 
    20 ;         The returned value of this function is the widget ID of the 
    21 ;         newly-created animation widget. 
    22 ; 
    23 ; COMMON BLOCKS: none 
    24 ; 
    25 ; SIDE EFFECTS: 
    26 ; 
    27 ;     Widget Events Returned by Combobox Widgets 
    28 ; 
    29 ;   Pressing the mouse button while the mouse cursor is over an 
    30 ;   element of a combobox widget causes the widget to change the label 
    31 ;   on the combobox button and to generate an event. The appearance of 
    32 ;   any previously selected element is restored to normal at the same 
    33 ;   time. The event structure returned by the WIDGET_EVENT function is 
    34 ;   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 every 
    39 ;   widget event. 
    40 ;   INDEX returns the index of the selected item. This can be used to 
    41 ;   index the array of names originally used to set the widget''s 
    42 ;   value 
    43 ;   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 max 
    46 ;       -1: si on appuie sur - alors que l''index est deja aux min. rq: 
    47 ;       ds ce cas l''index reste au min 
    48 ;       0 : ds les autres cas! 
    49 ; 
    50 ;   Keywords to WIDGET_CONTROL 
    51 ; 
    52 ;   A number of keywords to the WIDGET_CONTROL procedure affect the 
    53 ;   behavior of cw_slider_pm widget: GET_VALUE and SET_VALUE. 
    54 ;       1) GET_VALUE 
    55 ;   widget_control,wid_id,get_value=resultat 
    56 ;   retourne ds la variable resultat une structure de 3 elements dont 
    57 ;   les noms sont inspires des mots cles que l''on peut passer a 
    58 ;   widget_control qd on utilise WIDGET_COMBOBOX: 
    59 ;            COMBOBOX_NUMBER: the number of elements currently 
    60 ;            contained in the specified combobox widget. 
    61 ;            COMBOBOX_SELECT: the zero-based number of the 
    62 ;            currently-selected element (i.e., the currently-displayed 
    63 ;            element) in the specified combobox widget. 
    64 ;            DYNAMIC_RESIZE: a True value (1) if the widget specified 
    65 ;            by Widget_ID is a button, combobox, or label widget that 
    66 ;            has had its DYNAMIC_RESIZE attribute set. Otherwise, 
    67 ;            False (0) is returned. 
    68 ;       2) SET_VALUE 
    69 ;   widget_control,wid_id,set_value=impose 
    70 ;   permet de modifier l''etat de la combobox comme on peut le faire 
    71 ;   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 the 
    76 ;            specified CW_COMBOBOX_PM widget (see the documentation 
    77 ;            for the DYNAMIC_RESIZE keyword to WIDGET_COMBOBOX 
    78 ;            procedure for more information about dynamic widget 
    79 ;            resizing). 
    80 ;            COMBOBOX_SELECT:Set this keyword to return the zero-based 
    81 ;            number of the currently-selected element (i.e., the 
    82 ;            currently-displayed element) in the specified combobox 
    83 ;            widget. 
    84 ;            VALUE: The contents of the list widget (string or string 
    85 ;            array) 
    86 ; 
    87 ; RESTRICTIONS: 
    88 ; 
    89 ; EXAMPLE: cf utiliser le programme founit i-dessous: testwid et la 
    90 ; procedure associee, testwid_event. 
    91 ; 
    92 ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr) 
    93 ;                      6/9/1999 
    94 ; 
    95 ;- 
    96 ;------------------------------------------------------------ 
    97 ;------------------------------------------------------------ 
    98 ;------------------------------------------------------------ 
    991; testwid, value=strtrim(indgen(10),2) 
    1002; PRO testwid_event, event 
     
    212114                  , INDEX:index, STR:cmbbtxt, OUT:out} 
    213115end 
    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;------------------------------------------------------------ 
    215230FUNCTION cw_combobox_pm, parent, VALUE = value, UVALUE = uvalue, UNAME = uname, ROW = row, COLUMN = column, _extra = ex 
    216231; 
Note: See TracChangeset for help on using the changeset viewer.