coyote: CW_DRAWCOLOR

NAME
CW_DRAWCOLOR
PURPOSE
This compound widget is used to place a label or color name next
to a color patch. Clicking on the color patch allows the user
to select another color
AUTHOR
FANNING SOFTWARE CONSULTING
David Fanning, Ph.D.
1645 Sheely Drive
Fort Collins, CO 80526 USA
Phone: 970-221-0438
E-mail: david@idlcoyote.com
Coyote's Guide to IDL Programming: http://www.idlcoyote.com
CATEGORY
Graphics
CALLING SEQUENCE
colorpatchID = CW_DrawColor(parent)
REQUIRED INPUTS
parent - The identifier of a parent base widget.
OUTPUTS
colorpatchID - The widget identifier of the top-level base of this compound widget
INPUT KEYWORDS
COLOR - The name of the color to be displayed. Color names come from cgPickColorName.
COLUMN - Set this keyword to stack widgets in a column. Default is in a row.
EVENT_FUNC - The name of an event handler function for this compound widget.
EVENT_PRO -The name of an event handler procedure for this compound widget.
INDEX - An index number where the color should be loaded. !D.Table_Size-2, by default.
FILENAME - An optional input to cgPickColorName specifying different
           colors.  See the cgPickColorName documenation for the file format.
LABEL_LEFT - Set this keyword to have the label text aligned on the left of the label. Default is to center.
LABEL_RIGHT - Set this keyword to have the label text aligned on the right of the label. Default is to center.
LABELSIZE - This is the X size of the label widget (containing the label) in device coordinates. Default is natural size.
LABELTEXT - This is the text on the label. Example, "Background Color", etc.
TITLE - This is the title on the cgPickColorName program that allows the user to select another color.
UVALUE - A user value for the widget.
XSIZE - The xsize (in pixel units) of the color patch. By default, 20.
YSIZE - The xsize (in pixel units) of the color patch. By default, 20.
OUTPUT KEYWORDS
OBJECT - The object reference. Use this to call methods, etc.
OBJECT PROCEDURE METHODS
Set_Value -- this method takes one argument, the new color name.
            It will change the color of the widget if it has
            already been realized.
Get_Value -- this method returns the color name the widget is displaying
DEPENDENCIES
Reqires cgColor and cgPickColorName from the Coyote Library:
              http://www.idlcoyote.com/programs/cgColor.pro
              http://www.idlcoyote.com/programs/cgPickColorName.pro
MODIFICATION HISTORY
Written by David W. Fanning, March 2001.
Fixed a problem with self object cleanup. 7 March 2006. DWF.
Allow addition to already realized widget hierarchies, October 2007. L. Anderson.
Added set_value and get_value methods to the widget can be
     updated after being realized. October 2007. L. Anderson.
Added option to pass filename on to cgPickColorName. October
     2007. L. Anderson