packages icon



 CMAP(1)                                                             CMAP(1)
                                 26 Jul 1993



 NAME
      Cmap - Cmap Widget

 DESCRIPTION
      #include "Cmap.h"

      The cmap widget is an X toolkit compatible widget that displays the
      entries in the colormap of its XtNcolormap resource.  It also has an
      indicator box, and a label displaying the rgb components of the
      indicated box.

 WIDGET CLASS
      cmapWidgetClass

 RESOURCES
      XtNforeground
           foreground pixel of the widget, default is XtDefaultForeground.

      XtNfont
           font of label (XFontStruct), default is XtDefaultFont.

      XtNmargin
           minimum margin around widget (int), default is 5.

      XtNchangeCallback
           change callback, default is NULL.

      XtNboxWidth
           maximum box width (int), 0 for autoscale/autosize, default is 0

      XtNboxHeight
           maximum box height (int), 0 for autoscale/autosize, default is 0

      XtNselected
           current box where the indicator box is at (int), default is 0

      XtNfirstIndex
           first index to use in colormap (int), default is 0

      XtNlastIndex
           last index to use in colomrap (int), default is LastIndexDefault
           (use last possible index)

      XtNmappingTable
           a list of indices (Pixel *) that is used to map the currently
           selected index into this table of pixels

 ACTIONS
      select()
           accepts key/button/motion events, moving the indicator box to the
           square that the pointer is over



                                    - 1 -      Formatted:  November 14, 2024






 CMAP(1)                                                             CMAP(1)
                                 26 Jul 1993



      up() moves indicator up one box (autowrap)

      down()
           moves indicator down one box (autowrap)

      left()
           moves indicator left one box (autowrap)

      right()
           moves indicator right one box (autowrap)

 DEFAULT TRANSLATIONS
      <key>h: left()
      <key>j: up()
      <key>k: down()
      <key>l: right()
      <Btn1Down>: select()
      <Btn1Motion>: select()

 CALLBACK STRUCTURE
      typedef struct _CmapCallbackStruct
      {
        int reason;
        XEvent *event;
        XColor color;
      } CmapCallbackStruct, *CmapCallbackPtr;

 REASONS
      CMAP_SELECT
      CMAP_LEFT
      CMAP_DOWN
      CMAP_UP
      CMAP_RIGHT
      CMAP_VERIFY

 CALLABLE FUNCTIONS
      void CmapCheckSelectedColor(Widget _w, Boolean _notify);
           function to make sure the pixel of the box with the indicator box
           actually matches the rgb values.  _notify is a flag on whether a
           callback should be sent.

      XColor CmapGetSelected(Widget _w);
           get components of box with indicator.

 AUTHOR
      John L. Cwikla, 1993
      Wolfram Research, Inc
      cwikla@wri.com






                                    - 2 -      Formatted:  November 14, 2024