Document revision date: 10 November 2000
[Compaq] [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]
[OpenVMS documentation]

DECwindows Extensions to Motif


Previous Contents Index


DXmCreateColorMixDialog

Creates a color mixing widget with a dialog box.
Widget Class Hierarchy

Core Resource Set
\
Composite Resource Set
\
Constraint Resource Set
\
XmManager Resource Set
\
XmBulletinBoard Resource Set
\
DXmColorMixDialog Resource Set

Format


Widget DXmCreateColorMixDialog(parent, name, arglist, argcount) 
        Widget    parent; 
        String    name; 
        ArgList   arglist; 
        Cardinal  argcount; 
Resource Information

You can set the following widget-specific resources in the arglist when using any combination of default or application-provided color display and color mixer subwidgets:


XmString        DXmNclearLabel; 
XmString        DXmNdisplayLabel; 
Widget          DXmNdisplayWindow; 
XmString        DXmNhelpLabel; 
XmString        DXmNmainLabel; 
XmString        DXmNmixerLabel; 
Widget          DXmNmixerWindow; 
unsigned short  DXmNnewBlueValue; 
unsigned short  DXmNnewGreenValue; 
unsigned short  DXmNnewRedValue; 
unsigned short  DXmNorigBlueValue; 
unsigned short  DXmNorigGreenValue; 
unsigned short  DXmNorigRedValue; 
XmString        DXmNresetLabelString; 
XmString        DXmNscratchPadInfoLabel; 
XmString        DXmNscratchPadLabel; 
void proc       DXmNsetMixerColorProc; 
void proc       DXmNsetNewColorProc; 
XtCallbackList  XmNapplyCallback; 
XmString        XmNapplyLabelString; 
XtCallbackList  XmNcancelCallback; 
XmString        XmNcancelLabelString; 
XtCallbackList  XmNokCallback; 
XmString        XmNokLabelString; 
Widget          XmNworkWindow; 

You can set the following widget-specific resources in the arglist only when using the default color display subwidget:


unsigned short  DXmNbackBlueValue; 
unsigned short  DXmNbackGreenValue; 
unsigned short  DXmNbackRedValue; 
Dimension       DXmNdisplayColWinHeight; 
Dimension       DXmNdisplayColWinWidth; 
Dimension       DXmNdispWinMargin; 
Boolean         DXmNmatchColors; 

You can set the following widget-specific resources in the arglist only when using the default color mixer subwidget:


XmString        DXmNblackLabel; 
XmString        DXmNblueLabel; 
short           DXmNbrowserItemCount; 
XmString        DXmNbrowserLabel; 
unsigned char   DXmNcolorModel; 
XmString        DXmNcoolerLabel; 
XmString        DXmNdarkerLabel; 
XmString        DXmNearthtoneLabel; 
XmString        DXmNfullLabel; 
XmString        DXmNgrayLabel; 
XmString        DXmNgreenLabel; 
XmString        DXmNgreyscaleLabel; 
Boolean         DXmNgreyscaleOnGreyscale; 
XmString        DXmNhlsLabel; 
XmString        DXmNhueLabel; 
short           DXmNinterpTileCount; 
short           DXmNinterpTileHeight; 
short           DXmNinterpTileWidth; 
XmString        DXmNinterpTitleLabel; 
XmString        DXmNlighterLabel; 
XmString        DXmNlightLabel; 
short           DXmNlightnessIncrement; 
XmString        DXmNoptionLabel; 
XmString        DXmNpastelLabel; 
unsigned short  DXmNpickerColors; 
XmString        DXmNpickerLabel; 
short           DXmNpickerTileHeight; 
short           DXmNpickerTileWidth; 
XmString        DXmNpickerTitleLabel; 
XmString        DXmNredLabel; 
XmString        DXmNrgbLabel; 
XmString        DXmNsatLabel; 
XmString        DXmNsliderLabel; 
XmString        DXmNsmearLabel; 
XmString        DXmNspectrumLabel; 
XmString        DXmNundoLabel; 
XmString        DXmNuserPaletteLabel; 
XmString        DXmNvalueLabel; 
XmString        DXmNvividLabel; 
XmString        DXmNwarmerLabel; 
unsigned short  DXmNwarmthIncrement; 
XmString        DXmNwhiteLabel; 


