[ Previous |
Next |
Contents |
Glossary |
Home |
Search ]
Motif 2.1 Programmer's Guide
Core, RectObj, XmPrimitive, and XmGadget Classes
Nearly all the basic controls are subclasses of XmPrimitive
or XmGadget. XmPrimitive, in turn, is a subclass of the Intrinsics Core class,
and XmGadget is a subclass of the Intrinsics RectObj class.
Core
The Core class provides basic attributes of all widgets that
have associated windows. It has the following groups of resources:
Specifications of the widget's x and y coordinates, width and height,
and border width
A resource specifying whether or not the widget is sensitive or able to
receive input events from the Intrinsics event manager
Characteristics of the window, including background and border color or
pixmap, colormap, depth, and screen
A resource controlling whether or not the Intrinsics map the window when
the widget is managed
A table associating translations with actions
A set of accelerators, which is a translation table bound in the context
of a particular widget
RectObj
RectObj is the foundation for gadget classes; it is
essentially Core without the attributes related to having a window. RectObj
resources control the position and dimensions of the gadget's rectangular
area within its parent widget. A RectObj resource also determines whether or
not the gadget is sensitive.
XmPrimitive
XmPrimitive is the fundamental Motif class for all basic
control widgets--widgets that do not have children. It includes the
following resources and behavior:
Foreground color, top and bottom shadow colors or pixmaps, and shadow
thickness
Thickness and color or pixmap for the highlighting rectangle, which is
displayed when the widget has keyboard focus
Resources to determine whether the user can traverse to the widget and
whether or not it is a tab group
A resource to determine what unit of measurement the widget uses for size
and position resources
Callbacks for the widget to invoke when the user presses osfHelp
A resource for the application to use in associating arbitrary data with
the widget
Translations and actions for keyboard traversal to another widget
A resource that specifies the direction in which components of the
primitive (including strings) are laid out.
Callbacks that allow the application to control which popup menu will be
automatically posted.
XmGadget
XmGadget is the fundamental Motif class for all basic
control gadgets. XmGadget is equivalent to XmPrimitive, with two major
exceptions:
It has no associated window.
It has no translations or actions. The Manager parent controls traversal
between its gadget children, keeps track of gadgets that have input focus, and
dispatches events to them.
[ Previous |
Next |
Contents |
Glossary |
Home |
Search ]