Menu Editor

Introduction

The BASIS Menu Editor utility, _msedit.utl, is one of the powerful tools provided in the EUS Toolkit. It procides the capability to quickly design and create the menus that will be used to navigate through an application.

The BASIS Menu Editor provides a menu-driven approach to designing menus. With a few simple keystrokes you can:

  • Select from eight different menu types.

  • Set up the size and position of the menu on the screen.

  • Choose to display submenus and their style (sliding or cascading).

  • Specify the offset direction and distance of submenus from the main menu.

  • Specify the colors of menu outlines, backgrounds, titles, detail items, and highlights.

Menus created with the BASIS Menu Editor are called static menus and are stored in menu files. Each record in a menu file completely defines one menu. This is an important relationship to remember. One menu equals one menu record.

Related menus, such as submenus or independent menus that are part of the same program, should all be kept in the same file. However, there are no restrictions. Some developers may want to store all of their menus in one file, while others may choose to store different types of menus in different files.

Once a static menu file is defined, individual menus can be accessed from it by CALLing _msdrv.utl. See _msdrv.utl for additional information.

Menu Structure

The structure of the menu file for these menus would be similar to:

I. Menu File AR

  1. Menu record "main"

      1. Header of "main"

      2. Detail of "main"

        1. Submenu: See menu record "maint"

        2. Submenu: See menu record "reports"

  2. Menu record "maint"

      1. Header of "maint"

      2. Detail of "maint"

        1. Program, Customer Maintenance

        2. Program, Terms Maintenance

  3. Menu record "reports"

      1. Header of "reports"

      2. Detail of "reports"

        1. Program, Aged Trial Balance

        2. Program, Past Due Customers

        3. Program, Customer List

        4. Submenu: See menu record "analysis"

  4. Menu record "analysis"

      1. Header of "analysis"

      2. Detail of "analysis"

        1. Program, Profit Analysis

        2. Program, AR Analysis

The menu file AR must contain a menu record for each menu described above. Menu records contain Header information, which describes the characteristics of the menu as a whole, as well as Detail information, which describes the items, or selections. Detail information specifies how each item appears in the menu and what action is taken when each item is selected by the end-user.

Menu files are stored in a special directory. This directory is named in the global string (MENU). Assume the Menus library is defined as follows in the configuration file:

MENUS=(ROOT)menus/

A menu file name would be called in this format:

(ROOT)menus/menu_name.m(LANGUAGE)

The .m(LANGUAGE) extension is appended automatically by the BASIS Menu Editor and consists of a lower case m followed by the (LANGUAGE) global string, which is the current language code.

This makes it simple to internationalize the menus for an application. When the menus are complete, simply copy the menu file to another file with a different language code. Then, only the new menu records need to be edited to translate the titles, menu items, and prompts into the second language. Parameters that determine menu type, size, screen position, and behavior of the menu may remain unchanged. Changing the (LANGUAGE) global in the configuration file then causes the application to use the translated menus.