Documentation for /home/davin/idl/socware/

Generated by IDLdoc

single page | use frames     summary     class     fields     routine details     file attributes

spedas/gui/utilities/

pickcolor.pro


NAME: PICKCOLOR PURPOSE: A modal dialog widget allowing the user to select the RGB color triple specifying a color. The return value of the function is the color triple specifying the color or the "name" of the color if the NAME keyword is set. AUTHOR: FANNING SOFTWARE CONSULTING: David Fanning, Ph.D. 1645 Sheely Drive Fort Collins, CO 80526 USA Phone: 970-221-0438 E-mail: davidf@dfanning.com Coyote's Guide to IDL Programming: http://www.dfanning.com NOTE: This software has been heavily modified for usage by the SPEDAS GUI. Please direct any errors to the SPEDAS software team team and we will contact David Fanning, as necessary. CATEGORY: Graphics, Color Specification. See related program FSC_COLOR. CALLING SEQUENCE: color = PickColor(colorindex) RETURN VALUE: The return value of the function is a 1-by-3 array containing the values of the color triple that specifies the selected color. The color can be loaded, for example, in any color index: color = PickColor(240) TVLCT, color, 240 The return value is the original color triple if the user selects the CANCEL button. IF the NAMES keyword is set, the return value of the function is the "name" of the selected color. This would be appropriate for passing to the FSC_COLOR program, for example. OPTIONAL INPUT POSITIONAL PARAMETERS: COLORINDEX: The color index of the color to be changed. If not specified the color index !D.Table_Size - 2 is used. The Current Color and the Color Sliders are set to the values of the color at this color index. OPTIONAL INPUT KEYWORD PARAMETERS: GROUP_LEADER: The group leader for this widget program. This keyword is required for MODAL operation. If not supplied the program is a BLOCKING widget. Be adviced, however, that the program will NOT work if called from a blocking widget program, unless a GROUP_LEADER is supplied. NAMES: Set this keyword to return the "name" of the selected color rather than its color triple. STARTINDEX: 88 pre-determined colors are loaded The STARTINDEX is the index in the color table where these 88 colors will be loaded. By default, it is !D.Table_Size - 89. TITLE: The title on the program's top-level base. By default the title is "Pick a Color". OPTIONAL INPUT KEYWORD PARAMETERS: CANCEL: A keyword that is set to 1 if the CANCEL button is selected and to 0 otherwise. COMMON BLOCKS: None. MODIFICATION HISTORY: Written by: David Fanning, 28 Oct 99. Added NAME keyword. 18 March 2000, DWF. Fixed a small bug when choosing a colorindex less than !D.Table_Size-17. 20 April 2000. DWF. Added actual color names to label when NAMES keyword selected. 12 May 2000. DWF. Modified to use 88 colors and FSC_COLOR instead of 16 colors and GETCOLOR. 4 Dec 2000. DWF. Now drawing small box around each color. 13 March 2003. DWF. Added CURRENTCOLOR keyword. 3 July 2003. DWF. Switched to object graphics, eliminated side-effects. 25 Jan 2011 pcruce.

Routines

Routines from pickcolor.pro

PickColor_Select_Color, event
PickColor_Sliders, event
PickColor_Buttons, event
result = PickColor(currentColorIndex, Title=Title, Group_Leader=Group_Leader, Cancel=Cancel, Names=Names, CurrentColor=CurrentColor)

Routine details

top source PickColor_Select_Color

PickColor_Select_Color, event

Parameters

event

top source PickColor_Sliders

PickColor_Sliders, event

Parameters

event

top source PickColor_Buttons

PickColor_Buttons, event

Parameters

event

top source PickColor

result = PickColor(currentColorIndex, Title=Title, Group_Leader=Group_Leader, Cancel=Cancel, Names=Names, CurrentColor=CurrentColor)

Parameters

currentColorIndex

Keywords

Title
Group_Leader
Cancel
Names
CurrentColor

File attributes

Modification date: Thu Feb 13 16:41:46 2014
Lines: 186