Application Header file | <Xraw/Sme.h> |
Class Header file | <Xraw/SmeP.h> |
Class | smeWidgetClass |
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.
Name | Class | Type | Default Value |
---|---|---|---|
ancestorSensitive | AncestorSensitive | Boolean | True |
callback | Callback | XtCallbackList | NULL |
destroyCallback | Callback | XtCallbackList | NULL |
height | Height | Dimension | 0 |
sensitive | Sensitive | Boolean | True |
width | Width | Dimension | 1 |
ancestorSensitive |
The sensitivity state of the ancestors of this widget.
A widget is insensitive if either it or any of its
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. |
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 .
|
To Create a new Sme object you will need to define a few class procedures. These procedures allow the SimpleMenu to highlight and unhighlight the menu entry as the pointer cursor moves over it, as well as notifying the entry when the user has selected it.
There are three new class methods defined by the Sme Object. 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 specialized class procedures creating a new object is straight forward. Just subclass Sme and define new redisplay and highlight procedures. Here is some information that may help you avoid some common mistakes.
XtSetValues
will come after this unhighlight.