<<prev file | next file >>    view single page | view frames    summary: fields | routine    details: routine

ToBeReviewed/COULEURS/

xpal.pro

Routine summary

result = XP_NEW_COLORS()

NAME: XPAL PURPOSE: comme xpalette mais plus court a ecrire et possede en plus une touche save qui (grace a la routine newpalette) permet de sauver la routine que l''on vient de faire.

XP_ALERT_CALLER

XP_XLCTCALLBACK

XP_REDRAW

XP_REPLOT, color_index, type

XP_CHANGE_COLOR, type, value

XP_BUTTON_EVENT, event

xp_button_event_event, ev

XP_EVENT, event

XPAL, group=group, BLOCK=BLOCK, UPDATECALLBACK=UPDATECALLBACK, UPDATECBDATA=UPDATECBDATA

topXP_NEW_COLORS

result = XP_NEW_COLORS()

NAME: XPAL PURPOSE: comme xpalette mais plus court a ecrire et possede en plus une touche save qui (grace a la routine newpalette) permet de sauver la routine que l''on vient de faire. Rq qd on appuie sur la touche predefined appelle xlct plutot que xloadct CATEGORY: Color tables, widgets. CALLING SEQUENCE: XPAL INPUTS: No explicit inputs. The current color table is used as a starting point. KEYWORD PARAMETERS: BLOCK: Set this keyword to have XMANAGER block when this application is registered. By default the Xmanager keyword NO_BLOCK is set to 1 to provide access to the command line if active command line processing is available. Note that setting BLOCK for this application will cause all widget applications to block, not only this application. For more information see the NO_BLOCK keyword to XMANAGER. UPDATECALLBACK: Set this keyword to a string containing the name of a user-supplied procedure that will be called when the color table is updated by XLOADCT. The procedure may optionally accept a keyword called DATA, which will be automatically set to the value specified by the optional UPDATECBDATA keyword. UPDATECBDATA: Set this keyword to a value of any type. It will be passed via the DATA keyword to the user-supplied procedure specified via the UPDATECALLBACK keyword, if any. If the UPDATECBDATA keyword is not set the value accepted by the DATA keyword to the procedure specified by UPDATECALLBACK will be undefined. OUTPUTS: None. COMMON BLOCKS: COLORS: Contains the current RGB color tables. XP_COM: Private to this module. SIDE EFFECTS: XPAL uses two colors from the current color table as drawing foreground and background colors. These are used for the RGB plots on the left, and the current index marker on the right. This means that if the user set these two colors to the same value, the XPAL display could become unreadable (like writing on black paper with black ink). XPAL minimizes this possibility by noting changes to the color map and always using the brightest available color for the foreground color and the darkest for the background. Thus, the only way to make XPAL's display unreadable is to set the entire color map to a single color, which is highly unlikely. The only side effect of this policy is that you may notice XPAL redrawing the entire display after you've modified the current color. This simply means that the change has made XPAL pick new drawing colors. The new color tables are saved in the COLORS common and loaded to the display. PROCEDURE: The XPAL widget has the following controls: Left: Three plots showing the current Red, Green, and Blue vectors. Center: A status region containing: 1) The total number of colors. 2) The current color. XPAL allows changing one color at a time. This color is known as the "current color" and is indicated in the color spectrum display with a special marker. 3) The current mark index. The mark is used to remember a color index. It is established by pressing the "Set Mark Button" while the current color index is the desired mark index. 4) The current color. The special marker used in color spectrum display prevents the user from seeing the color of the current index, but it is visible here. A panel of control buttons, which do the following when pressed: Done: Exits XPAL. Predefined: Starts XLOADCT to allow selection of one of the predefined color tables. Help: Supplies help information similar to this header. Redraw: Completely redraws the display using the current state of the color map. Set Mark: Set the value of the mark index to the current index. Switch Mark: Exchange the mark and the current index. Copy Current: Every color lying between the current index and the mark index (inclusive) is given the current color. Interpolate: The colors lying between the current index and the mark index are interpolated linearly to lie between the colors of two endpoints. save: permet de sauver la palette qui est actuellement a l''ecran. Qd on appuie sur ce bouton, un widget apparait qui demande: 1) le nom a donner a la palette que l''on veut sauver 2) le numero de la palette que l''on veut eventuellement ecrase par la nouvelle palette.Si aucun numero n''est specifie la nouvelle palette estajoutee aux anciennes. 3) le nom du fichier qui contient les palettes. Rq: suivre eventuellement les indications fournis au prompteur. Three sliders (R, G, and B) that allow the user to modify the current color. Right: A display which shows the current color map as a series of squares. Color index 0 is at the upper left. The color index increases monotonically by rows going left to right and top to bottom. The current color index is indicated by a special marker symbol. There are 4 ways to change the current color: 1) Press any mouse button while the mouse pointer is over the color map display. 2) Use the "By Index" slider to move to the desired color index. 3) Use the "Row" Slider to move the marker vertically. 4) Use the "Column" Slider to move the marker horizontally. MODIFICATION HISTORY: addaptation de xpalette pour ajouter un bouton save par

Other attributes

Common blocks used

xp_com

topXP_ALERT_CALLER

XP_ALERT_CALLER

Other attributes

Common blocks used

xp_com

topXP_XLCTCALLBACK

XP_XLCTCALLBACK

topXP_REDRAW

XP_REDRAW

Other attributes

Common blocks used

xp_com

topXP_REPLOT

XP_REPLOT, color_index, type

Parameters

color_index       

type       

Other attributes

Common blocks used

xp_com colors pscale

topXP_CHANGE_COLOR

XP_CHANGE_COLOR, type, value

Parameters

type       

value       

Other attributes

Common blocks used

xp_com colors

topXP_BUTTON_EVENT

XP_BUTTON_EVENT, event

Parameters

event       

Other attributes

Common blocks used

xp_com colors basecommon

topxp_button_event_event

xp_button_event_event, ev

Parameters

ev       

Other attributes

Common blocks used

basecommon

topXP_EVENT

XP_EVENT, event

Parameters

event       

Other attributes

Common blocks used

xp_com colors

topXPAL

XPAL, group=group, BLOCK=BLOCK, UPDATECALLBACK=UPDATECALLBACK, UPDATECBDATA=UPDATECBDATA

Keywords

group       

BLOCK       

UPDATECALLBACK       

UPDATECBDATA       

Other attributes

Common blocks used

xp_com colors
Produced by IDLdoc 2.0.