DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Configuring Panorama (xdt3) Desktop menus

Menu clauses and commands

The commands on a menu, and the action performed when any command is chosen, are determined by the menu and menu_item clauses. These have the format:

   menu: menuname
   {
      menu_item clause
      ...
      menu_item clause
   }


NOTE: The text your provide for menuname is an internal reference, and does not appear as the title of the menu. To give a title to a menu, do not specify an action for the first menu command. In this case the command will automatically be centered rather than left-aligned.

Each menu_item clause contains a title clause specifying the name of the command, and a select_action clause specifying the action to occur when the command is chosen:

   menu_item
   {
      title=cmdname;
      select_action { script }
   }

Here cmdname gives the name of the menu command, and script is the action to be performed if it is chosen.

Instead of a script, the menu_item clause can reference a pull_off_menu clause, in which case choosing it displays the cascade menu of that name:

   menu_item
   {
      title=cmdname;
      pull_off_menu=name;
   }

For example, the Sort cascade menu would be defined by the following clause:

   menu_item
   {
      title=Sort;
      pull_off_menu=Sort_Cascade;
   }

The menu_item clause also has a short form, as follows:

   menu_item: cmdname
   {
      script
   }

This is equivalent to:

   menu_item
   {
      title=cmdname;
      select_action
      {
         script
      }
   }

See also:


Next topic: Mnemonics and accelerator keys
Previous topic: Defining menus

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 26 May 2005