home *** CD-ROM | disk | FTP | other *** search
- AltMenu
- ¨¨¨¨¨¨¨
- Hello and welcome to the wonderful world of AltMenu.
-
- What does it do?
- ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
- It blatantly steals one of the good features of Guttorm Vik's text editor,
- !StrongEd. That is you can define a menu which appears when you click menu
- anywhere on the screen with the left Alt key held down. You can then set
- this menu up to list all your favourite applications and utilities, program
- files, C header files, assembly source code files etc. etc. for easy loading
- without having to mess about going through directory trees or finding the
- iconbar from under that sea of windows.
-
- This may not seem to be that useful but trust me, it is. Try it, you might
- like it.
-
- How do I use it?
- ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
- You will find two applications within this directory, !AltMenu and !MakeMenu.
- !AltMenu contains a small module which provides the low-level support and
- does all the dirty work. You will need to run !AltMenu at some point, either
- from a filer window or in a hard-disc boot sequence. The module accepts
- AltMenu files (type &2AB which I just plucked from thin air and which is not
- Acorn allocated) which you will need to create using !MakeMenu. You can then
- load the AltMenu file by double-clicking or using the * command *AltMenu
- <filename>.
-
- !MakeMenu
- ¨¨¨¨¨¨¨¨¨
- So it all comes down to the fact that to use AltMenu you will need to know
- how to use !MakeMenu, so here goes.
-
- The basic principle of the program is that you can define a number of menus
- which can then be linked together as submenus if desired. Each menu is
- identified by its title, and when you load the program you will find that a
- menu called 'AltMenu' has already been created; this is the root menu and
- will be what appears when you click MENU with the Alt key held down.
-
- Editing menus
- ¨¨¨¨¨¨¨¨¨¨¨¨¨
- To edit a menu, you need to display it first. This is done using the 'Show'
- option on the main iconbar menu; selecting one of the names listed on the
- submenu will display that menu. You will then see a small window with a
- representation of the menu inside it. Clicking MENU over this window
- displays a small menu with the options 'Add item' and 'Edit item'. 'Edit
- item' will be greyed out unless you call up the menu with the pointer over an
- item (like in a filer window). Selecting either option will bring up the 'edit
- item' dialogue box.
-
- The edit item dialogue box
- ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
- This is where you actually define what a menu item will look like. Firstly,
- fill in the 'text' field with the item text. You will then need to say what
- the item does; it can either execute a * command when selected or it can lead
- to a submenu. For a * command, click on the 'Command' radio icon and then
- enter a valid * command into the writeable icon. For a submenu, you need to
- click on the 'Submenu' radio icon and then choose a name off the menu which
- can be brought up by clicking on the menu icon to the right of the submenu
- icon. Finally clicking OK will add or edit the item depending on which menu
- option you selected earlier on.
-
- If you just want the item to run a file, you can drag the file onto the
- dialogue box. Its leafname will be put in as the item text and the * command
- writeable icon will be filled with 'Filer_Run <filename>'. Alternatively, if
- you drag a file onto the dialogue with Shift held down, the * command will be
- 'Edit <filename>' (see later).
-
- Creating new menus
- ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
- Creating a new menu is done simply by choosing 'New menu...' on the iconbar
- menu. This will open small dialogue box; enter a unique identifier into the
- 'Identifier' field and click OK. After this you will need to show the menu,
- using the 'Show' option on the iconbar menu, before you can edit it.
-
- Other iconbar menu options
- ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
- Info: leads to a standard Info box.
- Save: leads to a standard Save box from which you can save your menus.
- After this simply double-clicking on the menu file will load the menu as the
- current AltMenu.
- Clear: this clears all the current menus (no confirmation, so be careful!)
- Quit : quits the program (again no confirmation)
-
-
- The Edit command
- ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
- As well as the *AltMenu command provided to load AltMenus, the module
- provides one other useful * command. This is *Edit <filename> and it simply
- loads the named file into whatever text editor is loaded. This is a handy
- command to use in menus as you can get it to load BASIC programs into an
- editor instead of running them.
-
-
- Very good, but the !MakeMenu program is useless
- ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
- Yes, I agree but I wrote it in a fairly short space of time when I was not
- feeling particularly inspired. If you would like to write a better one
- please feel free to do so; the AltMenu file format is described below. If
- you manage it PLEASE send me a copy!
-
-
- The AltMenu file format
- ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
- Yes, its illogical, yes it smacks of awful programming, but it works.
-
- The file starts with the four characters ALTM to identify the file as an
- AltMenu file. There then follows a series of blocks like this:
-
- /-------------------------------------\
- | Standard Wimp_CreateMenu menu block |
- |-------------------------------------|
- | Command block |
- \-------------------------------------/
-
- ie a standard Wimp menu block followed by a 'command block'. This is simply
- a list of the * commands that will be called when each menu option is
- selected, terminated by any character lower than ASCII 32. Note that a *
- command is searched for even when an option which has a submenu is selected
- so these options should have a command which does nothing, for example
- simply:
-
- |
-
- Note also that the end of the command block MUST be padded with null
- characters until it is word-aligned or some very strange things will happen.
-
- Submenu pointers should be file offsets, taking the start of the file as
- being the first Wimp_CreateMenu block ie ignoring the 4-byte header. Also
- the first menu in the file must be the root menu but after that the menus can
- appear in any order.
-
-
-
- Credits
- ¨¨¨¨¨¨¨
- When programming I count three PD programs as essential; !Zap, by Dominic
- Symes, a truly marvellous text editor; !StrongHlp, by Guttorm Vik, a simply
- wonderful hyper-text system with a very useful section on loads of SWI calls
- that you can't otherwise use without (expensive) PRMs; and !TemplEd by Dick
- Alstein, a frankly miraculous template editor and the only decent one I have
- ever seen. If you don't have these programs, get them. I would personally
- like to thank all the programmers for their efforts and for giving their
- programs away. (The !WordWorks thesaurus is also handy for finding all those
- superlatives that one needs to describe other people's programs!)
-
- I would also like to thank those programmers who have unwittingly taught me
- to program RISC OS by allowing me (!) to peruse their code.
-
-
-
- Legalities
- ¨¨¨¨¨¨¨¨¨¨
- !AltMenu, !MakeMenu and all supporting documentation is © Carl Hetherington.
- Copyright remains with me at all times. You may however copy the program
- provided that:
- * the whole distribution remains complete and unaltered.
- * no charge is made except to cover handling and postage costs (no more
- than £2).
- In other words, the program is Freeware.
-
-
- Contacting me
- ¨¨¨¨¨¨¨¨¨¨¨¨¨
- AltMenu was written by and is © Carl Hetherington. I can be reached at the
- following addresses:
-
- Holidays: Term-time:
-
- 31 Tamworth Road Wentworth College
- Ashby-de-la-Zouch The University of York
- Leicestershire Heslington
- LE65 2PW York
- YO1 5DD
- e-mail: cth103@york.ac.uk
- www: http://www.york.ac.uk/~cth103/
-
-
- Please write or e-mail if you find any bugs, have any suggestions for
- improvements, or just want to say hello. A formatted disc and SAE will bring
- the latest version of the program, or you can just check my web page if you
- have access to the internet.
-