The CW_RGBSLIDER function creates a compound widget that provides three sliders for adjusting color values. The RGB, CMY, HSV, and HLS color systems can all be used. No matter which color system is in use, the resulting color is always supplied in RGB, which is the base system for IDL.
The returned value of this function is the widget ID of the newly-created color adjustment widget.
This routine is written in the IDL language. Its source code can be found in the file
cw_rgbslider.pro
in the
lib
subdirectory of the IDL distribution.
The CW_RGBSLIDER widget consists of a pulldown menu which allows the user to change between the supported color systems, and three color adjustment sliders, allowing the user to select a new color value.
If set, display a small rectangle with the selected color, using the given index. The color is updated as the values are changed.
The widget ID returned by most compound widgets is actually the ID of the compound widget's base widget. This means that many keywords to the WIDGET_CONTROL and WIDGET_INFO routines that affect or return information on base widgets can be used with compound widgets.
See Compound Widgets for a more complete discussion of controlling compound widgets using WIDGET_CONTROL and WIDGET_INFO .
This widget generates event structures with the following definition:
event = {ID:0L, TOP:0L, HANDLER:0L, R:0B, G:0B, B:0B }
The `R', `G', and `B' fields contain the Red, Green and Blue components of the selected color. Note that CW_RGBSLIDER reports back the Red, Green, and Blue values no matter which color system is selected.