.NH 2
Sme Object
.LP
.XS
	Sme Object
.XE
.IN "Sme object" "" "@DEF@"
.sp
.Ds 0
.TA 2.0i
.ta 2.0i
Application Header file	<X11/Xaw/Sme.h>
.IN "Sme.h" ""
Class Header file	<X11/Xaw/SmeP.h>
.IN "SmeP.h" ""
Class		smeObjectClass
.IN "smeObjectClass" ""
Class Name	Sme
.IN "Sme object" "class name"
Superclass	RectObj
.De
.sp
.LP
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.  
.NH 3
Resources
.IN "SmeLine object" "resources"
.LP
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 new resources added for this class, as it picks up all its
resources from the RectObj class.
.ps 9
.nr PS 9
.vs 11
.nr VS 11
.TS H
lw(1.5i) lw(1i) lw(1i) lw(2i).
_
.sp 3p
.TB
Name	Class	Type	Default Value
.sp 3p
_
.TH
.R
.sp 3p
ancestorSensitive	AncestorSensitive	Boolean	True
destroyCallback	Callback	XtCallbackList	NULL
height	Height	Dimension	0
sensitive	Sensitive	Boolean	True
width	Width	Dimension	1
.sp 3p
_
.TE
.ps 11
.nr PS 11
.vs 13
.nr VS 13
.As
.Dc
.Hw
Keep in mind that the SimpleMenu widget will force all menu items to
be the width of the widest entry. 
.Se
.Xy
.NH 3
Subclassing the Sme Object
.IN "Sme object" "subclassing" "@DEF"
.LP
.sp
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.
.LP
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.
.IP \fBHighlight\fP(\|) 1i
.IN "Sme object" "Highlight routine"
Called to put the menu entry into the highlighted state.
.IP \fBUnhighlight\fP(\|) 1i
.IN "Sme object" "Unhighlight routine"
Called to return the widget to its normal (unhighlighted) state.
.IP \fBNotify\fP(\|) 
.IN "Sme object" "Notify routine"
Called when the user selects this menu entry.
.LP
.sp
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.
.IP 1) 3n
Objects can be zero pixels high.
.IP 2) 3n
Objects draw on their parent's window, therefore the Drawing dimensions
are different from those of widgets.  For instance, y locations vary
from \fBy\fP to \fBy + height\fP, not \fB0\fP to \fBheight\fP.
.IP 3) 3n
SetValues calls may come from the application while the SimpleMenu is in
its \fBnotify\fP procedure.  The SimpleMenu may later call the menu
entries \fBunhighlight\fP procedure.  Due to the asynchronous nature of
X the expose event generated by \fBXtSetValues\fP will come \fBafter
this \fBunhighlight\fP.
.IP 4) 3n
Remember the menu entry does not own the window.  Share the space with
other menu entries, never draw outside your own section of the menu.