Return Value

The identifier (widget ID) of the created color mixing widget.

Arguments

parent

The identifier (widget ID) of the parent widget.

name

The name of the created widget.

arglist

The application argument list.

argcount

The number of arguments in the application argument list.

Resources (Default or Application-Provided Color Display/Mixer Subwidgets)

DXmNclearLabel

Specifies the text that appears as the label of the scratch pad clear push button. The default text is "Clear". Access is CSG.

DXmNdisplayLabel

Specifies the text that appears above the color display subwidget, centered between the left and right borders. There is no default. Access is CSG.

DXmNdisplayWindow

The color display subwidget. The default is the color mixing widget's color display subwidget. Access is CSG.

Note the following:

DXmNhelpLabel

Specifies the text that appears inside the Help push button. The default text is "Help". Access is CSG.

DXmNmainLabel

Specifies the text that appears at the top of the color mixing widget, centered between the left and right borders. There is no default. Access is CSG.

DXmNmixerLabel

Specifies the text that appears above the color mixer subwidget, centered between the left and right borders. There is no default. Access is CSG.

DXmNmixerWindow

The color mixer subwidget. The default color mixer subwidget supports the hue, lightness, saturation (HLS), red, green, blue (RGB), Color Picker, Browser, and Greyscale Mixer color models. Setting this resource to Null at widget creation time prevents the color mixer subwidget from being displayed. Access is CSG.

Note the following:

DXmNnewBlueValue

The new blue color value for the color mixing widget. The default is 0 unless DXmNmatchColors is True. If DXmNmatchColors is True, then DXmNnewBlueValue is always set by default to match DXmNorigBlueValue whenever the widget is created or made visible. Access is CSG.

DXmNnewGreenValue

The new green color value for the color mixing widget. The default is 0 unless DXmNmatchColors is True. If DXmNmatchColors is True, then DXmNnewGreenValue is always set by default to match DXmNorigGreenValue whenever the widget is created or made visible. Access is CSG.

DXmNnewRedValue

The new red color value for the color mixing widget. The default is 0 unless DXmNmatchColors is True. If DXmNmatchColors is True, then DXmNnewRedValue is always set by default to match DXmNorigRedValue whenever the widget is created or made visible. Access is CSG.

DXmNorigBlueValue

The original blue color value for the color mixing widget. The default is 0; however, applications should set the original blue value. Access is CSG.

DXmNorigGreenValue

The original green color value for the color mixing widget. The default is 0; however, applications should set the original green value. Access is CSG.

DXmNorigRedValue

The original red color value for the color mixing widget. The default is 0; however, applications should set the original red value. Access is CSG.

DXmNresetLabelString

Specifies the text that appears inside the Reset push button. The default is "Reset". Access is CSG.

DXmNscratchPadInfoLabel

Specifies the text that appears as the label centered at the top of the scratch pad pop-up. The default text is "Save colors here...". Access is CSG.

DXmNscratchPadLabel

Specifies the text that appears as the label of the scratch pad push button. The default text is "Scratch Pad...". Access is CSG.

DXmNsetMixerColorProc

The resource used by the color mixing widget to update the current color mixer controls when the application sets a new color. (It is intended for applications that use a non-default color mixer subwidget.) The default is a procedure (specific to the color mixing widget) that updates the appropriate default color model (Picker, HLS, RGB, Browser, or Greyscale). Access is CSG.

DXmNsetNewColorProc

The resource used by the color mixing widget to update the new color values displayed in the color display subwidget. If the application replaces the default color display subwidget and requires that the color mixing widget update the new color, the application must set this resource. Otherwise, replacing the default color display subwidget sets this resource to Null. Access is CSG.

If this resource is set and the application manages this subwidget, the work window is placed below the color display and color mixer subwidgets (if present) and above the color mixing widget push buttons.

XmNapplyCallback

Callback (or callbacks) made when the user clicks the Apply push button widget in the color mixing widget. The reason for this callback is XmCR_APPLY. The default is Null. Access is CSG.

XmNapplyLabelString

Specifies the text that appears inside the Apply push button. The default is "Apply". Access is CSG.

