Creates a simplecolor bar that can be used to view and interactively shift a color table.
movedCallback (optional) A string containing the name of the callback routine that is executed when the color bar is shifted to the left or right.
range (optional) The range of colors to be displayed in the color bar. The default is to display the entire range of colors, as defined in the system variable !D.Table_Size.
windowid (optional) The window ID of the graphics window. (For information on window IDs, see the description for the WINDOW procedure.)
Horizontal If present and nonzero, the color bar is oriented horizontally (see Figure 2-147). (Default: vertical orientation)
Popup If present and nonzero, the color bar widget is displayed in its own Main window.
Background Specifies the background color name.
Bottom If a widget ID is specified (for example,
Bottom=wid
), then the bottom of the color bar widget is attached to the top of the specified widget. If no widget ID is specified (for example, /Bottom
), then the bottom of the color bar widget is attached to the bottom of the parent widget.Left=wid
), then the left side of the color bar widget is attached to the right side of the specified widget. If no widget ID is specified (for example, /Left
), then the left side of the color bar widget is attached to the left side of the parent widget.Right=wid
), then the right side of the color bar widget is attached to the left side of the specified widget. If no widget ID is specified (for example, /Right
), then the right side of the color bar widget is attached to the right side of the parent widget.Top=wid
), then the top of the color bar widget is attached to the bottom of the specified widget. If no widget ID is specified (for example, /Top
), then the top of the color bar widget is attached to the top of the parent widget.
NOTE: Use the window manager menu of the window frame to dismiss the CbarTool window from the screen.
Figure 2-147 WgCbarTool creates an array of colors that match the colors in the current color table. This color bar widget has been created using the Horizontal option; the default is for the color bar to be displayed in a vertical orientation.
Figure 2-148 WgCbarTool creates an array of colors that match the colors in the current color table. This color bar widget has been created using the Horizontal option; the default is for the color bar to be displayed in a vertical orientation.
You can use the output parameter windowid to keep track of the PV-WAVE window ID that is assigned to the color bar. You can create multiple instances of the color bar; each one will be assigned a different PV-WAVE window ID.
Colors
common block.Most color table procedures maintain the current color table in a common block called
Colors
, defined as follows:
COMMON Colors, r_orig, g_orig, b_orig, r_curr, g_curr, b_curr
r_curr
, g_curr
, and b_curr
.
parent
is defined, WgCbarTool is created as a child of parent
; otherwise, WgCbarTool runs on its own (i.e., in its own event loop).When you are finished interacting with the WgCbarTool window, close it using the window manager menu.
PRO Sample_wgcbartool, parent, tool_shell IF N_ELEMENTS(parent) NE 0 THEN BEGIN WgCbarTool, parent, tool_shell, /Horizontal, /Popup
ENDIF ELSE BEGIN WgCbarTool, /Horizontal
ENDELSE END
For more information about color table indices, refer to Experimenting with Different Color Tables in Chapter 11 of the PV-WAVE User's Guide.
For more information about how to write an application program based on WAVE Widgets, refer to Chapter 5, Using WAVE Widgets, in the PV-WAVE GUI Application Developer's Guide. For more information about how to write an application program based on the PV-WAVE Widget Toolbox, refer to Chapter 6, Using the Widget Toolbox, in the PV-WAVE GUI Application Developer's Guide.