The Popup Menu Editor --------------------- The editor allows you to edit several popup menus with ease, using a simple menu driven operation. Getting started --------------- The first thing that you should do is install the editor, this tells the editor that amount of memory to reserve for you to work with. Double click on INSTALL.PRG to load the installation program. This reads EDMENU.INF, and displays the results in a dialog box. You should edit the three items to values that suit you. Click on the 'Calc' button to calculate how much memory will be required (in bytes) by your current selections. The meanings of the three numbers are... Max menus: You may edit more than one menu in each file, this is the maximum number that you may edit. Item memory: This is the number of bytes allocated for storing menu item definitions. About 20K should be sufficient. String memory: This is the number of bytes allocated for storing strings, such as item names, help strings etc. About 20K should sufficient. When you have made your mind up, click on "Install" to save the new EDMENU.INF file, or "Cancel" to quit without saving. Running the editor ------------------ To run the editor, double-click on EDMENU.PRG. The editor requires the file EDMENU.INF, and one of the three supplied resource files, which one depends on the current screen resolution. When loaded, you will get a blank screen with a menu bar. You may now immediately start editing a new file, or load a file from disk for editing. If you are a first time user, it would be sensible to load the file DEMO.POP from the DEMO folder. Tinkering with this will give you a good idea of how to use the editor. Adding menus ------------ To add or amend a popup menu definition, select the "Select menu" option. To add a new menu, enter its name and click on "Add". The other options are fairly obvious in their operation. To edit a menu, click on its name and then on the "Edit" button. Editing a menu -------------- If you are editing a new menu, a dummy item will be inserted for you to start on. The first thing you will want to do is change this entry to something of your choice. To do this, select the "Amend" option from the "Options" menu. A dialog will appear with three editable parts. The "help" and "name" strings are optional and may be left blank if not required. The "name" string is where you enter the 'C' #define name of the menu item. References to this item within your program then use this name. The "Add before" and "Add after" insert items before or after the cursor position, using the same dialog as the "Amend" option. You may not add an item before the first item in a menu or sub-menu. To add a new sub-menu, select the "Add submenu" option and fill in the dialog as above. To delete an item, select the "Delete item" option. You may not delete the first item in the menu, or any item that still has a sub- menu attached. To add/change/delete the 'C' #define name of an item, select the "Name item" option. To move the cursor around the menu items, use the cursor arrow keys. Up and Down move the cursor to previous/next item. The right cursor moves into a sub-menu, If one exists. The left cursor moves back out of a sub-menu. Item attributes --------------- Each item in the menu may be one or more of the following... Selectable: The item will highlight when the mouse cursor passes over it. It will return it's index number when clicked. Disabled: These appear grey in the menu and may not be selected by the user. To display a greyed line in the menu, enter it's text as "#l", and disable it. This will be displayed as a greyed line by the main popup module. Checked: A tick is displayed to the left of the item. Centre: The text is centred within the bounding vertical lines of the menu. Saving/Loading -------------- The menu definitions are saved in ".POP" files. These files are in a special format unique to the editor. It is these files that you load and save into the editor. Source code ----------- In order to use the menus within your own programs, you must use the "Source" option. This saves a header file (".H"). This file must be #include'ed into your source code. General stuff ------------- The instructions above should be fairly un-necessary as the editor is very simple to use. There are, however, some things that you should know: 1. Don't use desk accessories that open their own windows. They will corrupt the screen area where your popup menus are being edited. 2. You will need at least 32K of free memory. The editor needs this amount of memory for storing screen data. 2. Help strings will not be displayed in low resolution, there is not enough room on the screen ! 3. If you are creating a set of menus to be used as a replacement for GEM's top menu bar, then you should create one menu for each drop-down. See the demonstration for details. Copyright --------- The editor is a part of the "Popup" package, and is governed by the shareware rules set out in the main "readme" file