interface option_menu create
Allows you to create a new information window.
Format:
interface option_menu create |
|---|
option_menu_name = | a new GI_opt_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 |
choices = | string |
values = | string |
commands = | string |
current_choice = | string |
Example:
interface option_menu create & |
option_menu_name = | test & |
enabled = | yes & |
help_text = | help & |
documentation_text = | doc & |
units = | relative & |
horiz_resizing = | attach_left & |
vert_resizing = | attach_top & |
location = | 0,0 & |
height = | 1 & |
width = | 1 & |
choices = | one, two, three & |
values = | "10,20,30" & |
commands = | "model display fit_to_view = no view_name = all","interface dialog & undisplay dialog= .gui.moag","interface dialog display dialog=.gui.moag" & |
current_choice = | two |
Description:
Parameter | Value Type | Description |
|---|
option_menu_name | A New GI_opt_menu | Specifies the name of a new information window |
enabled | Boolean | Activates the information window |
help_text | String | Specifies the help text |
documentation_text | String | Specifies the documentation text |
units | Int_units | Specifies the information window size in pixels or units relative to Adams window |
horiz_resizing | Int_H_Resize | Specifies the attachment and scaling option for menu |
vert_resizing | Int_V_Resize | Specifies the attachment and scaling option for menu |
location | Real | Specifies the location of the menu |
height | Real | Specifies the height of the menu in terms of relative units or pixels |
width | Real | Specifies the width of the menu in terms of relative units or pixels |
choices | String | Specifies the names of the choices |
values | String | Specifies values of each of the choices |
commands | String | Specifies the command name to be executed associated with the choice |
current_choice | String | Specifies the current command from the choices |
Extended Definition:
1. A new option menu is created if the menu with the specified name does not exist. This menu has multiple choices offered as various options or commands are to be executed. Each option or choice has an associated command.
2. If parameter ‘Enabled’ is set to ON, the menu will be preactivated.
3. The pop-up help and documentation help can be specified in appropriate dialog boxes.
4. The size of the info window can be specified in terms of the number of pixels. Alternatively, the size can also be stated as relative to the Adams window.
5. The vertical and horizontal resizing options are used to adjust the placement of the option menu on the existing dialog box. For example, attach_left; attach_top options for Horiz_resizing and Vert_resizing will place the option menu on the top left corner of the dialog box. The location can also be specified from the top left corner by adjusting the parameter ‘location’.
6. The size of the option menu window can be specified with respect to the Adams window size. The value for parameter height and width should be a real number between 0.0 and 2.0, where 2.0 represents the height of the Adams View window. Therefore, a value of 1.0 will set the info window to be half as high as the Adams View window.
7. Multiple choices can be specified for a number of commands to be executed. The choice can be offered as any string variable. Similarly, the choices can also be specified as values by specifying the parameter, ‘value’9. The number of commands equal to the choices offered are entered within quotation marks, separated by commas.
8. While executing the option menu, the default command to be executed is selected from the parameter, ‘current choice’.
Tips:
If the values of the choices in item 12 above are numeric, it should be quoted as a string. Similarly, the complete commands should be entered with quotations. Multiple commands are separated by commas.