The Phedit Menu Editor allows you to completely customize the menus used by Phedit. You do this by drawing the menus in this menu editor and saving them in a menu file. You then start up Phedit with the -u option, giving it the name of the menu file.
Example:
To create a new menu file go to the File menu and choose New.
An empty Working Menubar will appear in the Work Area. This empty Working Menubar where you will place your menubar items as you fill up your menu.
To open a menu file from the File menu choose Open Menu File ... The File Selector dialog will appear. Menu filenames typically end with .mnu. If your menu filename ends in something else change the pattern in the File Spec edit area.
Simply point to the part of the menu where you want the item to be added and click.
If you are adding the item to the Working Menubar then the Menubar Item Editor window will appear. Once you are done with the Menubar Item Editor window your item will have been added where you had asked for it to be put. Since it is an item on the Working Menubar you will see a plus sign to the left of the menu item's text. Clicking on this plus sign causes it to change into a minus sign and an empty submenu will appear. You would add more items to this submenu. Clicking on the minus sign causes the submenu to be closed.
If you are adding the item to a submenu then the Submenu Item Editor window will appear. Once you are done with the Submenu Item Editor window your item will have been added where you had asked for it to be put. If you indicated in the Submenu Item Editor dialog that the item was a Submenu item type then you will see a plus sign to the left of the item's text. Clicking on this plus sign causes it to change into a minus sign and an empty submenu will appear. You would add more items to this submenu. Clicking on the minus sign causes the submenu to be closed.
The three item types are:
Item Type | Decription |
---|---|
Command | Use this type if you want a primitive or macro to be run whenever the user chooses this menu item. |
Submenu | Use this type to add a submenu. When the user chooses this item a submenu will appear. |
Separator | Use this type for a visual separation between items in your menu. |
The Primitive/Macro list indicates what will happen when the user chooses this item. The list will contain all primitives as well as any macros you have loaded. If whatever you choose expects to be passed one or more parameters then the Parameter(s)... button will be enabled otherwise it will be disabled. Choosing the Parameter(s)... button will cause the Parameter Editor window to appear.
The white area is a list of the parameters for which you must provide values. There are currently only two types of parameters:
Type | Expected Format for the Value |
---|---|
int | This should be a number with no decimal places. |
string | This should be a string of characters surrounded by double quotes. |
Edit the Value: field that appears below the list until it contains the value you want to be passed for that parameter whenever the menu item is selected. In the sample above, whenever the Run Shell Window menu item is chosen the RunProgram() primitive will be run in the following way:
Once the Value: field contains what you want it to contain you must then click on Apply Edits for it to be reflected in the list.
Only once the list contains all the values that you want then you can click on Done to return to the Submenu Item Editor window.