Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

Simple Parsing Algorithm for the Creation of X-Windows Menu Bars

IP.com Disclosure Number: IPCOM000111399D
Original Publication Date: 1994-Feb-01
Included in the Prior Art Database: 2005-Mar-26
Document File: 2 page(s) / 77K

Publishing Venue

IBM

Related People

Pritt, MD: AUTHOR

Abstract

Disclosed is a parsing algorithm that creates a menu bar from a list of option labels. It uses a simple Pascal-like BEGIN-END structure for defining the pulldown menus, and the BEGIN-END structures can be nested to create multiple levels of pulldown menus. Changing the menu bar requires only a simple change of the list, thus obviating the need for re-programming and debugging.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 52% of the total text.

Simple Parsing Algorithm for the Creation of X-Windows Menu Bars

      Disclosed is a parsing algorithm that creates a menu bar from a
list of option labels.  It uses a simple Pascal-like BEGIN-END
structure for defining the pulldown menus, and the BEGIN-END
structures can be nested to create multiple levels of pulldown menus.
Changing the menu bar requires only a simple change of the list, thus
obviating the need for re-programming and debugging.

      The menu bar is the standard way of presenting options to the
user of an X Windows (or of any other graphical windowing system)
application.  When the user selects an option from the menu bar with
the mouse, an action may be performed or a pulldown menu may appear
that lists further options.  When the user selects an option from the
pulldown menu, another action may be performed or yet another
pulldown menu may appear.  The creation of a typical menu bar with
multiple levels of pulldown menus presents a complicated task for the
X Windows programmer [*].  Each widget requires the specification of
resources and properties, such as menu option labels, mnemonics,
actions to be performed when a menu option is selected, pulldown
menus to be attached to the options, etc.  The maintenance of a menu
bar, however, is even more difficult than its creation.  A simple
change to the menu bar--for example, the moving of an option from one
pulldown menu to another--requires extensive changes to the X Windows
code and a significant amount of work for the programmer.  Since the
structure of a menu bar may change repeatedly as an X Window
application is developed, a significant amount of work is spent
changing and maintaining the code for the menu bar.

      The BEGIN-END structures for this algorithm can be nested to
create multiple levels of pulldown menus.  Following is an example of
such a list.  (A similar list is also required for specifying the
callback functions to be performed for each menu bar option.)

          File
               BEGIN
                  Save
                  Retrieve
                  Delete
                  Exit
               END
           Action
               BEGIN
                   Paint
                       BEGIN
  ...