interface menu write
Allows you to write the commands associated with a menu to a file.
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 write the commands associated with a menu to a file.
Format:
interface menu write |
|---|
menu_name = | An Exisitng GI_menu |
file_name = | String |
field_name = | An Existing GI_field |
Example:
interface menu write & |
|---|
menu_name = | .gui.win.mnbr1.zoom.vwc_pop_up & |
file_name = | "D:/naresh/20 sept/z1.mnu" |
Description:
Parameter | Value Type | Description |
|---|
menu_name | An Exisitng GI_menu | Specifies the of an existing menu |
file_name | String | Specifies the name of a *.mnu file to which the commands are to be written |
field_name | An Exisitng GI_field | Specifies the existing interface field name |
Extended Definition:
1. The commands associated with a menu can be written to a .mnu file by ‘interface menu write’ command. This file can further be accessed to build another menu. Also an existing interface field can be written by using ‘interface menu write’ command.
2. The .mnu consists of a commands which can be written by ‘interface menu write’.
for example, the zoom operation tab on the menu has the following commands set which is written to a .mnu file
--------------------
NAME=vwc_pop_up
BUTTON2 Zoom In/Out <z>
HELP=Dynamically zoom the view
CMD=interface mode repeat=push mode=dyn_view_zoom
---------------------------
The above mentioned contents from a .mnu file can be read by ‘interface menu read’ command, which will display the menu zoom-in and zoom-out buttons against the already created zoom-menu.