Browse Prior Art Database

Eliminating Extraneous Separators in Dynamically Updated Menus

IP.com Disclosure Number: IPCOM000113117D
Original Publication Date: 1994-Jul-01
Included in the Prior Art Database: 2005-Mar-27
Document File: 2 page(s) / 100K

Publishing Venue

IBM

Related People

Morgan, SA: AUTHOR [+2]

Abstract

When menus are designed for an OS/2* Presentation Manager* (PM) application, separators are added to divide menu items within the menu into logical groupings. Separators are horizontal dividing lines between menu items. They are purely cosmetic, and provide no function except improving the overall appearance of the menu.

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

Eliminating Extraneous Separators in Dynamically Updated Menus

      When menus are designed for an OS/2* Presentation Manager* (PM)
application, separators are added to divide menu items within the
menu into logical groupings.  Separators are horizontal dividing
lines between menu items.  They are purely cosmetic, and provide no
function except improving the overall appearance of the menu.

      It is efficient to define a general menu definition that can be
used in many situations within an application.  This menu is defined
with all the menu items that may be needed, including the appropriate
separators.  When a menu needs to be displayed in a particular
situation, however, the general menu definition can be dynamically
updated by removing any menu items from the menu that are not
appropriate for the current situation, and the adjusted menu is what
is displayed.

      Since separators are only cosmetic, there is no inherent
knowledge of how they may be positioned in relation to any menu items
that are removed before a menu is displayed.  This gives rise to the
problem that when all of the menu items between subsequent separators
are removed, there remain two (or more) separators back-to-back in
the displayed menu.  There could also be a separator at the very top
of the menu if all leading menu items have been removed, or at the
very bottom of a menu if all following menu items have been removed.
This is unattractive, causing the application's user interface to
look amateurish, and should therefore be avoided.

      Examples of back-to-back separators in OS/2 2.1 can be found in
the popup menus for a minimized OS/2 windowed command prompt and for
a minimized DOS* full-screen session.  It is obvious that these menus
have removed a menu item from between separators following the
"Close" menu item, leaving two back-to-back separators.  The visual
effect speaks for itself.

      Described is a technique that applications can use to eliminate
back-to-back, leading or ending separators after menus have been
dynamically updated and menu items removed, without requiring any
special relational information as to the separators' placement within
the menu.

      Two flags are required in this technique to keep track of the
separators and non-separator menu items.  One indicates that a
non-separator has been found, and is used to eliminate any leading
separators at the top of the menu.  This flag is initialized to off,
and all separators found until this flag is set on are removed from
the menu.

      The second flag is set on when the last menu item examined was
a separator.  When a separator is found while this flag is on, it
indicates back-to-back separators and the separator just found is
removed.

      A menu ite...