Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought



EZMENU(3)                                               EZMENU(3)


NAME
       ezMenu - A library of menu widgets with a resource manager
       interface

SYNOPSIS
       #include <EzMenu/EzMenu.h>
       #include <EzMenu/EzME.h>


DESCRIPTION
       This package provides a resource manager interface to  the
       simpleMenu  widgets  provided  in  the Athena widgets. The
       widget class ezMenuWidgetClass is defined, subclassing the
       simpleMenu widget.


USAGE
       Include  the  files  listed above in compilation, and link
       with the library libezMenu.a.  For example, you might use

            % cc [files] [Xlibs] -LEzMenu -lezMenu



RESOURCE USAGE
       An EzMenu widget can specify  it's  menu  using  the  menu
       resource, as in

            *someMenu.menu:     ...

       or using XtSetValues(3X) with resource XtNmenu.

       The  menu resource should be a string consisting of paren-
       thesized entries, each of which is one  of  the  following
       forms:

       (item str ...)
              Creates  an  item  with  label "name". Typically an
              item will specify it's action after it's  name,  as
              described below.

       (menu str ...)
              Creates a nested menu whose name is "str"-menu. The
              specification of the menu  should  be  enclosed  in
              parentheses.

       (action str)
              The string "str" (which should be quoted in double-
              quotes) will be executed as if it  were  an  action
              specification  in  a  translation  when the item is
              selected. Thus it should be a  whitespace-separated
              list  of action procedures to call (with arguments)
              when the item is selected.   Double-quotes  can  be
              escaped with backslash (as can backslash itself).



                             21/9/90                            1




EZMENU(3)                                               EZMENU(3)


       (line) This  menu  item will be an unselectable line (like
              smeLine).

       (blank)
              This menu item will be an unselectable blank  space
              (like smeBSB with no label).


EXAMPLES
       The following is a simple menu specification:

            *someMenu.menu: \
                 (item "hello" (action "do-hello()")) \
                 (item "twice" (action "do-hello() do-hello()")) \
                 (item "other" (action "do-other(foo) \
                                        do-yet-another(foo,bar)")) \
                 (line) \
                 (item "quit"  (action "quit()")),

       Note the free form use of whitespace and multiple actions.


FILES
       EzMenu/EzMenu.h
       EzMenu/EzME.h
       EzMenu/libezMenu.a


DIAGNOSTICS
       The package will complain  of  bad  formats  in  the  menu
       description  with the cryptic string "unbalanced parens or
       bogus format" and an indication of context.  This  message
       can also be generated if a menu item is too long (the cur-
       rent limit is 256 characters).


SEE ALSO
       Athena Widgets - C Language Interface


AUTHOR
       The EzMenu widget routines were lifted  from  the  program
       xtex, copyright 1989 by Dirk Grunwald. That code is lifted
       straight from the MIT distribution of the SimpleMenu  wid-
       gets.
       Man page by George Ferguson (ferguson@cs.rochester.edu).











                             21/9/90                            2


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026