home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ARM Club 3
/
TheARMClub_PDCD3.iso
/
hensa
/
desktop
/
b059_1
/
!MenuDes
/
!Help
next >
Wrap
Text File
|
1994-01-10
|
10KB
|
255 lines
MenuDes v1.95 (19 Oct 1993)
===========================
This is a very simple version of a great menu designer which hasn't been written
yet.
Load a menu by dragging the file onto the iconbar icon, or doubleclick on it
while MenuDes is running.
You can also start from scratch by clicking on the iconbar icon.
The Main menu will be displayed at the top left of the screen.
Editing tools
-------------
Drag an item with Select to copy it to somewhere else. The copy will appear
where you dropped the box.
Drag an item while holding Shift to move it.
Click on an arrow to open a submenu.
Click Adjust on an item to bring up the properties box (see below).
Click Menu to bring up the menu box.
Menu box
--------
All information in the Menu box refers to the menu you pressed the Menu button
in. Also, the item you can delete is the item you were over.
The Title icon displays the menu title. You can edit the title by typing in
something else.
The Hotkey icon can be used to attach a key to the menu. Pressing this key will
open the submenu. See below for more information about hotkeys.
The item Height is the height of each item in OS-units.
The Gap is similarily the gap between the items, also in OS-units.
When you have finished defining the menu, press the OK button.
You can delete an item by clicking the 'Delete item '...'' button.
You can sort the items by their text contents by clicking 'Sort alphabetically'.
The 'Delete menu' button allows you to delete the menu. Deleting the main menu
will delete all the menus, so you will have to confirm that operation.
Item properties
---------------
After clicking Adjust on an item, a box pops up with information on that item.
This allows you to change the look and behaviour of the item. First of all,
there are 3 mutually exclusive 'types' of items:
Normal: Selection of the item causes a command to be executed.
Toggle: Selection executes one command, deselection another.
Writeable: Selection executes a command with a variable parameter.
Selecting the type affects what other things the item can do.
Normal items
------------
Most of your items will be 'Normal'. This is the natural type if you just want
easy access to an editor for example.
The 'Text' icon shows the text in the item, and can be anything at all. Usually
you would type in a description of the consequences of selecting the item.
The 'Selection' icon contains the command to be executed when you select the
item in the menu. This is usually just one command, e.g.
'Filer_Run adfs::hd4.$.!Zap'
which would start !Zap on selection.
Clicking Select on one of the 'Hotkey' icons produces a window, requesting you
to press a key. Whenever you press this key in the desktop (and Pinboard is
running and the menu is loaded and nobody else grabs the key first) it is
equivalent to selecting the item. As you setup your menu, you might get a
message saying "Already used as '<something>'". You can't have the same key on
two different items. Clicking the 'GRAB' button now will remove the key from the
original item, enabling you to use it on this one. Clicking Adjust on a 'Hotkey'
icon removes the hotkey.
The reason for having many hotkeys on one item is, that if for example 'z'
starts !Zap, you aren't able to open the !Zap directory by pressing 'Shift-z'
(i.e. a capital 'Z'), as you normally would be. Therefore, (if you want to be
able to do that) you can define both 'z' and 'Z' to activate the same item, and
you will have the same possibilities as when you double-click !Zap.
The same story of course applies to Ctrl when opening directories.
Clicking on the 'Submenu' icon will open a menu containing all the currently
defined submenus. Selecting one of these will make the item point to this
submenu.
*** Be careful not to make recursive menus! ***
Selecting '<New>' will create a new submenu and attach it to the current item.
The menu will be called the same as the item.
The Underline button will cause a dotted line to be drawn below the item.
* Note that the line is not shown in the menu designer, *
* but it will be in a future version. *
Clicking on 'Colours' will open a window, enabling you to select the foreground
and background colours of the item.
When you have finished editing the item, click OK. This will store the
information in the menu, and update it accordingly. If you close the properties
window, or click Adjust on another item, the information in the window will be
lost unless you have clicked OK.
You can drag files into the window, and the icons will be filled sensibly.
You can also drag files onto a single icon; this will leave the others alone.
You can indeed drag files directly into a menu, to add an item easily.
Toggle items
------------
The 'Toggle' type is very useful for different 'modes' of operation. You can
use it to FontInstall/FontRemove a group of outlined fonts, or to turn the
speaker on and off.
The 'Tick on' and 'Tick off' icons contains the 2 commands to be executed. The
'Tick on' command is for when the tick turns on, so to control the speaker, you
would write:
Tick on: Speaker On
Tick off: Speaker Off
The radio buttons beside the 'Tick' text is used to set whether the tick will be
on or off when the menu is loaded. In the speaker example above, you would set
this to the same as your configured speaker state.
Otherwise the toggle item works as a normal item.
Writeable items
---------------
Writeable is often found at the bottom of a list of fixed choices. Screenmode
selection, for example, could consist of several Normal items, and a Writeable
at the bottom. The command would be 'WimpMode %0', and enable you to select any
mode.
The 'Max length' icon should be filled with the maximum length of an entry.
This should at least be the length of the 'Text' string.
The Text icon contains the initial contents of the item, and is usually empty
or a suitable default value.
Other points
------------
Saving is done from the iconbar menu, if there is anything to save at all.
There is also an experimental keystrip-generator, which can be invoked by
dragging the drawfile somewhere.
It will try to make a sensible keystrip from the hotkeys in the currently loaded
menu. There are some things to be aware of:
The bounding boxes in the drawfile will all be A4 size... This makes the
rendering of anything but the whole picture slow. It also means that usually
the printing will be slowed down. This is no problem with Draw, which checks
the boxes automatically when loading a file. Some other editors (e.g. Vector)
needs to be told to do that.
Also, no checks are made on the lengths of the texts (yet). With very long menu
items you will probably have to edit the file by hand afterwards.
MenuDes can cope with a limited number of menus and entries, depending on the
memory given to it. You can set this to a fixed amount by giving a '-max' value
in the WimpSlot command in the !Run file. Otherwise it will depend on the
value of the 'Next' slot in the task display.
Hints about commands
--------------------
• Note that you can have several commands in one item by separating them with
'|M'
• You should get the 'SWIModule' by Jens H. Ovesen, it extends the possibilities
about 2^24 times. (It provides a 'SWI' command, which you will see a lot in
the demo menu)
• It's nice to have a quick way of saving the pinboard state from the menu.
This can be done using the new '*PinSave <filename>' command.
• You might have problems with some advanced commands, so it will help you to
know how they are executed:
1. The variable 'Alias$@DoItem' is set to the contents of the command string.
2. The command '@DoItem' is executed, optionally with a parameter from a
writeable item.
I meant to UnSet the variable afterwards, but it proved to be a valueable help
in debugging the more interesting commands, so I didn't.
• The Pinboard module now supports commands for most of the menu functions of
the normal pinboard-menu. This means that you can move these into the user-
menu easily and define a hotkey for them. You can also make combined
functions, e.g.:
'Pinboard_SelectAll|MPinboard_LockIcon' (Locks all icons)
or 'Wipe <Pinboard$Scrap>* F~C~V|MPinboard_Update' (Cleans out scrap dir)
• A very useful function: Disowns caret from anyone who has it.
'SWI Wimp_Initialise 200 &4B534154 "Tmp"|MSWI Wimp_SetCaretPosition -1'
Share & Enjoy!
Thomas Olsson, 19 Oct 1993
-------------------------------------------------------------------------------
For the curious, here is the format of a menu-file:
Menu (&0DE) format:
-------------------
All offsets are in bytes from the start of the file.
All menus are word-aligned.
Offset Meaning
-------------------------------------------------------------
0 Main menu title, 0-term
12 &WbWfTbTf, Work/Title Fore/Back colours
16 Width of menu
20 Height of each item
24 Gap between each item
28 Items in main menu, each 24 bytes:
0 Itemflags (as for a normal menuitem)
4 Submenu offset or -1 if none
8 Iconflags (&00000121 OR <colours>)
12 Offset to item text
16 Offset to command(s) & hotkeys
20 Command flags or length of buffer if writable
Command flags:
bit0 Tick bit active
Item list is terminated as a normal menu
by bit7 being set in the Itemflags.
28+24*<#items> Additional menu info after the last item:
0 Hotkey for menu (9 bit, as the hotkeys below)
The order of the following blocks is neither defined nor significant.
...Any submenus...
...Texts, CR term...
...Commands:
First byte is &07 to terminate the validation string.
&06 denotes an old format, which should be converted using MenuDes.
First command, CR-terminated
2nd command, CR-terminated
ALIGN
Hotkey1 , 9 bit, see below
Hotkey2
Hotkey3
Hotkey4
...end of file.
-------------------------------------------------------------
Hotkey codes:
-------------
&000-&01F Ctrl+Key
&020-&0FE Normal Key
&0FF * None *
&100-&11F Shift+Ctrl+Key
&120-&17F * Reserved *
&180-&1FF 'Wimp' Keys