DragonFly On-Line Manual Pages

Search: Section:  


XmColorSelector(3X)                                        XmColorSelector(3X)

NAME

The Color Selector widget

SYNOPSIS

#include <Xm/ColorS.h>

DESCRIPTION

The Color Selector widget allows users to choose a color by using either a set of RGB sliders or choosing from a list of all colors available in the rgb database. The name or rgb value, as well as the color selected, are dynamically displayed to the user as they pick and choose different colors. Normal Resources Name Class Type Initial Value blueSliderLabel SliderLabel XmString "Blue" colorListTogLabel TogLabel XmString "Color List" colorMode ColorMode XiColorMode XmScaleMode colorName String String White fileReadError FileReadError XmString "Could not read RGB.txt file" greenSliderLabel SliderLabel XmString "Green" marginHeight MarginHeight VerticalDimension 2 marginWidth MarginWidth HorizontalDimension 2 noCellError NoCellError XmString "No Color Cell Available" redSliderLabel SliderLabel XmString "Red" rgbFile String String /usr/lib/X11/rgb.txt sliderTogLabel TogLabel XmString "Color Sliders" All resource names begin with XmN and all resource class names begin with XmC. blueSliderLabel The string appearing for the label of the blue slider colorListTogLabel The string appearing for the label of the color list toggle colorMode The color list can be used in either slider or list mode. Acceptable values are XmListMode and XmScaleMode. This resource allows the application to determine the mode that the color selector should use when it is created. After this point, the user may freely change modes by utilizing a pair of radio buttons in the color selector. A type converter is registered to convert the strings "ScaleMode" and "ListMode" to color modes for use with the resource database. colorName This resource controls the color name that is currently displayed to the user. This value can be modified to change the color displayed in the color selector or queried to find the color the user has selected. The string returned here is either a color name or a pound sign (#) followed by a set of rgb values as specified in the Xlib specification. fileReadError The message which is displayed when the Color Selector cannot read the rgb.txt file. The message is displayed at the top of the window in which the color list would normally appear. greenSliderLabel The string appearing for the label of the green slider marginHeight marginWidth This is the amount of space left between each of the children in the color selector and between the outside children and the edge of the color selector widget. noCellError This resource controls the message which is displayed in the sample color field when the Color Selector cannot allocate a read/write color cell redSliderLabel The string appearing for the label of the red slider rgbFile This is the name of the file to be loaded, which contains the valid color names. Each of these names is sorted and the duplicates removed before being shown to the user. sliderTogLabel The string appearing for the label of the color slider toggle Convenience Routine XmCreateColorSelector - Widget creation convenience routine Widget XmCreateColorSelector( Widget parent, /* Widget id of parent for ColorSelector */ String name, /* Name of the created widget */ ArgList args, /* argument list */ Cardinal num_args /* number of items in argument list */ ) Children The color selector is composed of many sub-widgets. As with all widgets, most values are passed to this widget through the argument list at creation time or via set values and are passed to each of this widget's children, although get values requests must be made on a child-by-child basis. The children of the color selector are listed below. The documentation for each of the children should be consulted for a list of resources for each child. XmColorSelector<named by application> XmScrolledWindowscrolled XmScrollBarListvScrollBar XmScrollBarListhScrollBar XmListlist XmButtonBoxbuttonBox XmScalescale XmLabelGadgetscale_title XmScrollBarscale_scrollbar XmRowColumnradioBox XmToggleButtoncolorListToggle XmToggleButtoncolorSlidersToggle XmFramecolorFrame XmLabelcolorWindow

COPYRIGHT

Copyright (c) 1992 by Integrated Computer Solutions, Inc. XmColorSelector(3X)

Search: Section: