Specifications

Athena Widget Set libXaw 1.0.7
notify() Notifies the menu entry that is currently highlighted that is has been
selected. It is the responsibility of the menu entry to takethe appropriate
action.
MenuPopdown(menu)This action is defined in XToolkit Intrinsics — C Language Interface.
4.2.3. Positioning the SimpleMenu
If the SimpleMenu widget is to be used as a pulldown menu then the MenuButton widget, or
some other outside means should be used to place the menu when it is popped up.
If popup menus are desired it will be necessary to add the XawPositionSimpleMenu and
MenuPopup actions to the translation table of the widget that will be popping up the menu. The
MenuPopup action is described in XToolkit Intrinsics — C Language Interface. XawPosition-
SimpleMenu is a global action procedure registered by the SimpleMenu widget when the first
one is created or the convenience routine XawSimpleMenuAddGlobalActions is called.
Translation writers should be aware that Xt does not register grabs on ‘‘don’tcare’’modifiers, and
therefore the left hand side of the production should be written to exclude unspecified modifiers.
Forexample these are the translations needed to popup some of xterm’s menus:
!Ctrl<Btn1Down>: XawPositionSimpleMenu(xterm) MenuPopup(xterm)
!Ctrl<Btn2Down>: XawPositionSimpleMenu(modes) MenuPopup(modes)
XawPositionSimpleMenu(menu)The XawPositionSimpleMenu routine will search for the
menu name passed to it using XtNameToWidget starting
with the widget invoking the action as the reference widget.
If it is unsuccessful it will continue up the widget tree using
each of the invoking widget’sancestors as the reference wid-
get. If it is still unsuccessful it will print a warning message
and give up. XawPositionSimpleMenu will position the
menu directly under the pointer cursor.The menu will be
placed so that the pointer cursor is centered on the entry
named by the popupOnEntry resource. If the menuOn-
Screen resource is True then the menu will always be fully
visible on the screen.
4.2.4. Convenience Routines
4.2.4.1. Registering the Global Action Routines
The XawPositionSimpleMenu action routine may often be invokedbefore anymenus have been
created. This can occur when an application uses dynamic menu creation. In these cases an
application will need to register this global action routine by calling XawSimpleMenuAddGlob-
alActions:
void XawSimpleMenuAddGlobalActions(app_con)
XtAppContext app_con;
app_con Specifies the application context in which this action should be registered.
This function need only be called once per application and must be called before anywidget that
uses XawPositionSimpleMenu action is realized.
4.2.4.2. Getting and Clearing the Current Menu Entry
To get the currently highlighted menu entry use XawSimpleMenuGetActiveEntry:
62