| Name | Type | Default | Access |
|---|---|---|---|
| XmNannotationFontList | XmFontList | "fixed" | CSG |
| XmNbias | int | 0 | CSG |
| XmNcancelCallback | XtCallbackList | NULL | C |
| XmNcolormapFile | char * | NULL | CSG |
| XmNcolorNumberFontList | XmFontList | "fixed" | CSG |
| XmNcontrast | int | 0 | CSG |
| XmNdoubleClickInterval | int | 250 | CSG |
| XmNhelpCallback | XtCallbackList | NULL | C |
| XmNnumberOfColors | int | 0 | CSG |
| XmNokCallback | XtCallbackList | NULL | C |
| XmNpixelArray | Pixel * | NULL | C |
| XmNshowHelpButton | Boolean | False | CSG |
| XmNshowBiasScale | Boolean | True | CSG |
| XmNshowContrastScale | Boolean | True | CSG |
| XmNshowRotateScale | Boolean | True | CSG |
| XmNtitleFontList | XmFontList | "*helvetica-bold-r-*-180-*" | CSG |
| XmNtitleString | XmString | NULL | CSG |
When a colormap file is used by the EditColormap widget to generate the colors to be edited, this resource should not be specified by you because the widget will set it to the number of colors defined in the colormap file.
| Name | Class | Description |
|---|---|---|
| title_label | XmLabelGadget | Contains the optional title. |
| frame | XmFrame | The frame widget surrounding the colormap drawing area. |
| cmap_display | XmDrawingArea | Drawing area where the continuous spectrum of colors in the colormap is drawn. |
| cmap_square | XmDrawingArea | Where the color squares in the colormap are drawn. |
| interpo_radio_box | XmRowColumn | The radio box containing the interpolation radio buttons. |
| linear_toggle | XmToggleButtonGadget | The linear interpolation radio button. |
| tanh_toggle | XmToggleButtonGadget | The tanh interpolation radio button. |
| spline_toggle | XmToggleButtonGadget | The spline interpolation radio button. |
| rotate_scale | XmScale | The scale for rotating the colormap. |
| bias_scale | XmScale | The scale for the bias. |
| contrast_scale | XmScale | The scale for the contrast. |
| color_number_toggle | XmToggleButtonGadget | The check box controlling the display of the color numbers. |
| diagram | XmDrawingArea | Drawing area where the color intensity diagram is drawn. |
| toggle_box | XmRowColumn | The box containing the color component check boxes on the Color Diagram Panel. |
| red | XmToggleButtonGadget | The red component check box. |
| green | XmToggleButtonGadget | The green component check box. |
| blue | XmToggleButtonGadget | The blue component check box. |
| Name | Structure | Reason |
|---|---|---|
| XmNcancelCallback | XmAnyCallbackStruct | XmCR_CANCEL |
| XmNhelpCallback | XmAnyCallbackStruct | XmCR_HELP |
| XmNokCallback | XmAnyCallbackStruct | XmCR_OK |
The following ordered table lists the members of the callback structure, XmAnyCallbackStruct, used by the EditColormap widget for all of its callbacks.
| Data Type | Member | Description |
|---|---|---|
| int | reason | Indicates why the callback was invoked. |
| XEvent | *event | Points to the XEvent that triggered the callback. |
| Function Name | Description |
|---|---|
| XintCreateEditColormap | Creates an unmanaged EditColormap widget. |
| XintCreateEditColormapDialog | Creates a dialog shell containing an unmanaged EditColormap widget. |
| XintGenerateColormap | Generates a colormap containing gray scale colors. |
| XintGetColormapBiasContrast | Returns the bias and contrast values from a colormap file. |
| XintIsColormapFile | Determines whether a specified file is a colormap file. |
| XintReadColormap | Generates a colormap containing the colors defined in a colormap file. |
| XintParseColormapFile | Creates an array of XColor structures based upon the colors defined in a colormap file. |
| XintEditColormapFreeColors | Frees the pixels in the pixel array allocated by the XintReadColormap and XintGenerateColormap functions. |
| XintEditColormapUpdate | To update the colormap display if the user has changed the mapping of the pixel values to RGB externally. |
Widget XintCreateEditColormap (...)
| Widget | parent | Parent of new EditColormap widget. |
| char * | name | Name of new EditColormap widget. |
| ArgList | arglist | List of resource/value items. |
| Cardinal | argcount | Number of items in arglist. |
Widget XintCreateEditColormapDialog (...)
| Widget | parent | Parent of new dialog shell. |
| char * | name | Name of new dialog shell. |
| ArgList | arglist | List of resource/value items. |
| Cardinal | argcount | Number of items in arglist. |
Pixel *XintGenerateColormap(...)
| Widget | widget | A widget ID (It does not need to be and EditColormap Widget). |
| int | num_colors | Specifies the number of colors to allocate in the new colormap. |
| int * | err_code | Error code returned in case of error. |
In case of error, the function returns NULL and the argument err_code contains a pointer to an error code. Possible error codes include
| Error Code | Description |
|---|---|
| XintBAD_ALLOC_COLOR | Indicates that the colormap could not be generated. |
void XintGetColormapBiasContrast (...)
| Widget | widget | A widget ID (It does not need to be and EditColormap Widget). |
| char * | filename | Specifies the colormap file to be read. |
| int * | bias | Returns the bias value. |
| int * | contrast | Returns the contrast value. |
| int * | err_code | Returns an error code in case of error. |
If the specified filename cannot be open, err_code is set to XintOPEN_ERROR, otherwise it is set to 0.
Boolean XintIsColormapFile (char *filename)
where filename is the name of the file to be checked.
Pixel *XintReadColormap (...)
| Widget | widget | A widget ID (It does not need to be and EditColormap Widget). |
| char * | filename | Specifies the colormap file to be read. |
| int * | num_colors | Returns the number of colors in colormap. |
| int * | err_code | Returns an error code in case of error. |
In case of error, the function returns NULL and the argument err_code contains a pointer to an error code. Possible error codes include:
| Error Code | Description |
|---|---|
| XintBAD_ALLOC_COLOR | Indicates that the colormap could not be generated. |
| XintBAD_COLORMAP | Indicates that an error occurred while reading the colormap file. |
| XintOPEN_ERROR | Indicates that an error occurred while opening the colormap file. |
XColor *XintParseColormapFile (...)
| char * | filename | Specifies the colormap file to be read. |
| int * | num_colors | Returns the number of colors in the colormap. |
| int * | err_code | Returns an error code in case of error. |
In case of error, the function returns NULL and the argument err_code contains a pointer to an error code. Possible error codes include:
| Error Code | Description |
|---|---|
| XintBAD_COLORMAP | Indicates that an error occurred while reading the colormap file. |
| XintOPEN_ERROR | Indicates that an error occurred while opening the colormap file. |
void XintEditColormapFreeColors (...)
| Widget | widget | Specifies a widget ID that is using the same colormap as the one that was used when allocating the pixels to be freed. |
| Pixel * | pixels | Specifies the colormap used by the EditColormap widget. |
| int | num_colors | Specifies number of pixels in the pixels array to be freed. |
void XintEditColormapUpdate (Widget widget)
where widget specifies the ID of the EditColormap widget.