Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XmDrawingAr(3X) — Dell System V Release 4 Issue 2.2

Media Vault

Software Library

Restoration Projects

Artifacts Sought



XmDrawingArea(3X)                UNIX System V                XmDrawingArea(3X)


NAME
      XmDrawingArea - the DrawingArea widget class.


SYNOPSIS
      #include <Xm/DrawingA.h>


DESCRIPTION
      DrawingArea is an empty widget that is easily adaptable to a variety of
      purposes.  It does no drawing and defines no behavior except for invoking
      callbacks. Callbacks notify the application when graphics need to be
      drawn (exposure events or widget resize) and when the widget receives
      input from the keyboard or mouse.

      Applications are responsible for defining appearance and behavior as
      needed in response to DrawingArea callbacks.  Applications must take care
      not to draw in the shadow and to clear the old shadow when the widget is
      resized.

      DrawingArea is also a composite widget and subclass of XmManager that
      supports minimal geometry management for multiple widget or gadget
      children.


   Classes
      DrawingArea inherits behavior and resources from the Core, Composite,
      Constraint, and XmManager classes.

      The class pointer is xmDrawingAreaWidgetClass.

      The class name is XmDrawingArea.


   New Resources
      The following table defines a set of widget resources used by the
      programmer to specify data.  The programmer can also set the resource
      values for the inherited classes to set attributes for this widget.  To
      reference a resource by name or by class in a .Xdefaults file, remove the
      XmN or XmC prefix and use the remaining letters.  To specify one of the
      defined values for a resource in a .Xdefaults file, remove the Xm prefix
      and use the remaining letters (in either lowercase or uppercase, but
      include any underscores between words).  The codes in the access column
      indicate if the given resource can be set at creation time (C), set by
      using XtSetValues (S), retrieved by using XtGetValues (G), or is not
      applicable (N/A).








10/89                                                                    Page 1







XmDrawingArea(3X)                UNIX System V                XmDrawingArea(3X)


   ______________________________________________________________________________
  |                          XmDrawingArea Resource Set                         |
  |__________________|_________________|________________|______________|________|
  | Name             |  Class          |  Type          |  Default     |  Access|
  |__________________|_________________|________________|______________|________|
  |__________________|_________________|________________|______________|________|
  | XmNexposeCallback|  XmCCallback    |  XtCallbackList|  NULL        |  C     |
  |__________________|_________________|________________|______________|________|
  | XmNinputCallback |  XmCCallback    |  XtCallbackList|  NULL        |  C     |
  |__________________|_________________|________________|______________|________|
  | XmNmarginHeight  |  XmCMarginHeight|  Dimension     |  10          |  CSG   |
  |__________________|_________________|________________|______________|________|
  | XmNmarginWidth   |  XmCMarginWidth |  Dimension     |  10          |  CSG   |
  |__________________|_________________|________________|______________|________|
  | XmNresizeCallback|  XmCCallback    |  XtCallbackList|  NULL        |  C     |
  |__________________|_________________|________________|______________|________|
  | XmNresizePolicy  |  XmCResizePolicy|  unsigned char |  XmRESIZE_ANY|  CSG   |
  |__________________|_________________|________________|______________|________|


      XmNexposeCallback
            Specifies the list of callbacks that is called when DrawingArea
            receives an exposure event.  The callback reason is XmCR_EXPOSE.
            The callback structure also includes the exposure event.

      XmNinputCallback
            Specifies the list of callbacks that is called when the DrawingArea
            receives a keyboard or mouse event (key or button, up or down).
            The callback reason is XmCR_INPUT.  The callback structure also
            includes the input event.

      XmNmarginHeight
            Specifies the minimum spacing in pixels between the top or bottom
            edge of DrawingArea and any child widget.

      XmNmarginWidth
            Specifies the minimum spacing in pixels between the left or right
            edge of DrawingArea and any child widget.

      XmNresizeCallback
            Specifies the list of callbacks that is called when the DrawingArea
            is resized.  The callback reason is XmCR_RESIZE.

      XmNresizePolicy
            Controls the policy for resizing DrawingArea widgets.  Possible
            values include XmRESIZE_NONE (fixed size), XmRESIZE_ANY (shrink or
            grow as needed), and XmRESIZE_GROW (grow only).


   Inherited Resources
      DrawingArea inherits behavior and resources from the following
      superclasses.  For a complete description of each resource, refer to the


Page 2                                                                    10/89







XmDrawingArea(3X)                UNIX System V                XmDrawingArea(3X)


      man page for that superclass.