XmNcancelCallback

Callback (or callbacks) made when the user clicks the Cancel push button widget in the color mixing widget. The reason for this callback is XmCR_CANCEL. The default is Null. Access is CSG.

XmNcancelLabelString

Specifies the text that appears inside the Cancel push button. The default is "Cancel". Access is CSG.

XmNokCallback

Callback (or callbacks) made when the user clicks the OK push button widget in the color mixing widget. The reason for this callback is XmCR_ACTIVATE. The default is Null. Access is CSG.

XmNokLabelString

Specifies the text that appears inside the OK push button. The default is "OK". Access is CSG.

XmNworkWindow

An optional work area subwidget. The default is Null. Access is CSG.

Resources (Default Color Display Subwidget Only)

DXmNbackBlueValue

The value of the default color display subwidget's blue background color. The default value is 32767 (gray). Access is CSG.

This resource is valid only if the default color display subwidget is used; otherwise, the resource is ignored.

DXmNbackGreenValue

The value of the default color display subwidget's green background color. The default value is 32767 (gray). Access is CSG.

This resource is valid only if the default color display subwidget is used; otherwise, the resource is ignored.

DXmNbackRedValue

The value of the default color display subwidget's red background color. The default value is 32767 (gray). Access is CSG.

This resource is valid only if the default color display subwidget is used; otherwise, the resource is ignored.

DXmNdisplayColWinHeight

The height of the original and new color display windows. The default is 80 pixels. Access is CSG.

This resource is valid only if the default color display subwidget is used; otherwise, the resource is ignored.

DXmNdisplayColWinWidth

The width of the original and new color display windows. The default is 80 pixels. Access is CSG.

This resource is valid only if the default color display subwidget is used; otherwise, the resource is ignored.

DXmNdispWinMargin

The margin between the original and the new color display windows and the outsides edges of the color display subwidget. The margin is the area affected by the background resources (set gray by default). The default width is 20 pixels. Access is CSG.

This resource is valid only if the default color display subwidget is used; otherwise, the resource is ignored.

DXmNmatchColors

A Boolean resource that specifies whether new color values are matched to original color values whenever the color mixing widget is created and made visible. When True, new color values are matched to original color values. When False, new color values are not matched to original color values. The default is True. Access is CSG.

This resource is valid only if the default color display subwidget is used; otherwise, the resource is ignored.


Resources (Default Color Mixer Subwidget Only)

DXmNblackLabel

Specifies the text that appears below the left end of the middle scale subwidget. The default is "Black". Access is CSG.

This resource is used in the HLS mixer if the default color mixer subwidget is used; otherwise, the resource is ignored.

DXmNblueLabel

Specifies the text that appears below the left end of the bottom scale subwidget. The default is "Blue". Access is CSG.

This resource is used in the RGB mixer if the default color mixer subwidget is used; otherwise, the resource is ignored.

DXmNbrowserItemCount

The number of visible items in the browser's color list. You can set this resource only at widget creation time. Each visible item requires that the color mix widget allocate its own color cell. The default is 5. Access is CG.

This resource is valid only if the default color mixer subwidget is used; otherwise, the resource is ignored.

DXmNbrowserLabel

Specifies the text that appears as the fourth item in the color model option menu. The default text is "Browser". Access is CSG.

This resource is valid only if the default color mixer subwidget is used; otherwise, the resource is ignored.

DXmNcolorModel

The color model currently being used. The values for this resource are as follows:
Color Model Value When Default
Color Picker DXmColorModelPicker Color systems
HLS DXmColorModelHLS Not used as default
RGB DXmColorModelRGB Monochrome systems
Browser DXmColorModelBrowser Not used as default
Greyscale DXmColorModelGreyscale Gray scale systems

Applications should set this resource before the widget is managed (if at all), and allow users to switch color models by using the option menu. Access is CSG.

This resource is valid only if the default color mixer subwidget is used; otherwise, the resource is ignored.

DXmNcoolerLabel

Specifies the text of the Cooler arrow button. The default text is "Cooler". Access is CSG.

This resource is valid only if the default color mixer subwidget is used; otherwise, the resource is ignored.

DXmNdarkerLabel

Specifies the text of the Darker arrow button. The default text is "Darker". Access is CSG.

