Specifications
Athena Widget Set libXaw 1.0.7
Class Name Sme
Superclass RectObj
The Sme object is the base class for all menu entries. While this object is mainly intended to be
subclassed, it may be used in a menu to add blank space between menu entries.
4.5.1. Resources
The resources associated with the SmeLine object are defined in this section, and affect only the
single menu entry specified by this object. There are no newresources added for this class, as it
picks up all its resources from the RectObj class.
Name Class Type Notes Default Value
ancestorSensitive AncestorSensitive Boolean True
callback Callback XtCallbackList NULL
destroyCallback Callback XtCallbackList NULL
height Height Dimension 0
international International Boolean C False
sensitive Sensitive Boolean True
width Width Dimension 1
ancestorSensitive The sensitivity state of the ancestors of this widget. Awidget is insensi-
tive ifeither it or anyofits ancestors is insensitive.This resource should
not be changed with XtSetValues,although it may be queried.
destroyCallback All functions on this list are called when this widget is destroyed.
height
width The height and width of this widget in pixels. Keep in mind that the
SimpleMenu widget will force all menu items to be the width of the
widest entry.
international This is a boolean flag, only settable at widget creation time. While not
utilized in this widget, it can and should be checked by anysubclasses
that have behavior that should vary with locale.
sensitive Whether or not the toolkit should pass user events to this widget. The
widget will not get input events if either ancestorSensitive or sensitive is
False.
4.5.2. Subclassing the Sme Object
To Create a newSme object class you will need to define three class methods. These methods
allowthe SimpleMenu to highlight and unhighlight the menu entry as the pointer cursor moves
overit, as well as notify the entry when the user has selected it. All of these methods may be
inherited from the Sme object, although the default semantics are not very interesting.
Highlight() Called to put the menu entry into the highlighted state.
Unhighlight() Called to return the widget to its normal (unhighlighted) state.
Notify() Called when the user selects this menu entry.
Other then these methods, creating a newobject is straight forward. Here is some information
that may help you avoid some common mistakes.
1) Objects can be zero pixels high.
2) Objects drawontheir parent’swindow, therefore the Drawing dimensions are different from
those of widgets. Forinstance, y locations vary from y to y+height,not 0 to height.
66