Changeset 133 for trunk/SRC/Colors/xpal.pro
- Timestamp:
- 07/07/06 11:57:27 (18 years ago)
- Location:
- trunk/SRC/Colors
- Files:
-
- 1 added
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Colors/xpal.pro
r132 r133 1 ; $Id$2 ;3 ; Copyright (c) 1992-1998, Research Systems, Inc. All rights reserved.4 ; Unauthorized reproduction prohibited.5 1 ;+ 6 ; NAME: 7 ; XPAL 8 ; 9 ; PURPOSE: 10 ; comme xpalette mais plus court a ecrire et possede en plus 11 ; une touche save qui (grace a la routine newpalette) permet de 12 ; sauver la routine que l''on vient de faire. Rq qd on appuie 13 ; sur la touche predefined appelle xlct plutot que xloadct 14 ; 15 ; CATEGORY: 16 ; Color tables, widgets. 17 ; 18 ; CALLING SEQUENCE: 19 ; XPAL 20 ; 21 ; INPUTS: 22 ; No explicit inputs. The current color table is used as a starting 23 ; point. 24 ; 25 ; KEYWORD PARAMETERS: 26 ; BLOCK: Set this keyword to have XMANAGER block when this 2 ; 3 ; @file_comments 4 ; like xpalette but shorter to write and ,moreover, 5 ; possess a hotkey save which (thanks to the newpalette routine) 6 ; allows to save the routine that we have just done. Comment: when we 7 ; press the predefined hotkey, it calls xlct instead of xloadct 8 ; No explicit inputs. The current color table is used as a starting point. 9 ; 10 ; @categories Color tables, widgets. 11 ; 12 ; @keyword BLOCK Set this keyword to have XMANAGER block when this 27 13 ; application is registered. By default the Xmanager 28 14 ; keyword NO_BLOCK is set to 1 to provide access to the … … 32 18 ; application. For more information see the NO_BLOCK keyword 33 19 ; to XMANAGER. 34 ; UPDATECALLBACK:Set this keyword to a string containing the name of20 ; @keyword UPDATECALLBACK Set this keyword to a string containing the name of 35 21 ; a user-supplied procedure that will be called when the color 36 22 ; table is updated by XLOADCT. The procedure may optionally … … 38 24 ; set to the value specified by the optional UPDATECBDATA 39 25 ; keyword. 40 ; UPDATECBDATA:Set this keyword to a value of any type. It will be26 ; @keyword UPDATECBDATA Set this keyword to a value of any type. It will be 41 27 ; passed via the DATA keyword to the user-supplied procedure 42 28 ; specified via the UPDATECALLBACK keyword, if any. If the … … 45 31 ; will be undefined. 46 32 ; 47 ; OUTPUTS: 48 ; None. 49 ; 50 ; COMMON BLOCKS: 51 ; COLORS: Contains the current RGB color tables. 52 ; XP_COM: Private to this module. 53 ; 54 ; SIDE EFFECTS: 55 ; XPAL uses two colors from the current color table as 33 ; @uses COLORS: Contains the current RGB color tables. 34 ; @uses XP_COM: Private to this module. 35 ; 36 ; @restrictions XPAL uses two colors from the current color table as 56 37 ; drawing foreground and background colors. These are used 57 38 ; for the RGB plots on the left, and the current index marker on … … 72 53 ; to the display. 73 54 ; 74 ; PROCEDURE: 75 ; The XPAL widget has the following controls: 55 ; @examples The XPAL widget has the following controls: 76 56 ; 77 57 ; Left: Three plots showing the current Red, Green, and Blue vectors. … … 95 75 ; pressed: 96 76 ; 97 ; Done:Exits XPAL.98 ; 99 ; Predefined:Starts XLOADCT to allow selection of one of the77 ; Done: Exits XPAL. 78 ; 79 ; Predefined: Starts XLOADCT to allow selection of one of the 100 80 ; predefined color tables. 101 81 ; 102 ; Help:Supplies help information similar to this header.82 ; Help: Supplies help information similar to this header. 103 83 ; 104 84 ; Redraw: Completely redraws the display using the current … … 117 97 ; index and the mark index are interpolated linearly 118 98 ; to lie between the colors of two endpoints. 119 ; save: permet de sauver la palette qui est 120 ; actuellement a l''ecran. Qd on appuie sur ce 121 ; bouton, un widget apparait qui demande: 122 ; 1) le nom a donner a la palette que l''on veut sauver 123 ; 2) le numero de la palette que l''on veut 124 ; eventuellement ecrase par la nouvelle 125 ; palette.Si aucun numero n''est specifie la 126 ; nouvelle palette estajoutee aux anciennes. 127 ; 3) le nom du fichier qui contient les 128 ; palettes. Rq: suivre eventuellement les 129 ; indications fournis au prompteur. 99 ; save: Allows to save the palette which is currently 100 ; on the screen. When we press this hotkey, there is a 101 ; widget who appear and ask: 102 ; 1) the name of the palette we want to save. 103 ; 2) The number of the palette we may want to erase 104 ; by the new palette. If there is not any number 105 ; specified, the new palette is add to elders. 106 ; 3) The name of the file containing palettes. 107 ; Comment: May follow instructions gave by the prompter. 130 108 ; 131 109 ; … … 147 125 ; horizontally. 148 126 ; 149 ; MODIFICATION HISTORY: 150 ; addaptation de xpalette pour ajouter un bouton save par 127 ; @history addaptation de xpalette pour ajouter un bouton save par 151 128 ; Gima Nicolas (nglod@ipsl.jussieu.fr) et par Masson 152 129 ; Sebastien (smlod@ipsl.jussieu.fr) 130 ; 131 ; $Id$ 132 ; 153 133 ;- 154 134 ; 135 ;+ 136 ; @file_comments XP_NEW_COLORS: Choose the best foreground and background colors for the current 137 ; color maps and set !P appropriately. Returns 1 if the colors changed, 138 ; 0 otherwise. 139 ; 140 ; @returns 1 or 0 141 ;- 155 142 function XP_NEW_COLORS 156 ; Choose the best foreground and background colors for the current157 ; color maps and set !P appropriately. Returns 1 if the colors changed,158 ; 0 otherwise.159 143 ; 160 144 compile_opt idl2, strictarrsubs … … 202 186 endif 203 187 end 204 188 ;+ 189 ; @file_comments XP_XLCTCALLBACK: For visuals with static colormaps, update the graphics 190 ; after a change by XLOADCT. 191 ;- 205 192 pro XP_XLCTCALLBACK 206 ; For visuals with static colormaps, update the graphics207 ; after a change by XLOADCT.208 193 ; 209 194 compile_opt idl2, strictarrsubs … … 230 215 end 231 216 232 233 234 pro XP_REPLOT, color_index, type 235 ; Re-draw the RGB plots. Type has the following possible values. 236 ;; - 'D': Draw the data part of all three plots 217 ;+ 218 ; @file_comments XP_REPLOT: Re-draw the RGB plots. Type has the following possible values. 219 ; - 'D': Draw the data part of all three plots 237 220 ; - 'F': draw all three plots 238 221 ; - 'R': Draw the data part of the Red plot 239 222 ; - 'G': Draw the data part of the Green plot 240 223 ; - 'B': Draw the data part of the Blue plot 224 ;- 225 pro XP_REPLOT, color_index, type 241 226 ; 242 227 compile_opt idl2, strictarrsubs … … 312 297 313 298 314 315 pro XP_CHANGE_COLOR, type, value 316 ; Change current color. Type has the following possible values. 299 ;+ 300 ; @file_comments XP_CHANGE_COLOR: Change current color. Type has the following possible values. 317 301 ; - 'R': Change the R part of the current color 318 302 ; - 'G': ... 319 303 ; - 'B': ... 304 ;- 305 pro XP_CHANGE_COLOR, type, value 320 306 ; 321 307 compile_opt idl2, strictarrsubs … … 553 539 554 540 555 541 ;+ 542 ; 543 ; @keyword group 544 ; 545 ; @keyword BLOCK Set this keyword to have XMANAGER block when this 546 ; application is registered. By default the Xmanager 547 ; keyword NO_BLOCK is set to 1 to provide access to the 548 ; command line if active command line processing is available. 549 ; Note that setting BLOCK for this application will cause 550 ; all widget applications to block, not only this 551 ; application. For more information see the NO_BLOCK keyword 552 ; to XMANAGER. 553 ; @keyword UPDATECALLBACK Set this keyword to a string containing the name of 554 ; a user-supplied procedure that will be called when the color 555 ; table is updated by XLOADCT. The procedure may optionally 556 ; accept a keyword called DATA, which will be automatically 557 ; set to the value specified by the optional UPDATECBDATA 558 ; keyword. 559 ; @keyword UPDATECBDATA Set this keyword to a value of any type. It will be 560 ; passed via the DATA keyword to the user-supplied procedure 561 ; specified via the UPDATECALLBACK keyword, if any. If the 562 ; UPDATECBDATA keyword is not set the value accepted by the 563 ; DATA keyword to the procedure specified by UPDATECALLBACK 564 ; will be undefined. 565 ; 566 ;- 556 567 557 568 … … 597 608 !p.color = nc -1 ;Foreground color 598 609 !p.font = 0 ;Hdw font 599 save_win = !d.window ;Previous window610 save_win = !d.window ;Previous window 600 611 601 612 IF N_ELEMENTS(r_orig) LE 0 THEN BEGIN ;If no common, use current colors
Note: See TracChangeset
for help on using the changeset viewer.