This resource is valid only if the default color mixer subwidget is used; otherwise, the resource is ignored.

DXmNearthtoneLabel

The label used to represent the earthtones palette in the picker spectrum option menu. The default text is "Earthtones". Access is CSG.

This resource is valid only if the default color mixer subwidget is used; otherwise, the resource is ignored.

DXmNfullLabel

Specifies the text that appears below the right end of the bottom scale subwidget. The default is "Full". Access is CSG.

This resource is used in the HLS mixer if the default color mixer subwidget is used; otherwise, the resource is ignored.

DXmNgrayLabel

Specifies the text that appears below the left of the bottom scale subwidget. The default is "Gray". Access is CSG.

This resource is used in the HLS mixer if the default color mixer subwidget is used; otherwise, the resource is ignored.

DXmNgreenLabel

Specifies the text that appears below the left end of the middle scale subwidget. The default is "Green". Access is CSG.

This resource is used in the RGB mixer if the default color mixer subwidget is used; otherwise, the resource is ignored.

DXmNgreyscaleLabel

Specifies the text that appears as the bottom item in the color model option menu. The default text is "Grayscale". Access is CSG.

This resource is valid only if the default color mixer subwidget is used; otherwise, the resource is ignored.

DXmNgreyscaleOnGreyscale

A Boolean resource that, when True, specifies that the greyscale mixing color model is to be the default on greyscale systems. The default is True. Access is CSG.

This resource is valid only if the default color mixer subwidget is used; otherwise, the resource is ignored.

DXmNhlsLabel

Specifies the text that appears as the second item in the color model option menu. The default is "HLS". Access is CSG.

This resource is valid only if the default color mixer subwidget is used; otherwise, the resource is ignored.

DXmNhueLabel

Specifies the text that appears to the left of the top scale subwidget. The default is "Hue:". Access is CSG.

This resource is used in the HLS mixer if the default color mixer subwidget is used; otherwise, the resource is ignored.

DXmNinterpTileCount

The number of interpolator tiles used. (The color mixing widget must allocate a color cell for each interpolator tile.) You can set this resource only at widget creation time. The default is 10. Access is CG.

This resource is valid only if the default color mixer subwidget is used; otherwise, the resource is ignored.

DXmNinterpTileHeight

The height of each interpolator tile, in pixels. The default is 30. Access is CSG.

This resource is valid only if the default color mixer subwidget is used; otherwise, the resource is ignored.

DXmNinterpTileWidth

The width of each interpolator tile, in pixels. The default is 30. Access is CSG.

This resource is valid only if the default color mixer subwidget is used; otherwise, the resource is ignored.

DXmNinterpTitleLabel

Specifies the text that appears centered above the interpolator widget. The default text is "Interpolator". Access is CSG.

This resource is valid only if the default color mixer subwidget is used; otherwise, the resource is ignored.

DXmNlighterLabel

Specifies the text of the Lighter arrow button. The default text is "Lighter". Access is CSG.

This resource is valid only if the default color mixer subwidget is used; otherwise, the resource is ignored.

DXmNlightLabel

Specifies the text that appears to the left of the bottom scale subwidget. The default is "Lightness:". Access is CSG.

This resource is used in the HLS mixer if the default color mixer subwidget is used; otherwise, the resource is ignored.

DXmNlightnessIncrement

The percentage by which to increase or decrease the lightness of the color of each interpolator tile when the lighter or darker buttons are pressed. The default is 5. Access is CSG.

This resource is valid only if the default color mixer subwidget is used; otherwise, the resource is ignored.

DXmNoptionLabel

Specifies the text that appears inside the color model option menu subwidget. The default is "Color Model:". Access is CSG.

This resource is valid only if the default color mixer subwidget is used; otherwise, the resource is ignored.

DXmNpastelLabel

The label used to represent the pastels palette in the picker spectrum option menu. The default text is "Pastels". Access is CSG.

This resource is valid only if the default color mixer subwidget is used; otherwise, the resource is ignored.

DXmNpickerColors

A palette of ten colors that will be available through the user palette menu option. If not specified, no user palette will appear in the menu; otherwise, the user palette will become the default picker palette. You can set this resource only at widget creation time. Access is CG.

