Home » Archimedes archive » Archimedes World » AW-1995-01-Disc2.adf » Disk2Jan95 » !AWJan95/Goodies/Event/Docs/MenuDoc
!AWJan95/Goodies/Event/Docs/MenuDoc
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-1995-01-Disc2.adf » Disk2Jan95 |
Filename: | !AWJan95/Goodies/Event/Docs/MenuDoc |
Read OK: | ✔ |
File size: | 284F bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
Documentation for the MenuUtils module v.0.10 � Petrov Software 1992 Introduction This module is mainly intended for people who write RISC OS applications in BBC BASIC. It can save programmer from the need to write his own procedures in BASIC for handling menus. MenuUtils module can perform all the work needed to create, edit, display and decode menus. The module is very simple in use and is ideal for creating simple menus. On the other hand module's advanced features allows easily create and manipulate even very complex multi-level dynamic menus. What does MenuUtils do ? The MenuUtils module is not the extension to the Window Manager and it doesn't provide any extra feature. The module only provides a convenient interface for the programmer to Window Manager's menu system. The module has a collection of SWIs to do all the low level work concerned with direct accesses to menu data structures, memory allocation, etc. It saves the author of application program from the need to do this routine work himself. MenuUtils provides mechanism of item handlers. It allows to attach individual handler to each menu item. In case of BBC BASIC the handler may be simply a BASIC function. When menu item is selected the corresponding item handler may be invoked automatically. This feature saves the programmer from the need to decode the list of menu selections. During program development the use of individual item handlers simplifies the process of menu modification. You can freely rearrange menu items without the need to make any changes in other parts of the program. There is an example in the end of this text which illustrates the use of item handlers in BASIC programs. MenuUtils automatically allocates memory to hold menu data structures. And also it takes care about appearance of menus on screen by forcing them to be in standard RISC OS style. Technical details Module MenuUtils may be used only by programs which are WIMP tasks. Special SWI MenuUtil_Initialise is provided to register the program as MenuUtils client. MenuUtil_Initialise must be called after Wimp_Initialise has been called and before any other call to MenuUtils module is made. All menus created by MenuUtils are kept in RMA. So you have no need to reserve memory for them. On exit from your program all the memory will be automatically returned to RMA. Single MenuUtils module can handle menus for several WIMP tasks. Internal format of menu data structures created by the module is the same as described in RISC OS 2 PRM. So it is possible to combine menus created by MenuUtils with other menus. To find out address of menu data structure you can use SWI MenuUtil_Info. Menu handles Menu consists of menu title and one or more menu items. Each menu and each menu item created with MenuUtils gets unique handle. You can use this handle to refer to particular menu or menu item. The use of unique handles for each menu item instead of absolute addresses or positions in menu gives additional flexibility in manipulation with menu data structure. It allows for example insert and delete menu items. MenuUtils always remembers the handle used in last operation. This handle is called current handle and it will be used as default in the next operation. This is especially convenient when calls to the module are made from BASIC with SYS command. Menu creation To start new menu you must call MenuUtil_New. Then you may add to it any number of menu items. To add new item you must call MenuUtil_Add. Menu always is ready to be displayed on screen and you have no need to specially inform the module when you have added the last item to the menu. By default all new items are added to the end of menu. If you want to insert new item in the middle of menu then you must specify the handle of the item before which you want to insert the new item. All menu flags in added items are cleared. Colours and dimensions are in standard RISC OS style. Width of menu is adjusted automatically. In order to construct multi-level menu tree you have to connect some menu items with submenus or with dialog boxes. MenuUtils provides special SWI to link menu item with submenu. This SWI also allows you to link menus created by MenuUtils with other menus. Menu modification You can in any moment change menu title string as well as the text of menu items. You can also change foreground and background colours of menu items. Menu item has a number of flags which control its appearance and behaviour. The flags are tick, fade, dots, submenu, writable and message. Special SWIs are provided to set or clear each menu flag. As a special case when you are making menu item writable you can also specify buffer size and optional validation string. You can delete single menu item or the whole menu with MenuUtil_Delete. You can also recursively delete the whole menu subtree connected with the deleted item or with the deleted menu. Displaying menu on screen According to RISC OS rules you must display menu on screen when user clicks with Menu button over one of your windows or iconbar icon. To find out where to display the menu you have to perform some calculations. MenuUtils provides a SWI MenuUtil_Show which will perform all necessary calculations for you and open menu in the right screen position according to RISC OS standards. Special SWI is provided to display submenu in reply to Message_MenuWarning. Item handlers and menu decoding The mechanism of item handlers allows to link each menu item with individual item handler. The handler may be invoked automatically and you have no need to decode the list of selections in order to take the appropriate action. During the call to "MenuUtil_Initialise" you must specify initialisation type. Initialisation type defines the interpretation of item handlers and can be "BASIC" or "machine code" (latter is not supported in current version). In case of "BASIC" the item handlers are assumed to be the BASIC functions and in case of "machine code" - ARM subroutines. If you want to attach a handler to menu item you must pass the pointer to the name of BASIC function or respectively the address of the ARM subroutine to MenuUtil_Add. After user selection the corresponding item handler will be found by "MenuUtil_Decode". To invoke the handler you have to call either the BASIC function or the ARM subroutine depending on initialisation type. Other features Many applications use standard menu allowing user to select a colour from standard desktop colours. MenuUtils provides a special SWI "MenuUtil_ColourMenu" which creates such colour setting menu. Application notes This example illustrates the use of menu item handlers in programs in BBC BASIC. Lets consider simple menu consisting of single item. +----------------+ | | | Simple menu | | | +----------------+ | Item#1 | +----------------+ To create this menu we must call "MenuUtil_New" and to add an item - "MenuUtil_Add". SYS "MenuUtil_New",,"Simple menu" SYS "MenuUtil_Add",,"Item#1","func1" - here "Simple menu" is menu title, "Item#1" - item text and "func1" - name of the item handler. The name of the handler is "func1" so we must have a function with the name "FNfunc1". DEF FNfunc1 ... =TRUE Then we organize the main Wimp_Poll loop in the following way. DIM q% &100 REPEAT SYS "Wimp_Poll",,q% TO reason% CASE reason% OF ... REM Mouse click WHEN 6 IF q%!8=2 THEN SYS "MenuUtil_Show",,q% REM Menu selection WHEN 9 SYS "MenuUtil_Decode",,q% TO handler% IF handler% THEN handler$="FN"+$handler% IF EVAL handler$ ENDIF ... ENDCASE UNTIL FALSE If the user clicks with Menu button we will call "MenuUtil_Show" to display menu on screen. If user selects something from our menu we will call "MenuUtil_Decode" to find out corresponding item handler. Variable handler% will contain pointer to the handler name. In our example if user will select item "Item#1" variable handler% will point to string "func1". The full name of the handler will be "FN"+$handler%. And EVAL statement is used to call it. ------------------------------------------------------------------------ Notes from the author MenuUtils is freeware software. Everybody is free to use MenuUtils module, even in commercial code. In case of commercial use I would like to know this in advance (I could than provide you with the latest release). You can always contact me if you found some bug, or when having other suggestions. To contact the author of MenuUtils, please write to: RUSSIA 115541 Moscow Kavkazsky boulevard, 29 Bld. 1, Flat 107 Alex Petrov E-mail: APetrov@misis.msk.su APetrov@arm.msk.su FIDO : 2:5020/104.13 phone: +7 095 322 2098 fax : +7 095 236 8350
00000000 0a 0a 20 20 20 20 44 6f 63 75 6d 65 6e 74 61 74 |.. Documentat| 00000010 69 6f 6e 20 66 6f 72 20 74 68 65 20 4d 65 6e 75 |ion for the Menu| 00000020 55 74 69 6c 73 20 6d 6f 64 75 6c 65 20 76 2e 30 |Utils module v.0| 00000030 2e 31 30 20 0a 0a 20 20 20 20 20 20 20 20 20 20 |.10 .. | 00000040 20 20 20 20 20 20 20 20 20 20 20 a9 20 50 65 74 | . Pet| 00000050 72 6f 76 20 53 6f 66 74 77 61 72 65 20 31 39 39 |rov Software 199| 00000060 32 0a 0a 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 |2..... | 00000070 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000080 20 49 6e 74 72 6f 64 75 63 74 69 6f 6e 0a 20 20 | Introduction. | 00000090 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 000000b0 20 20 20 20 20 20 0a 54 68 69 73 20 6d 6f 64 75 | .This modu| 000000c0 6c 65 20 69 73 20 6d 61 69 6e 6c 79 20 69 6e 74 |le is mainly int| 000000d0 65 6e 64 65 64 20 66 6f 72 20 70 65 6f 70 6c 65 |ended for people| 000000e0 20 77 68 6f 20 77 72 69 74 65 20 52 49 53 43 20 | who write RISC | 000000f0 4f 53 0a 61 70 70 6c 69 63 61 74 69 6f 6e 73 20 |OS.applications | 00000100 69 6e 20 42 42 43 20 42 41 53 49 43 2e 20 49 74 |in BBC BASIC. It| 00000110 20 63 61 6e 20 73 61 76 65 20 70 72 6f 67 72 61 | can save progra| 00000120 6d 6d 65 72 20 66 72 6f 6d 20 74 68 65 20 6e 65 |mmer from the ne| 00000130 65 64 20 74 6f 0a 77 72 69 74 65 20 68 69 73 20 |ed to.write his | 00000140 6f 77 6e 20 70 72 6f 63 65 64 75 72 65 73 20 69 |own procedures i| 00000150 6e 20 42 41 53 49 43 20 66 6f 72 20 68 61 6e 64 |n BASIC for hand| 00000160 6c 69 6e 67 20 6d 65 6e 75 73 2e 20 4d 65 6e 75 |ling menus. Menu| 00000170 55 74 69 6c 73 20 6d 6f 64 75 6c 65 0a 63 61 6e |Utils module.can| 00000180 20 70 65 72 66 6f 72 6d 20 61 6c 6c 20 74 68 65 | perform all the| 00000190 20 77 6f 72 6b 20 6e 65 65 64 65 64 20 74 6f 20 | work needed to | 000001a0 63 72 65 61 74 65 2c 20 65 64 69 74 2c 20 64 69 |create, edit, di| 000001b0 73 70 6c 61 79 20 61 6e 64 20 64 65 63 6f 64 65 |splay and decode| 000001c0 0a 6d 65 6e 75 73 2e 20 54 68 65 20 6d 6f 64 75 |.menus. The modu| 000001d0 6c 65 20 69 73 20 76 65 72 79 20 73 69 6d 70 6c |le is very simpl| 000001e0 65 20 69 6e 20 75 73 65 20 61 6e 64 20 69 73 20 |e in use and is | 000001f0 69 64 65 61 6c 20 66 6f 72 20 63 72 65 61 74 69 |ideal for creati| 00000200 6e 67 0a 73 69 6d 70 6c 65 20 6d 65 6e 75 73 2e |ng.simple menus.| 00000210 20 4f 6e 20 74 68 65 20 6f 74 68 65 72 20 68 61 | On the other ha| 00000220 6e 64 20 6d 6f 64 75 6c 65 27 73 20 61 64 76 61 |nd module's adva| 00000230 6e 63 65 64 20 66 65 61 74 75 72 65 73 20 61 6c |nced features al| 00000240 6c 6f 77 73 0a 65 61 73 69 6c 79 20 63 72 65 61 |lows.easily crea| 00000250 74 65 20 61 6e 64 20 6d 61 6e 69 70 75 6c 61 74 |te and manipulat| 00000260 65 20 65 76 65 6e 20 76 65 72 79 20 63 6f 6d 70 |e even very comp| 00000270 6c 65 78 20 6d 75 6c 74 69 2d 6c 65 76 65 6c 20 |lex multi-level | 00000280 64 79 6e 61 6d 69 63 0a 6d 65 6e 75 73 2e 0a 0a |dynamic.menus...| 00000290 20 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | .. | 000002a0 20 20 20 20 20 57 68 61 74 20 64 6f 65 73 20 4d | What does M| 000002b0 65 6e 75 55 74 69 6c 73 20 64 6f 20 3f 0a 0a 54 |enuUtils do ?..T| 000002c0 68 65 20 4d 65 6e 75 55 74 69 6c 73 20 6d 6f 64 |he MenuUtils mod| 000002d0 75 6c 65 20 69 73 20 6e 6f 74 20 74 68 65 20 65 |ule is not the e| 000002e0 78 74 65 6e 73 69 6f 6e 20 74 6f 20 74 68 65 20 |xtension to the | 000002f0 57 69 6e 64 6f 77 20 4d 61 6e 61 67 65 72 20 61 |Window Manager a| 00000300 6e 64 20 69 74 0a 64 6f 65 73 6e 27 74 20 70 72 |nd it.doesn't pr| 00000310 6f 76 69 64 65 20 61 6e 79 20 65 78 74 72 61 20 |ovide any extra | 00000320 66 65 61 74 75 72 65 2e 20 54 68 65 20 6d 6f 64 |feature. The mod| 00000330 75 6c 65 20 6f 6e 6c 79 20 70 72 6f 76 69 64 65 |ule only provide| 00000340 73 20 61 0a 63 6f 6e 76 65 6e 69 65 6e 74 20 69 |s a.convenient i| 00000350 6e 74 65 72 66 61 63 65 20 66 6f 72 20 74 68 65 |nterface for the| 00000360 20 70 72 6f 67 72 61 6d 6d 65 72 20 74 6f 20 57 | programmer to W| 00000370 69 6e 64 6f 77 20 4d 61 6e 61 67 65 72 27 73 20 |indow Manager's | 00000380 6d 65 6e 75 0a 73 79 73 74 65 6d 2e 20 54 68 65 |menu.system. The| 00000390 20 6d 6f 64 75 6c 65 20 68 61 73 20 61 20 63 6f | module has a co| 000003a0 6c 6c 65 63 74 69 6f 6e 20 6f 66 20 53 57 49 73 |llection of SWIs| 000003b0 20 74 6f 20 64 6f 20 61 6c 6c 20 74 68 65 20 6c | to do all the l| 000003c0 6f 77 20 6c 65 76 65 6c 0a 77 6f 72 6b 20 63 6f |ow level.work co| 000003d0 6e 63 65 72 6e 65 64 20 77 69 74 68 20 64 69 72 |ncerned with dir| 000003e0 65 63 74 20 61 63 63 65 73 73 65 73 20 74 6f 20 |ect accesses to | 000003f0 6d 65 6e 75 20 64 61 74 61 20 73 74 72 75 63 74 |menu data struct| 00000400 75 72 65 73 2c 20 6d 65 6d 6f 72 79 0a 61 6c 6c |ures, memory.all| 00000410 6f 63 61 74 69 6f 6e 2c 20 65 74 63 2e 20 49 74 |ocation, etc. It| 00000420 20 73 61 76 65 73 20 74 68 65 20 61 75 74 68 6f | saves the autho| 00000430 72 20 6f 66 20 61 70 70 6c 69 63 61 74 69 6f 6e |r of application| 00000440 20 70 72 6f 67 72 61 6d 20 66 72 6f 6d 20 74 68 | program from th| 00000450 65 0a 6e 65 65 64 20 74 6f 20 64 6f 20 74 68 69 |e.need to do thi| 00000460 73 20 72 6f 75 74 69 6e 65 20 77 6f 72 6b 20 68 |s routine work h| 00000470 69 6d 73 65 6c 66 2e 0a 0a 4d 65 6e 75 55 74 69 |imself...MenuUti| 00000480 6c 73 20 70 72 6f 76 69 64 65 73 20 6d 65 63 68 |ls provides mech| 00000490 61 6e 69 73 6d 20 6f 66 20 69 74 65 6d 20 68 61 |anism of item ha| 000004a0 6e 64 6c 65 72 73 2e 20 49 74 20 61 6c 6c 6f 77 |ndlers. It allow| 000004b0 73 20 74 6f 20 61 74 74 61 63 68 0a 69 6e 64 69 |s to attach.indi| 000004c0 76 69 64 75 61 6c 20 68 61 6e 64 6c 65 72 20 74 |vidual handler t| 000004d0 6f 20 65 61 63 68 20 6d 65 6e 75 20 69 74 65 6d |o each menu item| 000004e0 2e 20 49 6e 20 63 61 73 65 20 6f 66 20 42 42 43 |. In case of BBC| 000004f0 20 42 41 53 49 43 20 74 68 65 20 68 61 6e 64 6c | BASIC the handl| 00000500 65 72 0a 6d 61 79 20 62 65 20 73 69 6d 70 6c 79 |er.may be simply| 00000510 20 61 20 42 41 53 49 43 20 66 75 6e 63 74 69 6f | a BASIC functio| 00000520 6e 2e 20 57 68 65 6e 20 6d 65 6e 75 20 69 74 65 |n. When menu ite| 00000530 6d 20 69 73 20 73 65 6c 65 63 74 65 64 20 74 68 |m is selected th| 00000540 65 0a 63 6f 72 72 65 73 70 6f 6e 64 69 6e 67 20 |e.corresponding | 00000550 69 74 65 6d 20 68 61 6e 64 6c 65 72 20 6d 61 79 |item handler may| 00000560 20 62 65 20 69 6e 76 6f 6b 65 64 20 61 75 74 6f | be invoked auto| 00000570 6d 61 74 69 63 61 6c 6c 79 2e 20 54 68 69 73 20 |matically. This | 00000580 66 65 61 74 75 72 65 0a 73 61 76 65 73 20 74 68 |feature.saves th| 00000590 65 20 70 72 6f 67 72 61 6d 6d 65 72 20 66 72 6f |e programmer fro| 000005a0 6d 20 74 68 65 20 6e 65 65 64 20 74 6f 20 64 65 |m the need to de| 000005b0 63 6f 64 65 20 74 68 65 20 6c 69 73 74 20 6f 66 |code the list of| 000005c0 20 6d 65 6e 75 0a 73 65 6c 65 63 74 69 6f 6e 73 | menu.selections| 000005d0 2e 20 44 75 72 69 6e 67 20 70 72 6f 67 72 61 6d |. During program| 000005e0 20 64 65 76 65 6c 6f 70 6d 65 6e 74 20 74 68 65 | development the| 000005f0 20 75 73 65 20 6f 66 20 69 6e 64 69 76 69 64 75 | use of individu| 00000600 61 6c 20 69 74 65 6d 0a 68 61 6e 64 6c 65 72 73 |al item.handlers| 00000610 20 73 69 6d 70 6c 69 66 69 65 73 20 74 68 65 20 | simplifies the | 00000620 70 72 6f 63 65 73 73 20 6f 66 20 6d 65 6e 75 20 |process of menu | 00000630 6d 6f 64 69 66 69 63 61 74 69 6f 6e 2e 20 59 6f |modification. Yo| 00000640 75 20 63 61 6e 20 66 72 65 65 6c 79 0a 72 65 61 |u can freely.rea| 00000650 72 72 61 6e 67 65 20 6d 65 6e 75 20 69 74 65 6d |rrange menu item| 00000660 73 20 77 69 74 68 6f 75 74 20 74 68 65 20 6e 65 |s without the ne| 00000670 65 64 20 74 6f 20 6d 61 6b 65 20 61 6e 79 20 63 |ed to make any c| 00000680 68 61 6e 67 65 73 20 69 6e 20 6f 74 68 65 72 0a |hanges in other.| 00000690 70 61 72 74 73 20 6f 66 20 74 68 65 20 70 72 6f |parts of the pro| 000006a0 67 72 61 6d 2e 20 54 68 65 72 65 20 69 73 20 61 |gram. There is a| 000006b0 6e 20 65 78 61 6d 70 6c 65 20 69 6e 20 74 68 65 |n example in the| 000006c0 20 65 6e 64 20 6f 66 20 74 68 69 73 20 74 65 78 | end of this tex| 000006d0 74 0a 77 68 69 63 68 20 69 6c 6c 75 73 74 72 61 |t.which illustra| 000006e0 74 65 73 20 74 68 65 20 75 73 65 20 6f 66 20 69 |tes the use of i| 000006f0 74 65 6d 20 68 61 6e 64 6c 65 72 73 20 69 6e 20 |tem handlers in | 00000700 42 41 53 49 43 20 70 72 6f 67 72 61 6d 73 2e 0a |BASIC programs..| 00000710 0a 4d 65 6e 75 55 74 69 6c 73 20 61 75 74 6f 6d |.MenuUtils autom| 00000720 61 74 69 63 61 6c 6c 79 20 61 6c 6c 6f 63 61 74 |atically allocat| 00000730 65 73 20 6d 65 6d 6f 72 79 20 74 6f 20 68 6f 6c |es memory to hol| 00000740 64 20 6d 65 6e 75 20 64 61 74 61 20 73 74 72 75 |d menu data stru| 00000750 63 74 75 72 65 73 2e 0a 41 6e 64 20 61 6c 73 6f |ctures..And also| 00000760 20 69 74 20 74 61 6b 65 73 20 63 61 72 65 20 61 | it takes care a| 00000770 62 6f 75 74 20 20 61 70 70 65 61 72 61 6e 63 65 |bout appearance| 00000780 20 6f 66 20 6d 65 6e 75 73 20 6f 6e 20 73 63 72 | of menus on scr| 00000790 65 65 6e 20 62 79 20 66 6f 72 63 69 6e 67 0a 74 |een by forcing.t| 000007a0 68 65 6d 20 74 6f 20 62 65 20 69 6e 20 73 74 61 |hem to be in sta| 000007b0 6e 64 61 72 64 20 52 49 53 43 20 4f 53 20 73 74 |ndard RISC OS st| 000007c0 79 6c 65 2e 0a 20 20 20 20 20 20 20 20 20 20 20 |yle.. | 000007d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 000007f0 20 20 20 20 0a 20 20 20 20 20 20 20 20 0a 0a 20 | . .. | 00000800 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000810 20 20 20 20 20 54 65 63 68 6e 69 63 61 6c 20 64 | Technical d| 00000820 65 74 61 69 6c 73 20 20 20 20 20 20 20 20 20 20 |etails | 00000830 20 20 20 20 20 20 20 20 20 20 20 0a 0a 4d 6f 64 | ..Mod| 00000840 75 6c 65 20 4d 65 6e 75 55 74 69 6c 73 20 6d 61 |ule MenuUtils ma| 00000850 79 20 62 65 20 75 73 65 64 20 6f 6e 6c 79 20 62 |y be used only b| 00000860 79 20 70 72 6f 67 72 61 6d 73 20 77 68 69 63 68 |y programs which| 00000870 20 61 72 65 20 57 49 4d 50 20 74 61 73 6b 73 2e | are WIMP tasks.| 00000880 0a 53 70 65 63 69 61 6c 20 53 57 49 20 4d 65 6e |.Special SWI Men| 00000890 75 55 74 69 6c 5f 49 6e 69 74 69 61 6c 69 73 65 |uUtil_Initialise| 000008a0 20 69 73 20 70 72 6f 76 69 64 65 64 20 74 6f 20 | is provided to | 000008b0 72 65 67 69 73 74 65 72 20 74 68 65 20 70 72 6f |register the pro| 000008c0 67 72 61 6d 20 61 73 0a 4d 65 6e 75 55 74 69 6c |gram as.MenuUtil| 000008d0 73 20 63 6c 69 65 6e 74 2e 20 4d 65 6e 75 55 74 |s client. MenuUt| 000008e0 69 6c 5f 49 6e 69 74 69 61 6c 69 73 65 20 6d 75 |il_Initialise mu| 000008f0 73 74 20 62 65 20 63 61 6c 6c 65 64 20 61 66 74 |st be called aft| 00000900 65 72 0a 57 69 6d 70 5f 49 6e 69 74 69 61 6c 69 |er.Wimp_Initiali| 00000910 73 65 20 68 61 73 20 62 65 65 6e 20 63 61 6c 6c |se has been call| 00000920 65 64 20 61 6e 64 20 62 65 66 6f 72 65 20 61 6e |ed and before an| 00000930 79 20 6f 74 68 65 72 20 63 61 6c 6c 20 74 6f 20 |y other call to | 00000940 4d 65 6e 75 55 74 69 6c 73 0a 6d 6f 64 75 6c 65 |MenuUtils.module| 00000950 20 69 73 20 6d 61 64 65 2e 0a 0a 41 6c 6c 20 6d | is made...All m| 00000960 65 6e 75 73 20 63 72 65 61 74 65 64 20 62 79 20 |enus created by | 00000970 4d 65 6e 75 55 74 69 6c 73 20 61 72 65 20 6b 65 |MenuUtils are ke| 00000980 70 74 20 69 6e 20 52 4d 41 2e 20 53 6f 20 79 6f |pt in RMA. So yo| 00000990 75 20 68 61 76 65 20 6e 6f 20 6e 65 65 64 20 74 |u have no need t| 000009a0 6f 0a 72 65 73 65 72 76 65 20 6d 65 6d 6f 72 79 |o.reserve memory| 000009b0 20 66 6f 72 20 74 68 65 6d 2e 20 4f 6e 20 65 78 | for them. On ex| 000009c0 69 74 20 66 72 6f 6d 20 79 6f 75 72 20 70 72 6f |it from your pro| 000009d0 67 72 61 6d 20 61 6c 6c 20 74 68 65 20 6d 65 6d |gram all the mem| 000009e0 6f 72 79 20 77 69 6c 6c 0a 62 65 20 61 75 74 6f |ory will.be auto| 000009f0 6d 61 74 69 63 61 6c 6c 79 20 72 65 74 75 72 6e |matically return| 00000a00 65 64 20 74 6f 20 52 4d 41 2e 0a 0a 53 69 6e 67 |ed to RMA...Sing| 00000a10 6c 65 20 4d 65 6e 75 55 74 69 6c 73 20 6d 6f 64 |le MenuUtils mod| 00000a20 75 6c 65 20 63 61 6e 20 68 61 6e 64 6c 65 20 6d |ule can handle m| 00000a30 65 6e 75 73 20 66 6f 72 20 73 65 76 65 72 61 6c |enus for several| 00000a40 20 57 49 4d 50 20 74 61 73 6b 73 2e 0a 0a 49 6e | WIMP tasks...In| 00000a50 74 65 72 6e 61 6c 20 66 6f 72 6d 61 74 20 6f 66 |ternal format of| 00000a60 20 6d 65 6e 75 20 64 61 74 61 20 73 74 72 75 63 | menu data struc| 00000a70 74 75 72 65 73 20 63 72 65 61 74 65 64 20 62 79 |tures created by| 00000a80 20 74 68 65 20 6d 6f 64 75 6c 65 20 69 73 20 74 | the module is t| 00000a90 68 65 0a 73 61 6d 65 20 61 73 20 64 65 73 63 72 |he.same as descr| 00000aa0 69 62 65 64 20 69 6e 20 52 49 53 43 20 4f 53 20 |ibed in RISC OS | 00000ab0 32 20 50 52 4d 2e 20 53 6f 20 69 74 20 69 73 20 |2 PRM. So it is | 00000ac0 70 6f 73 73 69 62 6c 65 20 74 6f 20 63 6f 6d 62 |possible to comb| 00000ad0 69 6e 65 20 6d 65 6e 75 73 0a 63 72 65 61 74 65 |ine menus.create| 00000ae0 64 20 62 79 20 4d 65 6e 75 55 74 69 6c 73 20 77 |d by MenuUtils w| 00000af0 69 74 68 20 6f 74 68 65 72 20 6d 65 6e 75 73 2e |ith other menus.| 00000b00 20 54 6f 20 66 69 6e 64 20 6f 75 74 20 61 64 64 | To find out add| 00000b10 72 65 73 73 20 6f 66 20 6d 65 6e 75 0a 64 61 74 |ress of menu.dat| 00000b20 61 20 73 74 72 75 63 74 75 72 65 20 79 6f 75 20 |a structure you | 00000b30 63 61 6e 20 75 73 65 20 53 57 49 20 4d 65 6e 75 |can use SWI Menu| 00000b40 55 74 69 6c 5f 49 6e 66 6f 2e 0a 0a 0a 0a 20 20 |Util_Info..... | 00000b50 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000b60 20 20 20 20 20 20 4d 65 6e 75 20 68 61 6e 64 6c | Menu handl| 00000b70 65 73 0a 0a 4d 65 6e 75 20 63 6f 6e 73 69 73 74 |es..Menu consist| 00000b80 73 20 6f 66 20 6d 65 6e 75 20 74 69 74 6c 65 20 |s of menu title | 00000b90 61 6e 64 20 6f 6e 65 20 6f 72 20 6d 6f 72 65 20 |and one or more | 00000ba0 6d 65 6e 75 20 69 74 65 6d 73 2e 20 45 61 63 68 |menu items. Each| 00000bb0 20 6d 65 6e 75 20 61 6e 64 0a 65 61 63 68 20 6d | menu and.each m| 00000bc0 65 6e 75 20 69 74 65 6d 20 63 72 65 61 74 65 64 |enu item created| 00000bd0 20 77 69 74 68 20 4d 65 6e 75 55 74 69 6c 73 20 | with MenuUtils | 00000be0 67 65 74 73 20 75 6e 69 71 75 65 20 68 61 6e 64 |gets unique hand| 00000bf0 6c 65 2e 20 59 6f 75 20 63 61 6e 20 75 73 65 0a |le. You can use.| 00000c00 74 68 69 73 20 68 61 6e 64 6c 65 20 74 6f 20 72 |this handle to r| 00000c10 65 66 65 72 20 74 6f 20 70 61 72 74 69 63 75 6c |efer to particul| 00000c20 61 72 20 6d 65 6e 75 20 6f 72 20 6d 65 6e 75 20 |ar menu or menu | 00000c30 69 74 65 6d 2e 0a 0a 54 68 65 20 75 73 65 20 6f |item...The use o| 00000c40 66 20 75 6e 69 71 75 65 20 68 61 6e 64 6c 65 73 |f unique handles| 00000c50 20 66 6f 72 20 65 61 63 68 20 6d 65 6e 75 20 69 | for each menu i| 00000c60 74 65 6d 20 69 6e 73 74 65 61 64 20 6f 66 20 61 |tem instead of a| 00000c70 62 73 6f 6c 75 74 65 0a 61 64 64 72 65 73 73 65 |bsolute.addresse| 00000c80 73 20 6f 72 20 70 6f 73 69 74 69 6f 6e 73 20 69 |s or positions i| 00000c90 6e 20 6d 65 6e 75 20 67 69 76 65 73 20 61 64 64 |n menu gives add| 00000ca0 69 74 69 6f 6e 61 6c 20 66 6c 65 78 69 62 69 6c |itional flexibil| 00000cb0 69 74 79 20 69 6e 0a 6d 61 6e 69 70 75 6c 61 74 |ity in.manipulat| 00000cc0 69 6f 6e 20 77 69 74 68 20 6d 65 6e 75 20 64 61 |ion with menu da| 00000cd0 74 61 20 73 74 72 75 63 74 75 72 65 2e 20 49 74 |ta structure. It| 00000ce0 20 61 6c 6c 6f 77 73 20 66 6f 72 20 65 78 61 6d | allows for exam| 00000cf0 70 6c 65 20 69 6e 73 65 72 74 0a 61 6e 64 20 64 |ple insert.and d| 00000d00 65 6c 65 74 65 20 6d 65 6e 75 20 69 74 65 6d 73 |elete menu items| 00000d10 2e 0a 0a 4d 65 6e 75 55 74 69 6c 73 20 61 6c 77 |...MenuUtils alw| 00000d20 61 79 73 20 72 65 6d 65 6d 62 65 72 73 20 74 68 |ays remembers th| 00000d30 65 20 68 61 6e 64 6c 65 20 75 73 65 64 20 69 6e |e handle used in| 00000d40 20 6c 61 73 74 20 6f 70 65 72 61 74 69 6f 6e 2e | last operation.| 00000d50 20 54 68 69 73 0a 68 61 6e 64 6c 65 20 69 73 20 | This.handle is | 00000d60 63 61 6c 6c 65 64 20 63 75 72 72 65 6e 74 20 68 |called current h| 00000d70 61 6e 64 6c 65 20 61 6e 64 20 69 74 20 77 69 6c |andle and it wil| 00000d80 6c 20 62 65 20 75 73 65 64 20 61 73 20 64 65 66 |l be used as def| 00000d90 61 75 6c 74 20 69 6e 20 74 68 65 0a 6e 65 78 74 |ault in the.next| 00000da0 20 6f 70 65 72 61 74 69 6f 6e 2e 20 54 68 69 73 | operation. This| 00000db0 20 69 73 20 65 73 70 65 63 69 61 6c 6c 79 20 63 | is especially c| 00000dc0 6f 6e 76 65 6e 69 65 6e 74 20 77 68 65 6e 20 63 |onvenient when c| 00000dd0 61 6c 6c 73 20 74 6f 20 74 68 65 20 6d 6f 64 75 |alls to the modu| 00000de0 6c 65 0a 61 72 65 20 6d 61 64 65 20 66 72 6f 6d |le.are made from| 00000df0 20 42 41 53 49 43 20 77 69 74 68 20 53 59 53 20 | BASIC with SYS | 00000e00 63 6f 6d 6d 61 6e 64 2e 0a 0a 20 20 20 20 20 20 |command... | 00000e10 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00000e40 20 20 20 20 20 20 20 20 20 0a 0a 20 20 20 20 20 | .. | 00000e50 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000e60 20 20 20 4d 65 6e 75 20 63 72 65 61 74 69 6f 6e | Menu creation| 00000e70 0a 0a 54 6f 20 73 74 61 72 74 20 6e 65 77 20 6d |..To start new m| 00000e80 65 6e 75 20 79 6f 75 20 6d 75 73 74 20 63 61 6c |enu you must cal| 00000e90 6c 20 4d 65 6e 75 55 74 69 6c 5f 4e 65 77 2e 20 |l MenuUtil_New. | 00000ea0 54 68 65 6e 20 79 6f 75 20 6d 61 79 20 61 64 64 |Then you may add| 00000eb0 20 74 6f 20 69 74 0a 61 6e 79 20 6e 75 6d 62 65 | to it.any numbe| 00000ec0 72 20 6f 66 20 6d 65 6e 75 20 69 74 65 6d 73 2e |r of menu items.| 00000ed0 20 54 6f 20 61 64 64 20 6e 65 77 20 69 74 65 6d | To add new item| 00000ee0 20 79 6f 75 20 6d 75 73 74 20 63 61 6c 6c 20 4d | you must call M| 00000ef0 65 6e 75 55 74 69 6c 5f 41 64 64 2e 0a 4d 65 6e |enuUtil_Add..Men| 00000f00 75 20 61 6c 77 61 79 73 20 69 73 20 72 65 61 64 |u always is read| 00000f10 79 20 74 6f 20 62 65 20 64 69 73 70 6c 61 79 65 |y to be displaye| 00000f20 64 20 6f 6e 20 73 63 72 65 65 6e 20 61 6e 64 20 |d on screen and | 00000f30 79 6f 75 20 68 61 76 65 20 6e 6f 20 6e 65 65 64 |you have no need| 00000f40 20 74 6f 0a 73 70 65 63 69 61 6c 6c 79 20 69 6e | to.specially in| 00000f50 66 6f 72 6d 20 74 68 65 20 6d 6f 64 75 6c 65 20 |form the module | 00000f60 77 68 65 6e 20 79 6f 75 20 68 61 76 65 20 61 64 |when you have ad| 00000f70 64 65 64 20 74 68 65 20 6c 61 73 74 20 69 74 65 |ded the last ite| 00000f80 6d 20 74 6f 20 74 68 65 0a 6d 65 6e 75 2e 0a 0a |m to the.menu...| 00000f90 42 79 20 64 65 66 61 75 6c 74 20 61 6c 6c 20 6e |By default all n| 00000fa0 65 77 20 69 74 65 6d 73 20 61 72 65 20 61 64 64 |ew items are add| 00000fb0 65 64 20 74 6f 20 74 68 65 20 65 6e 64 20 6f 66 |ed to the end of| 00000fc0 20 6d 65 6e 75 2e 20 49 66 20 79 6f 75 20 77 61 | menu. If you wa| 00000fd0 6e 74 20 74 6f 0a 69 6e 73 65 72 74 20 6e 65 77 |nt to.insert new| 00000fe0 20 69 74 65 6d 20 69 6e 20 74 68 65 20 6d 69 64 | item in the mid| 00000ff0 64 6c 65 20 6f 66 20 6d 65 6e 75 20 74 68 65 6e |dle of menu then| 00001000 20 79 6f 75 20 6d 75 73 74 20 73 70 65 63 69 66 | you must specif| 00001010 79 20 74 68 65 20 68 61 6e 64 6c 65 0a 6f 66 20 |y the handle.of | 00001020 74 68 65 20 69 74 65 6d 20 62 65 66 6f 72 65 20 |the item before | 00001030 77 68 69 63 68 20 79 6f 75 20 77 61 6e 74 20 74 |which you want t| 00001040 6f 20 69 6e 73 65 72 74 20 74 68 65 20 6e 65 77 |o insert the new| 00001050 20 69 74 65 6d 2e 0a 20 20 20 20 20 20 20 20 20 | item.. | 00001060 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001070 20 20 20 20 20 20 20 0a 41 6c 6c 20 6d 65 6e 75 | .All menu| 00001080 20 66 6c 61 67 73 20 69 6e 20 61 64 64 65 64 20 | flags in added | 00001090 69 74 65 6d 73 20 61 72 65 20 63 6c 65 61 72 65 |items are cleare| 000010a0 64 2e 20 43 6f 6c 6f 75 72 73 20 61 6e 64 20 64 |d. Colours and d| 000010b0 69 6d 65 6e 73 69 6f 6e 73 20 61 72 65 0a 69 6e |imensions are.in| 000010c0 20 73 74 61 6e 64 61 72 64 20 52 49 53 43 20 4f | standard RISC O| 000010d0 53 20 73 74 79 6c 65 2e 20 57 69 64 74 68 20 6f |S style. Width o| 000010e0 66 20 6d 65 6e 75 20 69 73 20 61 64 6a 75 73 74 |f menu is adjust| 000010f0 65 64 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 |ed automatically| 00001100 2e 0a 0a 49 6e 20 6f 72 64 65 72 20 74 6f 20 63 |...In order to c| 00001110 6f 6e 73 74 72 75 63 74 20 6d 75 6c 74 69 2d 6c |onstruct multi-l| 00001120 65 76 65 6c 20 6d 65 6e 75 20 74 72 65 65 20 79 |evel menu tree y| 00001130 6f 75 20 68 61 76 65 20 74 6f 20 63 6f 6e 6e 65 |ou have to conne| 00001140 63 74 20 73 6f 6d 65 0a 6d 65 6e 75 20 69 74 65 |ct some.menu ite| 00001150 6d 73 20 77 69 74 68 20 73 75 62 6d 65 6e 75 73 |ms with submenus| 00001160 20 6f 72 20 77 69 74 68 20 64 69 61 6c 6f 67 20 | or with dialog | 00001170 62 6f 78 65 73 2e 20 4d 65 6e 75 55 74 69 6c 73 |boxes. MenuUtils| 00001180 20 70 72 6f 76 69 64 65 73 0a 73 70 65 63 69 61 | provides.specia| 00001190 6c 20 53 57 49 20 74 6f 20 6c 69 6e 6b 20 6d 65 |l SWI to link me| 000011a0 6e 75 20 69 74 65 6d 20 77 69 74 68 20 73 75 62 |nu item with sub| 000011b0 6d 65 6e 75 2e 20 54 68 69 73 20 53 57 49 20 61 |menu. This SWI a| 000011c0 6c 73 6f 20 61 6c 6c 6f 77 73 20 79 6f 75 0a 74 |lso allows you.t| 000011d0 6f 20 6c 69 6e 6b 20 6d 65 6e 75 73 20 63 72 65 |o link menus cre| 000011e0 61 74 65 64 20 62 79 20 4d 65 6e 75 55 74 69 6c |ated by MenuUtil| 000011f0 73 20 77 69 74 68 20 6f 74 68 65 72 20 6d 65 6e |s with other men| 00001200 75 73 2e 0a 0a 20 20 20 20 20 20 20 20 20 20 20 |us... | 00001210 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001220 20 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | .. | 00001230 20 20 20 20 20 20 20 20 20 4d 65 6e 75 20 6d 6f | Menu mo| 00001240 64 69 66 69 63 61 74 69 6f 6e 0a 20 20 20 20 20 |dification. | 00001250 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00001280 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 59 6f | .Yo| 00001290 75 20 63 61 6e 20 69 6e 20 61 6e 79 20 6d 6f 6d |u can in any mom| 000012a0 65 6e 74 20 63 68 61 6e 67 65 20 6d 65 6e 75 20 |ent change menu | 000012b0 74 69 74 6c 65 20 73 74 72 69 6e 67 20 61 73 20 |title string as | 000012c0 77 65 6c 6c 20 61 73 20 74 68 65 20 74 65 78 74 |well as the text| 000012d0 20 6f 66 0a 6d 65 6e 75 20 69 74 65 6d 73 2e 20 | of.menu items. | 000012e0 59 6f 75 20 63 61 6e 20 61 6c 73 6f 20 63 68 61 |You can also cha| 000012f0 6e 67 65 20 66 6f 72 65 67 72 6f 75 6e 64 20 61 |nge foreground a| 00001300 6e 64 20 62 61 63 6b 67 72 6f 75 6e 64 20 63 6f |nd background co| 00001310 6c 6f 75 72 73 20 6f 66 0a 6d 65 6e 75 20 69 74 |lours of.menu it| 00001320 65 6d 73 2e 0a 20 20 20 20 20 20 20 20 20 20 20 |ems.. | 00001330 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00001350 20 20 20 0a 4d 65 6e 75 20 69 74 65 6d 20 68 61 | .Menu item ha| 00001360 73 20 61 20 6e 75 6d 62 65 72 20 6f 66 20 66 6c |s a number of fl| 00001370 61 67 73 20 77 68 69 63 68 20 63 6f 6e 74 72 6f |ags which contro| 00001380 6c 20 69 74 73 20 61 70 70 65 61 72 61 6e 63 65 |l its appearance| 00001390 20 61 6e 64 0a 62 65 68 61 76 69 6f 75 72 2e 20 | and.behaviour. | 000013a0 54 68 65 20 66 6c 61 67 73 20 61 72 65 20 74 69 |The flags are ti| 000013b0 63 6b 2c 20 66 61 64 65 2c 20 64 6f 74 73 2c 20 |ck, fade, dots, | 000013c0 73 75 62 6d 65 6e 75 2c 20 77 72 69 74 61 62 6c |submenu, writabl| 000013d0 65 20 61 6e 64 0a 6d 65 73 73 61 67 65 2e 20 53 |e and.message. S| 000013e0 70 65 63 69 61 6c 20 53 57 49 73 20 61 72 65 20 |pecial SWIs are | 000013f0 70 72 6f 76 69 64 65 64 20 74 6f 20 73 65 74 20 |provided to set | 00001400 6f 72 20 63 6c 65 61 72 20 65 61 63 68 20 6d 65 |or clear each me| 00001410 6e 75 20 66 6c 61 67 2e 20 41 73 0a 61 20 73 70 |nu flag. As.a sp| 00001420 65 63 69 61 6c 20 63 61 73 65 20 77 68 65 6e 20 |ecial case when | 00001430 79 6f 75 20 61 72 65 20 6d 61 6b 69 6e 67 20 6d |you are making m| 00001440 65 6e 75 20 69 74 65 6d 20 77 72 69 74 61 62 6c |enu item writabl| 00001450 65 20 79 6f 75 20 63 61 6e 20 61 6c 73 6f 0a 73 |e you can also.s| 00001460 70 65 63 69 66 79 20 62 75 66 66 65 72 20 73 69 |pecify buffer si| 00001470 7a 65 20 61 6e 64 20 6f 70 74 69 6f 6e 61 6c 20 |ze and optional | 00001480 76 61 6c 69 64 61 74 69 6f 6e 20 73 74 72 69 6e |validation strin| 00001490 67 2e 20 0a 0a 59 6f 75 20 63 61 6e 20 64 65 6c |g. ..You can del| 000014a0 65 74 65 20 73 69 6e 67 6c 65 20 6d 65 6e 75 20 |ete single menu | 000014b0 69 74 65 6d 20 6f 72 20 74 68 65 20 77 68 6f 6c |item or the whol| 000014c0 65 20 6d 65 6e 75 20 77 69 74 68 0a 4d 65 6e 75 |e menu with.Menu| 000014d0 55 74 69 6c 5f 44 65 6c 65 74 65 2e 20 59 6f 75 |Util_Delete. You| 000014e0 20 63 61 6e 20 61 6c 73 6f 20 72 65 63 75 72 73 | can also recurs| 000014f0 69 76 65 6c 79 20 64 65 6c 65 74 65 20 74 68 65 |ively delete the| 00001500 20 77 68 6f 6c 65 20 6d 65 6e 75 0a 73 75 62 74 | whole menu.subt| 00001510 72 65 65 20 63 6f 6e 6e 65 63 74 65 64 20 77 69 |ree connected wi| 00001520 74 68 20 74 68 65 20 64 65 6c 65 74 65 64 20 69 |th the deleted i| 00001530 74 65 6d 20 6f 72 20 77 69 74 68 20 74 68 65 20 |tem or with the | 00001540 64 65 6c 65 74 65 64 20 6d 65 6e 75 2e 0a 0a 20 |deleted menu... | 00001550 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 000015a0 20 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | . | 000015b0 20 20 20 20 20 44 69 73 70 6c 61 79 69 6e 67 20 | Displaying | 000015c0 6d 65 6e 75 20 6f 6e 20 73 63 72 65 65 6e 0a 20 |menu on screen. | 000015d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000015e0 20 20 0a 41 63 63 6f 72 64 69 6e 67 20 74 6f 20 | .According to | 000015f0 52 49 53 43 20 4f 53 20 72 75 6c 65 73 20 79 6f |RISC OS rules yo| 00001600 75 20 6d 75 73 74 20 64 69 73 70 6c 61 79 20 6d |u must display m| 00001610 65 6e 75 20 6f 6e 20 73 63 72 65 65 6e 20 77 68 |enu on screen wh| 00001620 65 6e 20 75 73 65 72 0a 63 6c 69 63 6b 73 20 77 |en user.clicks w| 00001630 69 74 68 20 4d 65 6e 75 20 62 75 74 74 6f 6e 20 |ith Menu button | 00001640 6f 76 65 72 20 6f 6e 65 20 6f 66 20 79 6f 75 72 |over one of your| 00001650 20 77 69 6e 64 6f 77 73 20 6f 72 20 69 63 6f 6e | windows or icon| 00001660 62 61 72 20 69 63 6f 6e 2e 20 54 6f 0a 66 69 6e |bar icon. To.fin| 00001670 64 20 6f 75 74 20 77 68 65 72 65 20 74 6f 20 64 |d out where to d| 00001680 69 73 70 6c 61 79 20 74 68 65 20 6d 65 6e 75 20 |isplay the menu | 00001690 79 6f 75 20 68 61 76 65 20 74 6f 20 70 65 72 66 |you have to perf| 000016a0 6f 72 6d 20 73 6f 6d 65 0a 63 61 6c 63 75 6c 61 |orm some.calcula| 000016b0 74 69 6f 6e 73 2e 20 4d 65 6e 75 55 74 69 6c 73 |tions. MenuUtils| 000016c0 20 70 72 6f 76 69 64 65 73 20 61 20 53 57 49 20 | provides a SWI | 000016d0 4d 65 6e 75 55 74 69 6c 5f 53 68 6f 77 20 77 68 |MenuUtil_Show wh| 000016e0 69 63 68 20 77 69 6c 6c 0a 70 65 72 66 6f 72 6d |ich will.perform| 000016f0 20 61 6c 6c 20 6e 65 63 65 73 73 61 72 79 20 63 | all necessary c| 00001700 61 6c 63 75 6c 61 74 69 6f 6e 73 20 66 6f 72 20 |alculations for | 00001710 79 6f 75 20 61 6e 64 20 6f 70 65 6e 20 6d 65 6e |you and open men| 00001720 75 20 69 6e 20 74 68 65 20 72 69 67 68 74 0a 73 |u in the right.s| 00001730 63 72 65 65 6e 20 70 6f 73 69 74 69 6f 6e 20 61 |creen position a| 00001740 63 63 6f 72 64 69 6e 67 20 74 6f 20 52 49 53 43 |ccording to RISC| 00001750 20 4f 53 20 73 74 61 6e 64 61 72 64 73 2e 0a 0a | OS standards...| 00001760 53 70 65 63 69 61 6c 20 53 57 49 20 69 73 20 70 |Special SWI is p| 00001770 72 6f 76 69 64 65 64 20 74 6f 20 64 69 73 70 6c |rovided to displ| 00001780 61 79 20 73 75 62 6d 65 6e 75 20 69 6e 20 72 65 |ay submenu in re| 00001790 70 6c 79 20 74 6f 0a 4d 65 73 73 61 67 65 5f 4d |ply to.Message_M| 000017a0 65 6e 75 57 61 72 6e 69 6e 67 2e 0a 0a 0a 0a 20 |enuWarning..... | 000017b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 74 | It| 000017c0 65 6d 20 68 61 6e 64 6c 65 72 73 20 61 6e 64 20 |em handlers and | 000017d0 6d 65 6e 75 20 64 65 63 6f 64 69 6e 67 0a 20 20 |menu decoding. | 000017e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00001810 20 20 20 20 20 20 20 0a 54 68 65 20 6d 65 63 68 | .The mech| 00001820 61 6e 69 73 6d 20 6f 66 20 69 74 65 6d 20 68 61 |anism of item ha| 00001830 6e 64 6c 65 72 73 20 61 6c 6c 6f 77 73 20 74 6f |ndlers allows to| 00001840 20 6c 69 6e 6b 20 65 61 63 68 20 6d 65 6e 75 20 | link each menu | 00001850 69 74 65 6d 20 77 69 74 68 0a 69 6e 64 69 76 69 |item with.indivi| 00001860 64 75 61 6c 20 69 74 65 6d 20 68 61 6e 64 6c 65 |dual item handle| 00001870 72 2e 20 54 68 65 20 68 61 6e 64 6c 65 72 20 6d |r. The handler m| 00001880 61 79 20 62 65 20 69 6e 76 6f 6b 65 64 20 61 75 |ay be invoked au| 00001890 74 6f 6d 61 74 69 63 61 6c 6c 79 20 61 6e 64 0a |tomatically and.| 000018a0 79 6f 75 20 68 61 76 65 20 6e 6f 20 6e 65 65 64 |you have no need| 000018b0 20 74 6f 20 64 65 63 6f 64 65 20 74 68 65 20 6c | to decode the l| 000018c0 69 73 74 20 6f 66 20 73 65 6c 65 63 74 69 6f 6e |ist of selection| 000018d0 73 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 74 61 |s in order to ta| 000018e0 6b 65 20 74 68 65 0a 61 70 70 72 6f 70 72 69 61 |ke the.appropria| 000018f0 74 65 20 61 63 74 69 6f 6e 2e 0a 0a 44 75 72 69 |te action...Duri| 00001900 6e 67 20 74 68 65 20 63 61 6c 6c 20 74 6f 20 22 |ng the call to "| 00001910 4d 65 6e 75 55 74 69 6c 5f 49 6e 69 74 69 61 6c |MenuUtil_Initial| 00001920 69 73 65 22 20 79 6f 75 20 6d 75 73 74 20 73 70 |ise" you must sp| 00001930 65 63 69 66 79 0a 69 6e 69 74 69 61 6c 69 73 61 |ecify.initialisa| 00001940 74 69 6f 6e 20 74 79 70 65 2e 20 49 6e 69 74 69 |tion type. Initi| 00001950 61 6c 69 73 61 74 69 6f 6e 20 74 79 70 65 20 64 |alisation type d| 00001960 65 66 69 6e 65 73 20 74 68 65 20 69 6e 74 65 72 |efines the inter| 00001970 70 72 65 74 61 74 69 6f 6e 20 6f 66 0a 69 74 65 |pretation of.ite| 00001980 6d 20 68 61 6e 64 6c 65 72 73 20 61 6e 64 20 63 |m handlers and c| 00001990 61 6e 20 62 65 20 22 42 41 53 49 43 22 20 6f 72 |an be "BASIC" or| 000019a0 20 22 6d 61 63 68 69 6e 65 20 63 6f 64 65 22 20 | "machine code" | 000019b0 28 6c 61 74 74 65 72 20 69 73 20 6e 6f 74 0a 73 |(latter is not.s| 000019c0 75 70 70 6f 72 74 65 64 20 69 6e 20 63 75 72 72 |upported in curr| 000019d0 65 6e 74 20 76 65 72 73 69 6f 6e 29 2e 20 49 6e |ent version). In| 000019e0 20 63 61 73 65 20 6f 66 20 22 42 41 53 49 43 22 | case of "BASIC"| 000019f0 20 74 68 65 20 69 74 65 6d 20 68 61 6e 64 6c 65 | the item handle| 00001a00 72 73 0a 61 72 65 20 61 73 73 75 6d 65 64 20 74 |rs.are assumed t| 00001a10 6f 20 62 65 20 74 68 65 20 42 41 53 49 43 20 66 |o be the BASIC f| 00001a20 75 6e 63 74 69 6f 6e 73 20 61 6e 64 20 69 6e 20 |unctions and in | 00001a30 63 61 73 65 20 6f 66 20 22 6d 61 63 68 69 6e 65 |case of "machine| 00001a40 20 63 6f 64 65 22 20 2d 0a 41 52 4d 20 73 75 62 | code" -.ARM sub| 00001a50 72 6f 75 74 69 6e 65 73 2e 20 49 66 20 79 6f 75 |routines. If you| 00001a60 20 77 61 6e 74 20 74 6f 20 61 74 74 61 63 68 20 | want to attach | 00001a70 61 20 68 61 6e 64 6c 65 72 20 74 6f 20 6d 65 6e |a handler to men| 00001a80 75 20 69 74 65 6d 20 79 6f 75 20 6d 75 73 74 0a |u item you must.| 00001a90 70 61 73 73 20 74 68 65 20 70 6f 69 6e 74 65 72 |pass the pointer| 00001aa0 20 74 6f 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 | to the name of | 00001ab0 42 41 53 49 43 20 66 75 6e 63 74 69 6f 6e 20 6f |BASIC function o| 00001ac0 72 20 72 65 73 70 65 63 74 69 76 65 6c 79 20 74 |r respectively t| 00001ad0 68 65 0a 61 64 64 72 65 73 73 20 6f 66 20 74 68 |he.address of th| 00001ae0 65 20 41 52 4d 20 73 75 62 72 6f 75 74 69 6e 65 |e ARM subroutine| 00001af0 20 74 6f 20 4d 65 6e 75 55 74 69 6c 5f 41 64 64 | to MenuUtil_Add| 00001b00 2e 0a 0a 41 66 74 65 72 20 75 73 65 72 20 73 65 |...After user se| 00001b10 6c 65 63 74 69 6f 6e 20 74 68 65 20 63 6f 72 72 |lection the corr| 00001b20 65 73 70 6f 6e 64 69 6e 67 20 69 74 65 6d 20 68 |esponding item h| 00001b30 61 6e 64 6c 65 72 20 77 69 6c 6c 20 62 65 20 66 |andler will be f| 00001b40 6f 75 6e 64 20 62 79 0a 22 4d 65 6e 75 55 74 69 |ound by."MenuUti| 00001b50 6c 5f 44 65 63 6f 64 65 22 2e 20 54 6f 20 69 6e |l_Decode". To in| 00001b60 76 6f 6b 65 20 74 68 65 20 68 61 6e 64 6c 65 72 |voke the handler| 00001b70 20 79 6f 75 20 68 61 76 65 20 74 6f 20 63 61 6c | you have to cal| 00001b80 6c 20 65 69 74 68 65 72 20 74 68 65 0a 42 41 53 |l either the.BAS| 00001b90 49 43 20 66 75 6e 63 74 69 6f 6e 20 6f 72 20 74 |IC function or t| 00001ba0 68 65 20 41 52 4d 20 73 75 62 72 6f 75 74 69 6e |he ARM subroutin| 00001bb0 65 20 64 65 70 65 6e 64 69 6e 67 20 6f 6e 20 69 |e depending on i| 00001bc0 6e 69 74 69 61 6c 69 73 61 74 69 6f 6e 20 74 79 |nitialisation ty| 00001bd0 70 65 2e 0a 0a 20 20 20 20 20 20 20 20 20 20 20 |pe... | 00001be0 20 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | . | 00001bf0 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 20 20 | . | 00001c00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001c10 20 20 20 20 20 20 4f 74 68 65 72 20 66 65 61 74 | Other feat| 00001c20 75 72 65 73 0a 20 20 20 20 20 20 20 20 20 20 20 |ures. | 00001c30 20 20 20 20 20 20 0a 4d 61 6e 79 20 61 70 70 6c | .Many appl| 00001c40 69 63 61 74 69 6f 6e 73 20 75 73 65 20 73 74 61 |ications use sta| 00001c50 6e 64 61 72 64 20 6d 65 6e 75 20 61 6c 6c 6f 77 |ndard menu allow| 00001c60 69 6e 67 20 75 73 65 72 20 74 6f 20 73 65 6c 65 |ing user to sele| 00001c70 63 74 20 61 20 63 6f 6c 6f 75 72 0a 66 72 6f 6d |ct a colour.from| 00001c80 20 73 74 61 6e 64 61 72 64 20 64 65 73 6b 74 6f | standard deskto| 00001c90 70 20 63 6f 6c 6f 75 72 73 2e 20 4d 65 6e 75 55 |p colours. MenuU| 00001ca0 74 69 6c 73 20 70 72 6f 76 69 64 65 73 20 61 20 |tils provides a | 00001cb0 73 70 65 63 69 61 6c 20 53 57 49 0a 22 4d 65 6e |special SWI."Men| 00001cc0 75 55 74 69 6c 5f 43 6f 6c 6f 75 72 4d 65 6e 75 |uUtil_ColourMenu| 00001cd0 22 20 77 68 69 63 68 20 63 72 65 61 74 65 73 20 |" which creates | 00001ce0 73 75 63 68 20 63 6f 6c 6f 75 72 20 73 65 74 74 |such colour sett| 00001cf0 69 6e 67 20 6d 65 6e 75 2e 0a 0a 0a 0a 20 20 20 |ing menu..... | 00001d00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001d10 20 20 20 41 70 70 6c 69 63 61 74 69 6f 6e 20 6e | Application n| 00001d20 6f 74 65 73 0a 0a 54 68 69 73 20 65 78 61 6d 70 |otes..This examp| 00001d30 6c 65 20 69 6c 6c 75 73 74 72 61 74 65 73 20 74 |le illustrates t| 00001d40 68 65 20 75 73 65 20 6f 66 20 6d 65 6e 75 20 69 |he use of menu i| 00001d50 74 65 6d 20 68 61 6e 64 6c 65 72 73 20 69 6e 20 |tem handlers in | 00001d60 70 72 6f 67 72 61 6d 73 20 69 6e 0a 42 42 43 20 |programs in.BBC | 00001d70 42 41 53 49 43 2e 20 4c 65 74 73 20 63 6f 6e 73 |BASIC. Lets cons| 00001d80 69 64 65 72 20 73 69 6d 70 6c 65 20 6d 65 6e 75 |ider simple menu| 00001d90 20 63 6f 6e 73 69 73 74 69 6e 67 20 6f 66 20 73 | consisting of s| 00001da0 69 6e 67 6c 65 20 69 74 65 6d 2e 0a 0a 20 20 20 |ingle item... | 00001db0 20 20 20 20 20 20 20 20 20 2b 2d 2d 2d 2d 2d 2d | +------| 00001dc0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2b 0a 20 20 20 20 |----------+. | 00001dd0 20 20 20 20 20 20 20 20 7c 20 20 20 20 20 20 20 | | | 00001de0 20 20 20 20 20 20 20 20 20 7c 0a 20 20 20 20 20 | |. | 00001df0 20 20 20 20 20 20 20 7c 20 20 53 69 6d 70 6c 65 | | Simple| 00001e00 20 6d 65 6e 75 20 20 20 7c 0a 20 20 20 20 20 20 | menu |. | 00001e10 20 20 20 20 20 20 7c 20 20 20 20 20 20 20 20 20 | | | 00001e20 20 20 20 20 20 20 20 7c 0a 20 20 20 20 20 20 20 | |. | 00001e30 20 20 20 20 20 2b 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | +----------| 00001e40 2d 2d 2d 2d 2d 2d 2b 0a 20 20 20 20 20 20 20 20 |------+. | 00001e50 20 20 20 20 7c 20 20 49 74 65 6d 23 31 20 20 20 | | Item#1 | 00001e60 20 20 20 20 20 7c 20 20 0a 20 20 20 20 20 20 20 | | . | 00001e70 20 20 20 20 20 2b 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | +----------| 00001e80 2d 2d 2d 2d 2d 2d 2b 0a 0a 54 6f 20 63 72 65 61 |------+..To crea| 00001e90 74 65 20 74 68 69 73 20 6d 65 6e 75 20 77 65 20 |te this menu we | 00001ea0 6d 75 73 74 20 63 61 6c 6c 20 22 4d 65 6e 75 55 |must call "MenuU| 00001eb0 74 69 6c 5f 4e 65 77 22 20 61 6e 64 20 74 6f 20 |til_New" and to | 00001ec0 61 64 64 20 61 6e 20 69 74 65 6d 20 2d 0a 22 4d |add an item -."M| 00001ed0 65 6e 75 55 74 69 6c 5f 41 64 64 22 2e 0a 0a 20 |enuUtil_Add"... | 00001ee0 53 59 53 20 22 4d 65 6e 75 55 74 69 6c 5f 4e 65 |SYS "MenuUtil_Ne| 00001ef0 77 22 2c 2c 22 53 69 6d 70 6c 65 20 6d 65 6e 75 |w",,"Simple menu| 00001f00 22 0a 20 53 59 53 20 22 4d 65 6e 75 55 74 69 6c |". SYS "MenuUtil| 00001f10 5f 41 64 64 22 2c 2c 22 49 74 65 6d 23 31 22 2c |_Add",,"Item#1",| 00001f20 22 66 75 6e 63 31 22 0a 0a 2d 20 68 65 72 65 20 |"func1"..- here | 00001f30 22 53 69 6d 70 6c 65 20 6d 65 6e 75 22 20 69 73 |"Simple menu" is| 00001f40 20 6d 65 6e 75 20 74 69 74 6c 65 2c 20 22 49 74 | menu title, "It| 00001f50 65 6d 23 31 22 20 2d 20 69 74 65 6d 20 74 65 78 |em#1" - item tex| 00001f60 74 20 61 6e 64 20 22 66 75 6e 63 31 22 20 2d 0a |t and "func1" -.| 00001f70 6e 61 6d 65 20 6f 66 20 74 68 65 20 69 74 65 6d |name of the item| 00001f80 20 68 61 6e 64 6c 65 72 2e 20 54 68 65 20 6e 61 | handler. The na| 00001f90 6d 65 20 6f 66 20 74 68 65 20 68 61 6e 64 6c 65 |me of the handle| 00001fa0 72 20 69 73 20 22 66 75 6e 63 31 22 20 73 6f 20 |r is "func1" so | 00001fb0 77 65 0a 6d 75 73 74 20 68 61 76 65 20 61 20 66 |we.must have a f| 00001fc0 75 6e 63 74 69 6f 6e 20 77 69 74 68 20 74 68 65 |unction with the| 00001fd0 20 6e 61 6d 65 20 22 46 4e 66 75 6e 63 31 22 2e | name "FNfunc1".| 00001fe0 0a 0a 20 44 45 46 20 46 4e 66 75 6e 63 31 0a 20 |.. DEF FNfunc1. | 00001ff0 2e 2e 2e 0a 20 3d 54 52 55 45 0a 0a 54 68 65 6e |.... =TRUE..Then| 00002000 20 77 65 20 6f 72 67 61 6e 69 7a 65 20 74 68 65 | we organize the| 00002010 20 6d 61 69 6e 20 57 69 6d 70 5f 50 6f 6c 6c 20 | main Wimp_Poll | 00002020 6c 6f 6f 70 20 69 6e 20 74 68 65 20 66 6f 6c 6c |loop in the foll| 00002030 6f 77 69 6e 67 20 77 61 79 2e 0a 0a 20 44 49 4d |owing way... DIM| 00002040 20 71 25 20 26 31 30 30 0a 20 52 45 50 45 41 54 | q% &100. REPEAT| 00002050 20 53 59 53 20 22 57 69 6d 70 5f 50 6f 6c 6c 22 | SYS "Wimp_Poll"| 00002060 2c 2c 71 25 20 54 4f 20 72 65 61 73 6f 6e 25 0a |,,q% TO reason%.| 00002070 20 20 20 43 41 53 45 20 72 65 61 73 6f 6e 25 20 | CASE reason% | 00002080 4f 46 0a 20 20 20 20 20 2e 2e 2e 20 20 20 20 20 |OF. ... | 00002090 20 20 20 20 0a 20 20 20 20 20 52 45 4d 20 4d 6f | . REM Mo| 000020a0 75 73 65 20 63 6c 69 63 6b 0a 20 20 20 20 20 57 |use click. W| 000020b0 48 45 4e 20 36 0a 20 20 20 20 20 20 20 20 20 20 |HEN 6. | 000020c0 20 20 49 46 20 71 25 21 38 3d 32 20 54 48 45 4e | IF q%!8=2 THEN| 000020d0 20 53 59 53 20 22 4d 65 6e 75 55 74 69 6c 5f 53 | SYS "MenuUtil_S| 000020e0 68 6f 77 22 2c 2c 71 25 0a 20 0a 20 20 20 20 20 |how",,q%. . | 000020f0 52 45 4d 20 4d 65 6e 75 20 73 65 6c 65 63 74 69 |REM Menu selecti| 00002100 6f 6e 20 20 0a 20 20 20 20 20 57 48 45 4e 20 39 |on . WHEN 9| 00002110 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 59 53 |. SYS| 00002120 20 22 4d 65 6e 75 55 74 69 6c 5f 44 65 63 6f 64 | "MenuUtil_Decod| 00002130 65 22 2c 2c 71 25 20 54 4f 20 68 61 6e 64 6c 65 |e",,q% TO handle| 00002140 72 25 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 |r%. I| 00002150 46 20 68 61 6e 64 6c 65 72 25 20 54 48 45 4e 0a |F handler% THEN.| 00002160 20 20 20 20 20 20 20 20 20 20 20 20 20 20 68 61 | ha| 00002170 6e 64 6c 65 72 24 3d 22 46 4e 22 2b 24 68 61 6e |ndler$="FN"+$han| 00002180 64 6c 65 72 25 20 20 20 0a 20 20 20 20 20 20 20 |dler% . | 00002190 20 20 20 20 20 20 20 49 46 20 45 56 41 4c 20 68 | IF EVAL h| 000021a0 61 6e 64 6c 65 72 24 0a 20 20 20 20 20 20 20 20 |andler$. | 000021b0 20 20 20 20 45 4e 44 49 46 0a 20 20 20 20 20 2e | ENDIF. .| 000021c0 2e 2e 0a 20 20 20 45 4e 44 43 41 53 45 0a 20 55 |... ENDCASE. U| 000021d0 4e 54 49 4c 20 46 41 4c 53 45 0a 20 20 20 20 0a |NTIL FALSE. .| 000021e0 49 66 20 74 68 65 20 75 73 65 72 20 63 6c 69 63 |If the user clic| 000021f0 6b 73 20 77 69 74 68 20 4d 65 6e 75 20 62 75 74 |ks with Menu but| 00002200 74 6f 6e 20 77 65 20 77 69 6c 6c 20 63 61 6c 6c |ton we will call| 00002210 20 22 4d 65 6e 75 55 74 69 6c 5f 53 68 6f 77 22 | "MenuUtil_Show"| 00002220 20 74 6f 0a 64 69 73 70 6c 61 79 20 6d 65 6e 75 | to.display menu| 00002230 20 6f 6e 20 73 63 72 65 65 6e 2e 20 49 66 20 75 | on screen. If u| 00002240 73 65 72 20 73 65 6c 65 63 74 73 20 73 6f 6d 65 |ser selects some| 00002250 74 68 69 6e 67 20 66 72 6f 6d 20 6f 75 72 20 6d |thing from our m| 00002260 65 6e 75 20 77 65 0a 77 69 6c 6c 20 63 61 6c 6c |enu we.will call| 00002270 20 22 4d 65 6e 75 55 74 69 6c 5f 44 65 63 6f 64 | "MenuUtil_Decod| 00002280 65 22 20 74 6f 20 66 69 6e 64 20 6f 75 74 20 63 |e" to find out c| 00002290 6f 72 72 65 73 70 6f 6e 64 69 6e 67 20 69 74 65 |orresponding ite| 000022a0 6d 20 68 61 6e 64 6c 65 72 2e 0a 56 61 72 69 61 |m handler..Varia| 000022b0 62 6c 65 20 68 61 6e 64 6c 65 72 25 20 77 69 6c |ble handler% wil| 000022c0 6c 20 63 6f 6e 74 61 69 6e 20 70 6f 69 6e 74 65 |l contain pointe| 000022d0 72 20 74 6f 20 74 68 65 20 68 61 6e 64 6c 65 72 |r to the handler| 000022e0 20 6e 61 6d 65 2e 20 49 6e 20 6f 75 72 0a 65 78 | name. In our.ex| 000022f0 61 6d 70 6c 65 20 69 66 20 75 73 65 72 20 77 69 |ample if user wi| 00002300 6c 6c 20 73 65 6c 65 63 74 20 69 74 65 6d 20 22 |ll select item "| 00002310 49 74 65 6d 23 31 22 20 76 61 72 69 61 62 6c 65 |Item#1" variable| 00002320 20 68 61 6e 64 6c 65 72 25 20 77 69 6c 6c 20 70 | handler% will p| 00002330 6f 69 6e 74 0a 74 6f 20 73 74 72 69 6e 67 20 22 |oint.to string "| 00002340 66 75 6e 63 31 22 2e 20 54 68 65 20 66 75 6c 6c |func1". The full| 00002350 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 68 61 6e | name of the han| 00002360 64 6c 65 72 20 77 69 6c 6c 20 62 65 0a 22 46 4e |dler will be."FN| 00002370 22 2b 24 68 61 6e 64 6c 65 72 25 2e 20 41 6e 64 |"+$handler%. And| 00002380 20 45 56 41 4c 20 73 74 61 74 65 6d 65 6e 74 20 | EVAL statement | 00002390 69 73 20 75 73 65 64 20 74 6f 20 63 61 6c 6c 20 |is used to call | 000023a0 69 74 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 |it.. | 000023b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 000023e0 20 20 20 20 20 0a 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d | ..---------| 000023f0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00002420 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a |---------------.| 00002430 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002440 20 20 20 20 4e 6f 74 65 73 20 66 72 6f 6d 20 74 | Notes from t| 00002450 68 65 20 61 75 74 68 6f 72 0a 0a 0a 4d 65 6e 75 |he author...Menu| 00002460 55 74 69 6c 73 20 69 73 20 66 72 65 65 77 61 72 |Utils is freewar| 00002470 65 20 73 6f 66 74 77 61 72 65 2e 20 45 76 65 72 |e software. Ever| 00002480 79 62 6f 64 79 20 69 73 20 66 72 65 65 20 74 6f |ybody is free to| 00002490 20 75 73 65 20 4d 65 6e 75 55 74 69 6c 73 0a 6d | use MenuUtils.m| 000024a0 6f 64 75 6c 65 2c 20 65 76 65 6e 20 69 6e 20 63 |odule, even in c| 000024b0 6f 6d 6d 65 72 63 69 61 6c 20 63 6f 64 65 2e 20 |ommercial code. | 000024c0 49 6e 20 63 61 73 65 20 6f 66 20 63 6f 6d 6d 65 |In case of comme| 000024d0 72 63 69 61 6c 20 75 73 65 20 49 20 77 6f 75 6c |rcial use I woul| 000024e0 64 0a 6c 69 6b 65 20 74 6f 20 6b 6e 6f 77 20 74 |d.like to know t| 000024f0 68 69 73 20 69 6e 20 61 64 76 61 6e 63 65 20 28 |his in advance (| 00002500 49 20 63 6f 75 6c 64 20 74 68 61 6e 20 70 72 6f |I could than pro| 00002510 76 69 64 65 20 79 6f 75 20 77 69 74 68 20 74 68 |vide you with th| 00002520 65 20 6c 61 74 65 73 74 0a 72 65 6c 65 61 73 65 |e latest.release| 00002530 29 2e 20 59 6f 75 20 63 61 6e 20 61 6c 77 61 79 |). You can alway| 00002540 73 20 63 6f 6e 74 61 63 74 20 6d 65 20 69 66 20 |s contact me if | 00002550 79 6f 75 20 66 6f 75 6e 64 20 73 6f 6d 65 20 62 |you found some b| 00002560 75 67 2c 20 6f 72 20 77 68 65 6e 0a 68 61 76 69 |ug, or when.havi| 00002570 6e 67 20 6f 74 68 65 72 20 73 75 67 67 65 73 74 |ng other suggest| 00002580 69 6f 6e 73 2e 0a 0a 20 20 20 20 20 20 20 20 20 |ions... | 00002590 54 6f 20 63 6f 6e 74 61 63 74 20 74 68 65 20 61 |To contact the a| 000025a0 75 74 68 6f 72 20 6f 66 20 4d 65 6e 75 55 74 69 |uthor of MenuUti| 000025b0 6c 73 2c 20 70 6c 65 61 73 65 20 77 72 69 74 65 |ls, please write| 000025c0 20 74 6f 3a 0a 20 20 20 20 20 20 20 20 20 20 20 | to:. | 000025d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000025e0 20 20 20 20 20 20 20 20 20 20 20 0a 20 20 20 20 | . | 000025f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00002610 20 20 20 20 52 55 53 53 49 41 0a 20 20 20 20 20 | RUSSIA. | 00002620 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00002640 20 20 20 31 31 35 35 34 31 0a 20 20 20 20 20 20 | 115541. | 00002650 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00002670 20 20 4d 6f 73 63 6f 77 0a 20 20 20 20 20 20 20 | Moscow. | 00002680 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 000026a0 20 4b 61 76 6b 61 7a 73 6b 79 20 62 6f 75 6c 65 | Kavkazsky boule| 000026b0 76 61 72 64 2c 20 32 39 0a 20 20 20 20 20 20 20 |vard, 29. | 000026c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 000026e0 20 42 6c 64 2e 20 31 2c 20 46 6c 61 74 20 31 30 | Bld. 1, Flat 10| 000026f0 37 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |7. | 00002700 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002710 20 20 20 20 20 20 20 20 20 20 41 6c 65 78 20 50 | Alex P| 00002720 65 74 72 6f 76 20 20 20 20 0a 0a 20 20 20 20 20 |etrov .. | 00002730 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002740 20 20 20 20 45 2d 6d 61 69 6c 3a 20 41 50 65 74 | E-mail: APet| 00002750 72 6f 76 40 6d 69 73 69 73 2e 6d 73 6b 2e 73 75 |rov@misis.msk.su| 00002760 20 20 20 20 20 20 0a 20 20 20 20 20 20 20 20 20 | . | 00002770 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002780 20 20 20 20 20 20 20 20 41 50 65 74 72 6f 76 40 | APetrov@| 00002790 61 72 6d 2e 6d 73 6b 2e 73 75 0a 20 20 20 20 20 |arm.msk.su. | 000027a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000027b0 20 20 20 20 20 20 20 20 20 20 20 20 0a 20 20 20 | . | 000027c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000027d0 20 20 20 20 20 20 46 49 44 4f 20 3a 20 20 32 3a | FIDO : 2:| 000027e0 35 30 32 30 2f 31 30 34 2e 31 33 0a 0a 20 20 20 |5020/104.13.. | 000027f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002800 20 20 20 20 20 20 20 70 68 6f 6e 65 3a 20 2b 37 | phone: +7| 00002810 20 30 39 35 20 33 32 32 20 32 30 39 38 0a 20 20 | 095 322 2098. | 00002820 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002830 20 20 20 20 20 20 20 20 66 61 78 20 20 3a 20 2b | fax : +| 00002840 37 20 30 39 35 20 32 33 36 20 38 33 35 30 0a |7 095 236 8350.| 0000284f