Name

ExmSimple — The Simple widget class demonstration widget

Synopsis

#include <Exm/Simple.h>

DESCRIPTION

ExmSimple is a demonstration widget. OSF provides this widget solely to teach programmers how to write their own Motif widgets. OSF does not support this widget in any way.

The source code for the ExmSimple widget illustrates how to do the following:

  • Use Xlib drawing functions to render a simple visual inside a Motif widget

  • Create a primitive widget that can serve as a superclass for other Motif widgets

  • Create a Motif representation type

  • Install the XmQTcontainerItem trait and define its trait methods

  • Install the XmQTcareParentVisual trait and define its trait method

ExmSimple is an instantiable widget and is also used as a superclass for other widgets, such as ExmString and ExmPanner.

ExmSimple displays a simple visual. The value of the ExmNsimpleShape resource determines whether this visual is a rectangle or an oval. Note that none of the Exm subclasses of ExmSimple display this visual. That is, none of the Exm subclasses of ExmSimple inherit the draw_visual method of ExmSimple.

When ExmSimple is insensitive, the visual has a stippled appearance.

ExmSimple displays its visual in the center of the widget. A margin region lies between the the window decorations and the visual. The dimensions of the margin region are determined by the values of the XmNmarginWidth and XmNmarginHeight resources. An application cannot directly control the size of the visual; ExmSimple will automatically set the visual size so that it fits snugly inside the margin region.

The help callback is the only callback supported.

Classes

ExmSimple inherits behavior and resources from Core and XmPrimitive.

The class pointer is exmSimpleWidgetClass.

The class name is ExmSimple.

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, ExmN, XmC or ExmC prefix and use the remaining letters. To specify one of the defined values for a resource in a .Xdefaults file, remove the Xm or Exm 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).

ExmSimple Resource Set
NameClassTypeDefaultAccess
ExmNsimpleShapeExmCSimpleShapeunsigned charExmSHAPE_OVALCSG
XmNmarginHeightXmCMarginHeightDimension4CSG
XmNmarginWidthXmCMarginWidthDimension4CSG

ExmNsimpleShape 

Specifies the shape to be displayed in the widget. The two possible values for this resource are ExmSHAPE_OVAL and ExmSHAPE_RECTANGLE. The ExmSHAPE_OVAL (the default) causes ExmSimple to display an oval and the ExmSHAPE_RECTANGLE causes ExmSimple to display a rectangle.

XmNmarginHeight 

Specifies the distance between the inside top edge of the window decorations and the outside top edge of the graphics (the oval or rectangle). This resource also specifies the distance between the inside bottom edge of the window decorations and the outside bottom edge of the graphics. If the widget is not big enough to display both the graphics and the margin, the widget will reduce the margin height.

XmNmarginWidth 

Specifies the distance between the inside left edge of the window decorations and the outside left edge of the graphics (the oval or rectangle). This resource also specifies the distance between the inside right edge of the window decorations and the outside right edge of the graphics. If the widget is not big enough to display both the graphics and the margin, the widget will reduce the margin width.

Inherited Resources

ExmSimple inherits behavior and resources from the following superclasses. For a complete description of each resource, refer to the reference page for that superclass.

XmPrimitive Resource Set
NameClassTypeDefaultAccess
XmNbottomShadowColorXmCBottomShadowColorPixeldynamicCSG
XmNbottomShadowPixmapXmCBottomShadowPixmapPixmapXmUNSPECIFIED_PIXMAPCSG
XmNconvertCallbackXmCCallbackXtCallbackListNULLC
XmNforegroundXmCForegroundPixeldynamicCSG
XmNhelpCallbackXmCCallbackXtCallbackListNULLC
XmNhighlightColorXmCHighlightColorPixeldynamicCSG
XmNhighlightOnEnterXmCHighlightOnEnterBooleanFalseCSG
XmNhighlightPixmapXmCHighlightPixmapPixmapdynamicCSG
XmNhighlightThicknessXmCHighlightThicknessDimension2CSG
XmNlayoutDirectionXmCLayoutDirectionXmDirectiondynamicCG
XmNnavigationTypeXmCNavigationTypeXmNavigationTypeXmNONECSG
XmNpopupHandlerCallbackXmCCallbackXtCallbackListNULLC
XmNshadowThicknessXmCShadowThicknessDimension2CSG
XmNtopShadowColorXmCTopShadowColorPixeldynamicCSG
XmNtopShadowPixmapXmCTopShadowPixmapPixmapdynamicCSG
XmNtraversalOnXmCTraversalOnBooleanTrueCSG
XmNunitTypeXmCUnitTypeunsigned chardynamicCSG
XmNuserDataXmCUserDataXtPointerNULLCSG

Core Resource Set
NameClassTypeDefaultAccess
XmNacceleratorsXmCAcceleratorsXtAcceleratorsdynamicCSG
XmNancestorSensitiveXmCSensitiveBooleandynamicG
XmNbackgroundXmCBackgroundPixeldynamicCSG
XmNbackgroundPixmapXmCPixmapPixmapXmUNSPECIFIED_PIXMAPCSG
XmNborderColorXmCBorderColorPixelXtDefaultForegroundCSG
XmNborderPixmapXmCPixmapPixmapXmUNSPECIFIED_PIXMAPCSG
XmNborderWidthXmCBorderWidthDimension0CSG
XmNcolormapXmCColormapColormapdynamicCG
XmNdepthXmCDepthintdynamicCG
XmNdestroyCallbackXmCCallbackXtCallbackListNULLC
XmNheightXmCHeightDimensiondynamicCSG
XmNinitialResourcesPersistentXmCInitialResourcesPersistentBooleanTrueC
XmNmappedWhenManagedXmCMappedWhenManagedBooleanTrueCSG
XmNscreenXmCScreenScreen *dynamicCG
XmNsensitiveXmCSensitiveBooleanTrueCSG
XmNtranslationsXmCTranslationsXtTranslationsdynamicCSG
XmNwidthXmCWidthDimensiondynamicCSG
XmNxXmCPositionPosition0CSG
XmNyXmCPositionPosition0CSG

Translations

ExmSimple inherits all the translations of XmPrimitive. ExmSimple does not provide any additional translations beyond those defined by XmPrimitive.

Action Routines

ExmSimple provides no action routines of its own.

RELATED

Core(3) and XmPrimitive(3).