home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / desktop / b059_1 / !MenuDes / !Help next >
Text File  |  1994-01-10  |  10KB  |  255 lines

  1.  
  2. MenuDes v1.95 (19 Oct 1993)
  3. ===========================
  4.  
  5. This is a very simple version of a great menu designer which hasn't been written
  6. yet.
  7.  
  8. Load a menu by dragging the file onto the iconbar icon, or doubleclick on it
  9. while MenuDes is running.
  10. You can also start from scratch by clicking on the iconbar icon.
  11. The Main menu will be displayed at the top left of the screen.
  12.  
  13.  
  14. Editing tools
  15. -------------
  16. Drag an item with Select to copy it to somewhere else. The copy will appear
  17. where you dropped the box.
  18. Drag an item while holding Shift to move it.
  19. Click on an arrow to open a submenu.
  20. Click Adjust on an item to bring up the properties box (see below).
  21. Click Menu to bring up the menu box.
  22.  
  23.  
  24. Menu box
  25. --------
  26. All information in the Menu box refers to the menu you pressed the Menu button
  27. in. Also, the item you can delete is the item you were over.
  28.  
  29. The Title icon displays the menu title. You can edit the title by typing in
  30. something else.
  31. The Hotkey icon can be used to attach a key to the menu. Pressing this key will
  32. open the submenu. See below for more information about hotkeys.
  33. The item Height is the height of each item in OS-units.
  34. The Gap is similarily the gap between the items, also in OS-units.
  35. When you have finished defining the menu, press the OK button. 
  36.  
  37. You can delete an item by clicking the 'Delete item '...'' button.
  38. You can sort the items by their text contents by clicking 'Sort alphabetically'.
  39. The 'Delete menu' button allows you to delete the menu. Deleting the main menu
  40. will delete all the menus, so you will have to confirm that operation.
  41.  
  42.  
  43. Item properties
  44. ---------------
  45. After clicking Adjust on an item, a box pops up with information on that item.
  46. This allows you to change the look and behaviour of the item. First of all,
  47. there are 3 mutually exclusive 'types' of items:
  48.  
  49.    Normal: Selection of the item causes a command to be executed.
  50.    Toggle: Selection executes one command, deselection another.
  51. Writeable: Selection executes a command with a variable parameter.
  52.  
  53. Selecting the type affects what other things the item can do.
  54.  
  55.  
  56. Normal items
  57. ------------
  58. Most of your items will be 'Normal'. This is the natural type if you just want
  59. easy access to an editor for example.
  60.  
  61. The 'Text' icon shows the text in the item, and can be anything at all. Usually
  62. you would type in a description of the consequences of selecting the item.
  63.  
  64. The 'Selection' icon contains the command to be executed when you select the
  65. item in the menu. This is usually just one command, e.g.
  66. 'Filer_Run adfs::hd4.$.!Zap'
  67. which would start !Zap on selection.
  68.  
  69. Clicking Select on one of the 'Hotkey' icons produces a window, requesting you
  70. to press a key. Whenever you press this key in the desktop (and Pinboard is
  71. running and the menu is loaded and nobody else grabs the key first) it is
  72. equivalent to selecting the item. As you setup your menu, you might get a
  73. message saying "Already used as '<something>'". You can't have the same key on
  74. two different items. Clicking the 'GRAB' button now will remove the key from the
  75. original item, enabling you to use it on this one. Clicking Adjust on a 'Hotkey'
  76. icon removes the hotkey.
  77. The reason for having many hotkeys on one item is, that if for example 'z'
  78. starts !Zap, you aren't able to open the !Zap directory by pressing 'Shift-z'
  79. (i.e. a capital 'Z'), as you normally would be. Therefore, (if you want to be
  80. able to do that) you can define both 'z' and 'Z' to activate the same item, and
  81. you will have the same possibilities as when you double-click !Zap.
  82. The same story of course applies to Ctrl when opening directories.
  83.  
  84. Clicking on the 'Submenu' icon will open a menu containing all the currently
  85. defined submenus. Selecting one of these will make the item point to this
  86. submenu.
  87. *** Be careful not to make recursive menus! ***
  88. Selecting '<New>' will create a new submenu and attach it to the current item.
  89. The menu will be called the same as the item.
  90.  
  91. The Underline button will cause a dotted line to be drawn below the item.
  92. * Note that the line is not shown in the menu designer, *
  93. * but it will be in a future version.                   *
  94.  
  95. Clicking on 'Colours' will open a window, enabling you to select the foreground
  96. and background colours of the item.
  97.  
  98. When you have finished editing the item, click OK. This will store the
  99. information in the menu, and update it accordingly. If you close the properties
  100. window, or click Adjust on another item, the information in the window will be
  101. lost unless you have clicked OK.
  102.  
  103. You can drag files into the window, and the icons will be filled sensibly.
  104. You can also drag files onto a single icon; this will leave the others alone.
  105. You can indeed drag files directly into a menu, to add an item easily.
  106.  
  107.  
  108. Toggle items
  109. ------------
  110. The 'Toggle' type is very useful for different 'modes' of operation. You can
  111. use it to FontInstall/FontRemove a group of outlined fonts, or to turn the
  112. speaker on and off.
  113.  
  114. The 'Tick on' and 'Tick off' icons contains the 2 commands to be executed. The
  115. 'Tick on' command is for when the tick turns on, so to control the speaker, you
  116. would write:
  117.  Tick on: Speaker On
  118. Tick off: Speaker Off
  119.  
  120. The radio buttons beside the 'Tick' text is used to set whether the tick will be
  121. on or off when the menu is loaded. In the speaker example above, you would set
  122. this to the same as your configured speaker state.
  123.  
  124. Otherwise the toggle item works as a normal item.
  125.  
  126.  
  127. Writeable items
  128. ---------------
  129. Writeable is often found at the bottom of a list of fixed choices. Screenmode
  130. selection, for example, could consist of several Normal items, and a Writeable
  131. at the bottom. The command would be 'WimpMode %0', and enable you to select any
  132. mode.
  133.  
  134. The 'Max length' icon should be filled with the maximum length of an entry.
  135. This should at least be the length of the 'Text' string.
  136.  
  137. The Text icon contains the initial contents of the item, and is usually empty
  138. or a suitable default value.
  139.  
  140.  
  141. Other points
  142. ------------
  143. Saving is done from the iconbar menu, if there is anything to save at all.
  144. There is also an experimental keystrip-generator, which can be invoked by
  145. dragging the drawfile somewhere.
  146. It will try to make a sensible keystrip from the hotkeys in the currently loaded
  147. menu. There are some things to be aware of:
  148. The bounding boxes in the drawfile will all be A4 size... This makes the
  149. rendering of anything but the whole picture slow. It also means that usually
  150. the printing will be slowed down. This is no problem with Draw, which checks
  151. the boxes automatically when loading a file. Some other editors (e.g. Vector)
  152. needs to be told to do that.
  153. Also, no checks are made on the lengths of the texts (yet). With very long menu
  154. items you will probably have to edit the file by hand afterwards.
  155.  
  156. MenuDes can cope with a limited number of menus and entries, depending on the
  157. memory given to it. You can set this to a fixed amount by giving a '-max' value
  158. in the WimpSlot command in the !Run file. Otherwise it will depend on the
  159. value of the 'Next' slot in the task display. 
  160.  
  161. Hints about commands
  162. --------------------
  163.  
  164. • Note that you can have several commands in one item by separating them with
  165.   '|M'
  166. • You should get the 'SWIModule' by Jens H. Ovesen, it extends the possibilities
  167.   about 2^24 times. (It provides a 'SWI' command, which you will see a lot in
  168.   the demo menu)
  169. • It's nice to have a quick way of saving the pinboard state from the menu.
  170.   This can be done using the new '*PinSave <filename>' command.
  171. • You might have problems with some advanced commands, so it will help you to
  172.   know how they are executed:
  173.   1. The variable 'Alias$@DoItem' is set to the contents of the command string.
  174.   2. The command '@DoItem' is executed, optionally with a parameter from a
  175.      writeable item.
  176.   I meant to UnSet the variable afterwards, but it proved to be a valueable help
  177.   in debugging the more interesting commands, so I didn't.
  178. • The Pinboard module now supports commands for most of the menu functions of
  179.   the normal pinboard-menu. This means that you can move these into the user-
  180.   menu easily and define a hotkey for them. You can also make combined
  181.   functions, e.g.:
  182.      'Pinboard_SelectAll|MPinboard_LockIcon'         (Locks all icons)
  183.   or 'Wipe <Pinboard$Scrap>* F~C~V|MPinboard_Update' (Cleans out scrap dir)
  184. • A very useful function: Disowns caret from anyone who has it.
  185.   'SWI Wimp_Initialise 200 &4B534154 "Tmp"|MSWI Wimp_SetCaretPosition -1'
  186.  
  187.  
  188. Share & Enjoy!
  189.  
  190. Thomas Olsson, 19 Oct 1993
  191.  
  192. -------------------------------------------------------------------------------
  193.  
  194. For the curious, here is the format of a menu-file:
  195.  
  196.  
  197. Menu (&0DE) format:
  198. -------------------
  199.  
  200. All offsets are in bytes from the start of the file.
  201. All menus are word-aligned.
  202.  
  203. Offset        Meaning
  204. -------------------------------------------------------------
  205. 0        Main menu title, 0-term
  206. 12        &WbWfTbTf, Work/Title Fore/Back colours
  207. 16        Width of menu
  208. 20        Height of each item
  209. 24        Gap between each item
  210. 28        Items in main menu, each 24 bytes:
  211.         0    Itemflags (as for a normal menuitem)
  212.         4    Submenu offset or -1 if none
  213.         8    Iconflags (&00000121 OR <colours>)
  214.         12    Offset to item text
  215.         16    Offset to command(s) & hotkeys
  216.         20    Command flags or length of buffer if writable
  217.             Command flags:
  218.                 bit0    Tick bit active
  219.             Item list is terminated as a normal menu
  220.             by bit7 being set in the Itemflags.
  221.  
  222. 28+24*<#items>    Additional menu info after the last item:
  223.         0    Hotkey for menu (9 bit, as the hotkeys below)
  224.  
  225. The order of the following blocks is neither defined nor significant.
  226.  
  227. ...Any submenus...
  228.  
  229. ...Texts, CR term...
  230.  
  231. ...Commands:
  232.     First byte is &07 to terminate the validation string.
  233.     &06 denotes an old format, which should be converted using MenuDes.
  234.     First command, CR-terminated
  235.     2nd command, CR-terminated
  236.     ALIGN
  237.     Hotkey1 , 9 bit, see below
  238.     Hotkey2
  239.     Hotkey3
  240.     Hotkey4
  241.  
  242. ...end of file.
  243.  
  244. -------------------------------------------------------------
  245.  
  246. Hotkey codes:
  247. -------------
  248. &000-&01F    Ctrl+Key
  249. &020-&0FE    Normal Key
  250. &0FF        * None *
  251. &100-&11F    Shift+Ctrl+Key
  252. &120-&17F    * Reserved *
  253. &180-&1FF    'Wimp' Keys
  254.  
  255.