1 / 10

SECTION 13 MENUS

SECTION 13 MENUS. MENUS. What’s in this section: Menu Builder Syntax of Menu File Using Commands to Add Menus. MENU BUILDER. Overview

neveah
Download Presentation

SECTION 13 MENUS

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SECTION 13 MENUS

  2. MENUS • What’s in this section: • Menu Builder • Syntax of Menu File • Using Commands to Add Menus

  3. MENU BUILDER • Overview • You can use the Menu Builder (Tools  Menu  Modify) to modify and create menus to better suit your needs and preferences, or match your industry’s terminology. • You can specify keyboard accelerators (shortcuts) and mnemonics. Mnemonics create an underlined keystroke equivalent for a menu item, such as File. Accelerators let you associate a key (such as F10) or key sequence (such as CTRL+k) with a menu item. • You can build menus for a particular model or for an entire application. For example, you can add the elements shown next:

  4. SYNTAX OF MENU FILE • Each line of a menu file defines an object and its name, or specifies information about the parent object. For clarity, ADAMS/View indents the lines. As you edit the text, you can also indent the lines. • The following figure shows a portion of the Menu Builder that defines the Help menu in ADAMS/View. Below the Menu Builder is the corresponding Help menu as it appears in ADAMS/View.

  5. SYNTAX OF MENU FILE (CONT.) • Separator • SEPARATORn • Toggle • TOGGLEn TITLE NAME=nameHELP=helpSTATE=stateCMD=command • Menu • MENUn TITLENAME=nameHELP=Help • Button • BUTTONn LABEL :: ACCELERATORNAME=nameHELP=helpCMD=command

  6. SYNTAX OF MENU FILE (CONT.) • Referring to the example syntax on the previous page, the text lines have the following parameters: • n is an integer between 1 and 10, usually 1, 2, or 3. It defines the menu level in which the object appears. Level 1 is the first level. MENU1 appears on the menu bar, for example, while BUTTON2 appears under the preceding MENU1. The n is required for MENU, but is optional for the other objects. If you omit the level, ADAMS/View assumes the object belongs under the last MENU. • You can cascade menus up to 10 deep by nesting MENUs below other MENUs. You can include as many buttons in a menu as you want, although you should not create more than will fit on your screen. • LABEL is the text that appears in the menu. For an icon button, you specify the icon name instead of the text. In Motif, the icon name is the name of a XBM (X BitMap) or XPM (X PixMap) format file. In Windows, the icon name is the name of a bitmap (.bmp) format file.

  7. SYNTAX OF MENU FILE (CONT.) • LABELs can contain ampersand (&) characters that specify keyboard mnemonic shortcuts for a menu item (for example, ALT-F opens the File menu). • BUTTONs can specify an accelerator key (for example, CTRL+M, SHIFT+G, or F12) that invokes the button action. • If NAME is omitted, ADAMS/View constructs a default identifier, such as MENU_4 or BUTTON_7. • Note that, with the exception of CMD= lines, spaces are not permitted in the menu structure input. So NAME = my_menu is not valid, but NAME=my_menu is valid. This differs from ADAMS/View command language syntax where spacing rules are flexible. • TOGGLE buttons create a menu item that displays a check mark depending on the STATE value (ON or OFF). The state value is toggled when the button is clicked. • SEPARATOR elements create horizontal linebreaks that denote groups of commands.

  8. USING COMMANDS TO ADD MENUS • If you want to modify the ADAMS/View main menu, we highly recommend that you do this using commands instead of the Menu Builder, or .mnu file. If you modify a menu structure for one version of ADAMS/View and save it, it may not represent the full, default, menu structure for subsequent ADAMS/View versions. For this reason, it is a better idea to use command language to build only the changes that you want rather than re-doing the entire menu structure.

More Related