topxpal
Color, Widget
Keywords
GROUP
BLOCK
default: 1
UPDATECALLBACK
UPDATECBDATA
Examples
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: Allows to save the palette which is currently
on the screen. When we press this hotkey, there is a
widget who appear and ask:
1) the name of the palette we want to save.
2) The number of the palette we may want to erase
by the new palette. If there is not any number
specified, the new palette is add to elders.
3) The name of the file containing palettes.
Comment: May follow instructions gave by the prompter.
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.
Version history
History
Adaptation of xpalette to add a save button by
Grima Nicolas (nglod@ipsl.jussieu.fr) and by Masson
Sebastien (smlod@ipsl.jussieu.fr)
$Id: xpal.pro 163 2006-08-29 12:59:46Z navarro $
Known issues
Restrictions
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.
Other attributes
Uses routines
XP_COM: Private to this module.
Common blocks used
xp_com
colors
Statistics
McCabe cyclic | 10 |
McCabe essential | 1 |
McCabe modular design | 1 |