- Timestamp:
- 03/19/07 18:15:51 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_pagelayout.pro
r157 r231 1 ;*********************************************************************2 1 ;+ 2 ; 3 3 ; @file_comments 4 ;5 4 ; 6 5 ; @categories 7 6 ; Compound widget 8 ; 7 ; 9 8 ; @param EVENT 10 9 ; 10 ; @returns 11 11 ; 12 ; @returns13 ;14 ;15 12 ; @uses 16 ; 17 ; 13 ; 18 14 ; @restrictions 19 ; 20 ; 15 ; 21 16 ; @examples 22 ; 23 ; 17 ; 24 18 ; @history 25 ; 26 ; 27 ; @version 19 ; 20 ; @version 28 21 ; $Id$ 29 22 ;- 30 ; *********************************************************************23 ; 31 24 FUNCTION cw_pagelayout_event, event 32 25 ; … … 43 36 if uval.name EQ 'undo' then begin 44 37 return,{ID:event.handler, TOP:event.top, HANDLER:0L} 45 ENDIF ELSE BEGIN 38 ENDIF ELSE BEGIN 46 39 ; 47 40 @common … … 63 56 case uval.name of 64 57 'clear': 65 'column':BEGIN 58 'column':BEGIN 66 59 smallin = [event.index+1, smallin[1], 1] 67 60 smallout = [event.index+1, smallout[1], 1] … … 73 66 endcase 74 67 nbredessin = smallin[0]*smallin[1] 75 ; 68 ; 76 69 ; We put all back to 0 for postscripts 77 70 createhistory, event.top, smallin 78 ; 79 options = extractatt(top_uvalue, 'options') 71 ; 72 options = extractatt(top_uvalue, 'options') 80 73 flags = extractatt(top_uvalue, 'optionsflag') 81 74 flag = flags[*, numdessinin] 82 ; 75 ; 83 76 ; update and reset all values of the top_uvalue... 84 77 ; … … 100 93 ptr_free, extractatt(top_uvalue, 'exextra') 101 94 *top_uvalue[1, findline(top_uvalue, 'exextra')] = ptrarr(nbredessin, /allocate_heap) 102 ; *top_uvalue[1, findline(top_uvalue, '')] = 95 ; *top_uvalue[1, findline(top_uvalue, '')] = 103 96 ; 104 ENDELSE 97 ENDELSE 105 98 106 99 return,{ID:event.handler, TOP:event.top, HANDLER:0L} 107 100 end 108 ; *********************************************************************101 ; 109 102 ;+ 103 ; 110 104 ; @file_comments 111 ;112 105 ; 113 106 ; @categories 114 107 ; Compound widget 115 ; 108 ; 116 109 ; @param PARENT {in}{required} 117 110 ; The widget ID of the parent widget. 118 111 ; 119 ; @param SMALL 120 ; 112 ; @param SMALL 121 113 ; 122 114 ; @keyword COLUMN 123 115 ; Buttons will be arranged in the number of columns 124 116 ; specified by this keyword. 125 ; 117 ; 126 118 ; @keyword ROW 127 119 ; Buttons will be arranged in the number of rows 128 120 ; specified by this keyword. 129 ; 121 ; 130 122 ; @keyword UVALUE 131 123 ; The user value to be associated with the widget. 132 ; 124 ; 133 125 ; @keyword UNAME 134 126 ; The user name to be associated with the widget. 135 127 ; 136 128 ; @keyword _EXTRA 137 ; Used to pass yourkeywords129 ; Used to pass keywords 138 130 ; 139 131 ; @keyword UNZOOM 140 ; 141 ; 132 ; 142 133 ; @returns 143 ; 144 ; 134 ; 145 135 ; @uses 146 ; 147 ; 136 ; 148 137 ; @restrictions 149 ; 150 ; 138 ; 151 139 ; @examples 152 ; 153 ; 140 ; 154 141 ; @history 155 ; 156 ; 142 ; 157 143 ; @version 158 ; $Id$ 159 ; 160 ; @todo 144 ; $Id$ 145 ; 146 ; @todo 161 147 ; seb: documenter 162 ; 148 ; 163 149 ;- 150 ; 164 151 FUNCTION cw_pagelayout, parent, small, UVALUE = uvalue, UNAME = uname, UNZOOM = unzoom, COLUMN = column, ROW = row, _extra = ex 165 ;------------------------------------------------166 152 ; 167 153 compile_opt idl2, strictarrsubs 168 154 ; 169 row = keyword_set(row)*(1-keyword_set(column)) 155 row = keyword_set(row)*(1-keyword_set(column)) 170 156 if NOT keyword_set(uvalue) then uvalue = '' 171 157 if NOT keyword_set(uname) then uname = '' … … 174 160 , FUNC_GET_VALUE = 'cw_pagelayout_get_value' $ 175 161 , PRO_SET_VALUE = 'cw_pagelayout_set_value' $ 176 , UVALUE = uvalue, UNAME = uname, space = 0, _extra = ex) 162 , UVALUE = uvalue, UNAME = uname, space = 0, _extra = ex) 177 163 ;------------------------------------------------ 178 164 IF n_elements(small) eq 0 then small = [1, 1, 1] … … 183 169 widget_control, id, set_combobox_select = small[0]-1 184 170 ; 185 IF keyword_set(row) THEN BEGIN 171 IF keyword_set(row) THEN BEGIN 186 172 xoff = 60 187 173 yoff = 0 188 ENDIF ELSE BEGIN 174 ENDIF ELSE BEGIN 189 175 xoff = 0 190 176 yoff = 20 191 ENDELSE 177 ENDELSE 192 178 dummy = widget_label(base, value = 'row', xoffset = xoff, yoffset = yoff+3) 193 179 id = widget_combobox(base, value = strtrim(indgen(9)+1, 1), uvalue = {name:'row'} $ … … 198 184 return, base 199 185 end 200 ;*********************************************************************
Note: See TracChangeset
for help on using the changeset viewer.