interface menu create
Allows you to create a new row for a new or existing menu.
The ‘interface menu’ allows you to create, manage, and display menus. Adams view displays menus below the Command Line. You may enter Adams view commands by picking on menus, and filling out the resulting panels. If you have menus loaded and displayed, you have your choice between typing commands in the Command Line, and picking through the menus. If you are unfamiliar with a command, you will probably find the menus easier to use. If you know exactly which command to enter, you may find it quicker to type it directly.
Adams view menus are data base objects. You create, modify, and delete them as you would any other objects in Adams view. With your Adams view distribution, you received a predefined set of menus and panels that closely match the Adams view command structure. You may use them as they are, or modify them to suit your own needs and tastes.
The main menu is named '.gui.root'. The names of other menus are derived from the keywords they represent. The fixed menu, at the bottom of the display, is a special menu named '.gui.fixed_menu'. You may add, modify, or delete items from the fixed menu, but you may not delete the menu itself. To get the name of any particular menu, type on the command line (while the desired menu is displayed): "list_info pick <CR>". Then pick the desired menu and then it's full definition, including the name, will be displayed in the information window.
Menus work very simply. Each menu item has a command string associated with it. When you select an item by picking on it, Adams view executes the command associated with the item. Many times, this command will display a new menu next to the current one, allowing you to work your way down the command structure. The final menu item will display the panel associated with the command you are entering, if it has parameters, or issue the command immediately, if it has no parameters.
This command is used to create a menu on the menubar.
Format:
interface menu create |
|---|
menu_name = | a new GI_menu |
enabled = | boolean |
help_text = | string |
documentation_text = | string |
units = | int_units |
horiz_resizing = | int_h_resize |
vert_resizing = | int_v_resize |
location = | real |
height = | real |
width = | real |
label = | string |
Example:
interface menu create & |
|---|
menu_name = | .gui.win.mnbr1.zoom & |
enabled = | yes & |
help_text = | "text2help" & |
documentation_text = | "text2doc" & |
units = | relative & |
horiz_resizing = | attach_left & |
vert_resizing = | attach_top & |
location = | 0.0, 0.0 & |
height = | 0.3 & |
width = | 0.3 & |
label = | "zoom control" |
Description:
Parameter | Value Type | Description |
|---|
menu_name | A New GI_menu | Specifies the name for a new menu |
enabled | Boolean | Activates the menu |
help_text | String | Specifies the help text |
documentation_text | String | Specifies the documentation text |
units | Int_units | Specifies the menu size as pixel or relative to Adams window |
horiz_resizing | Int_h_resize | Specifies the attachment and scaling option for the menu |
vert_resizing | Int_v_resize | Specifies the attachment and scaling option for the menu |
location | Real | Specifies the location of the menu on the window |
height | Real | Specifies the height of the menu in terms of relative units or pixel |
width | Real | Specifies the width of the window field in terms of relative units or pixel |
label | String | Specifies the label to appear on menubar |
Extended Definition:
1. The ‘menu_name’ specifies the name of an existing menu which you want to modify. You identify a menu by typing its name. If a menu is available by default, you may identify it by entering its name only. If it is not, you must enter its full name. To identify a menu under a different library, for instance, you may need to enter the library name as well. For example, you may specify menu 'menu1' from library 'gui', by entering ".gui.menu1". If you type a "?", Adams View will list the menus available by default.
2. A menubar contains various menus. Each of these menus may be associated with different commands. The menus on this menubar can be created by this command, adding commands to the menus is done by ‘interface menubar build’ command. The menubar can be displayed on the main_window, popup_window, ppt_main_window, or a user defined custom window.
3. The menu is enabled by the parameter ‘enabled’. The popup_help_text and documentation is specified. The size of the menu can be specified either in terms of number of pixels. Alternatively, the size can also be stated as relative to the Adams window. The vertical and horizontal resizing options are used to adjust the placement of the menu on existing window. For example, attach_left; attach_top options for Horiz_resizing and Vert_resizing will place the window on the top left corner of the window. The location can also be specified from the top left corner by adjusting the parameter ‘location’
4. The ‘label’ will appear on menu created on the menubar.