Home » Archimedes archive » Archimedes World » AW-1994-06-Disc2.adf » Disk2Jun94 » !AWJune94/Goodies/Zap/!Zap/Docs/E-Menu

!AWJune94/Goodies/Zap/!Zap/Docs/E-Menu

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Archimedes archive » Archimedes World » AW-1994-06-Disc2.adf » Disk2Jun94
Filename: !AWJune94/Goodies/Zap/!Zap/Docs/E-Menu
Read OK:
File size: 0E23 bytes
Load address: 0000
Exec address: 0000
File contents
*************************************************************************
* >E-Menu	Documents zaps internal menu format			*
*************************************************************************

If you are writing your own mode then you may add your own menu to appear off
the the mode menu. The current modes have a writable icon of the form 'text
width' for example.

You are asked to give an offset to a 'zap menu structure' at offset e_menu in
the mode table. This file documents the format of this structure. It is of
the form:

	#&00	Menu name (12) (zero terminated)
	#&0C	Menu width (os coords)
	#&10	Module offset of 'update menu code' (see below)
	#&14	Menu entries (x n)
		-1 to terminate list of entries
		
Each menu entry is of the form:

	#&00	Flags:	b0-b7	Menu flags as for wimp. ie,
			b0	Display tick to left of item
			b1	Dotted line follows
			b2	item writable
			b3	generate warning message (see below)
			b7	ignored
			b8-b15	Minimum buffer size for this menu entry.
				(eg writable icon).
			b16-b23	Internal use : save menu start in a memory
			b24-b31	Icon colours / 0 for default
	#&04	Submenu pointer:
		If the submenu warning bit is clear then:
			0=none
			1-15=internal use : get from memory 1-15
			>16 offset in module of submenu (same structure)
		If the submenu warning bit is set then this gives the module
		offset of the code to be called to open the submenu (see
		below).
	#&08	Index word. This is a 'handle' for this menu entry which is
		passed to the interpret code.
	#&0C	Module offset of the interpret code to call when menu 
		clicked on.
	#&10	Text for this entry (0 terminated string of any length)
	ALIGN before next entry.
	
This structure is relocatable and thus can be stored directly in your mode
extension module. When Zap is run, it converts it into a standard wimp menu
with all menu entries being indirected strings. The other values are stored
at negative offsets from the standard wimp structure:

	menu pointer
	#-4	= address of update menu sub
	
	menu entry string buffer pointer
	#-12	= sub to handle submenu creation (if warning bit set)
	#-8	= index word
	#-4	= address of the interpret code to be called when clicked on
	
The update menu sub is called when the menu is created to update the 'ticks'
etc. This is called when a menu is created/recreated. The entry/exit
conditions are:

	\E	R0=offset of this menu in previous menu
		R6=w_format value (opt_format if R8=0)
		R7=w_flags value (opt_flags if R8=0)
		R8/R9=window (or 0 if called from iconbar menu)
		R10=address of the start of the wimp menu structure
		R11<>your workspace
	\X	You may corrupt R0-R11 VS on error etc
	
The interpret code is called when the menu is clicked on. Adjust clicks etc
are handled automatically. Perform the menu action. The update code will be
called again if the menu is recreated. The entry/exit conditions are:

	\E	R0=offset in menu (=R11!-4)
		R1=index word (=R10!-8)
		R2=address of menu item start
		R3=address of previous menu item start
		R6=w_format value (opt_format if R8=0)
		R7=w_flags value (opt_flags if R8=0)
		R8/R9=window (or 0 if called from iconbar menu)
		R10=address of text for this menu item
		R11=end of list of menu offsets as returned by the wimp
	\X	You may corrupt R0-R11 VS on error etc
	
The menu warning code is called when the menu warning bit is set and zap gets
a menu warning message. It has entry/exit conditions:

	\E	R8/R9=window (or 0 if called from iconbar menu)
		R11=menu warning block as returned by the wimp
	\X	R1=pointer to submenu OR window handle of leaf window to
		be opened.