Note that the first item in the array is the red value of the first spectrum tile, the second item is its green value, the third item is its blue value, the fourth item is the second tile's red value, and so on. Thus, this array must contain thirty elements if it is set.

This resource is valid only if the default color mixer subwidget is used; otherwise, the resource is ignored.

DXmNpickerLabel

Specifies the text that appears as the top item in the color model option menu. The default text is "Picker". Access is CSG.

This resource is valid only if the default color mixer subwidget is used; otherwise, the resource is ignored.

DXmNpickerTileHeight

The height of each individual spectrum tile, in pixels. The default is 30. Access is CSG.

This resource is valid only if the default color mixer subwidget is used; otherwise, the resource is ignored.

DXmNpickerTileWidth

The width of each individual spectrum tile, in pixels. The default is 30. Access is CSG.

This resource is valid only if the default color mixer subwidget is used; otherwise, the resource is ignored.

DXmNpickerTitleLabel

Specifies the text that appears centered above the picker widget. The default text is "Spectrum". Access is CSG.

This resource is valid only if the default color mixer subwidget is used; otherwise, the resource is ignored.

DXmNredLabel

Specifies the text that appears below the left end of the top scale subwidget. The default is "Red". Access is CSG.

This resource is used in the RGB mixer if the default color mixer subwidget is used; otherwise, the resource is ignored.

DXmNrgbLabel

Specifies the text that appears as the third item in the color model option menu. The default is "RGB". Access is CSG.

This resource is valid only if the default color mixer subwidget is used; otherwise, the resource is ignored.

DXmNsatLabel

Specifies the text that appears to the left of the middle scale subwidget. The default is "Saturation:". Access is CSG.

This resource is used in the HLS mixer if the default color mixer subwidget is used; otherwise, the resource is ignored.

DXmNsliderLabel

Specifies the text that appears above the left end of the top scale subwidget. The default is "Percentage". Access is CSG.

This resource is used in the RGB mixer if the default color mixer subwidget is used; otherwise, the resource is ignored.

DXmNsmearLabel

Specifies the text of the Smear push button. The default text is "Smear". Access is CSG.

This resource is valid only if the default color mixer subwidget is used; otherwise, the resource is ignored.

DXmNspectrumLabel

The label used to represent the "rainbow" palette in the picker spectrum option menu. The default text is "Spectrum". Access is CSG.

This resource is valid only if the default color mixer subwidget is used; otherwise, the resource is ignored.

DXmNundoLabel

Specifies the text of the Undo push button. The default text is "Undo". Access is CSG.

This resource is valid only if the default color mixer subwidget is used; otherwise, the resource is ignored.

DXmNuserPaletteLabel

The label used to represent the application-defined user palette in the spectrum option menu. The default text is "User palette". Access is CSG.

This resource is valid only if the default color mixer subwidget is used; otherwise, the resource is ignored.

DXmNvalueLabel

Specifies the text that appears above the column of text subwidgets. The default is "Value". Access is CSG.

This resource is used in the RGB mixer if the default color mixer subwidget is used; otherwise, the resource is ignored.

DXmNvividLabel

The label used to represent the vivids palette in the picker spectrum option menu. The default text is "Vivids". Access is CSG.

This resource is valid only if the default color mixer subwidget is used; otherwise, the resource is ignored.

DXmNwarmerLabel

Specifies the text of the Warmer arrow button. The default text is "Warmer". Access is CSG.

This resource is valid only if the default color mixer subwidget is used; otherwise, the resource is ignored.

DXmNwarmthIncrement

The amount of red or blue added to the color of each interpolator tile when the warmer or cooler buttons are pressed. The default is 5000. Access is CSG.

This resource is valid only if the default color mixer subwidget is used; otherwise, the resource is ignored.

DXmNwhiteLabel

Specifies the text that appears below the right end of the middle scale subwidget. The default is "White". Access is CSG.

This resource is used in the HLS mixer if the default color mixer subwidget is used; otherwise, the resource is ignored.

Resource Exceptions The following resources inherited from XmBulletinBoard are supported differently: Callback Structure


Previous Next Contents Index

  [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]  
  privacy and legal statement  
5635PRO_002.HTML