Ignore:
Timestamp:
07/07/06 11:57:27 (18 years ago)
Author:
navarro
Message:

english and nicer header (1)

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. 
    51;+ 
    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 
    2713;               application is registered.  By default the Xmanager 
    2814;               keyword NO_BLOCK is set to 1 to provide access to the 
     
    3218;               application.  For more information see the NO_BLOCK keyword 
    3319;               to XMANAGER. 
    34 ;       UPDATECALLBACK: Set this keyword to a string containing the name of 
     20; @keyword UPDATECALLBACK Set this keyword to a string containing the name of 
    3521;               a user-supplied procedure that will be called when the color 
    3622;               table is updated by XLOADCT.  The procedure may optionally 
     
    3824;               set to the value specified by the optional UPDATECBDATA 
    3925;               keyword. 
    40 ;       UPDATECBDATA: Set this keyword to a value of any type. It will be 
     26; @keyword UPDATECBDATA Set this keyword to a value of any type. It will be 
    4127;               passed via the DATA keyword to the user-supplied procedure 
    4228;               specified via the UPDATECALLBACK keyword, if any. If the 
     
    4531;               will be undefined. 
    4632; 
    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 
    5637;       drawing foreground and background colors. These are used 
    5738;       for the RGB plots on the left, and the current index marker on 
     
    7253;       to the display. 
    7354; 
    74 ; PROCEDURE: 
    75 ;       The XPAL widget has the following controls: 
     55; @examples The XPAL widget has the following controls: 
    7656; 
    7757;       Left:   Three plots showing the current Red, Green, and Blue vectors. 
     
    9575;               pressed: 
    9676; 
    97 ;               Done:  Exits XPAL. 
    98 ; 
    99 ;         Predefined:  Starts XLOADCT to allow selection of one of the 
     77;                 Done: Exits XPAL. 
     78; 
     79;           Predefined: Starts XLOADCT to allow selection of one of the 
    10080;                       predefined color tables. 
    10181; 
    102 ;               Help:  Supplies help information similar to this header. 
     82;                 Help: Supplies help information similar to this header. 
    10383; 
    10484;               Redraw: Completely redraws the display using the current 
     
    11797;                       index and the mark index are interpolated linearly 
    11898;                       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. 
    130108;                 
    131109; 
     
    147125;                          horizontally. 
    148126; 
    149 ; MODIFICATION HISTORY: 
    150 ;          addaptation de xpalette pour ajouter un bouton save par 
     127; @history addaptation de xpalette pour ajouter un bouton save par 
    151128;          Gima Nicolas (nglod@ipsl.jussieu.fr) et par Masson 
    152129;          Sebastien (smlod@ipsl.jussieu.fr) 
     130; 
     131; $Id$ 
     132; 
    153133;- 
    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;-  
    155142function XP_NEW_COLORS 
    156 ; Choose the best foreground and background colors for the current 
    157 ; color maps and set !P appropriately. Returns 1 if the colors changed, 
    158 ; 0 otherwise. 
    159143; 
    160144  compile_opt idl2, strictarrsubs 
     
    202186  endif 
    203187end 
    204  
     188;+ 
     189; @file_comments XP_XLCTCALLBACK:  For visuals with static colormaps, update the graphics 
     190;                after a change by XLOADCT. 
     191;- 
    205192pro XP_XLCTCALLBACK 
    206   ; For visuals with static colormaps, update the graphics 
    207   ; after a change by XLOADCT. 
    208193; 
    209194  compile_opt idl2, strictarrsubs 
     
    230215end 
    231216 
    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 
    237220;       - 'F': draw all three plots 
    238221;       - 'R': Draw the data part of the Red plot 
    239222;       - 'G': Draw the data part of the Green plot 
    240223;       - 'B': Draw the data part of the Blue plot 
     224;-  
     225pro XP_REPLOT, color_index, type 
    241226; 
    242227  compile_opt idl2, strictarrsubs 
     
    312297 
    313298 
    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. 
    317301;       - 'R': Change the R part of the current color 
    318302;       - 'G': ... 
    319303;       - 'B': ... 
     304;- 
     305pro XP_CHANGE_COLOR, type, value 
    320306; 
    321307  compile_opt idl2, strictarrsubs 
     
    553539 
    554540 
    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;- 
    556567 
    557568 
     
    597608  !p.color = nc -1              ;Foreground color 
    598609  !p.font = 0                   ;Hdw font 
    599   save_win = !d.window  ;Previous window 
     610  save_win = !d.window          ;Previous window 
    600611 
    601612  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.