_________________________________________________________________________________________________________
|                                        XmManager Resource Set                                         |
|_____________________|_____________________________|___________________|______________________|________|
|Name                 |  Class                      |  Type             |  Default             |  Access|
|_____________________|_____________________________|___________________|______________________|________|
|_____________________|_____________________________|___________________|______________________|________|
|XmNbottomShadowColor |  XmCBottomShadowColor       |  Pixel            |  dynamic             |  CSG   |
|_____________________|_____________________________|___________________|______________________|________|
|XmNbottomShadowPixmap|  XmCBottomShadowPixmap      |  Pixmap           |  XmUNSPECIFIED_PIXMAP|  CSG   |
|_____________________|_____________________________|___________________|______________________|________|
|XmNforeground        |  XmCForeground              |  Pixel            |  dynamic             |  CSG   |
|_____________________|_____________________________|___________________|______________________|________|
|XmNhelpCallback      |  XmCCallback                |  XtCallbackList   |  NULL                |  C     |
|_____________________|_____________________________|___________________|______________________|________|
|XmNhighlightColor    |  XmCHighlightColor          |  Pixel            |  dynamic             |  CSG   |
|_____________________|_____________________________|___________________|______________________|________|
|XmNhighlightPixmap   |  XmCHighlightPixmap         |  Pixmap           |  dynamic             |  CSG   |
|_____________________|_____________________________|___________________|______________________|________|
|XmNnavigationType    |  XmCNavigationType          |  XmNavigationType |  XmTAB_GROUP         |  CSG   |
|_____________________|_____________________________|___________________|______________________|________|
|XmNshadowThickness   |  XmCShadowThickness         |  Dimension        |  0                   |  CSG   |
|_____________________|_____________________________|___________________|______________________|________|
|XmNstringDirection   |  XmCStringDirection         |  XmStringDirection|  dynamic             |  CG    |
|_____________________|_____________________________|___________________|______________________|________|
|XmNtopShadowColor    |  XmCBackgroundTopShadowColor|  Pixel            |  dynamic             |  CSG   |
|_____________________|_____________________________|___________________|______________________|________|
|XmNtopShadowPixmap   |  XmCTopShadowPixmap         |  Pixmap           |  dynamic             |  CSG   |
|_____________________|_____________________________|___________________|______________________|________|
|XmNtraversalOn       |  XmCTraversalOn             |  Boolean          |  True                |  CSG   |
|_____________________|_____________________________|___________________|______________________|________|
|XmNunitType          |  XmCUnitType                |  unsigned char    |  dynamic             |  CSG   |
|_____________________|_____________________________|___________________|______________________|________|
|XmNuserData          |  XmCUserData                |  Pointer          |  NULL                |  CSG   |
|_____________________|_____________________________|___________________|______________________|________|

    _______________________________________________________________________
   |                        Composite Resource Set                        |
   |__________________|___________________|____________|_________|________|
   | Name             |  Class            |  Type      |  Default|  Access|
   |__________________|___________________|____________|_________|________|
   |__________________|___________________|____________|_________|________|
   | XmNchildren      |  XmCReadOnly      |  WidgetList|  NULL   |  G     |
   |__________________|___________________|____________|_________|________|
   | XmNinsertPosition|  XmCInsertPosition|  (*)()     |  NULL   |  CSG   |
   |__________________|___________________|____________|_________|________|
   | XmNnumChildren   |  XmCReadOnly      |  Cardinal  |  0      |  G     |
   |__________________|___________________|____________|_________|________|





10/89                                                                    Page 3







XmDrawingArea(3X)                UNIX System V                XmDrawingArea(3X)


