EzMenu(3)

Name
EzMenu - menu cascade constructed from description in resource database

Synopsis
#include <X11/Intrinsic.h> #include <X11/EzMenu.h> widget = XtCreatePopupShell(name, ezMenuWidgetClass, ...);

Class Hierarchy
Core-->Composite-->Shell-->OverrideShell-->SimpleMenu-->EzMenu

Description
EzMenu is a simple menu package built on top of the X11R4 (and later) Athena menu widgets. It allows you to construct a menu with cascaded submenus to any level from a description stored as a resource value. You create the EzMenu as a top-level shell, and it reads its XtNmenu resource and creates child widgets according to the description therein.

The syntax of XtNmenu is easiest to describe using an example. Here is a resource file for an EzMenu called menuTitle:

Eztest.menuTitle.label: EzTest Menu
Eztest.menuTitle.menu:\
        (line)\
        (item "Meaningless Item" (action "does-not-exist()"))\
        (item "Another Meaningless Item" (action "does-not-exist()"))\
        (blank)\
        (menu "Submenu..." \
                (line)\
                (item "Multiple actions here" \
                   (action "does-not-exist() nor-does-this()"))\
                (item "Single Action" (action "does-not-exist()"))\
        )\
        (blank)\
        (line)\
        (blank)\
        (item "Last entry!" (action "does-not-exist()"))

This example shows how to create separator lines, blanks, regular entries, and entries that pop up submenus. Note that the EzMenu description specifies actions instead of callbacks. You need to create these actions, and add them to the global action list with XtAppAddActions. If you want, you can create an action that calls a callback using XtCallCallbacks().

More about callbacks.

The menu entries are encapsulated in the EzME widget. The EzME widget is a subclass of the Athena smeBSB widget, with added features that it

Illustration

Resources
In addition to the resources defined by superclasses, this widget defines the following: XtNmenu, XtCMenu, XtRString, NULL

Public Functions
None.

Author

Dirk Grunwald, grunwald@foobar.colorado.edu