| Prev | Next | Start of Chapter | Next Chapter | Contents | Glossary | Index | Comments | (12 out of 12)

Dynamically Switching Between Applications

gms-switch-menu-bar-cascade-template

When more than one G2 application is loaded simultaneously, and each can display a menu bar, the user typically needs a way to switch from one menu bar to another, and thus from one application to another. The Switch Menu Bar template, shown below, provides this capability.


In general, every G2 application that uses a GMS menu bar and might be loaded along with another such application should provide the ability to switch menu bars by including a Switch Menu Bar template in its menu bar. Otherwise a user who enters the application by switching to its menu bar will not be able to leave conveniently.

Switching Menu Bars

The Switch Menu Bar template is a subclass of Dynamic Cascade template. When selected, the template calls a panel constructor that:

  1. Obtains all compiled menu bars from the compiled resource.

  2. Extracts the menu label (the value of Gms-label) and the menu index (Gms-index) from the root template of each menu bar.

  3. Creates a cascade menu that contains a leaf entry for each menu bar. This entry:

To include a Switch Menu Bar template in a menu specification:

| Prev | Next | Start of Chapter | Next Chapter | Contents | Glossary | Index | Comments | (12 out of 12)

Copyright © 1997 Gensym Corporation, Inc.