________________________________________________________________________________________________________________
|                                              Core Resource Set                                               |
|_____________________________|_______________________________|________________|______________________|________|
|Name                         |  Class                        |  Type          |  Default             |  Access|
|_____________________________|_______________________________|________________|______________________|________|
|_____________________________|_______________________________|________________|______________________|________|
|XmNaccelerators              |  XmCAccelerators              |  XtAccelerators|  dynamic             |  CSG   |
|_____________________________|_______________________________|________________|______________________|________|
|XmNancestorSensitive         |  XmCSensitive                 |  Boolean       |  dynamic             |  G     |
|_____________________________|_______________________________|________________|______________________|________|
|XmNbackground                |  XmCBackground                |  Pixel         |  dynamic             |  CSG   |
|_____________________________|_______________________________|________________|______________________|________|
|XmNbackgroundPixmap          |  XmCPixmap                    |  Pixmap        |  XmUNSPECIFIED_PIXMAP|  CSG   |
|_____________________________|_______________________________|________________|______________________|________|
|XmNborderColor               |  XmCBorderColor               |  Pixel         |  XtDefaultForeground |  CSG   |
|_____________________________|_______________________________|________________|______________________|________|
|XmNborderPixmap              |  XmCPixmap                    |  Pixmap        |  XmUNSPECIFIED_PIXMAP|  CSG   |
|_____________________________|_______________________________|________________|______________________|________|
|XmNborderWidth               |  XmCBorderWidth               |  Dimension     |  0                   |  CSG   |
|_____________________________|_______________________________|________________|______________________|________|
|XmNcolormap                  |  XmCColormap                  |  Colormap      |  dynamic             |  CG    |
|_____________________________|_______________________________|________________|______________________|________|
|XmNdepth                     |  XmCDepth                     |  int           |  dynamic             |  CG    |
|_____________________________|_______________________________|________________|______________________|________|
|XmNdestroyCallback           |  XmCCallback                  |  XtCallbackList|  NULL                |  C     |
|_____________________________|_______________________________|________________|______________________|________|
|XmNheight                    |  XmCHeight                    |  Dimension     |  dynamic             |  CSG   |
|_____________________________|_______________________________|________________|______________________|________|
|XmNinitialResourcesPersistent|  XmCInitialResourcesPersistent|  Boolean       |  True                |  C     |
|_____________________________|_______________________________|________________|______________________|________|
|XmNmappedWhenManaged         |  XmCMappedWhenManaged         |  Boolean       |  True                |  CSG   |
|_____________________________|_______________________________|________________|______________________|________|
|XmNscreen                    |  XmCScreen                    |  Screen *      |  dynamic             |  CG    |
|_____________________________|_______________________________|________________|______________________|________|
|XmNsensitive                 |  XmCSensitive                 |  Boolean       |  True                |  CSG   |
|_____________________________|_______________________________|________________|______________________|________|
|XmNtranslations              |  XmCTranslations              |  XtTranslations|  dynamic             |  CSG   |
|_____________________________|_______________________________|________________|______________________|________|
|XmNwidth                     |  XmCWidth                     |  Dimension     |  dynamic             |  CSG   |
|_____________________________|_______________________________|________________|______________________|________|
|XmNx                         |  XmCPosition                  |  Position      |  0                   |  CSG   |
|_____________________________|_______________________________|________________|______________________|________|
|XmNy                         |  XmCPosition                  |  Position      |  0                   |  CSG   |
|_____________________________|_______________________________|________________|______________________|________|


   Callback Information
      A pointer to the following structure is passed to each callback:

      typedef struct
      {
        int      reason;


Page 4                                                                    10/89







XmDrawingArea(3X)                UNIX System V                XmDrawingArea(3X)


        XEvent   * event;
        Window   window;
      } XmDrawingAreaCallbackStruct;


     reason Indicates why the callback was invoked

     event  Points to the XEvent that triggered the callback.  This is NULL for
             the XmNresizeCallback.

     window Is set to the widget window


   Translations
      XmDrawingArea inherits translations from XmManager.  Before calling the
      XmManager actions, all events in the inherited translations except
      <BtnMotion>, <EnterWindow>, <LeaveWindow>, <FocusIn>, and <FocusOut> also
      call the DrawingAreaInput() action.

      XmDrawingArea has the additional translations listed below.  These
      translations may not directly correspond to a translation table.

      MAny BAny Press:DrawingAreaInput()
      MAny BAny Release:DrawingAreaInput()

      MAny KAny Press:DrawingAreaInput()
                     ManagerGadgetKeyInput()
      MAny KAny Release:DrawingAreaInput()



   Action Routines
      The XmDrawingArea action routines are described below:

      DrawingAreaInput():
            Unless the event takes place in a gadget, calls the callbacks for
            XmNinputCallback.

      ManagerGadgetKeyInput():
            Causes the current gadget to process a keyboard event.


   Additional Behavior
      The XmDrawingArea widget has the additional behavior described below:

      <Expose>:
            Calls the callbacks for XmNexposeCallback.

      <Widget Resize>:
            Calls the callbacks for XmNresizeCallback.




10/89                                                                    Page 5







XmDrawingArea(3X)                UNIX System V                XmDrawingArea(3X)


   Virtual Bindings
      The bindings for virtual keys are vendor specific.  For information about
      bindings for virtual buttons and keys, see VirtualBindings(3X).

RELATED INFORMATION
      Composite(3X), Constraint(3X), Core(3X), XmCreateDrawingArea(3X), and
      XmManager(3X).















































Page 6                                                                    10/89





Typewritten Software • bear@typewritten.org • Edmonds, WA 98026