All leaf windows should be warned!
00000000  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
*
00000040  2a 2a 2a 2a 2a 2a 2a 2a  2a 0a 2a 20 3e 45 2d 4d  |*********.* >E-M|
00000050  65 6e 75 09 44 6f 63 75  6d 65 6e 74 73 20 7a 61  |enu.Documents za|
00000060  70 73 20 69 6e 74 65 72  6e 61 6c 20 6d 65 6e 75  |ps internal menu|
00000070  20 66 6f 72 6d 61 74 09  09 09 2a 0a 2a 2a 2a 2a  | format...*.****|
00000080  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
*
000000c0  2a 2a 2a 2a 2a 0a 0a 49  66 20 79 6f 75 20 61 72  |*****..If you ar|
000000d0  65 20 77 72 69 74 69 6e  67 20 79 6f 75 72 20 6f  |e writing your o|
000000e0  77 6e 20 6d 6f 64 65 20  74 68 65 6e 20 79 6f 75  |wn mode then you|
000000f0  20 6d 61 79 20 61 64 64  20 79 6f 75 72 20 6f 77  | may add your ow|
00000100  6e 20 6d 65 6e 75 20 74  6f 20 61 70 70 65 61 72  |n menu to appear|
00000110  20 6f 66 66 0a 74 68 65  20 74 68 65 20 6d 6f 64  | off.the the mod|
00000120  65 20 6d 65 6e 75 2e 20  54 68 65 20 63 75 72 72  |e menu. The curr|
00000130  65 6e 74 20 6d 6f 64 65  73 20 68 61 76 65 20 61  |ent modes have a|
00000140  20 77 72 69 74 61 62 6c  65 20 69 63 6f 6e 20 6f  | writable icon o|
00000150  66 20 74 68 65 20 66 6f  72 6d 20 27 74 65 78 74  |f the form 'text|
00000160  0a 77 69 64 74 68 27 20  66 6f 72 20 65 78 61 6d  |.width' for exam|
00000170  70 6c 65 2e 0a 0a 59 6f  75 20 61 72 65 20 61 73  |ple...You are as|
00000180  6b 65 64 20 74 6f 20 67  69 76 65 20 61 6e 20 6f  |ked to give an o|
00000190  66 66 73 65 74 20 74 6f  20 61 20 27 7a 61 70 20  |ffset to a 'zap |
000001a0  6d 65 6e 75 20 73 74 72  75 63 74 75 72 65 27 20  |menu structure' |
000001b0  61 74 20 6f 66 66 73 65  74 20 65 5f 6d 65 6e 75  |at offset e_menu|
000001c0  20 69 6e 0a 74 68 65 20  6d 6f 64 65 20 74 61 62  | in.the mode tab|
000001d0  6c 65 2e 20 54 68 69 73  20 66 69 6c 65 20 64 6f  |le. This file do|
000001e0  63 75 6d 65 6e 74 73 20  74 68 65 20 66 6f 72 6d  |cuments the form|
000001f0  61 74 20 6f 66 20 74 68  69 73 20 73 74 72 75 63  |at of this struc|
00000200  74 75 72 65 2e 20 49 74  20 69 73 20 6f 66 0a 74  |ture. It is of.t|
00000210  68 65 20 66 6f 72 6d 3a  0a 0a 09 23 26 30 30 09  |he form:...#&00.|
00000220  4d 65 6e 75 20 6e 61 6d  65 20 28 31 32 29 20 28  |Menu name (12) (|
00000230  7a 65 72 6f 20 74 65 72  6d 69 6e 61 74 65 64 29  |zero terminated)|
00000240  0a 09 23 26 30 43 09 4d  65 6e 75 20 77 69 64 74  |..#&0C.Menu widt|
00000250  68 20 28 6f 73 20 63 6f  6f 72 64 73 29 0a 09 23  |h (os coords)..#|
00000260  26 31 30 09 4d 6f 64 75  6c 65 20 6f 66 66 73 65  |&10.Module offse|
00000270  74 20 6f 66 20 27 75 70  64 61 74 65 20 6d 65 6e  |t of 'update men|
00000280  75 20 63 6f 64 65 27 20  28 73 65 65 20 62 65 6c  |u code' (see bel|
00000290  6f 77 29 0a 09 23 26 31  34 09 4d 65 6e 75 20 65  |ow)..#&14.Menu e|
000002a0  6e 74 72 69 65 73 20 28  78 20 6e 29 0a 09 09 2d  |ntries (x n)...-|
000002b0  31 20 74 6f 20 74 65 72  6d 69 6e 61 74 65 20 6c  |1 to terminate l|
000002c0  69 73 74 20 6f 66 20 65  6e 74 72 69 65 73 0a 09  |ist of entries..|
000002d0  09 0a 45 61 63 68 20 6d  65 6e 75 20 65 6e 74 72  |..Each menu entr|
000002e0  79 20 69 73 20 6f 66 20  74 68 65 20 66 6f 72 6d  |y is of the form|
000002f0  3a 0a 0a 09 23 26 30 30  09 46 6c 61 67 73 3a 09  |:...#&00.Flags:.|
00000300  62 30 2d 62 37 09 4d 65  6e 75 20 66 6c 61 67 73  |b0-b7.Menu flags|
00000310  20 61 73 20 66 6f 72 20  77 69 6d 70 2e 20 69 65  | as for wimp. ie|
00000320  2c 0a 09 09 09 62 30 09  44 69 73 70 6c 61 79 20  |,....b0.Display |
00000330  74 69 63 6b 20 74 6f 20  6c 65 66 74 20 6f 66 20  |tick to left of |
00000340  69 74 65 6d 0a 09 09 09  62 31 09 44 6f 74 74 65  |item....b1.Dotte|
00000350  64 20 6c 69 6e 65 20 66  6f 6c 6c 6f 77 73 0a 09  |d line follows..|
00000360  09 09 62 32 09 69 74 65  6d 20 77 72 69 74 61 62  |..b2.item writab|
00000370  6c 65 0a 09 09 09 62 33  09 67 65 6e 65 72 61 74  |le....b3.generat|
00000380  65 20 77 61 72 6e 69 6e  67 20 6d 65 73 73 61 67  |e warning messag|
00000390  65 20 28 73 65 65 20 62  65 6c 6f 77 29 0a 09 09  |e (see below)...|
000003a0  09 62 37 09 69 67 6e 6f  72 65 64 0a 09 09 09 62  |.b7.ignored....b|
000003b0  38 2d 62 31 35 09 4d 69  6e 69 6d 75 6d 20 62 75  |8-b15.Minimum bu|
000003c0  66 66 65 72 20 73 69 7a  65 20 66 6f 72 20 74 68  |ffer size for th|
000003d0  69 73 20 6d 65 6e 75 20  65 6e 74 72 79 2e 0a 09  |is menu entry...|
000003e0  09 09 09 28 65 67 20 77  72 69 74 61 62 6c 65 20  |...(eg writable |
000003f0  69 63 6f 6e 29 2e 0a 09  09 09 62 31 36 2d 62 32  |icon).....b16-b2|
00000400  33 09 49 6e 74 65 72 6e  61 6c 20 75 73 65 20 3a  |3.Internal use :|
00000410  20 73 61 76 65 20 6d 65  6e 75 20 73 74 61 72 74  | save menu start|
00000420  20 69 6e 20 61 20 6d 65  6d 6f 72 79 0a 09 09 09  | in a memory....|
00000430  62 32 34 2d 62 33 31 09  49 63 6f 6e 20 63 6f 6c  |b24-b31.Icon col|
00000440  6f 75 72 73 20 2f 20 30  20 66 6f 72 20 64 65 66  |ours / 0 for def|
00000450  61 75 6c 74 0a 09 23 26  30 34 09 53 75 62 6d 65  |ault..#&04.Subme|
00000460  6e 75 20 70 6f 69 6e 74  65 72 3a 0a 09 09 49 66  |nu pointer:...If|
00000470  20 74 68 65 20 73 75 62  6d 65 6e 75 20 77 61 72  | the submenu war|
00000480  6e 69 6e 67 20 62 69 74  20 69 73 20 63 6c 65 61  |ning bit is clea|
00000490  72 20 74 68 65 6e 3a 0a  09 09 09 30 3d 6e 6f 6e  |r then:....0=non|
000004a0  65 0a 09 09 09 31 2d 31  35 3d 69 6e 74 65 72 6e  |e....1-15=intern|
000004b0  61 6c 20 75 73 65 20 3a  20 67 65 74 20 66 72 6f  |al use : get fro|
000004c0  6d 20 6d 65 6d 6f 72 79  20 31 2d 31 35 0a 09 09  |m memory 1-15...|
000004d0  09 3e 31 36 20 6f 66 66  73 65 74 20 69 6e 20 6d  |.>16 offset in m|
000004e0  6f 64 75 6c 65 20 6f 66  20 73 75 62 6d 65 6e 75  |odule of submenu|
000004f0  20 28 73 61 6d 65 20 73  74 72 75 63 74 75 72 65  | (same structure|
00000500  29 0a 09 09 49 66 20 74  68 65 20 73 75 62 6d 65  |)...If the subme|
00000510  6e 75 20 77 61 72 6e 69  6e 67 20 62 69 74 20 69  |nu warning bit i|
00000520  73 20 73 65 74 20 74 68  65 6e 20 74 68 69 73 20  |s set then this |
00000530  67 69 76 65 73 20 74 68  65 20 6d 6f 64 75 6c 65  |gives the module|
00000540  0a 09 09 6f 66 66 73 65  74 20 6f 66 20 74 68 65  |...offset of the|
00000550  20 63 6f 64 65 20 74 6f  20 62 65 20 63 61 6c 6c  | code to be call|
00000560  65 64 20 74 6f 20 6f 70  65 6e 20 74 68 65 20 73  |ed to open the s|
00000570  75 62 6d 65 6e 75 20 28  73 65 65 0a 09 09 62 65  |ubmenu (see...be|
00000580  6c 6f 77 29 2e 0a 09 23  26 30 38 09 49 6e 64 65  |low)...#&08.Inde|
00000590  78 20 77 6f 72 64 2e 20  54 68 69 73 20 69 73 20  |x word. This is |
000005a0  61 20 27 68 61 6e 64 6c  65 27 20 66 6f 72 20 74  |a 'handle' for t|
000005b0  68 69 73 20 6d 65 6e 75  20 65 6e 74 72 79 20 77  |his menu entry w|
000005c0  68 69 63 68 20 69 73 0a  09 09 70 61 73 73 65 64  |hich is...passed|
000005d0  20 74 6f 20 74 68 65 20  69 6e 74 65 72 70 72 65  | to the interpre|
000005e0  74 20 63 6f 64 65 2e 0a  09 23 26 30 43 09 4d 6f  |t code...#&0C.Mo|
000005f0  64 75 6c 65 20 6f 66 66  73 65 74 20 6f 66 20 74  |dule offset of t|
00000600  68 65 20 69 6e 74 65 72  70 72 65 74 20 63 6f 64  |he interpret cod|
00000610  65 20 74 6f 20 63 61 6c  6c 20 77 68 65 6e 20 6d  |e to call when m|
00000620  65 6e 75 20 0a 09 09 63  6c 69 63 6b 65 64 20 6f  |enu ...clicked o|
00000630  6e 2e 0a 09 23 26 31 30  09 54 65 78 74 20 66 6f  |n...#&10.Text fo|
00000640  72 20 74 68 69 73 20 65  6e 74 72 79 20 28 30 20  |r this entry (0 |
00000650  74 65 72 6d 69 6e 61 74  65 64 20 73 74 72 69 6e  |terminated strin|
00000660  67 20 6f 66 20 61 6e 79  20 6c 65 6e 67 74 68 29  |g of any length)|
00000670  0a 09 41 4c 49 47 4e 20  62 65 66 6f 72 65 20 6e  |..ALIGN before n|
00000680  65 78 74 20 65 6e 74 72  79 2e 0a 09 0a 54 68 69  |ext entry....Thi|
00000690  73 20 73 74 72 75 63 74  75 72 65 20 69 73 20 72  |s structure is r|
000006a0  65 6c 6f 63 61 74 61 62  6c 65 20 61 6e 64 20 74  |elocatable and t|
000006b0  68 75 73 20 63 61 6e 20  62 65 20 73 74 6f 72 65  |hus can be store|
000006c0  64 20 64 69 72 65 63 74  6c 79 20 69 6e 20 79 6f  |d directly in yo|
000006d0  75 72 20 6d 6f 64 65 0a  65 78 74 65 6e 73 69 6f  |ur mode.extensio|
000006e0  6e 20 6d 6f 64 75 6c 65  2e 20 57 68 65 6e 20 5a  |n module. When Z|
000006f0  61 70 20 69 73 20 72 75  6e 2c 20 69 74 20 63 6f  |ap is run, it co|
00000700  6e 76 65 72 74 73 20 69  74 20 69 6e 74 6f 20 61  |nverts it into a|
00000710  20 73 74 61 6e 64 61 72  64 20 77 69 6d 70 20 6d  | standard wimp m|
00000720  65 6e 75 0a 77 69 74 68  20 61 6c 6c 20 6d 65 6e  |enu.with all men|
00000730  75 20 65 6e 74 72 69 65  73 20 62 65 69 6e 67 20  |u entries being |
00000740  69 6e 64 69 72 65 63 74  65 64 20 73 74 72 69 6e  |indirected strin|
00000750  67 73 2e 20 54 68 65 20  6f 74 68 65 72 20 76 61  |gs. The other va|
00000760  6c 75 65 73 20 61 72 65  20 73 74 6f 72 65 64 0a  |lues are stored.|
00000770  61 74 20 6e 65 67 61 74  69 76 65 20 6f 66 66 73  |at negative offs|
00000780  65 74 73 20 66 72 6f 6d  20 74 68 65 20 73 74 61  |ets from the sta|
00000790  6e 64 61 72 64 20 77 69  6d 70 20 73 74 72 75 63  |ndard wimp struc|
000007a0  74 75 72 65 3a 0a 0a 09  6d 65 6e 75 20 70 6f 69  |ture:...menu poi|
000007b0  6e 74 65 72 0a 09 23 2d  34 09 3d 20 61 64 64 72  |nter..#-4.= addr|
000007c0  65 73 73 20 6f 66 20 75  70 64 61 74 65 20 6d 65  |ess of update me|
000007d0  6e 75 20 73 75 62 0a 09  0a 09 6d 65 6e 75 20 65  |nu sub....menu e|
000007e0  6e 74 72 79 20 73 74 72  69 6e 67 20 62 75 66 66  |ntry string buff|
000007f0  65 72 20 70 6f 69 6e 74  65 72 0a 09 23 2d 31 32  |er pointer..#-12|
00000800  09 3d 20 73 75 62 20 74  6f 20 68 61 6e 64 6c 65  |.= sub to handle|
00000810  20 73 75 62 6d 65 6e 75  20 63 72 65 61 74 69 6f  | submenu creatio|
00000820  6e 20 28 69 66 20 77 61  72 6e 69 6e 67 20 62 69  |n (if warning bi|
00000830  74 20 73 65 74 29 0a 09  23 2d 38 09 3d 20 69 6e  |t set)..#-8.= in|
00000840  64 65 78 20 77 6f 72 64  0a 09 23 2d 34 09 3d 20  |dex word..#-4.= |
00000850  61 64 64 72 65 73 73 20  6f 66 20 74 68 65 20 69  |address of the i|
00000860  6e 74 65 72 70 72 65 74  20 63 6f 64 65 20 74 6f  |nterpret code to|
00000870  20 62 65 20 63 61 6c 6c  65 64 20 77 68 65 6e 20  | be called when |
00000880  63 6c 69 63 6b 65 64 20  6f 6e 0a 09 0a 54 68 65  |clicked on...The|
00000890  20 75 70 64 61 74 65 20  6d 65 6e 75 20 73 75 62  | update menu sub|
000008a0  20 69 73 20 63 61 6c 6c  65 64 20 77 68 65 6e 20  | is called when |
000008b0  74 68 65 20 6d 65 6e 75  20 69 73 20 63 72 65 61  |the menu is crea|
000008c0  74 65 64 20 74 6f 20 75  70 64 61 74 65 20 74 68  |ted to update th|
000008d0  65 20 27 74 69 63 6b 73  27 0a 65 74 63 2e 20 54  |e 'ticks'.etc. T|
000008e0  68 69 73 20 69 73 20 63  61 6c 6c 65 64 20 77 68  |his is called wh|
000008f0  65 6e 20 61 20 6d 65 6e  75 20 69 73 20 63 72 65  |en a menu is cre|
00000900  61 74 65 64 2f 72 65 63  72 65 61 74 65 64 2e 20  |ated/recreated. |
00000910  54 68 65 20 65 6e 74 72  79 2f 65 78 69 74 0a 63  |The entry/exit.c|
00000920  6f 6e 64 69 74 69 6f 6e  73 20 61 72 65 3a 0a 0a  |onditions are:..|
00000930  09 5c 45 09 52 30 3d 6f  66 66 73 65 74 20 6f 66  |.\E.R0=offset of|
00000940  20 74 68 69 73 20 6d 65  6e 75 20 69 6e 20 70 72  | this menu in pr|
00000950  65 76 69 6f 75 73 20 6d  65 6e 75 0a 09 09 52 36  |evious menu...R6|
00000960  3d 77 5f 66 6f 72 6d 61  74 20 76 61 6c 75 65 20  |=w_format value |
00000970  28 6f 70 74 5f 66 6f 72  6d 61 74 20 69 66 20 52  |(opt_format if R|
00000980  38 3d 30 29 0a 09 09 52  37 3d 77 5f 66 6c 61 67  |8=0)...R7=w_flag|
00000990  73 20 76 61 6c 75 65 20  28 6f 70 74 5f 66 6c 61  |s value (opt_fla|
000009a0  67 73 20 69 66 20 52 38  3d 30 29 0a 09 09 52 38  |gs if R8=0)...R8|
000009b0  2f 52 39 3d 77 69 6e 64  6f 77 20 28 6f 72 20 30  |/R9=window (or 0|
000009c0  20 69 66 20 63 61 6c 6c  65 64 20 66 72 6f 6d 20  | if called from |
000009d0  69 63 6f 6e 62 61 72 20  6d 65 6e 75 29 0a 09 09  |iconbar menu)...|
000009e0  52 31 30 3d 61 64 64 72  65 73 73 20 6f 66 20 74  |R10=address of t|
000009f0  68 65 20 73 74 61 72 74  20 6f 66 20 74 68 65 20  |he start of the |
00000a00  77 69 6d 70 20 6d 65 6e  75 20 73 74 72 75 63 74  |wimp menu struct|
00000a10  75 72 65 0a 09 09 52 31  31 3c 3e 79 6f 75 72 20  |ure...R11<>your |
00000a20  77 6f 72 6b 73 70 61 63  65 0a 09 5c 58 09 59 6f  |workspace..\X.Yo|
00000a30  75 20 6d 61 79 20 63 6f  72 72 75 70 74 20 52 30  |u may corrupt R0|
00000a40  2d 52 31 31 20 56 53 20  6f 6e 20 65 72 72 6f 72  |-R11 VS on error|
00000a50  20 65 74 63 0a 09 0a 54  68 65 20 69 6e 74 65 72  | etc...The inter|
00000a60  70 72 65 74 20 63 6f 64  65 20 69 73 20 63 61 6c  |pret code is cal|
00000a70  6c 65 64 20 77 68 65 6e  20 74 68 65 20 6d 65 6e  |led when the men|
00000a80  75 20 69 73 20 63 6c 69  63 6b 65 64 20 6f 6e 2e  |u is clicked on.|
00000a90  20 41 64 6a 75 73 74 20  63 6c 69 63 6b 73 20 65  | Adjust clicks e|
00000aa0  74 63 0a 61 72 65 20 68  61 6e 64 6c 65 64 20 61  |tc.are handled a|
00000ab0  75 74 6f 6d 61 74 69 63  61 6c 6c 79 2e 20 50 65  |utomatically. Pe|
00000ac0  72 66 6f 72 6d 20 74 68  65 20 6d 65 6e 75 20 61  |rform the menu a|
00000ad0  63 74 69 6f 6e 2e 20 54  68 65 20 75 70 64 61 74  |ction. The updat|
00000ae0  65 20 63 6f 64 65 20 77  69 6c 6c 20 62 65 0a 63  |e code will be.c|
00000af0  61 6c 6c 65 64 20 61 67  61 69 6e 20 69 66 20 74  |alled again if t|
00000b00  68 65 20 6d 65 6e 75 20  69 73 20 72 65 63 72 65  |he menu is recre|
00000b10  61 74 65 64 2e 20 54 68  65 20 65 6e 74 72 79 2f  |ated. The entry/|
00000b20  65 78 69 74 20 63 6f 6e  64 69 74 69 6f 6e 73 20  |exit conditions |
00000b30  61 72 65 3a 0a 0a 09 5c  45 09 52 30 3d 6f 66 66  |are:...\E.R0=off|
00000b40  73 65 74 20 69 6e 20 6d  65 6e 75 20 28 3d 52 31  |set in menu (=R1|
00000b50  31 21 2d 34 29 0a 09 09  52 31 3d 69 6e 64 65 78  |1!-4)...R1=index|
00000b60  20 77 6f 72 64 20 28 3d  52 31 30 21 2d 38 29 0a  | word (=R10!-8).|
00000b70  09 09 52 32 3d 61 64 64  72 65 73 73 20 6f 66 20  |..R2=address of |
00000b80  6d 65 6e 75 20 69 74 65  6d 20 73 74 61 72 74 0a  |menu item start.|
00000b90  09 09 52 33 3d 61 64 64  72 65 73 73 20 6f 66 20  |..R3=address of |
00000ba0  70 72 65 76 69 6f 75 73  20 6d 65 6e 75 20 69 74  |previous menu it|
00000bb0  65 6d 20 73 74 61 72 74  0a 09 09 52 36 3d 77 5f  |em start...R6=w_|
00000bc0  66 6f 72 6d 61 74 20 76  61 6c 75 65 20 28 6f 70  |format value (op|
00000bd0  74 5f 66 6f 72 6d 61 74  20 69 66 20 52 38 3d 30  |t_format if R8=0|
00000be0  29 0a 09 09 52 37 3d 77  5f 66 6c 61 67 73 20 76  |)...R7=w_flags v|
00000bf0  61 6c 75 65 20 28 6f 70  74 5f 66 6c 61 67 73 20  |alue (opt_flags |
00000c00  69 66 20 52 38 3d 30 29  0a 09 09 52 38 2f 52 39  |if R8=0)...R8/R9|
00000c10  3d 77 69 6e 64 6f 77 20  28 6f 72 20 30 20 69 66  |=window (or 0 if|
00000c20  20 63 61 6c 6c 65 64 20  66 72 6f 6d 20 69 63 6f  | called from ico|
00000c30  6e 62 61 72 20 6d 65 6e  75 29 0a 09 09 52 31 30  |nbar menu)...R10|
00000c40  3d 61 64 64 72 65 73 73  20 6f 66 20 74 65 78 74  |=address of text|
00000c50  20 66 6f 72 20 74 68 69  73 20 6d 65 6e 75 20 69  | for this menu i|
00000c60  74 65 6d 0a 09 09 52 31  31 3d 65 6e 64 20 6f 66  |tem...R11=end of|
00000c70  20 6c 69 73 74 20 6f 66  20 6d 65 6e 75 20 6f 66  | list of menu of|
00000c80  66 73 65 74 73 20 61 73  20 72 65 74 75 72 6e 65  |fsets as returne|
00000c90  64 20 62 79 20 74 68 65  20 77 69 6d 70 0a 09 5c  |d by the wimp..\|
00000ca0  58 09 59 6f 75 20 6d 61  79 20 63 6f 72 72 75 70  |X.You may corrup|
00000cb0  74 20 52 30 2d 52 31 31  20 56 53 20 6f 6e 20 65  |t R0-R11 VS on e|
00000cc0  72 72 6f 72 20 65 74 63  0a 09 0a 54 68 65 20 6d  |rror etc...The m|
00000cd0  65 6e 75 20 77 61 72 6e  69 6e 67 20 63 6f 64 65  |enu warning code|
00000ce0  20 69 73 20 63 61 6c 6c  65 64 20 77 68 65 6e 20  | is called when |
00000cf0  74 68 65 20 6d 65 6e 75  20 77 61 72 6e 69 6e 67  |the menu warning|
00000d00  20 62 69 74 20 69 73 20  73 65 74 20 61 6e 64 20  | bit is set and |
00000d10  7a 61 70 20 67 65 74 73  0a 61 20 6d 65 6e 75 20  |zap gets.a menu |
00000d20  77 61 72 6e 69 6e 67 20  6d 65 73 73 61 67 65 2e  |warning message.|
00000d30  20 49 74 20 68 61 73 20  65 6e 74 72 79 2f 65 78  | It has entry/ex|
00000d40  69 74 20 63 6f 6e 64 69  74 69 6f 6e 73 3a 0a 0a  |it conditions:..|
00000d50  09 5c 45 09 52 38 2f 52  39 3d 77 69 6e 64 6f 77  |.\E.R8/R9=window|
00000d60  20 28 6f 72 20 30 20 69  66 20 63 61 6c 6c 65 64  | (or 0 if called|
00000d70  20 66 72 6f 6d 20 69 63  6f 6e 62 61 72 20 6d 65  | from iconbar me|
00000d80  6e 75 29 0a 09 09 52 31  31 3d 6d 65 6e 75 20 77  |nu)...R11=menu w|
00000d90  61 72 6e 69 6e 67 20 62  6c 6f 63 6b 20 61 73 20  |arning block as |
00000da0  72 65 74 75 72 6e 65 64  20 62 79 20 74 68 65 20  |returned by the |
00000db0  77 69 6d 70 0a 09 5c 58  09 52 31 3d 70 6f 69 6e  |wimp..\X.R1=poin|
00000dc0  74 65 72 20 74 6f 20 73  75 62 6d 65 6e 75 20 4f  |ter to submenu O|
00000dd0  52 20 77 69 6e 64 6f 77  20 68 61 6e 64 6c 65 20  |R window handle |
00000de0  6f 66 20 6c 65 61 66 20  77 69 6e 64 6f 77 20 74  |of leaf window t|
00000df0  6f 0a 09 09 62 65 20 6f  70 65 6e 65 64 2e 0a 0a  |o...be opened...|
00000e00  41 6c 6c 20 6c 65 61 66  20 77 69 6e 64 6f 77 73  |All leaf windows|
00000e10  20 73 68 6f 75 6c 64 20  62 65 20 77 61 72 6e 65  | should be warne|
00000e20  64 21 0a                                          |d!.|
00000e23