home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / utilities / utilsd / evntshell / !StrongHlp / HelpData / MenuUtils < prev    next >
Unknown  |  1995-11-10  |  35.9 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text


This file was not able to be converted.
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
100% file data default
100% gt2 Kopftext: 'HELP(' default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 48 45 4c 50 28 00 00 00 | c9 00 00 00 34 7f 00 00 |HELP(...|....4...|
|00000010| 2c 31 00 00 00 fd ff ff | 00 00 00 00 60 02 00 00 |,1......|....`...|
|00000020| 00 01 00 00 00 00 00 00 | 24 00 00 00 46 52 45 45 |........|$...FREE|
|00000030| 4c 00 00 00 ff ff ff ff | 30 17 00 00 46 fd ff ff |L.......|0...F...|
|00000040| 8e ab d1 22 11 03 00 00 | 13 00 00 00 00 00 00 00 |..."....|........|
|00000050| 41 64 64 00 44 1a 00 00 | 46 fd ff ff 90 ab d1 22 |Add.D...|F......"|
|00000060| 7c 00 00 00 13 00 00 00 | 00 00 00 00 43 6f 6c 6f ||.......|....Colo|
|00000070| 75 72 4d 65 6e 75 00 00 | 00 00 00 00 02 ec 8e e3 |urMenu..|........|
|00000080| 44 41 54 41 7e 03 00 00 | 4d 65 6e 75 55 74 69 6c |DATA~...|MenuUtil|
|00000090| 73 20 4d 6f 64 75 6c 65 | 20 30 2e 31 30 0a 23 49 |s Module| 0.10.#I|
|000000a0| 6e 64 65 6e 74 20 35 0a | 23 53 70 72 69 74 65 20 |ndent 5.|#Sprite |
|000000b0| 30 2c 30 20 66 69 6c 65 | 5f 66 66 61 0a 54 68 69 |0,0 file|_ffa.Thi|
|000000c0| 73 20 69 73 20 61 20 6d | 6f 64 75 6c 65 20 77 68 |s is a m|odule wh|
|000000d0| 69 63 68 20 61 69 64 73 | 20 74 68 65 0a 63 72 65 |ich aids| the.cre|
|000000e0| 61 74 69 6f 6e 20 61 6e | 64 20 75 73 61 67 65 20 |ation an|d usage |
|000000f0| 6f 66 20 6d 65 6e 75 73 | 2e 0a 23 49 6e 64 65 6e |of menus|..#Inden|
|00000100| 74 20 30 0a 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |t 0.____|________|
|00000110| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00000120| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 0a 0a 41 6c 6c |________|___..All|
|00000130| 20 53 57 49 73 20 61 72 | 65 20 70 72 65 66 69 78 | SWIs ar|e prefix|
|00000140| 65 64 20 77 69 74 68 20 | 27 4d 65 6e 75 55 74 69 |ed with |'MenuUti|
|00000150| 6c 5f 27 2e 0a 43 6c 69 | 63 6b 20 3c 68 65 72 65 |l_'..Cli|ck <here|
|00000160| 3d 3e 44 6f 63 73 3e 20 | 66 6f 72 20 66 75 72 74 |=>Docs> |for furt|
|00000170| 68 65 72 20 64 6f 63 75 | 6d 65 6e 74 61 74 69 6f |her docu|mentatio|
|00000180| 6e 0a 61 6e 64 20 70 72 | 6f 67 72 61 6d 6d 69 6e |n.and pr|ogrammin|
|00000190| 67 20 65 78 61 6d 70 6c | 65 73 2e 0a 0a 23 54 61 |g exampl|es...#Ta|
|000001a0| 62 6c 65 20 36 20 31 34 | 0a 3c 49 6e 69 74 69 61 |ble 6 14|.<Initia|
|000001b0| 6c 69 73 65 20 3d 3e 4d | 65 6e 75 55 74 69 6c 5f |lise =>M|enuUtil_|
|000001c0| 49 6e 69 74 69 61 6c 69 | 73 65 3e 20 20 20 20 0a |Initiali|se> .|
|000001d0| 3c 4e 65 77 20 20 20 20 | 20 20 20 20 3d 3e 4d 65 |<New | =>Me|
|000001e0| 6e 75 55 74 69 6c 5f 4e | 65 77 3e 20 20 20 20 20 |nuUtil_N|ew> |
|000001f0| 20 20 20 20 20 20 0a 3c | 41 64 64 20 20 20 20 20 | .<|Add |
|00000200| 20 20 20 3d 3e 4d 65 6e | 75 55 74 69 6c 5f 41 64 | =>Men|uUtil_Ad|
|00000210| 64 3e 20 20 20 20 20 20 | 20 20 20 20 20 0a 3c 44 |d> | .<D|
|00000220| 65 6c 65 74 65 20 20 20 | 20 20 3d 3e 4d 65 6e 75 |elete | =>Menu|
|00000230| 55 74 69 6c 5f 44 65 6c | 65 74 65 3e 20 20 0a 3c |Util_Del|ete> .<|
|00000240| 44 65 63 6f 64 65 20 20 | 20 20 20 3d 3e 4d 65 6e |Decode | =>Men|
|00000250| 75 55 74 69 6c 5f 44 65 | 63 6f 64 65 3e 0a 3c 53 |uUtil_De|code>.<S|
|00000260| 68 6f 77 20 20 20 20 20 | 20 20 3d 3e 4d 65 6e 75 |how | =>Menu|
|00000270| 55 74 69 6c 5f 53 68 6f | 77 3e 0a 3c 53 68 6f 77 |Util_Sho|w>.<Show|
|00000280| 53 75 62 4d 65 6e 75 3d | 3e 4d 65 6e 75 55 74 69 |SubMenu=|>MenuUti|
|00000290| 6c 5f 53 68 6f 77 53 75 | 62 4d 65 6e 75 3e 0a 3c |l_ShowSu|bMenu>.<|
|000002a0| 49 6e 66 6f 20 20 20 20 | 20 20 20 3d 3e 4d 65 6e |Info | =>Men|
|000002b0| 75 55 74 69 6c 5f 49 6e | 66 6f 3e 0a 3c 54 65 78 |uUtil_In|fo>.<Tex|
|000002c0| 74 20 20 20 20 20 20 20 | 3d 3e 4d 65 6e 75 55 74 |t |=>MenuUt|
|000002d0| 69 6c 5f 54 65 78 74 3e | 0a 3c 54 69 63 6b 20 20 |il_Text>|.<Tick |
|000002e0| 20 20 20 20 20 3d 3e 4d | 65 6e 75 55 74 69 6c 5f | =>M|enuUtil_|
|000002f0| 54 69 63 6b 3e 0a 3c 44 | 6f 74 73 20 20 20 20 20 |Tick>.<D|ots |
|00000300| 20 20 3d 3e 4d 65 6e 75 | 55 74 69 6c 5f 44 6f 74 | =>Menu|Util_Dot|
|00000310| 73 3e 0a 3c 46 61 64 65 | 20 20 20 20 20 20 20 3d |s>.<Fade| =|
|00000320| 3e 4d 65 6e 75 55 74 69 | 6c 5f 46 61 64 65 3e 0a |>MenuUti|l_Fade>.|
|00000330| 3c 57 61 72 6e 69 6e 67 | 20 20 20 20 3d 3e 4d 65 |<Warning| =>Me|
|00000340| 6e 75 55 74 69 6c 5f 57 | 61 72 6e 69 6e 67 3e 0a |nuUtil_W|arning>.|
|00000350| 3c 57 72 69 74 61 62 6c | 65 20 20 20 3d 3e 4d 65 |<Writabl|e =>Me|
|00000360| 6e 75 55 74 69 6c 5f 57 | 72 69 74 61 62 6c 65 3e |nuUtil_W|ritable>|
|00000370| 0a 3c 53 75 62 4d 65 6e | 75 20 20 20 20 3d 3e 4d |.<SubMen|u =>M|
|00000380| 65 6e 75 55 74 69 6c 5f | 53 75 62 4d 65 6e 75 3e |enuUtil_|SubMenu>|
|00000390| 0a 3c 43 6f 6c 6f 75 72 | 4d 65 6e 75 20 3d 3e 4d |.<Colour|Menu =>M|
|000003a0| 65 6e 75 55 74 69 6c 5f | 43 6f 6c 6f 75 72 4d 65 |enuUtil_|ColourMe|
|000003b0| 6e 75 3e 0a 3c 43 6f 6c | 6f 75 72 73 20 20 20 20 |nu>.<Col|ours |
|000003c0| 3d 3e 4d 65 6e 75 55 74 | 69 6c 5f 43 6f 6c 6f 75 |=>MenuUt|il_Colou|
|000003d0| 72 73 3e 0a 3c 54 69 63 | 6b 4f 6e 6c 79 20 20 20 |rs>.<Tic|kOnly |
|000003e0| 3d 3e 4d 65 6e 75 55 74 | 69 6c 5f 54 69 63 6b 4f |=>MenuUt|il_TickO|
|000003f0| 6e 6c 79 3e 0a 23 45 6e | 64 54 61 62 6c 65 00 00 |nly>.#En|dTable..|
|00000400| 44 41 54 41 a3 06 00 00 | 41 70 70 6c 69 63 61 74 |DATA....|Applicat|
|00000410| 69 6f 6e 20 4e 6f 74 65 | 73 0a 54 68 69 73 20 65 |ion Note|s.This e|
|00000420| 78 61 6d 70 6c 65 20 69 | 6c 6c 75 73 74 72 61 74 |xample i|llustrat|
|00000430| 65 73 20 74 68 65 20 75 | 73 65 20 6f 66 20 6d 65 |es the u|se of me|
|00000440| 6e 75 20 69 74 65 6d 20 | 68 61 6e 64 6c 65 72 73 |nu item |handlers|
|00000450| 20 69 6e 20 70 72 6f 67 | 72 61 6d 73 20 69 6e 0a | in prog|rams in.|
|00000460| 42 42 43 20 42 41 53 49 | 43 2e 20 4c 65 74 73 20 |BBC BASI|C. Lets |
|00000470| 63 6f 6e 73 69 64 65 72 | 20 73 69 6d 70 6c 65 20 |consider| simple |
|00000480| 6d 65 6e 75 20 63 6f 6e | 73 69 73 74 69 6e 67 20 |menu con|sisting |
|00000490| 6f 66 20 73 69 6e 67 6c | 65 20 69 74 65 6d 2e 0a |of singl|e item..|
|000004a0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 2b 2d 2d |. | +--|
|000004b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2b 0a |--------|------+.|
|000004c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 7c 20 20 20 | | | |
|000004d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 7c 0a 20 | | |. |
|000004e0| 20 20 20 20 20 20 20 20 | 20 20 20 7c 20 20 53 69 | | | Si|
|000004f0| 6d 70 6c 65 20 6d 65 6e | 75 20 20 20 7c 0a 20 20 |mple men|u |. |
|00000500| 20 20 20 20 20 20 20 20 | 20 20 7c 20 20 20 20 20 | | | |
|00000510| 20 20 20 20 20 20 20 20 | 20 20 20 7c 0a 20 20 20 | | |. |
|00000520| 20 20 20 20 20 20 20 20 | 20 2b 2d 2d 2d 2d 2d 2d | | +------|
|00000530| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2b 0a 20 20 20 20 |--------|--+. |
|00000540| 20 20 20 20 20 20 20 20 | 7c 20 20 49 74 65 6d 23 | || Item#|
|00000550| 31 20 20 20 20 20 20 20 | 20 7c 20 20 0a 20 20 20 |1 | | . |
|00000560| 20 20 20 20 20 20 20 20 | 20 2b 2d 2d 2d 2d 2d 2d | | +------|
|00000570| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2b 0a 0a 54 6f 20 |--------|--+..To |
|00000580| 63 72 65 61 74 65 20 74 | 68 69 73 20 6d 65 6e 75 |create t|his menu|
|00000590| 20 77 65 20 6d 75 73 74 | 20 63 61 6c 6c 20 22 3c | we must| call "<|
|000005a0| 4d 65 6e 75 55 74 69 6c | 5f 4e 65 77 3e 22 20 61 |MenuUtil|_New>" a|
|000005b0| 6e 64 20 74 6f 20 61 64 | 64 20 61 6e 20 69 74 65 |nd to ad|d an ite|
|000005c0| 6d 20 2d 0a 22 3c 4d 65 | 6e 75 55 74 69 6c 5f 41 |m -."<Me|nuUtil_A|
|000005d0| 64 64 3e 22 2e 0a 0a 20 | 53 59 53 20 22 4d 65 6e |dd>"... |SYS "Men|
|000005e0| 75 55 74 69 6c 5f 4e 65 | 77 22 2c 2c 22 53 69 6d |uUtil_Ne|w",,"Sim|
|000005f0| 70 6c 65 20 6d 65 6e 75 | 22 0a 20 53 59 53 20 22 |ple menu|". SYS "|
|00000600| 4d 65 6e 75 55 74 69 6c | 5f 41 64 64 22 2c 2c 22 |MenuUtil|_Add",,"|
|00000610| 49 74 65 6d 23 31 22 2c | 22 66 75 6e 63 31 22 0a |Item#1",|"func1".|
|00000620| 0a 2d 20 68 65 72 65 20 | 22 53 69 6d 70 6c 65 20 |.- here |"Simple |
|00000630| 6d 65 6e 75 22 20 69 73 | 20 6d 65 6e 75 20 74 69 |menu" is| menu ti|
|00000640| 74 6c 65 2c 20 22 49 74 | 65 6d 23 31 22 20 2d 20 |tle, "It|em#1" - |
|00000650| 69 74 65 6d 20 74 65 78 | 74 20 61 6e 64 20 22 66 |item tex|t and "f|
|00000660| 75 6e 63 31 22 20 2d 0a | 6e 61 6d 65 20 6f 66 20 |unc1" -.|name of |
|00000670| 74 68 65 20 69 74 65 6d | 20 68 61 6e 64 6c 65 72 |the item| handler|
|00000680| 2e 20 54 68 65 20 6e 61 | 6d 65 20 6f 66 20 74 68 |. The na|me of th|
|00000690| 65 20 68 61 6e 64 6c 65 | 72 20 69 73 20 22 66 75 |e handle|r is "fu|
|000006a0| 6e 63 31 22 20 73 6f 20 | 77 65 0a 6d 75 73 74 20 |nc1" so |we.must |
|000006b0| 68 61 76 65 20 61 20 66 | 75 6e 63 74 69 6f 6e 20 |have a f|unction |
|000006c0| 77 69 74 68 20 74 68 65 | 20 6e 61 6d 65 20 22 46 |with the| name "F|
|000006d0| 4e 66 75 6e 63 31 22 2e | 0a 0a 20 44 45 46 20 46 |Nfunc1".|.. DEF F|
|000006e0| 4e 66 75 6e 63 31 0a 20 | 2e 2e 2e 0a 20 3d 54 52 |Nfunc1. |.... =TR|
|000006f0| 55 45 0a 0a 54 68 65 6e | 20 77 65 20 6f 72 67 61 |UE..Then| we orga|
|00000700| 6e 69 7a 65 20 74 68 65 | 20 6d 61 69 6e 20 57 69 |nize the| main Wi|
|00000710| 6d 70 5f 50 6f 6c 6c 20 | 6c 6f 6f 70 20 69 6e 20 |mp_Poll |loop in |
|00000720| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 77 61 |the foll|owing wa|
|00000730| 79 2e 0a 0a 20 44 49 4d | 20 71 25 20 26 31 30 30 |y... DIM| q% &100|
|00000740| 0a 20 52 45 50 45 41 54 | 20 53 59 53 20 22 57 69 |. REPEAT| SYS "Wi|
|00000750| 6d 70 5f 50 6f 6c 6c 22 | 2c 2c 71 25 20 54 4f 20 |mp_Poll"|,,q% TO |
|00000760| 72 65 61 73 6f 6e 25 0a | 20 20 20 43 41 53 45 20 |reason%.| CASE |
|00000770| 72 65 61 73 6f 6e 25 20 | 4f 46 0a 20 20 20 20 20 |reason% |OF. |
|00000780| 2e 2e 2e 20 20 20 20 20 | 20 20 20 20 0a 20 20 20 |... | . |
|00000790| 20 20 52 45 4d 20 4d 6f | 75 73 65 20 63 6c 69 63 | REM Mo|use clic|
|000007a0| 6b 0a 20 20 20 20 20 57 | 48 45 4e 20 36 0a 20 20 |k. W|HEN 6. |
|000007b0| 20 20 20 20 20 20 20 20 | 20 20 49 46 20 71 25 21 | | IF q%!|
|000007c0| 38 3d 32 20 54 48 45 4e | 20 53 59 53 20 22 3c 4d |8=2 THEN| SYS "<M|
|000007d0| 65 6e 75 55 74 69 6c 5f | 53 68 6f 77 3e 22 2c 2c |enuUtil_|Show>",,|
|000007e0| 71 25 0a 20 0a 20 20 20 | 20 20 52 45 4d 20 4d 65 |q%. . | REM Me|
|000007f0| 6e 75 20 73 65 6c 65 63 | 74 69 6f 6e 20 20 0a 20 |nu selec|tion . |
|00000800| 20 20 20 20 57 48 45 4e | 20 39 0a 20 20 20 20 20 | WHEN| 9. |
|00000810| 20 20 20 20 20 20 20 53 | 59 53 20 22 3c 4d 65 6e | S|YS "<Men|
|00000820| 75 55 74 69 6c 5f 44 65 | 63 6f 64 65 3e 22 2c 2c |uUtil_De|code>",,|
|00000830| 71 25 20 54 4f 20 68 61 | 6e 64 6c 65 72 25 0a 20 |q% TO ha|ndler%. |
|00000840| 20 20 20 20 20 20 20 20 | 20 20 20 49 46 20 68 61 | | IF ha|
|00000850| 6e 64 6c 65 72 25 20 54 | 48 45 4e 0a 20 20 20 20 |ndler% T|HEN. |
|00000860| 20 20 20 20 20 20 20 20 | 20 20 68 61 6e 64 6c 65 | | handle|
|00000870| 72 24 3d 22 46 4e 22 2b | 24 68 61 6e 64 6c 65 72 |r$="FN"+|$handler|
|00000880| 25 20 20 20 0a 20 20 20 | 20 20 20 20 20 20 20 20 |% . | |
|00000890| 20 20 20 49 46 20 45 56 | 41 4c 20 68 61 6e 64 6c | IF EV|AL handl|
|000008a0| 65 72 24 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |er$. | |
|000008b0| 45 4e 44 49 46 0a 20 20 | 20 20 20 2e 2e 2e 0a 20 |ENDIF. | .... |
|000008c0| 20 20 45 4e 44 43 41 53 | 45 0a 20 55 4e 54 49 4c | ENDCAS|E. UNTIL|
|000008d0| 20 46 41 4c 53 45 0a 20 | 20 20 20 0a 49 66 20 74 | FALSE. | .If t|
|000008e0| 68 65 20 75 73 65 72 20 | 63 6c 69 63 6b 73 20 77 |he user |clicks w|
|000008f0| 69 74 68 20 4d 65 6e 75 | 20 62 75 74 74 6f 6e 20 |ith Menu| button |
|00000900| 77 65 20 77 69 6c 6c 20 | 63 61 6c 6c 20 22 3c 4d |we will |call "<M|
|00000910| 65 6e 75 55 74 69 6c 5f | 53 68 6f 77 3e 22 20 74 |enuUtil_|Show>" t|
|00000920| 6f 0a 64 69 73 70 6c 61 | 79 20 6d 65 6e 75 20 6f |o.displa|y menu o|
|00000930| 6e 20 73 63 72 65 65 6e | 2e 20 49 66 20 75 73 65 |n screen|. If use|
|00000940| 72 20 73 65 6c 65 63 74 | 73 20 73 6f 6d 65 74 68 |r select|s someth|
|00000950| 69 6e 67 20 66 72 6f 6d | 20 6f 75 72 20 6d 65 6e |ing from| our men|
|00000960| 75 20 77 65 0a 77 69 6c | 6c 20 63 61 6c 6c 20 22 |u we.wil|l call "|
|00000970| 3c 4d 65 6e 75 55 74 69 | 6c 5f 44 65 63 6f 64 65 |<MenuUti|l_Decode|
|00000980| 3e 22 20 74 6f 20 66 69 | 6e 64 20 6f 75 74 20 63 |>" to fi|nd out c|
|00000990| 6f 72 72 65 73 70 6f 6e | 64 69 6e 67 20 69 74 65 |orrespon|ding ite|
|000009a0| 6d 20 68 61 6e 64 6c 65 | 72 2e 0a 56 61 72 69 61 |m handle|r..Varia|
|000009b0| 62 6c 65 20 68 61 6e 64 | 6c 65 72 25 20 77 69 6c |ble hand|ler% wil|
|000009c0| 6c 20 63 6f 6e 74 61 69 | 6e 20 70 6f 69 6e 74 65 |l contai|n pointe|
|000009d0| 72 20 74 6f 20 74 68 65 | 20 68 61 6e 64 6c 65 72 |r to the| handler|
|000009e0| 20 6e 61 6d 65 2e 20 49 | 6e 20 6f 75 72 0a 65 78 | name. I|n our.ex|
|000009f0| 61 6d 70 6c 65 20 69 66 | 20 75 73 65 72 20 77 69 |ample if| user wi|
|00000a00| 6c 6c 20 73 65 6c 65 63 | 74 20 69 74 65 6d 20 22 |ll selec|t item "|
|00000a10| 49 74 65 6d 23 31 22 20 | 76 61 72 69 61 62 6c 65 |Item#1" |variable|
|00000a20| 20 68 61 6e 64 6c 65 72 | 25 20 77 69 6c 6c 20 70 | handler|% will p|
|00000a30| 6f 69 6e 74 0a 74 6f 20 | 73 74 72 69 6e 67 20 22 |oint.to |string "|
|00000a40| 66 75 6e 63 31 22 2e 20 | 54 68 65 20 66 75 6c 6c |func1". |The full|
|00000a50| 20 6e 61 6d 65 20 6f 66 | 20 74 68 65 20 68 61 6e | name of| the han|
|00000a60| 64 6c 65 72 20 77 69 6c | 6c 20 62 65 0a 22 46 4e |dler wil|l be."FN|
|00000a70| 22 2b 24 68 61 6e 64 6c | 65 72 25 2e 20 41 6e 64 |"+$handl|er%. And|
|00000a80| 20 45 56 41 4c 20 73 74 | 61 74 65 6d 65 6e 74 20 | EVAL st|atement |
|00000a90| 69 73 20 75 73 65 64 20 | 74 6f 20 63 61 6c 6c 20 |is used |to call |
|00000aa0| 69 74 2e 00 46 52 45 45 | 14 01 00 00 c0 1a 00 00 |it..FREE|........|
|00000ab0| 80 00 00 00 46 fd ff ff | 7a ab d1 22 7e 03 00 00 |....F...|z.."~...|
|00000ac0| 13 00 00 00 00 00 00 00 | 21 52 6f 6f 74 00 00 00 |........|!Root...|
|00000ad0| 00 04 00 00 46 fd ff ff | 7c ab d1 22 a3 06 00 00 |....F...||.."....|
|00000ae0| 13 00 00 00 00 00 00 00 | 41 70 70 4e 6f 74 65 73 |........|AppNotes|
|00000af0| 00 00 00 00 04 0c 00 00 | 46 fd ff ff 7e ab d1 22 |........|F...~.."|
|00000b00| 92 03 00 00 13 00 00 00 | 00 00 00 00 41 75 74 68 |........|....Auth|
|00000b10| 6f 72 00 00 98 0f 00 00 | 46 fd ff ff 7f ab d1 22 |or......|F......"|
|00000b20| 14 01 00 00 13 00 00 00 | 00 00 00 00 44 65 63 4d |........|....DecM|
|00000b30| 53 4c 69 73 74 00 00 00 | ac 10 00 00 46 fd ff ff |SList...|....F...|
|00000b40| 81 ab d1 22 8a 02 00 00 | 13 00 00 00 00 00 00 00 |..."....|........|
|00000b50| 44 65 63 52 32 42 6c 6b | 00 00 00 00 38 13 00 00 |DecR2Blk|....8...|
|00000b60| 46 fd ff ff 8a ab d1 22 | f1 01 00 00 13 00 00 00 |F......"|........|
|00000b70| 00 00 00 00 44 69 73 70 | 6c 61 79 69 6e 67 00 00 |....Disp|laying..|
|00000b80| 2c 15 00 00 46 fd ff ff | 8b ab d1 22 03 02 00 00 |,...F...|..."....|
|00000b90| 13 00 00 00 00 00 00 00 | 44 6f 63 73 00 00 00 00 |........|Docs....|
|00000ba0| 54 23 00 00 46 fd ff ff | 8d ab d1 22 80 02 00 00 |T#..F...|..."....|
|00000bb0| 13 01 00 00 00 00 00 00 | 46 52 45 45 4c 00 00 00 |........|FREEL...|
|00000bc0| a4 0a 00 00 20 39 00 00 | 46 ff ff ff bc ab d1 22 |.... 9..|F......"|
|00000bd0| 68 07 00 00 13 00 00 00 | 00 00 00 00 41 64 64 00 |h.......|....Add.|
|00000be0| 88 40 00 00 46 ff ff ff | be ab d1 22 f4 02 00 00 |.@..F...|..."....|
|00000bf0| 13 00 00 00 00 00 00 00 | 43 6f 6c 6f 75 72 4d 65 |........|ColourMe|
|00000c00| 6e 75 00 00 44 41 54 41 | 92 03 00 00 4e 6f 74 65 |nu..DATA|....Note|
|00000c10| 73 20 46 72 6f 6d 20 54 | 68 65 20 41 75 74 68 6f |s From T|he Autho|
|00000c20| 72 0a 4d 65 6e 75 55 74 | 69 6c 73 20 69 73 20 66 |r.MenuUt|ils is f|
|00000c30| 72 65 65 77 61 72 65 20 | 73 6f 66 74 77 61 72 65 |reeware |software|
|00000c40| 2e 20 45 76 65 72 79 62 | 6f 64 79 20 69 73 20 66 |. Everyb|ody is f|
|00000c50| 72 65 65 20 74 6f 20 75 | 73 65 20 4d 65 6e 75 55 |ree to u|se MenuU|
|00000c60| 74 69 6c 73 0a 6d 6f 64 | 75 6c 65 2c 20 65 76 65 |tils.mod|ule, eve|
|00000c70| 6e 20 69 6e 20 63 6f 6d | 6d 65 72 63 69 61 6c 20 |n in com|mercial |
|00000c80| 63 6f 64 65 2e 20 49 6e | 20 63 61 73 65 20 6f 66 |code. In| case of|
|00000c90| 20 63 6f 6d 6d 65 72 63 | 69 61 6c 20 75 73 65 20 | commerc|ial use |
|00000ca0| 49 20 77 6f 75 6c 64 0a | 6c 69 6b 65 20 74 6f 20 |I would.|like to |
|00000cb0| 6b 6e 6f 77 20 74 68 69 | 73 20 69 6e 20 61 64 76 |know thi|s in adv|
|00000cc0| 61 6e 63 65 20 28 49 20 | 63 6f 75 6c 64 20 74 68 |ance (I |could th|
|00000cd0| 61 6e 20 70 72 6f 76 69 | 64 65 20 79 6f 75 20 77 |an provi|de you w|
|00000ce0| 69 74 68 20 74 68 65 20 | 6c 61 74 65 73 74 0a 72 |ith the |latest.r|
|00000cf0| 65 6c 65 61 73 65 29 2e | 20 59 6f 75 20 63 61 6e |elease).| You can|
|00000d00| 20 61 6c 77 61 79 73 20 | 63 6f 6e 74 61 63 74 20 | always |contact |
|00000d10| 6d 65 20 69 66 20 79 6f | 75 20 66 6f 75 6e 64 20 |me if yo|u found |
|00000d20| 73 6f 6d 65 20 62 75 67 | 2c 20 6f 72 20 77 68 65 |some bug|, or whe|
|00000d30| 6e 0a 68 61 76 69 6e 67 | 20 6f 74 68 65 72 20 73 |n.having| other s|
|00000d40| 75 67 67 65 73 74 69 6f | 6e 73 2e 0a 0a 54 6f 20 |uggestio|ns...To |
|00000d50| 63 6f 6e 74 61 63 74 20 | 74 68 65 20 61 75 74 68 |contact |the auth|
|00000d60| 6f 72 20 6f 66 20 4d 65 | 6e 75 55 74 69 6c 73 2c |or of Me|nuUtils,|
|00000d70| 20 70 6c 65 61 73 65 20 | 77 72 69 74 65 20 74 6f | please |write to|
|00000d80| 3a 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |:. | |
|00000d90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 0a | | .|
|00000da0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000db0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 52 | | R|
|00000dc0| 55 53 53 49 41 0a 20 20 | 20 20 20 20 20 20 20 20 |USSIA. | |
|00000dd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000de0| 20 20 20 20 20 31 31 35 | 35 34 31 0a 20 20 20 20 | 115|541. |
|00000df0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000e00| 20 20 20 20 20 20 20 20 | 20 20 20 4d 6f 73 63 6f | | Mosco|
|00000e10| 77 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |w. | |
|00000e20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000e30| 20 4b 61 76 6b 61 7a 73 | 6b 79 20 62 6f 75 6c 65 | Kavkazs|ky boule|
|00000e40| 76 61 72 64 2c 20 32 39 | 0a 20 20 20 20 20 20 20 |vard, 29|. |
|00000e50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000e60| 20 20 20 20 20 20 20 20 | 42 6c 64 2e 20 31 2c 20 | |Bld. 1, |
|00000e70| 46 6c 61 74 20 31 30 37 | 0a 20 20 20 20 20 20 20 |Flat 107|. |
|00000e80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000e90| 20 20 20 20 20 20 20 20 | 41 6c 65 78 20 50 65 74 | |Alex Pet|
|00000ea0| 72 6f 76 20 20 20 20 0a | 0a 20 20 20 20 20 20 20 |rov .|. |
|00000eb0| 20 20 20 20 20 20 20 20 | 20 45 2d 6d 61 69 6c 3a | | E-mail:|
|00000ec0| 20 41 50 65 74 72 6f 76 | 40 6d 69 73 69 73 2e 6d | APetrov|@misis.m|
|00000ed0| 73 6b 2e 73 75 20 20 20 | 20 20 20 0a 20 20 20 20 |sk.su | . |
|00000ee0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000ef0| 20 20 20 20 41 50 65 74 | 72 6f 76 40 61 72 6d 2e | APet|rov@arm.|
|00000f00| 6d 73 6b 2e 73 75 0a 20 | 20 20 20 20 20 20 20 20 |msk.su. | |
|00000f10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 0a | | .|
|00000f20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000f30| 46 49 44 4f 20 3a 20 20 | 32 3a 35 30 32 30 2f 31 |FIDO : |2:5020/1|
|00000f40| 30 34 2e 31 33 0a 0a 20 | 20 20 20 20 20 20 20 20 |04.13.. | |
|00000f50| 20 20 20 20 20 20 20 20 | 70 68 6f 6e 65 3a 20 2b | |phone: +|
|00000f60| 37 20 30 39 35 20 33 32 | 32 20 32 30 39 38 0a 20 |7 095 32|2 2098. |
|00000f70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000f80| 66 61 78 20 20 3a 20 2b | 37 20 30 39 35 20 32 33 |fax : +|7 095 23|
|00000f90| 36 20 38 33 35 30 00 00 | 44 41 54 41 14 01 00 00 |6 8350..|DATA....|
|00000fa0| 4c 69 73 74 20 4f 66 20 | 4d 65 6e 75 20 53 65 6c |List Of |Menu Sel|
|00000fb0| 65 63 74 69 6f 6e 73 20 | 28 4d 65 6e 75 55 74 69 |ections |(MenuUti|
|00000fc0| 6c 5f 44 65 63 6f 64 65 | 29 0a 52 31 20 2b 20 30 |l_Decode|).R1 + 0|
|00000fd0| 20 20 69 74 65 6d 20 69 | 6e 20 6d 61 69 6e 20 6d | item i|n main m|
|00000fe0| 65 6e 75 20 77 68 69 63 | 68 20 77 61 73 20 73 65 |enu whic|h was se|
|00000ff0| 6c 65 63 74 65 64 20 0a | 20 20 20 20 20 20 20 20 |lected .| |
|00001000| 28 73 74 61 72 74 69 6e | 67 20 66 72 6f 6d 20 30 |(startin|g from 0|
|00001010| 29 0a 52 31 20 2b 20 34 | 20 20 69 74 65 6d 20 69 |).R1 + 4| item i|
|00001020| 6e 20 66 69 72 73 74 20 | 73 75 62 6d 65 6e 75 20 |n first |submenu |
|00001030| 77 68 69 63 68 20 77 61 | 73 20 20 20 20 20 20 0a |which wa|s .|
|00001040| 20 20 20 20 20 20 20 20 | 73 65 6c 65 63 74 65 64 | |selected|
|00001050| 0a 52 31 20 2b 20 38 20 | 20 69 74 65 6d 20 69 6e |.R1 + 8 | item in|
|00001060| 20 73 65 63 6f 6e 64 20 | 73 75 62 6d 65 6e 75 20 | second |submenu |
|00001070| 77 68 69 63 68 20 77 61 | 73 20 20 20 20 20 0a 20 |which wa|s . |
|00001080| 20 20 20 20 20 20 20 73 | 65 6c 65 63 74 65 64 0a | s|elected.|
|00001090| 2e 2e 2e 0a 20 20 20 20 | 20 20 20 20 74 65 72 6d |.... | term|
|000010a0| 69 6e 61 74 65 64 20 62 | 79 20 2d 31 44 41 54 41 |inated b|y -1DATA|
|000010b0| 8a 02 00 00 42 6c 6f 63 | 6b 20 52 65 74 75 72 6e |....Bloc|k Return|
|000010c0| 65 64 20 49 6e 20 52 32 | 20 28 4d 65 6e 75 55 74 |ed In R2| (MenuUt|
|000010d0| 69 6c 5f 44 65 63 6f 64 | 65 29 0a 52 32 2b 30 20 |il_Decod|e).R2+0 |
|000010e0| 20 70 6f 73 69 74 69 6f | 6e 20 6f 66 20 73 65 6c | positio|n of sel|
|000010f0| 65 63 74 65 64 20 6d 65 | 6e 75 20 69 74 65 6d 20 |ected me|nu item |
|00001100| 69 6e 20 6d 65 6e 75 0a | 20 20 20 20 20 20 28 73 |in menu.| (s|
|00001110| 74 61 72 74 69 6e 67 20 | 66 72 6f 6d 20 30 29 0a |tarting |from 0).|
|00001120| 52 32 2b 34 20 20 70 6f | 69 6e 74 65 72 20 74 6f |R2+4 po|inter to|
|00001130| 20 73 65 6c 65 63 74 65 | 64 20 69 74 65 6d 20 64 | selecte|d item d|
|00001140| 61 74 61 0a 52 32 2b 38 | 20 20 73 65 6c 65 63 74 |ata.R2+8| select|
|00001150| 65 64 20 69 74 65 6d 20 | 68 61 6e 64 6c 65 20 6f |ed item |handle o|
|00001160| 72 20 7a 65 72 6f 20 69 | 66 20 69 74 65 6d 20 77 |r zero i|f item w|
|00001170| 61 73 0a 20 20 20 20 20 | 20 63 72 65 61 74 65 64 |as. | created|
|00001180| 20 77 69 74 68 6f 75 74 | 20 4d 65 6e 75 55 74 69 | without| MenuUti|
|00001190| 6c 73 0a 52 32 2b 31 32 | 20 70 6f 69 6e 74 65 72 |ls.R2+12| pointer|
|000011a0| 20 74 6f 20 74 65 78 74 | 20 73 74 72 69 6e 67 20 | to text| string |
|000011b0| 6f 66 20 73 65 6c 65 63 | 74 65 64 20 69 74 65 6d |of selec|ted item|
|000011c0| 0a 52 32 2b 31 36 20 70 | 6f 73 69 74 69 6f 6e 20 |.R2+16 p|osition |
|000011d0| 6f 66 20 70 61 72 65 6e | 74 20 6d 65 6e 75 20 69 |of paren|t menu i|
|000011e0| 74 65 6d 20 69 6e 20 6d | 65 6e 75 0a 20 20 20 20 |tem in m|enu. |
|000011f0| 20 20 28 73 74 61 72 74 | 69 6e 67 20 66 72 6f 6d | (start|ing from|
|00001200| 20 30 29 0a 52 32 2b 32 | 30 20 70 6f 69 6e 74 65 | 0).R2+2|0 pointe|
|00001210| 72 20 74 6f 20 70 61 72 | 65 6e 74 20 69 74 65 6d |r to par|ent item|
|00001220| 20 64 61 74 61 0a 52 32 | 2b 32 34 20 70 61 72 65 | data.R2|+24 pare|
|00001230| 6e 74 20 69 74 65 6d 20 | 68 61 6e 64 6c 65 20 6f |nt item |handle o|
|00001240| 72 20 7a 65 72 6f 20 69 | 66 20 69 74 65 6d 20 77 |r zero i|f item w|
|00001250| 61 73 0a 20 20 20 20 20 | 20 63 72 65 61 74 65 64 |as. | created|
|00001260| 20 77 69 74 68 6f 75 74 | 20 4d 65 6e 75 55 74 69 | without| MenuUti|
|00001270| 6c 73 0a 52 32 2b 32 38 | 20 70 6f 69 6e 74 65 72 |ls.R2+28| pointer|
|00001280| 20 74 6f 20 74 65 78 74 | 20 73 74 72 69 6e 67 20 | to text| string |
|00001290| 6f 66 20 70 61 72 65 6e | 74 20 69 74 65 6d 0a 0a |of paren|t item..|
|000012a0| 49 66 20 74 68 65 20 69 | 74 65 6d 20 68 61 73 20 |If the i|tem has |
|000012b0| 62 65 65 6e 20 73 65 6c | 65 63 74 65 64 20 66 72 |been sel|ected fr|
|000012c0| 6f 6d 20 74 68 65 20 74 | 6f 70 2d 6c 65 76 65 6c |om the t|op-level|
|000012d0| 0a 6d 65 6e 75 20 74 68 | 65 6e 20 74 68 65 72 65 |.menu th|en there|
|000012e0| 20 77 69 6c 6c 20 62 65 | 20 6e 6f 20 70 61 72 65 | will be| no pare|
|000012f0| 6e 74 20 69 74 65 6d 20 | 61 6e 64 0a 63 6f 72 72 |nt item |and.corr|
|00001300| 65 73 70 6f 6e 64 69 6e | 67 20 70 61 72 74 20 6f |espondin|g part o|
|00001310| 66 20 74 68 65 20 62 6c | 6f 63 6b 20 77 69 6c 6c |f the bl|ock will|
|00001320| 20 62 65 20 66 69 6c 6c | 65 64 0a 77 69 74 68 20 | be fill|ed.with |
|00001330| 7a 65 72 6f 73 2e 00 00 | 44 41 54 41 f1 01 00 00 |zeros...|DATA....|
|00001340| 44 69 73 70 6c 61 79 69 | 6e 67 20 4d 65 6e 75 73 |Displayi|ng Menus|
|00001350| 20 4f 6e 20 54 68 65 20 | 53 63 72 65 65 6e 0a 41 | On The |Screen.A|
|00001360| 63 63 6f 72 64 69 6e 67 | 20 74 6f 20 52 49 53 43 |ccording| to RISC|
|00001370| 20 4f 53 20 72 75 6c 65 | 73 20 79 6f 75 20 6d 75 | OS rule|s you mu|
|00001380| 73 74 20 64 69 73 70 6c | 61 79 20 6d 65 6e 75 20 |st displ|ay menu |
|00001390| 6f 6e 20 73 63 72 65 65 | 6e 20 77 68 65 6e 20 75 |on scree|n when u|
|000013a0| 73 65 72 0a 63 6c 69 63 | 6b 73 20 77 69 74 68 20 |ser.clic|ks with |
|000013b0| 4d 65 6e 75 20 62 75 74 | 74 6f 6e 20 6f 76 65 72 |Menu but|ton over|
|000013c0| 20 6f 6e 65 20 6f 66 20 | 79 6f 75 72 20 77 69 6e | one of |your win|
|000013d0| 64 6f 77 73 20 6f 72 20 | 69 63 6f 6e 62 61 72 20 |dows or |iconbar |
|000013e0| 69 63 6f 6e 2e 20 54 6f | 0a 66 69 6e 64 20 6f 75 |icon. To|.find ou|
|000013f0| 74 20 77 68 65 72 65 20 | 74 6f 20 64 69 73 70 6c |t where |to displ|
|00001400| 61 79 20 74 68 65 20 6d | 65 6e 75 20 79 6f 75 20 |ay the m|enu you |
|00001410| 68 61 76 65 20 74 6f 20 | 70 65 72 66 6f 72 6d 20 |have to |perform |
|00001420| 73 6f 6d 65 0a 63 61 6c | 63 75 6c 61 74 69 6f 6e |some.cal|culation|
|00001430| 73 2e 20 4d 65 6e 75 55 | 74 69 6c 73 20 70 72 6f |s. MenuU|tils pro|
|00001440| 76 69 64 65 73 20 61 20 | 53 57 49 20 3c 4d 65 6e |vides a |SWI <Men|
|00001450| 75 55 74 69 6c 5f 53 68 | 6f 77 3e 20 77 68 69 63 |uUtil_Sh|ow> whic|
|00001460| 68 20 77 69 6c 6c 0a 70 | 65 72 66 6f 72 6d 20 61 |h will.p|erform a|
|00001470| 6c 6c 20 6e 65 63 65 73 | 73 61 72 79 20 63 61 6c |ll neces|sary cal|
|00001480| 63 75 6c 61 74 69 6f 6e | 73 20 66 6f 72 20 79 6f |culation|s for yo|
|00001490| 75 20 61 6e 64 20 6f 70 | 65 6e 20 6d 65 6e 75 20 |u and op|en menu |
|000014a0| 69 6e 20 74 68 65 20 72 | 69 67 68 74 0a 73 63 72 |in the r|ight.scr|
|000014b0| 65 65 6e 20 70 6f 73 69 | 74 69 6f 6e 20 61 63 63 |een posi|tion acc|
|000014c0| 6f 72 64 69 6e 67 20 74 | 6f 20 52 49 53 43 20 4f |ording t|o RISC O|
|000014d0| 53 20 73 74 61 6e 64 61 | 72 64 73 2e 0a 0a 53 70 |S standa|rds...Sp|
|000014e0| 65 63 69 61 6c 20 53 57 | 49 20 69 73 20 70 72 6f |ecial SW|I is pro|
|000014f0| 76 69 64 65 64 20 74 6f | 20 64 69 73 70 6c 61 79 |vided to| display|
|00001500| 20 73 75 62 6d 65 6e 75 | 20 69 6e 20 72 65 70 6c | submenu| in repl|
|00001510| 79 20 74 6f 0a 4d 65 73 | 73 61 67 65 5f 4d 65 6e |y to.Mes|sage_Men|
|00001520| 75 57 61 72 6e 69 6e 67 | 2e 00 00 00 44 41 54 41 |uWarning|....DATA|
|00001530| 03 02 00 00 4d 65 6e 75 | 55 74 69 6c 73 20 6d 6f |....Menu|Utils mo|
|00001540| 64 75 6c 65 20 76 2e 30 | 2e 31 30 0a 3c 49 6e 74 |dule v.0|.10.<Int|
|00001550| 72 6f 64 75 63 74 69 6f | 6e 20 20 20 20 20 20 20 |roductio|n |
|00001560| 20 20 20 20 20 20 20 20 | 20 20 20 20 3d 3e 49 6e | | =>In|
|00001570| 74 72 6f 3e 0a 3c 57 68 | 61 74 20 64 6f 65 73 20 |tro>.<Wh|at does |
|00001580| 4d 65 6e 75 55 74 69 6c | 73 20 64 6f 20 3f 20 20 |MenuUtil|s do ? |
|00001590| 20 20 20 20 20 3d 3e 57 | 68 61 74 44 6f 3e 0a 3c | =>W|hatDo>.<|
|000015a0| 54 65 63 68 6e 69 63 61 | 6c 20 64 65 74 61 69 6c |Technica|l detail|
|000015b0| 73 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3d |s | =|
|000015c0| 3e 54 65 63 68 44 65 74 | 3e 0a 3c 4d 65 6e 75 20 |>TechDet|>.<Menu |
|000015d0| 68 61 6e 64 6c 65 73 20 | 20 20 20 20 20 20 20 20 |handles | |
|000015e0| 20 20 20 20 20 20 20 20 | 20 20 3d 3e 4d 48 61 6e | | =>MHan|
|000015f0| 64 6c 65 73 3e 0a 3c 4d | 65 6e 75 20 63 72 65 61 |dles>.<M|enu crea|
|00001600| 74 69 6f 6e 20 20 20 20 | 20 20 20 20 20 20 20 20 |tion | |
|00001610| 20 20 20 20 20 20 3d 3e | 4d 43 72 65 61 74 69 6f | =>|MCreatio|
|00001620| 6e 3e 0a 3c 4d 65 6e 75 | 20 6d 6f 64 69 66 69 63 |n>.<Menu| modific|
|00001630| 61 74 69 6f 6e 20 20 20 | 20 20 20 20 20 20 20 20 |ation | |
|00001640| 20 20 20 3d 3e 4d 4d 6f | 64 69 66 69 63 61 74 69 | =>MMo|dificati|
|00001650| 6f 6e 3e 0a 3c 44 69 73 | 70 6c 61 79 69 6e 67 20 |on>.<Dis|playing |
|00001660| 6d 65 6e 75 20 6f 6e 20 | 73 63 72 65 65 6e 20 20 |menu on |screen |
|00001670| 20 20 20 20 3d 3e 44 69 | 73 70 6c 61 79 69 6e 67 | =>Di|splaying|
|00001680| 3e 0a 3c 49 74 65 6d 20 | 68 61 6e 64 6c 65 72 73 |>.<Item |handlers|
|00001690| 20 61 6e 64 20 6d 65 6e | 75 20 64 65 63 6f 64 69 | and men|u decodi|
|000016a0| 6e 67 3d 3e 48 61 6e 64 | 6c 65 72 73 3e 0a 3c 4f |ng=>Hand|lers>.<O|
|000016b0| 74 68 65 72 20 66 65 61 | 74 75 72 65 73 20 20 20 |ther fea|tures |
|000016c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3d 3e | | =>|
|000016d0| 46 65 61 74 75 72 65 73 | 3e 0a 3c 41 70 70 6c 69 |Features|>.<Appli|
|000016e0| 63 61 74 69 6f 6e 20 6e | 6f 74 65 73 20 20 20 20 |cation n|otes |
|000016f0| 20 20 20 20 20 20 20 20 | 20 20 3d 3e 41 70 70 4e | | =>AppN|
|00001700| 6f 74 65 73 3e 0a 3c 4e | 6f 74 65 73 20 66 72 6f |otes>.<N|otes fro|
|00001710| 6d 20 74 68 65 20 61 75 | 74 68 6f 72 20 20 20 20 |m the au|thor |
|00001720| 20 20 20 20 20 20 3d 3e | 41 75 74 68 6f 72 3e 00 | =>|Author>.|
|00001730| 44 41 54 41 11 03 00 00 | 45 78 61 6d 70 6c 65 20 |DATA....|Example |
|00001740| 63 6f 64 65 20 28 4d 65 | 6e 75 55 74 69 6c 5f 41 |code (Me|nuUtil_A|
|00001750| 64 64 29 0a 41 64 64 20 | 69 74 65 6d 20 22 49 6e |dd).Add |item "In|
|00001760| 66 6f 22 20 74 6f 20 74 | 68 65 20 63 75 72 72 65 |fo" to t|he curre|
|00001770| 6e 74 20 6d 65 6e 75 0a | 0a 20 20 53 59 53 20 22 |nt menu.|. SYS "|
|00001780| 4d 65 6e 75 55 74 69 6c | 5f 41 64 64 22 2c 2c 22 |MenuUtil|_Add",,"|
|00001790| 49 6e 66 6f 22 20 54 4f | 20 69 6e 66 6f 49 74 65 |Info" TO| infoIte|
|000017a0| 6d 25 0a 0a 41 64 64 20 | 69 74 65 6d 20 22 51 75 |m%..Add |item "Qu|
|000017b0| 69 74 22 20 61 6e 64 20 | 74 68 65 6e 20 69 6e 73 |it" and |then ins|
|000017c0| 65 72 74 20 69 74 65 6d | 20 22 43 72 65 61 74 65 |ert item| "Create|
|000017d0| 22 20 6a 75 73 74 20 62 | 65 66 6f 72 65 20 69 74 |" just b|efore it|
|000017e0| 2e 20 20 4c 65 74 27 73 | 0a 74 68 65 20 66 69 72 |. Let's|.the fir|
|000017f0| 73 74 20 69 74 65 6d 20 | 77 69 6c 6c 20 68 61 76 |st item |will hav|
|00001800| 65 20 74 68 65 20 68 61 | 6e 64 6c 65 72 2e 20 54 |e the ha|ndler. T|
|00001810| 68 65 20 68 61 6e 64 6c | 65 72 20 69 73 20 61 73 |he handl|er is as|
|00001820| 73 75 6d 65 64 20 74 6f | 20 62 65 0a 42 41 53 49 |sumed to| be.BASI|
|00001830| 43 20 66 75 6e 63 74 69 | 6f 6e 20 46 4e 71 75 69 |C functi|on FNqui|
|00001840| 74 2e 20 28 53 65 65 20 | 3c 4d 65 6e 75 55 74 69 |t. (See |<MenuUti|
|00001850| 6c 5f 44 65 63 6f 64 65 | 3e 20 6f 6e 20 68 6f 77 |l_Decode|> on how|
|00001860| 20 74 68 69 73 20 68 61 | 6e 64 6c 65 72 20 6d 61 | this ha|ndler ma|
|00001870| 79 20 62 65 0a 63 61 6c | 6c 65 64 29 0a 0a 20 20 |y be.cal|led).. |
|00001880| 53 59 53 20 22 4d 65 6e | 75 55 74 69 6c 5f 41 64 |SYS "Men|uUtil_Ad|
|00001890| 64 22 2c 2c 22 51 75 69 | 74 22 2c 22 71 75 69 74 |d",,"Qui|t","quit|
|000018a0| 22 20 54 4f 20 71 75 69 | 74 49 74 65 6d 25 0a 20 |" TO qui|tItem%. |
|000018b0| 20 53 59 53 20 22 4d 65 | 6e 75 55 74 69 6c 5f 41 | SYS "Me|nuUtil_A|
|000018c0| 64 64 22 2c 71 75 69 74 | 49 74 65 6d 25 2c 22 43 |dd",quit|Item%,"C|
|000018d0| 72 65 61 74 65 22 20 54 | 4f 20 63 72 65 61 74 65 |reate" T|O create|
|000018e0| 49 74 65 6d 25 0a 20 20 | 0a 43 72 65 61 74 65 20 |Item%. |.Create |
|000018f0| 6d 65 6e 75 20 73 69 6d | 69 6c 61 72 20 74 6f 20 |menu sim|ilar to |
|00001900| 44 69 73 70 6c 61 79 20 | 73 75 62 6d 65 6e 75 20 |Display |submenu |
|00001910| 69 6e 20 46 69 6c 65 72 | 2e 20 57 68 65 6e 20 69 |in Filer|. When i|
|00001920| 74 65 6d 73 20 61 72 65 | 20 61 64 64 65 64 0a 74 |tems are| added.t|
|00001930| 6f 20 63 75 72 72 65 6e | 74 20 6d 65 6e 75 20 6d |o curren|t menu m|
|00001940| 65 6e 75 20 68 61 6e 64 | 6c 65 20 28 64 69 73 70 |enu hand|le (disp|
|00001950| 4d 65 6e 75 25 29 20 6d | 61 79 20 62 65 20 6f 6d |Menu%) m|ay be om|
|00001960| 69 74 74 65 64 20 61 73 | 20 69 74 20 77 69 6c 6c |itted as| it will|
|00001970| 20 62 65 0a 75 73 65 64 | 20 62 79 20 64 65 66 61 | be.used| by defa|
|00001980| 75 6c 74 2e 0a 0a 20 53 | 59 53 20 22 4d 65 6e 75 |ult... S|YS "Menu|
|00001990| 55 74 69 6c 5f 4e 65 77 | 22 2c 2c 22 44 69 73 70 |Util_New|",,"Disp|
|000019a0| 6c 61 79 22 20 54 4f 20 | 64 69 73 70 4d 65 6e 75 |lay" TO |dispMenu|
|000019b0| 25 0a 20 53 59 53 20 22 | 4d 65 6e 75 55 74 69 6c |%. SYS "|MenuUtil|
|000019c0| 5f 41 64 64 22 2c 2c 22 | 4c 61 72 67 65 20 69 63 |_Add",,"|Large ic|
|000019d0| 6f 6e 73 22 20 54 4f 20 | 6c 61 72 67 65 49 74 65 |ons" TO |largeIte|
|000019e0| 6d 25 0a 20 53 59 53 20 | 22 4d 65 6e 75 55 74 69 |m%. SYS |"MenuUti|
|000019f0| 6c 5f 41 64 64 22 2c 2c | 22 53 6d 61 6c 6c 20 69 |l_Add",,|"Small i|
|00001a00| 63 6f 6e 73 22 20 54 4f | 20 73 6d 61 6c 6c 49 74 |cons" TO| smallIt|
|00001a10| 65 6d 25 0a 20 53 59 53 | 20 22 4d 65 6e 75 55 74 |em%. SYS| "MenuUt|
|00001a20| 69 6c 5f 41 64 64 22 2c | 2c 22 46 75 6c 6c 20 69 |il_Add",|,"Full i|
|00001a30| 6e 66 6f 22 20 54 4f 20 | 66 75 6c 6c 49 74 65 6d |nfo" TO |fullItem|
|00001a40| 25 00 00 00 44 41 54 41 | 7c 00 00 00 45 78 61 6d |%...DATA||...Exam|
|00001a50| 70 6c 65 20 63 6f 64 65 | 20 28 4d 65 6e 75 55 74 |ple code| (MenuUt|
|00001a60| 69 6c 5f 43 6f 6c 6f 75 | 72 4d 65 6e 75 29 0a 43 |il_Colou|rMenu).C|
|00001a70| 72 65 61 74 65 20 63 6f | 6c 6f 75 72 20 73 65 74 |reate co|lour set|
|00001a80| 74 69 6e 67 20 6d 65 6e | 75 3a 0a 0a 20 20 53 59 |ting men|u:.. SY|
|00001a90| 53 20 22 4d 65 6e 75 55 | 74 69 6c 5f 43 6f 6c 6f |S "MenuU|til_Colo|
|00001aa0| 75 72 4d 65 6e 75 22 2c | 2c 22 43 6f 6c 6f 75 72 |urMenu",|,"Colour|
|00001ab0| 22 20 54 4f 20 63 6f 6c | 6f 75 72 4d 65 6e 75 25 |" TO col|ourMenu%|
|00001ac0| 46 52 45 45 24 00 00 00 | 2c 00 00 00 30 17 00 00 |FREE$...|,...0...|
|00001ad0| 46 fd ff ff 8e ab d1 22 | 11 03 00 00 13 00 00 00 |F......"|........|
|00001ae0| 00 00 00 00 44 41 54 41 | 75 00 00 00 45 78 61 6d |....DATA|u...Exam|
|00001af0| 70 6c 65 20 63 6f 64 65 | 20 28 4d 65 6e 75 55 74 |ple code| (MenuUt|
|00001b00| 69 6c 5f 54 69 63 6b 4f | 6e 6c 79 29 0a 54 69 63 |il_TickO|nly).Tic|
|00001b10| 6b 20 62 6c 61 63 6b 20 | 63 6f 6c 6f 75 72 20 69 |k black |colour i|
|00001b20| 6e 20 63 6f 6c 6f 75 72 | 20 6d 65 6e 75 3a 0a 0a |n colour| menu:..|
|00001b30| 20 20 53 59 53 20 22 3c | 4d 65 6e 75 55 74 69 6c | SYS "<|MenuUtil|
|00001b40| 5f 54 69 63 6b 4f 6e 6c | 79 3e 22 2c 63 6f 6c 6f |_TickOnl|y>",colo|
|00001b50| 75 72 4d 65 6e 75 25 2c | 37 00 00 00 44 41 54 41 |urMenu%,|7...DATA|
|00001b60| c3 00 00 00 45 78 61 6d | 70 6c 65 20 63 6f 64 65 |....Exam|ple code|
|00001b70| 20 28 4d 65 6e 75 55 74 | 69 6c 5f 53 68 6f 77 53 | (MenuUt|il_ShowS|
|00001b80| 75 62 4d 65 6e 75 29 0a | 44 69 73 70 6c 61 79 20 |ubMenu).|Display |
|00001b90| 66 6f 6e 74 73 20 73 75 | 62 6d 65 6e 75 20 6f 6e |fonts su|bmenu on|
|00001ba0| 20 73 63 72 65 65 6e 20 | 61 66 74 65 72 20 72 65 | screen |after re|
|00001bb0| 63 65 69 76 69 6e 67 20 | 4d 65 6e 75 57 61 72 6e |ceiving |MenuWarn|
|00001bc0| 69 6e 67 3a 0a 0a 20 20 | 53 59 53 20 22 4d 65 6e |ing:.. |SYS "Men|
|00001bd0| 75 55 74 69 6c 5f 53 75 | 62 4d 65 6e 75 22 2c 66 |uUtil_Su|bMenu",f|
|00001be0| 6f 6e 74 73 49 74 65 6d | 25 2c 66 6f 6e 74 73 4d |ontsItem|%,fontsM|
|00001bf0| 65 6e 75 25 0a 20 20 53 | 59 53 20 22 4d 65 6e 75 |enu%. S|YS "Menu|
|00001c00| 55 74 69 6c 5f 53 68 6f | 77 53 75 62 4d 65 6e 75 |Util_Sho|wSubMenu|
|00001c10| 22 2c 66 6f 6e 74 73 4d | 65 6e 75 25 2c 71 25 ff |",fontsM|enu%,q%.|
|00001c20| 44 41 54 41 79 00 00 00 | 45 78 61 6d 70 6c 65 20 |DATAy...|Example |
|00001c30| 63 6f 64 65 20 28 4d 65 | 6e 75 55 74 69 6c 5f 43 |code (Me|nuUtil_C|
|00001c40| 6f 6c 6f 75 72 73 29 0a | 43 68 61 6e 67 65 20 63 |olours).|Change c|
|00001c50| 6f 6c 6f 75 72 73 20 6f | 66 20 63 75 72 72 65 6e |olours o|f curren|
|00001c60| 74 20 69 74 65 6d 20 74 | 6f 20 62 6c 61 63 6b 20 |t item t|o black |
|00001c70| 6f 6e 20 79 65 6c 6c 6f | 77 3a 0a 0a 20 20 53 59 |on yello|w:.. SY|
|00001c80| 53 20 22 4d 65 6e 75 55 | 74 69 6c 5f 43 6f 6c 6f |S "MenuU|til_Colo|
|00001c90| 75 72 73 22 2c 2c 37 2c | 39 00 00 00 44 41 54 41 |urs",,7,|9...DATA|
|00001ca0| 55 01 00 00 45 78 61 6d | 70 6c 65 20 63 6f 64 65 |U...Exam|ple code|
|00001cb0| 20 28 4d 65 6e 75 55 74 | 69 6c 5f 44 65 63 6f 64 | (MenuUt|il_Decod|
|00001cc0| 65 29 0a 53 75 70 70 6f | 73 65 20 57 69 6d 70 5f |e).Suppo|se Wimp_|
|00001cd0| 50 6f 6c 6c 20 68 61 73 | 20 72 65 74 75 72 6e 65 |Poll has| returne|
|00001ce0| 64 20 72 65 61 73 6f 6e | 20 63 6f 64 65 20 39 0a |d reason| code 9.|
|00001cf0| 28 4d 65 6e 75 5f 53 65 | 6c 65 63 74 69 6f 6e 29 |(Menu_Se|lection)|
|00001d00| 20 61 6e 64 20 71 25 20 | 70 6f 69 6e 74 73 20 74 | and q% |points t|
|00001d10| 6f 20 74 68 65 0a 63 6f | 72 72 65 73 70 6f 6e 64 |o the.co|rrespond|
|00001d20| 69 6e 67 20 62 6c 6f 63 | 6b 2e 20 59 6f 75 20 63 |ing bloc|k. You c|
|00001d30| 61 6e 20 75 73 65 0a 4d | 65 6e 75 55 74 69 6c 5f |an use.M|enuUtil_|
|00001d40| 44 65 63 6f 64 65 20 74 | 6f 20 63 61 6c 6c 20 74 |Decode t|o call t|
|00001d50| 68 65 20 69 74 65 6d 20 | 68 61 6e 64 6c 65 72 20 |he item |handler |
|00001d60| 69 6e 0a 74 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |in.the f|ollowing|
|00001d70| 20 77 61 79 3a 0a 0a 20 | 20 53 59 53 20 22 4d 65 | way:.. | SYS "Me|
|00001d80| 6e 75 55 74 69 6c 5f 44 | 65 63 6f 64 65 22 2c 2c |nuUtil_D|ecode",,|
|00001d90| 71 25 20 54 4f 20 68 61 | 6e 64 6c 65 72 25 20 20 |q% TO ha|ndler% |
|00001da0| 20 20 20 20 0a 20 20 49 | 46 20 68 61 6e 64 6c 65 | . I|F handle|
|00001db0| 72 25 20 54 48 45 4e 0a | 20 20 20 20 68 61 6e 64 |r% THEN.| hand|
|00001dc0| 6c 65 72 24 3d 22 46 4e | 22 2b 24 68 61 6e 64 6c |ler$="FN|"+$handl|
|00001dd0| 65 72 25 0a 20 20 20 20 | 49 46 20 45 56 41 4c 28 |er%. |IF EVAL(|
|00001de0| 68 61 6e 64 6c 65 72 24 | 29 0a 20 20 45 4e 44 49 |handler$|). ENDI|
|00001df0| 46 00 00 00 44 41 54 41 | c8 00 00 00 45 78 61 6d |F...DATA|....Exam|
|00001e00| 70 6c 65 20 63 6f 64 65 | 20 28 4d 65 6e 75 55 74 |ple code| (MenuUt|
|00001e10| 69 6c 5f 44 65 6c 65 74 | 65 29 0a 44 65 6c 65 74 |il_Delet|e).Delet|
|00001e20| 65 20 69 74 65 6d 20 77 | 69 74 68 20 68 61 6e 64 |e item w|ith hand|
|00001e30| 6c 65 20 74 6d 70 49 74 | 65 6d 25 3a 0a 0a 20 20 |le tmpIt|em%:.. |
|00001e40| 53 59 53 20 22 4d 65 6e | 75 55 74 69 6c 5f 44 65 |SYS "Men|uUtil_De|
|00001e50| 6c 65 74 65 22 2c 74 6d | 70 49 74 65 6d 25 0a 0a |lete",tm|pItem%..|
|00001e60| 52 65 63 75 72 73 69 76 | 65 6c 79 20 64 65 6c 65 |Recursiv|ely dele|
|00001e70| 74 65 20 61 6c 6c 20 6d | 65 6e 75 73 20 6c 69 6e |te all m|enus lin|
|00001e80| 6b 65 64 20 77 69 74 68 | 20 6d 61 69 6e 4d 65 6e |ked with| mainMen|
|00001e90| 75 25 3a 0a 20 0a 20 20 | 53 59 53 20 22 4d 65 6e |u%:. . |SYS "Men|
|00001ea0| 75 55 74 69 6c 5f 44 65 | 6c 65 74 65 22 2c 6d 61 |uUtil_De|lete",ma|
|00001eb0| 69 6e 4d 65 6e 75 25 2c | 54 52 55 45 44 41 54 41 |inMenu%,|TRUEDATA|
|00001ec0| 71 00 00 00 45 78 61 6d | 70 6c 65 20 63 6f 64 65 |q...Exam|ple code|
|00001ed0| 20 28 4d 65 6e 75 55 74 | 69 6c 5f 44 6f 74 73 29 | (MenuUt|il_Dots)|
|00001ee0| 0a 44 69 73 70 6c 61 79 | 20 64 6f 74 74 65 64 20 |.Display| dotted |
|00001ef0| 6c 69 6e 65 20 61 66 74 | 65 72 20 74 68 65 20 63 |line aft|er the c|
|00001f00| 75 72 72 65 6e 74 20 6d | 65 6e 75 20 69 74 65 6d |urrent m|enu item|
|00001f10| 0a 0a 20 20 53 59 53 20 | 22 4d 65 6e 75 55 74 69 |.. SYS |"MenuUti|
|00001f20| 6c 5f 44 6f 74 73 22 2c | 2c 54 52 55 45 00 00 00 |l_Dots",|,TRUE...|
|00001f30| 44 41 54 41 c1 00 00 00 | 45 78 61 6d 70 6c 65 20 |DATA....|Example |
|00001f40| 63 6f 64 65 20 28 4d 65 | 6e 75 55 74 69 6c 5f 46 |code (Me|nuUtil_F|
|00001f50| 61 64 65 29 0a 46 61 64 | 65 20 63 75 72 72 65 6e |ade).Fad|e curren|
|00001f60| 74 20 6d 65 6e 75 20 69 | 74 65 6d 3a 0a 0a 20 20 |t menu i|tem:.. |
|00001f70| 53 59 53 20 22 3c 4d 65 | 6e 75 55 74 69 6c 5f 46 |SYS "<Me|nuUtil_F|
|00001f80| 61 64 65 3e 22 2c 2c 54 | 52 55 45 0a 0a 46 61 64 |ade>",,T|RUE..Fad|
|00001f90| 65 20 61 6c 6c 20 69 74 | 65 6d 73 20 69 6e 20 22 |e all it|ems in "|
|00001fa0| 53 65 6c 65 63 74 22 20 | 73 75 62 6d 65 6e 75 20 |Select" |submenu |
|00001fb0| 77 69 74 68 20 68 61 6e | 64 6c 65 20 73 65 6c 65 |with han|dle sele|
|00001fc0| 63 74 4d 65 6e 75 25 0a | 0a 20 20 53 59 53 20 22 |ctMenu%.|. SYS "|
|00001fd0| 3c 4d 65 6e 75 55 74 69 | 6c 5f 46 61 64 65 3e 22 |<MenuUti|l_Fade>"|
|00001fe0| 2c 73 65 6c 65 63 74 4d | 65 6e 75 25 2c 54 52 55 |,selectM|enu%,TRU|
|00001ff0| 45 00 00 00 44 41 54 41 | 76 00 00 00 45 78 61 6d |E...DATA|v...Exam|
|00002000| 70 6c 65 20 63 6f 64 65 | 20 28 4d 65 6e 75 55 74 |ple code| (MenuUt|
|00002010| 69 6c 5f 49 6e 69 74 69 | 61 6c 69 73 65 29 0a 52 |il_Initi|alise).R|
|00002020| 65 67 69 73 74 65 72 20 | 74 68 65 20 74 61 73 6b |egister |the task|
|00002030| 20 77 69 74 68 20 61 6e | 79 20 76 65 72 73 69 6f | with an|y versio|
|00002040| 6e 20 6f 66 20 74 68 65 | 20 6d 6f 64 75 6c 65 0a |n of the| module.|
|00002050| 0a 53 59 53 20 22 4d 65 | 6e 75 55 74 69 6c 5f 49 |.SYS "Me|nuUtil_I|
|00002060| 6e 69 74 69 61 6c 69 73 | 65 22 00 00 44 41 54 41 |nitialis|e"..DATA|
|00002070| 85 01 00 00 45 78 61 6d | 70 6c 65 20 63 6f 64 65 |....Exam|ple code|
|00002080| 20 28 4d 65 6e 75 55 74 | 69 6c 5f 4e 65 77 29 0a | (MenuUt|il_New).|
|00002090| 53 74 61 72 74 20 63 6f | 6e 73 74 72 75 63 74 69 |Start co|nstructi|
|000020a0| 6f 6e 20 6f 66 20 73 69 | 6d 70 6c 65 20 6d 65 6e |on of si|mple men|
|000020b0| 75 20 6c 69 6b 65 20 6f | 6e 65 20 69 6e 20 50 61 |u like o|ne in Pa|
|000020c0| 6c 65 74 74 65 20 55 74 | 69 6c 69 74 79 0a 0a 20 |lette Ut|ility.. |
|000020d0| 20 53 59 53 20 22 4d 65 | 6e 75 55 74 69 6c 5f 4e | SYS "Me|nuUtil_N|
|000020e0| 65 77 22 2c 2c 22 50 61 | 6c 65 74 74 65 22 20 0a |ew",,"Pa|lette" .|
|000020f0| 0a 49 66 20 79 6f 75 20 | 70 72 6f 67 72 61 6d 20 |.If you |program |
|00002100| 68 61 73 20 63 6f 6d 70 | 6c 65 78 20 6d 65 6e 75 |has comp|lex menu|
|00002110| 20 73 74 72 75 63 74 75 | 72 65 20 28 6c 69 6b 65 | structu|re (like|
|00002120| 20 53 6f 75 72 63 65 20 | 45 64 69 74 6f 72 29 20 | Source |Editor) |
|00002130| 74 68 65 6e 20 79 6f 75 | 0a 68 61 76 65 20 74 6f |then you|.have to|
|00002140| 20 72 65 6d 65 6d 62 65 | 72 20 74 68 65 20 68 61 | remembe|r the ha|
|00002150| 6e 64 6c 65 73 20 6f 66 | 20 61 6c 6c 20 73 75 62 |ndles of| all sub|
|00002160| 6d 65 6e 75 73 0a 0a 20 | 20 53 59 53 20 22 4d 65 |menus.. | SYS "Me|
|00002170| 6e 75 55 74 69 6c 5f 4e | 65 77 22 2c 2c 22 53 72 |nuUtil_N|ew",,"Sr|
|00002180| 63 45 64 69 74 22 20 54 | 4f 20 6d 61 69 6e 4d 65 |cEdit" T|O mainMe|
|00002190| 6e 75 25 0a 20 20 53 59 | 53 20 22 4d 65 6e 75 55 |nu%. SY|S "MenuU|
|000021a0| 74 69 6c 5f 4e 65 77 22 | 2c 2c 22 44 69 73 70 6c |til_New"|,,"Displ|
|000021b0| 61 79 22 20 54 4f 20 64 | 69 73 70 4d 65 6e 75 25 |ay" TO d|ispMenu%|
|000021c0| 0a 20 20 53 59 53 20 22 | 4d 65 6e 75 55 74 69 6c |. SYS "|MenuUtil|
|000021d0| 5f 4e 65 77 22 2c 2c 22 | 46 6f 6e 74 73 22 2c 32 |_New",,"|Fonts",2|
|000021e0| 30 30 20 20 54 4f 20 66 | 6f 6e 74 73 4d 65 6e 75 |00 TO f|ontsMenu|
|000021f0| 25 00 00 00 44 41 54 41 | 5e 01 00 00 45 78 61 6d |%...DATA|^...Exam|
|00002200| 70 6c 65 20 63 6f 64 65 | 20 28 4d 65 6e 75 55 74 |ple code| (MenuUt|
|00002210| 69 6c 5f 53 68 6f 77 29 | 0a 53 75 70 70 6f 73 65 |il_Show)|.Suppose|
|00002220| 20 57 69 6d 70 5f 50 6f | 6c 6c 20 68 61 73 20 72 | Wimp_Po|ll has r|
|00002230| 65 74 75 72 6e 65 64 20 | 72 65 61 73 6f 6e 20 63 |eturned |reason c|
|00002240| 6f 64 65 20 36 20 28 4d | 6f 75 73 65 5f 43 6c 69 |ode 6 (M|ouse_Cli|
|00002250| 63 6b 29 20 61 6e 64 20 | 71 25 20 70 6f 69 6e 74 |ck) and |q% point|
|00002260| 73 20 74 6f 0a 74 68 65 | 20 72 65 74 75 72 6e 65 |s to.the| returne|
|00002270| 64 20 62 6c 6f 63 6b 2e | 20 44 69 73 70 6c 61 79 |d block.| Display|
|00002280| 20 6d 65 6e 75 20 6f 6e | 20 73 63 72 65 65 6e 20 | menu on| screen |
|00002290| 69 66 20 74 68 65 20 63 | 6c 69 63 6b 20 69 73 20 |if the c|lick is |
|000022a0| 77 69 74 68 20 4d 65 6e | 75 20 62 75 74 74 6f 6e |with Men|u button|
|000022b0| 2e 0a 0a 20 20 62 75 74 | 74 6f 6e 73 25 3d 71 25 |... but|tons%=q%|
|000022c0| 21 38 0a 20 20 49 46 20 | 28 62 75 74 74 6f 6e 73 |!8. IF |(buttons|
|000022d0| 25 20 41 4e 44 32 29 3c | 3e 30 20 54 48 45 4e 20 |% AND2)<|>0 THEN |
|000022e0| 53 59 53 20 22 4d 65 6e | 75 55 74 69 6c 5f 53 68 |SYS "Men|uUtil_Sh|
|000022f0| 6f 77 22 2c 6d 61 69 6e | 4d 65 6e 75 25 2c 71 25 |ow",main|Menu%,q%|
|00002300| 0a 20 20 0a 4c 65 61 76 | 65 20 6d 65 6e 75 20 6f |. .Leav|e menu o|
|00002310| 6e 20 73 63 72 65 65 6e | 20 61 66 74 65 72 20 73 |n screen| after s|
|00002320| 65 6c 65 63 74 69 6f 6e | 20 77 69 74 68 20 41 64 |election| with Ad|
|00002330| 6a 75 73 74 20 62 75 74 | 74 6f 6e 0a 0a 20 20 53 |just but|ton.. S|
|00002340| 59 53 20 22 4d 65 6e 75 | 55 74 69 6c 5f 53 68 6f |YS "Menu|Util_Sho|
|00002350| 77 22 00 00 44 49 52 24 | 80 02 00 00 38 02 00 00 |w"..DIR$|....8...|
|00002360| 30 17 00 00 46 fd ff ff | 8e ab d1 22 11 03 00 00 |0...F...|..."....|
|00002370| 13 00 00 00 00 00 00 00 | 41 64 64 00 44 1a 00 00 |........|Add.D...|
|00002380| 46 fd ff ff 90 ab d1 22 | 7c 00 00 00 13 00 00 00 |F......"||.......|
|00002390| 00 00 00 00 43 6f 6c 6f | 75 72 4d 65 6e 75 00 00 |....Colo|urMenu..|
|000023a0| 20 1c 00 00 46 fd ff ff | 91 ab d1 22 79 00 00 00 | ...F...|..."y...|
|000023b0| 13 00 00 00 00 00 00 00 | 43 6f 6c 6f 75 72 73 00 |........|Colours.|
|000023c0| 9c 1c 00 00 46 fd ff ff | 93 ab d1 22 55 01 00 00 |....F...|..."U...|
|000023d0| 13 00 00 00 00 00 00 00 | 44 65 63 6f 64 65 00 00 |........|Decode..|
|000023e0| f4 1d 00 00 46 fd ff ff | 94 ab d1 22 c8 00 00 00 |....F...|..."....|
|000023f0| 13 00 00 00 00 00 00 00 | 44 65 6c 65 74 65 00 00 |........|Delete..|
|00002400| bc 1e 00 00 46 fd ff ff | 96 ab d1 22 71 00 00 00 |....F...|..."q...|
|00002410| 13 00 00 00 00 00 00 00 | 44 6f 74 73 00 00 00 00 |........|Dots....|
|00002420| 30 1f 00 00 46 fd ff ff | 9a ab d1 22 c1 00 00 00 |0...F...|..."....|
|00002430| 13 00 00 00 00 00 00 00 | 46 61 64 65 00 00 00 00 |........|Fade....|
|00002440| f4 1f 00 00 46 fd ff ff | 9c ab d1 22 76 00 00 00 |....F...|..."v...|
|00002450| 13 00 00 00 00 00 00 00 | 49 6e 69 74 69 61 6c 69 |........|Initiali|
|00002460| 73 65 00 00 6c 20 00 00 | 46 fd ff ff 9d ab d1 22 |se..l ..|F......"|
|00002470| 85 01 00 00 13 00 00 00 | 00 00 00 00 4e 65 77 00 |........|....New.|
|00002480| f4 21 00 00 46 fd ff ff | 9e ab d1 22 5e 01 00 00 |.!..F...|..."^...|
|00002490| 13 00 00 00 00 00 00 00 | 53 68 6f 77 00 00 00 00 |........|Show....|
|000024a0| 5c 1b 00 00 46 fd ff ff | a0 ab d1 22 c3 00 00 00 |\...F...|..."....|
|000024b0| 13 00 00 00 00 00 00 00 | 53 68 6f 77 53 75 62 4d |........|ShowSubM|
|000024c0| 65 6e 75 00 d4 25 00 00 | 46 fd ff ff a2 ab d1 22 |enu..%..|F......"|
|000024d0| 4b 01 00 00 13 00 00 00 | 00 00 00 00 53 75 62 6d |K.......|....Subm|
|000024e0| 65 6e 75 00 20 27 00 00 | 46 fd ff ff a4 ab d1 22 |enu. '..|F......"|
|000024f0| c3 02 00 00 13 00 00 00 | 00 00 00 00 54 65 78 74 |........|....Text|
|00002500| 00 00 00 00 e4 29 00 00 | 46 fd ff ff a5 ab d1 22 |.....)..|F......"|
|00002510| e4 00 00 00 13 00 00 00 | 00 00 00 00 54 69 63 6b |........|....Tick|
|00002520| 00 00 00 00 e4 1a 00 00 | 46 fd ff ff ab ab d1 22 |........|F......"|
|00002530| 75 00 00 00 13 00 00 00 | 00 00 00 00 54 69 63 6b |u.......|....Tick|
|00002540| 4f 6e 6c 79 00 00 00 00 | c8 2a 00 00 46 fd ff ff |Only....|.*..F...|
|00002550| ac ab d1 22 84 00 00 00 | 13 00 00 00 00 00 00 00 |..."....|........|
|00002560| 57 61 72 6e 69 6e 67 00 | 4c 2b 00 00 46 fd ff ff |Warning.|L+..F...|
|00002570| ad ab d1 22 1f 01 00 00 | 13 00 00 00 00 00 00 00 |..."....|........|
|00002580| 57 72 69 74 61 62 6c 65 | 00 00 00 00 ff ff ff ff |Writable|........|
|00002590| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|000025a0| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|000025b0| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|000025c0| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|000025d0| ff ff ff ff 44 41 54 41 | 4b 01 00 00 45 78 61 6d |....DATA|K...Exam|
|000025e0| 70 6c 65 20 63 6f 64 65 | 20 28 4d 65 6e 75 55 74 |ple code| (MenuUt|
|000025f0| 69 6c 5f 53 75 62 6d 65 | 6e 75 29 0a 43 6f 6e 6e |il_Subme|nu).Conn|
|00002600| 65 63 74 20 22 41 62 6f | 75 74 20 74 68 69 73 20 |ect "Abo|ut this |
|00002610| 70 72 6f 67 72 61 6d 22 | 20 77 69 6e 64 6f 77 20 |program"| window |
|00002620| 74 6f 20 74 68 65 20 69 | 74 65 6d 20 22 49 6e 66 |to the i|tem "Inf|
|00002630| 6f 22 3a 0a 20 0a 20 20 | 53 59 53 20 22 57 69 6d |o":. . |SYS "Wim|
|00002640| 70 5f 43 72 65 61 74 65 | 57 69 6e 64 6f 77 22 2c |p_Create|Window",|
|00002650| 2c 62 6c 6f 63 6b 25 20 | 54 4f 20 69 6e 66 6f 57 |,block% |TO infoW|
|00002660| 69 6e 64 6f 77 25 0a 20 | 20 53 59 53 20 22 4d 65 |indow%. | SYS "Me|
|00002670| 6e 75 55 74 69 6c 5f 53 | 75 62 6d 65 6e 75 22 2c |nuUtil_S|ubmenu",|
|00002680| 69 6e 66 6f 49 74 65 6d | 25 2c 69 6e 66 6f 57 69 |infoItem|%,infoWi|
|00002690| 6e 64 6f 77 25 0a 0a 43 | 72 65 61 74 65 20 22 44 |ndow%..C|reate "D|
|000026a0| 69 73 70 6c 61 79 22 20 | 69 74 65 6d 20 69 6e 20 |isplay" |item in |
|000026b0| 66 69 6c 65 72 20 6d 65 | 6e 75 3a 0a 0a 20 20 53 |filer me|nu:.. S|
|000026c0| 59 53 20 22 4d 65 6e 75 | 55 74 69 6c 5f 4e 65 77 |YS "Menu|Util_New|
|000026d0| 22 2c 2c 22 46 69 6c 65 | 72 22 0a 20 20 53 59 53 |",,"File|r". SYS|
|000026e0| 20 22 4d 65 6e 75 55 74 | 69 6c 5f 41 64 64 22 2c | "MenuUt|il_Add",|
|000026f0| 2c 22 44 69 73 70 6c 61 | 79 22 0a 20 20 53 59 53 |,"Displa|y". SYS|
|00002700| 20 22 4d 65 6e 75 55 74 | 69 6c 5f 53 75 62 6d 65 | "MenuUt|il_Subme|
|00002710| 6e 75 22 2c 2c 64 69 73 | 70 4d 65 6e 75 25 20 00 |nu",,dis|pMenu% .|
|00002720| 44 41 54 41 c3 02 00 00 | 45 78 61 6d 70 6c 65 20 |DATA....|Example |
|00002730| 63 6f 64 65 20 28 4d 65 | 6e 75 55 74 69 6c 5f 54 |code (Me|nuUtil_T|
|00002740| 65 78 74 29 0a 53 65 74 | 20 6e 65 77 20 6d 65 6e |ext).Set| new men|
|00002750| 75 20 74 69 74 6c 65 20 | 73 74 72 69 6e 67 3a 0a |u title |string:.|
|00002760| 0a 20 20 53 59 53 20 22 | 4d 65 6e 75 55 74 69 6c |. SYS "|MenuUtil|
|00002770| 5f 54 65 78 74 22 2c 6f | 62 6a 65 63 74 4d 65 6e |_Text",o|bjectMen|
|00002780| 75 25 2c 22 44 69 72 65 | 63 74 6f 72 79 22 0a 0a |u%,"Dire|ctory"..|
|00002790| 4c 65 74 27 73 20 76 61 | 72 69 61 62 6c 65 20 74 |Let's va|riable t|
|000027a0| 79 70 65 25 20 63 6f 6e | 74 61 69 6e 73 20 6f 6e |ype% con|tains on|
|000027b0| 65 20 6f 66 20 74 68 65 | 20 76 61 6c 75 65 73 20 |e of the| values |
|000027c0| 30 2c 31 2c 32 20 6f 72 | 20 33 20 64 65 70 65 6e |0,1,2 or| 3 depen|
|000027d0| 64 69 6e 67 20 6f 6e 20 | 74 68 65 0a 6f 62 6a 65 |ding on |the.obje|
|000027e0| 63 74 20 73 65 6c 65 63 | 74 65 64 20 69 6e 20 46 |ct selec|ted in F|
|000027f0| 69 6c 65 72 20 77 69 6e | 64 6f 77 20 61 6e 64 20 |iler win|dow and |
|00002800| 76 61 72 69 61 62 6c 65 | 20 6e 61 6d 65 24 20 63 |variable| name$ c|
|00002810| 6f 6e 74 61 69 6e 73 20 | 74 68 65 20 6e 61 6d 65 |ontains |the name|
|00002820| 20 6f 66 20 74 68 65 0a | 66 69 6c 65 20 6f 72 20 | of the.|file or |
|00002830| 64 69 72 65 63 74 6f 72 | 79 20 73 65 6c 65 63 74 |director|y select|
|00002840| 65 64 2e 20 20 0a 0a 20 | 20 43 41 53 45 20 74 79 |ed. .. | CASE ty|
|00002850| 70 65 25 20 4f 46 0a 20 | 20 20 20 57 48 45 4e 20 |pe% OF. | WHEN |
|00002860| 30 3a 69 24 3d 22 46 69 | 6c 65 20 27 27 22 0a 20 |0:i$="Fi|le ''". |
|00002870| 20 20 20 57 48 45 4e 20 | 31 3a 69 24 3d 22 46 69 | WHEN |1:i$="Fi|
|00002880| 6c 65 20 27 22 2b 6e 61 | 6d 65 24 2b 22 27 22 3a |le '"+na|me$+"'":|
|00002890| 73 24 3d 22 46 69 6c 65 | 22 0a 20 20 20 20 57 48 |s$="File|". WH|
|000028a0| 45 4e 20 32 3a 69 24 3d | 22 44 69 72 2e 20 27 22 |EN 2:i$=|"Dir. '"|
|000028b0| 2b 6e 61 6d 65 24 2b 22 | 27 22 3a 73 24 3d 22 44 |+name$+"|'":s$="D|
|000028c0| 69 72 65 63 74 6f 72 79 | 22 0a 20 20 20 20 57 48 |irectory|". WH|
|000028d0| 45 4e 20 33 3a 69 24 3d | 22 53 65 6c 65 63 74 69 |EN 3:i$=|"Selecti|
|000028e0| 6f 6e 22 3a 73 24 3d 69 | 24 0a 20 20 45 4e 44 43 |on":s$=i|$. ENDC|
|000028f0| 41 53 45 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |ASE. | |
|00002900| 20 20 20 20 20 20 20 0a | 52 45 4d 20 66 61 64 65 | .|REM fade|
|00002910| 20 74 68 65 20 69 74 65 | 6d 20 69 66 20 6e 6f 74 | the ite|m if not|
|00002920| 68 69 6e 67 20 69 73 20 | 73 65 6c 65 63 74 65 64 |hing is |selected|
|00002930| 0a 0a 20 20 53 59 53 20 | 22 4d 65 6e 75 55 74 69 |.. SYS |"MenuUti|
|00002940| 6c 5f 46 61 64 65 22 2c | 6f 62 6a 65 63 74 49 74 |l_Fade",|objectIt|
|00002950| 65 6d 25 2c 74 79 70 65 | 25 3d 30 20 20 20 20 20 |em%,type|%=0 |
|00002960| 20 20 20 20 20 20 0a 0a | 52 45 4d 20 73 65 74 20 | ..|REM set |
|00002970| 6e 65 77 20 69 74 65 6d | 20 74 65 78 74 0a 0a 20 |new item| text.. |
|00002980| 20 53 59 53 20 22 4d 65 | 6e 75 55 74 69 6c 5f 54 | SYS "Me|nuUtil_T|
|00002990| 65 78 74 22 2c 2c 69 24 | 0a 20 20 20 20 20 20 20 |ext",,i$|. |
|000029a0| 20 20 20 20 0a 52 45 4d | 20 73 65 74 20 6e 65 77 | .REM| set new|
|000029b0| 20 73 75 62 6d 65 6e 75 | 20 74 69 74 6c 65 0a 0a | submenu| title..|
|000029c0| 20 20 53 59 53 20 22 4d | 65 6e 75 55 74 69 6c 5f | SYS "M|enuUtil_|
|000029d0| 54 65 78 74 22 2c 74 6f | 6f 6c 73 4d 65 6e 75 25 |Text",to|olsMenu%|
|000029e0| 2c 73 24 00 44 41 54 41 | e4 00 00 00 45 78 61 6d |,s$.DATA|....Exam|
|000029f0| 70 6c 65 20 63 6f 64 65 | 20 28 4d 65 6e 75 55 74 |ple code| (MenuUt|
|00002a00| 69 6c 5f 54 69 63 6b 29 | 0a 54 69 63 6b 20 6f 6e |il_Tick)|.Tick on|
|00002a10| 65 20 6f 66 20 74 68 65 | 20 69 74 65 6d 73 20 64 |e of the| items d|
|00002a20| 65 70 65 6e 64 69 6e 67 | 20 6f 6e 20 74 68 65 20 |epending| on the |
|00002a30| 76 61 6c 75 65 20 6f 66 | 20 76 61 72 69 61 62 6c |value of| variabl|
|00002a40| 65 20 64 69 73 70 25 3a | 0a 0a 20 20 53 59 53 20 |e disp%:|.. SYS |
|00002a50| 22 4d 65 6e 75 55 74 69 | 6c 5f 54 69 63 6b 22 2c |"MenuUti|l_Tick",|
|00002a60| 6c 61 72 67 65 49 74 65 | 6d 25 2c 28 64 69 73 70 |largeIte|m%,(disp|
|00002a70| 25 3d 31 29 0a 20 20 53 | 59 53 20 22 4d 65 6e 75 |%=1). S|YS "Menu|
|00002a80| 55 74 69 6c 5f 54 69 63 | 6b 22 2c 73 6d 61 6c 6c |Util_Tic|k",small|
|00002a90| 49 74 65 6d 2c 28 64 69 | 73 70 25 3d 32 29 0a 20 |Item,(di|sp%=2). |
|00002aa0| 20 53 59 53 20 22 4d 65 | 6e 75 55 74 69 6c 5f 54 | SYS "Me|nuUtil_T|
|00002ab0| 69 63 6b 22 2c 66 75 6c | 6c 49 74 65 6d 25 2c 28 |ick",ful|lItem%,(|
|00002ac0| 64 69 73 70 25 3d 33 29 | 44 41 54 41 84 00 00 00 |disp%=3)|DATA....|
|00002ad0| 45 78 61 6d 70 6c 65 20 | 63 6f 64 65 20 28 4d 65 |Example |code (Me|
|00002ae0| 6e 75 55 74 69 6c 5f 57 | 61 72 6e 69 6e 67 29 0a |nuUtil_W|arning).|
|00002af0| 47 65 6e 65 72 61 74 65 | 20 6d 65 73 73 61 67 65 |Generate| message|
|00002b00| 20 77 68 65 6e 20 6d 6f | 76 69 6e 67 20 74 6f 20 | when mo|ving to |
|00002b10| 74 68 65 20 66 6f 6e 74 | 73 20 73 75 62 6d 65 6e |the font|s submen|
|00002b20| 75 3a 0a 0a 20 20 53 59 | 53 20 22 4d 65 6e 75 55 |u:.. SY|S "MenuU|
|00002b30| 74 69 6c 5f 57 61 72 6e | 69 6e 67 22 2c 66 6f 6e |til_Warn|ing",fon|
|00002b40| 74 73 49 74 65 6d 25 2c | 54 52 55 45 44 41 54 41 |tsItem%,|TRUEDATA|
|00002b50| 1f 01 00 00 45 78 61 6d | 70 6c 65 20 63 6f 64 65 |....Exam|ple code|
|00002b60| 20 28 4d 65 6e 75 55 74 | 69 6c 5f 57 72 69 74 61 | (MenuUt|il_Writa|
|00002b70| 62 6c 65 29 0a 4d 61 6b | 65 20 63 75 72 72 65 6e |ble).Mak|e curren|
|00002b80| 74 20 69 74 65 6d 20 77 | 72 69 74 61 62 6c 65 20 |t item w|ritable |
|00002b90| 77 69 74 68 6f 75 74 20 | 76 61 6c 69 64 61 74 69 |without |validati|
|00002ba0| 6f 6e 20 73 74 72 69 6e | 67 3a 0a 0a 20 20 53 59 |on strin|g:.. SY|
|00002bb0| 53 20 22 4d 65 6e 75 55 | 74 69 6c 5f 57 72 69 74 |S "MenuU|til_Writ|
|00002bc0| 61 62 6c 65 22 2c 2c 54 | 52 55 45 0a 0a 4d 61 6b |able",,T|RUE..Mak|
|00002bd0| 65 20 6d 65 6e 75 20 69 | 74 65 6d 20 77 69 74 68 |e menu i|tem with|
|00002be0| 20 68 61 6e 64 6c 65 20 | 77 69 64 74 68 49 74 65 | handle |widthIte|
|00002bf0| 6d 25 20 77 72 69 74 61 | 62 6c 65 2c 20 77 69 74 |m% writa|ble, wit|
|00002c00| 68 20 62 75 66 66 65 72 | 20 73 69 7a 65 20 34 30 |h buffer| size 40|
|00002c10| 20 61 6e 64 0a 61 6c 6c | 6f 77 20 74 6f 20 65 6e | and.all|ow to en|
|00002c20| 74 65 72 20 74 6f 20 69 | 74 20 6f 6e 6c 79 20 64 |ter to i|t only d|
|00002c30| 69 67 69 74 73 3a 0a 0a | 20 20 53 59 53 20 22 4d |igits:..| SYS "M|
|00002c40| 65 6e 75 55 74 69 6c 5f | 57 72 69 74 61 62 6c 65 |enuUtil_|Writable|
|00002c50| 22 2c 77 69 64 74 68 49 | 74 65 6d 25 2c 54 52 55 |",widthI|tem%,TRU|
|00002c60| 45 2c 34 30 2c 22 41 30 | 2d 39 22 00 44 41 54 41 |E,40,"A0|-9".DATA|
|00002c70| db 00 00 00 4f 74 68 65 | 72 20 46 65 61 74 75 72 |....Othe|r Featur|
|00002c80| 65 73 0a 4d 61 6e 79 20 | 61 70 70 6c 69 63 61 74 |es.Many |applicat|
|00002c90| 69 6f 6e 73 20 75 73 65 | 20 73 74 61 6e 64 61 72 |ions use| standar|
|00002ca0| 64 20 6d 65 6e 75 20 61 | 6c 6c 6f 77 69 6e 67 20 |d menu a|llowing |
|00002cb0| 75 73 65 72 20 74 6f 20 | 73 65 6c 65 63 74 20 61 |user to |select a|
|00002cc0| 20 63 6f 6c 6f 75 72 0a | 66 72 6f 6d 20 73 74 61 | colour.|from sta|
|00002cd0| 6e 64 61 72 64 20 64 65 | 73 6b 74 6f 70 20 63 6f |ndard de|sktop co|
|00002ce0| 6c 6f 75 72 73 2e 20 4d | 65 6e 75 55 74 69 6c 73 |lours. M|enuUtils|
|00002cf0| 20 70 72 6f 76 69 64 65 | 73 20 61 20 73 70 65 63 | provide|s a spec|
|00002d00| 69 61 6c 20 53 57 49 0a | 22 3c 4d 65 6e 75 55 74 |ial SWI.|"<MenuUt|
|00002d10| 69 6c 5f 43 6f 6c 6f 75 | 72 4d 65 6e 75 3e 22 20 |il_Colou|rMenu>" |
|00002d20| 77 68 69 63 68 20 63 72 | 65 61 74 65 73 20 73 75 |which cr|eates su|
|00002d30| 63 68 20 63 6f 6c 6f 75 | 72 20 73 65 74 74 69 6e |ch colou|r settin|
|00002d40| 67 20 6d 65 6e 75 2e 00 | 44 41 54 41 e3 03 00 00 |g menu..|DATA....|
|00002d50| 49 74 65 6d 20 48 61 6e | 64 6c 65 72 73 20 41 6e |Item Han|dlers An|
|00002d60| 64 20 4d 65 6e 75 20 44 | 65 63 6f 64 69 6e 67 0a |d Menu D|ecoding.|
|00002d70| 54 68 65 20 6d 65 63 68 | 61 6e 69 73 6d 20 6f 66 |The mech|anism of|
|00002d80| 20 69 74 65 6d 20 68 61 | 6e 64 6c 65 72 73 20 61 | item ha|ndlers a|
|00002d90| 6c 6c 6f 77 73 20 74 6f | 20 6c 69 6e 6b 20 65 61 |llows to| link ea|
|00002da0| 63 68 20 6d 65 6e 75 20 | 69 74 65 6d 20 77 69 74 |ch menu |item wit|
|00002db0| 68 0a 69 6e 64 69 76 69 | 64 75 61 6c 20 69 74 65 |h.indivi|dual ite|
|00002dc0| 6d 20 68 61 6e 64 6c 65 | 72 2e 20 54 68 65 20 68 |m handle|r. The h|
|00002dd0| 61 6e 64 6c 65 72 20 6d | 61 79 20 62 65 20 69 6e |andler m|ay be in|
|00002de0| 76 6f 6b 65 64 20 61 75 | 74 6f 6d 61 74 69 63 61 |voked au|tomatica|
|00002df0| 6c 6c 79 20 61 6e 64 0a | 79 6f 75 20 68 61 76 65 |lly and.|you have|
|00002e00| 20 6e 6f 20 6e 65 65 64 | 20 74 6f 20 64 65 63 6f | no need| to deco|
|00002e10| 64 65 20 74 68 65 20 6c | 69 73 74 20 6f 66 20 73 |de the l|ist of s|
|00002e20| 65 6c 65 63 74 69 6f 6e | 73 20 69 6e 20 6f 72 64 |election|s in ord|
|00002e30| 65 72 20 74 6f 20 74 61 | 6b 65 20 74 68 65 0a 61 |er to ta|ke the.a|
|00002e40| 70 70 72 6f 70 72 69 61 | 74 65 20 61 63 74 69 6f |ppropria|te actio|
|00002e50| 6e 2e 0a 0a 44 75 72 69 | 6e 67 20 74 68 65 20 63 |n...Duri|ng the c|
|00002e60| 61 6c 6c 20 74 6f 20 22 | 4d 65 6e 75 55 74 69 6c |all to "|MenuUtil|
|00002e70| 5f 49 6e 69 74 69 61 6c | 69 73 65 22 20 79 6f 75 |_Initial|ise" you|
|00002e80| 20 6d 75 73 74 20 73 70 | 65 63 69 66 79 0a 69 6e | must sp|ecify.in|
|00002e90| 69 74 69 61 6c 69 73 61 | 74 69 6f 6e 20 74 79 70 |itialisa|tion typ|
|00002ea0| 65 2e 20 49 6e 69 74 69 | 61 6c 69 73 61 74 69 6f |e. Initi|alisatio|
|00002eb0| 6e 20 74 79 70 65 20 64 | 65 66 69 6e 65 73 20 74 |n type d|efines t|
|00002ec0| 68 65 20 69 6e 74 65 72 | 70 72 65 74 61 74 69 6f |he inter|pretatio|
|00002ed0| 6e 20 6f 66 0a 69 74 65 | 6d 20 68 61 6e 64 6c 65 |n of.ite|m handle|
|00002ee0| 72 73 20 61 6e 64 20 63 | 61 6e 20 62 65 20 22 42 |rs and c|an be "B|
|00002ef0| 41 53 49 43 22 20 6f 72 | 20 22 6d 61 63 68 69 6e |ASIC" or| "machin|
|00002f00| 65 20 63 6f 64 65 22 20 | 28 6c 61 74 74 65 72 20 |e code" |(latter |
|00002f10| 69 73 20 6e 6f 74 0a 73 | 75 70 70 6f 72 74 65 64 |is not.s|upported|
|00002f20| 20 69 6e 20 63 75 72 72 | 65 6e 74 20 76 65 72 73 | in curr|ent vers|
|00002f30| 69 6f 6e 29 2e 20 49 6e | 20 63 61 73 65 20 6f 66 |ion). In| case of|
|00002f40| 20 22 42 41 53 49 43 22 | 20 74 68 65 20 69 74 65 | "BASIC"| the ite|
|00002f50| 6d 20 68 61 6e 64 6c 65 | 72 73 0a 61 72 65 20 61 |m handle|rs.are a|
|00002f60| 73 73 75 6d 65 64 20 74 | 6f 20 62 65 20 74 68 65 |ssumed t|o be the|
|00002f70| 20 42 41 53 49 43 20 66 | 75 6e 63 74 69 6f 6e 73 | BASIC f|unctions|
|00002f80| 20 61 6e 64 20 69 6e 20 | 63 61 73 65 20 6f 66 20 | and in |case of |
|00002f90| 22 6d 61 63 68 69 6e 65 | 20 63 6f 64 65 22 20 2d |"machine| code" -|
|00002fa0| 0a 41 52 4d 20 73 75 62 | 72 6f 75 74 69 6e 65 73 |.ARM sub|routines|
|00002fb0| 2e 20 49 66 20 79 6f 75 | 20 77 61 6e 74 20 74 6f |. If you| want to|
|00002fc0| 20 61 74 74 61 63 68 20 | 61 20 68 61 6e 64 6c 65 | attach |a handle|
|00002fd0| 72 20 74 6f 20 6d 65 6e | 75 20 69 74 65 6d 20 79 |r to men|u item y|
|00002fe0| 6f 75 20 6d 75 73 74 0a | 70 61 73 73 20 74 68 65 |ou must.|pass the|
|00002ff0| 20 70 6f 69 6e 74 65 72 | 20 74 6f 20 74 68 65 20 | pointer| to the |
|00003000| 6e 61 6d 65 20 6f 66 20 | 42 41 53 49 43 20 66 75 |name of |BASIC fu|
|00003010| 6e 63 74 69 6f 6e 20 6f | 72 20 72 65 73 70 65 63 |nction o|r respec|
|00003020| 74 69 76 65 6c 79 20 74 | 68 65 0a 61 64 64 72 65 |tively t|he.addre|
|00003030| 73 73 20 6f 66 20 74 68 | 65 20 41 52 4d 20 73 75 |ss of th|e ARM su|
|00003040| 62 72 6f 75 74 69 6e 65 | 20 74 6f 20 4d 65 6e 75 |broutine| to Menu|
|00003050| 55 74 69 6c 5f 41 64 64 | 2e 0a 0a 41 66 74 65 72 |Util_Add|...After|
|00003060| 20 75 73 65 72 20 73 65 | 6c 65 63 74 69 6f 6e 20 | user se|lection |
|00003070| 74 68 65 20 63 6f 72 72 | 65 73 70 6f 6e 64 69 6e |the corr|espondin|
|00003080| 67 20 69 74 65 6d 20 68 | 61 6e 64 6c 65 72 20 77 |g item h|andler w|
|00003090| 69 6c 6c 20 62 65 20 66 | 6f 75 6e 64 20 62 79 0a |ill be f|ound by.|
|000030a0| 22 4d 65 6e 75 55 74 69 | 6c 5f 44 65 63 6f 64 65 |"MenuUti|l_Decode|
|000030b0| 22 2e 20 54 6f 20 69 6e | 76 6f 6b 65 20 74 68 65 |". To in|voke the|
|000030c0| 20 68 61 6e 64 6c 65 72 | 20 79 6f 75 20 68 61 76 | handler| you hav|
|000030d0| 65 20 74 6f 20 63 61 6c | 6c 20 65 69 74 68 65 72 |e to cal|l either|
|000030e0| 20 74 68 65 0a 42 41 53 | 49 43 20 66 75 6e 63 74 | the.BAS|IC funct|
|000030f0| 69 6f 6e 20 6f 72 20 74 | 68 65 20 41 52 4d 20 73 |ion or t|he ARM s|
|00003100| 75 62 72 6f 75 74 69 6e | 65 20 64 65 70 65 6e 64 |ubroutin|e depend|
|00003110| 69 6e 67 20 6f 6e 20 69 | 6e 69 74 69 61 6c 69 73 |ing on i|nitialis|
|00003120| 61 74 69 6f 6e 20 74 79 | 70 65 2e 00 44 49 52 24 |ation ty|pe..DIR$|
|00003130| 60 02 00 00 54 02 00 00 | 80 00 00 00 46 fd ff ff |`...T...|....F...|
|00003140| 7a ab d1 22 7e 03 00 00 | 13 00 00 00 00 00 00 00 |z.."~...|........|
|00003150| 21 52 6f 6f 74 00 00 00 | 00 04 00 00 46 fd ff ff |!Root...|....F...|
|00003160| 7c ab d1 22 a3 06 00 00 | 13 00 00 00 00 00 00 00 ||.."....|........|
|00003170| 41 70 70 4e 6f 74 65 73 | 00 00 00 00 04 0c 00 00 |AppNotes|........|
|00003180| 46 fd ff ff 7e ab d1 22 | 92 03 00 00 13 00 00 00 |F...~.."|........|
|00003190| 00 00 00 00 41 75 74 68 | 6f 72 00 00 98 0f 00 00 |....Auth|or......|
|000031a0| 46 fd ff ff 7f ab d1 22 | 14 01 00 00 13 00 00 00 |F......"|........|
|000031b0| 00 00 00 00 44 65 63 4d | 53 4c 69 73 74 00 00 00 |....DecM|SList...|
|000031c0| ac 10 00 00 46 fd ff ff | 81 ab d1 22 8a 02 00 00 |....F...|..."....|
|000031d0| 13 00 00 00 00 00 00 00 | 44 65 63 52 32 42 6c 6b |........|DecR2Blk|
|000031e0| 00 00 00 00 38 13 00 00 | 46 fd ff ff 8a ab d1 22 |....8...|F......"|
|000031f0| f1 01 00 00 13 00 00 00 | 00 00 00 00 44 69 73 70 |........|....Disp|
|00003200| 6c 61 79 69 6e 67 00 00 | 2c 15 00 00 46 fd ff ff |laying..|,...F...|
|00003210| 8b ab d1 22 03 02 00 00 | 13 00 00 00 00 00 00 00 |..."....|........|
|00003220| 44 6f 63 73 00 00 00 00 | 54 23 00 00 46 fd ff ff |Docs....|T#..F...|
|00003230| 8d ab d1 22 80 02 00 00 | 13 01 00 00 00 00 00 00 |..."....|........|
|00003240| 45 78 5f 00 6c 2c 00 00 | 46 fd ff ff af ab d1 22 |Ex_.l,..|F......"|
|00003250| db 00 00 00 13 00 00 00 | 00 00 00 00 46 65 61 74 |........|....Feat|
|00003260| 75 72 65 73 00 00 00 00 | 48 2d 00 00 46 fd ff ff |ures....|H-..F...|
|00003270| b0 ab d1 22 e3 03 00 00 | 13 00 00 00 00 00 00 00 |..."....|........|
|00003280| 48 61 6e 64 6c 65 72 73 | 00 00 00 00 8c 33 00 00 |Handlers|.....3..|
|00003290| 46 fd ff ff b2 ab d1 22 | ec 01 00 00 13 00 00 00 |F......"|........|
|000032a0| 00 00 00 00 49 6e 74 72 | 6f 00 00 00 78 35 00 00 |....Intr|o...x5..|
|000032b0| 46 fd ff ff b5 ab d1 22 | a7 03 00 00 13 00 00 00 |F......"|........|
|000032c0| 00 00 00 00 4d 43 72 65 | 61 74 69 6f 6e 00 00 00 |....MCre|ation...|
|000032d0| 14 62 00 00 46 fd ff ff | bb ab d1 22 60 02 00 00 |.b..F...|..."`...|
|000032e0| 13 01 00 00 00 00 00 00 | 4d 65 6e 75 55 74 69 6c |........|MenuUtil|
|000032f0| 5f 00 00 00 04 8d 00 00 | 46 fd ff ff ca f6 87 6e |_.......|F......n|
|00003300| b3 02 00 00 13 00 00 00 | 00 00 00 00 4d 48 61 6e |........|....MHan|
|00003310| 64 6c 65 73 00 00 00 00 | e0 81 00 00 46 fd ff ff |dles....|....F...|
|00003320| ee ab d1 22 d9 02 00 00 | 13 00 00 00 00 00 00 00 |..."....|........|
|00003330| 4d 4d 6f 64 69 66 69 63 | 61 74 69 6f 6e 00 00 00 |MModific|ation...|
|00003340| bc 84 00 00 46 fd ff ff | ef ab d1 22 27 03 00 00 |....F...|..."'...|
|00003350| 13 00 00 00 00 00 00 00 | 54 65 63 68 44 65 74 00 |........|TechDet.|
|00003360| e4 87 00 00 46 fd ff ff | f1 ab d1 22 1e 05 00 00 |....F...|..."....|
|00003370| 13 00 00 00 00 00 00 00 | 57 68 61 74 44 6f 00 00 |........|WhatDo..|
|00003380| ff ff ff ff ff ff ff ff | ff ff ff ff 44 41 54 41 |........|....DATA|
|00003390| ec 01 00 00 49 6e 74 72 | 6f 64 75 63 74 69 6f 6e |....Intr|oduction|
|000033a0| 0a 54 68 69 73 20 6d 6f | 64 75 6c 65 20 69 73 20 |.This mo|dule is |
|000033b0| 6d 61 69 6e 6c 79 20 69 | 6e 74 65 6e 64 65 64 20 |mainly i|ntended |
|000033c0| 66 6f 72 20 70 65 6f 70 | 6c 65 20 77 68 6f 20 77 |for peop|le who w|
|000033d0| 72 69 74 65 20 52 49 53 | 43 20 4f 53 0a 61 70 70 |rite RIS|C OS.app|
|000033e0| 6c 69 63 61 74 69 6f 6e | 73 20 69 6e 20 42 42 43 |lication|s in BBC|
|000033f0| 20 42 41 53 49 43 2e 20 | 49 74 20 63 61 6e 20 73 | BASIC. |It can s|
|00003400| 61 76 65 20 70 72 6f 67 | 72 61 6d 6d 65 72 20 66 |ave prog|rammer f|
|00003410| 72 6f 6d 20 74 68 65 20 | 6e 65 65 64 20 74 6f 0a |rom the |need to.|
|00003420| 77 72 69 74 65 20 68 69 | 73 20 6f 77 6e 20 70 72 |write hi|s own pr|
|00003430| 6f 63 65 64 75 72 65 73 | 20 69 6e 20 42 41 53 49 |ocedures| in BASI|
|00003440| 43 20 66 6f 72 20 68 61 | 6e 64 6c 69 6e 67 20 6d |C for ha|ndling m|
|00003450| 65 6e 75 73 2e 20 4d 65 | 6e 75 55 74 69 6c 73 20 |enus. Me|nuUtils |
|00003460| 6d 6f 64 75 6c 65 0a 63 | 61 6e 20 70 65 72 66 6f |module.c|an perfo|
|00003470| 72 6d 20 61 6c 6c 20 74 | 68 65 20 77 6f 72 6b 20 |rm all t|he work |
|00003480| 6e 65 65 64 65 64 20 74 | 6f 20 63 72 65 61 74 65 |needed t|o create|
|00003490| 2c 20 65 64 69 74 2c 20 | 64 69 73 70 6c 61 79 20 |, edit, |display |
|000034a0| 61 6e 64 20 64 65 63 6f | 64 65 0a 6d 65 6e 75 73 |and deco|de.menus|
|000034b0| 2e 20 54 68 65 20 6d 6f | 64 75 6c 65 20 69 73 20 |. The mo|dule is |
|000034c0| 76 65 72 79 20 73 69 6d | 70 6c 65 20 69 6e 20 75 |very sim|ple in u|
|000034d0| 73 65 20 61 6e 64 20 69 | 73 20 69 64 65 61 6c 20 |se and i|s ideal |
|000034e0| 66 6f 72 20 63 72 65 61 | 74 69 6e 67 0a 73 69 6d |for crea|ting.sim|
|000034f0| 70 6c 65 20 6d 65 6e 75 | 73 2e 20 4f 6e 20 74 68 |ple menu|s. On th|
|00003500| 65 20 6f 74 68 65 72 20 | 68 61 6e 64 20 6d 6f 64 |e other |hand mod|
|00003510| 75 6c 65 27 73 20 61 64 | 76 61 6e 63 65 64 20 66 |ule's ad|vanced f|
|00003520| 65 61 74 75 72 65 73 20 | 61 6c 6c 6f 77 73 0a 65 |eatures |allows.e|
|00003530| 61 73 69 6c 79 20 63 72 | 65 61 74 65 20 61 6e 64 |asily cr|eate and|
|00003540| 20 6d 61 6e 69 70 75 6c | 61 74 65 20 65 76 65 6e | manipul|ate even|
|00003550| 20 76 65 72 79 20 63 6f | 6d 70 6c 65 78 20 6d 75 | very co|mplex mu|
|00003560| 6c 74 69 2d 6c 65 76 65 | 6c 20 64 79 6e 61 6d 69 |lti-leve|l dynami|
|00003570| 63 0a 6d 65 6e 75 73 2e | 44 41 54 41 a7 03 00 00 |c.menus.|DATA....|
|00003580| 4d 65 6e 75 20 43 72 65 | 61 74 69 6f 6e 0a 54 6f |Menu Cre|ation.To|
|00003590| 20 73 74 61 72 74 20 6e | 65 77 20 6d 65 6e 75 20 | start n|ew menu |
|000035a0| 79 6f 75 20 6d 75 73 74 | 20 63 61 6c 6c 20 4d 65 |you must| call Me|
|000035b0| 6e 75 55 74 69 6c 5f 4e | 65 77 2e 20 54 68 65 6e |nuUtil_N|ew. Then|
|000035c0| 20 79 6f 75 20 6d 61 79 | 20 61 64 64 20 74 6f 20 | you may| add to |
|000035d0| 69 74 0a 61 6e 79 20 6e | 75 6d 62 65 72 20 6f 66 |it.any n|umber of|
|000035e0| 20 6d 65 6e 75 20 69 74 | 65 6d 73 2e 20 54 6f 20 | menu it|ems. To |
|000035f0| 61 64 64 20 6e 65 77 20 | 69 74 65 6d 20 79 6f 75 |add new |item you|
|00003600| 20 6d 75 73 74 20 63 61 | 6c 6c 20 4d 65 6e 75 55 | must ca|ll MenuU|
|00003610| 74 69 6c 5f 41 64 64 2e | 0a 4d 65 6e 75 20 61 6c |til_Add.|.Menu al|
|00003620| 77 61 79 73 20 69 73 20 | 72 65 61 64 79 20 74 6f |ways is |ready to|
|00003630| 20 62 65 20 64 69 73 70 | 6c 61 79 65 64 20 6f 6e | be disp|layed on|
|00003640| 20 73 63 72 65 65 6e 20 | 61 6e 64 20 79 6f 75 20 | screen |and you |
|00003650| 68 61 76 65 20 6e 6f 20 | 6e 65 65 64 20 74 6f 0a |have no |need to.|
|00003660| 73 70 65 63 69 61 6c 6c | 79 20 69 6e 66 6f 72 6d |speciall|y inform|
|00003670| 20 74 68 65 20 6d 6f 64 | 75 6c 65 20 77 68 65 6e | the mod|ule when|
|00003680| 20 79 6f 75 20 68 61 76 | 65 20 61 64 64 65 64 20 | you hav|e added |
|00003690| 74 68 65 20 6c 61 73 74 | 20 69 74 65 6d 20 74 6f |the last| item to|
|000036a0| 20 74 68 65 0a 6d 65 6e | 75 2e 0a 0a 42 79 20 64 | the.men|u...By d|
|000036b0| 65 66 61 75 6c 74 20 61 | 6c 6c 20 6e 65 77 20 69 |efault a|ll new i|
|000036c0| 74 65 6d 73 20 61 72 65 | 20 61 64 64 65 64 20 74 |tems are| added t|
|000036d0| 6f 20 74 68 65 20 65 6e | 64 20 6f 66 20 6d 65 6e |o the en|d of men|
|000036e0| 75 2e 20 49 66 20 79 6f | 75 20 77 61 6e 74 20 74 |u. If yo|u want t|
|000036f0| 6f 0a 69 6e 73 65 72 74 | 20 6e 65 77 20 69 74 65 |o.insert| new ite|
|00003700| 6d 20 69 6e 20 74 68 65 | 20 6d 69 64 64 6c 65 20 |m in the| middle |
|00003710| 6f 66 20 6d 65 6e 75 20 | 74 68 65 6e 20 79 6f 75 |of menu |then you|
|00003720| 20 6d 75 73 74 20 73 70 | 65 63 69 66 79 20 74 68 | must sp|ecify th|
|00003730| 65 20 68 61 6e 64 6c 65 | 0a 6f 66 20 74 68 65 20 |e handle|.of the |
|00003740| 69 74 65 6d 20 62 65 66 | 6f 72 65 20 77 68 69 63 |item bef|ore whic|
|00003750| 68 20 79 6f 75 20 77 61 | 6e 74 20 74 6f 20 69 6e |h you wa|nt to in|
|00003760| 73 65 72 74 20 74 68 65 | 20 6e 65 77 20 69 74 65 |sert the| new ite|
|00003770| 6d 2e 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |m.. | |
|00003780| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003790| 20 20 20 0a 41 6c 6c 20 | 6d 65 6e 75 20 66 6c 61 | .All |menu fla|
|000037a0| 67 73 20 69 6e 20 61 64 | 64 65 64 20 69 74 65 6d |gs in ad|ded item|
|000037b0| 73 20 61 72 65 20 63 6c | 65 61 72 65 64 2e 20 43 |s are cl|eared. C|
|000037c0| 6f 6c 6f 75 72 73 20 61 | 6e 64 20 64 69 6d 65 6e |olours a|nd dimen|
|000037d0| 73 69 6f 6e 73 20 61 72 | 65 0a 69 6e 20 73 74 61 |sions ar|e.in sta|
|000037e0| 6e 64 61 72 64 20 52 49 | 53 43 20 4f 53 20 73 74 |ndard RI|SC OS st|
|000037f0| 79 6c 65 2e 20 57 69 64 | 74 68 20 6f 66 20 6d 65 |yle. Wid|th of me|
|00003800| 6e 75 20 69 73 20 61 64 | 6a 75 73 74 65 64 20 61 |nu is ad|justed a|
|00003810| 75 74 6f 6d 61 74 69 63 | 61 6c 6c 79 2e 0a 0a 49 |utomatic|ally...I|
|00003820| 6e 20 6f 72 64 65 72 20 | 74 6f 20 63 6f 6e 73 74 |n order |to const|
|00003830| 72 75 63 74 20 6d 75 6c | 74 69 2d 6c 65 76 65 6c |ruct mul|ti-level|
|00003840| 20 6d 65 6e 75 20 74 72 | 65 65 20 79 6f 75 20 68 | menu tr|ee you h|
|00003850| 61 76 65 20 74 6f 20 63 | 6f 6e 6e 65 63 74 20 73 |ave to c|onnect s|
|00003860| 6f 6d 65 0a 6d 65 6e 75 | 20 69 74 65 6d 73 20 77 |ome.menu| items w|
|00003870| 69 74 68 20 73 75 62 6d | 65 6e 75 73 20 6f 72 20 |ith subm|enus or |
|00003880| 77 69 74 68 20 64 69 61 | 6c 6f 67 20 62 6f 78 65 |with dia|log boxe|
|00003890| 73 2e 20 4d 65 6e 75 55 | 74 69 6c 73 20 70 72 6f |s. MenuU|tils pro|
|000038a0| 76 69 64 65 73 0a 73 70 | 65 63 69 61 6c 20 53 57 |vides.sp|ecial SW|
|000038b0| 49 20 74 6f 20 6c 69 6e | 6b 20 6d 65 6e 75 20 69 |I to lin|k menu i|
|000038c0| 74 65 6d 20 77 69 74 68 | 20 73 75 62 6d 65 6e 75 |tem with| submenu|
|000038d0| 2e 20 54 68 69 73 20 53 | 57 49 20 61 6c 73 6f 20 |. This S|WI also |
|000038e0| 61 6c 6c 6f 77 73 20 79 | 6f 75 0a 74 6f 20 6c 69 |allows y|ou.to li|
|000038f0| 6e 6b 20 6d 65 6e 75 73 | 20 63 72 65 61 74 65 64 |nk menus| created|
|00003900| 20 62 79 20 4d 65 6e 75 | 55 74 69 6c 73 20 77 69 | by Menu|Utils wi|
|00003910| 74 68 20 6f 74 68 65 72 | 20 6d 65 6e 75 73 2e 00 |th other| menus..|
|00003920| 44 41 54 41 68 07 00 00 | 4d 65 6e 75 55 74 69 6c |DATAh...|MenuUtil|
|00003930| 5f 41 64 64 20 28 53 57 | 49 20 26 34 35 42 43 32 |_Add (SW|I &45BC2|
|00003940| 29 0a 41 64 64 73 20 6e | 65 77 20 69 74 65 6d 20 |).Adds n|ew item |
|00003950| 74 6f 20 65 78 69 73 74 | 69 6e 67 20 6d 65 6e 75 |to exist|ing menu|
|00003960| 2e 0a 0a 45 6e 74 72 79 | 3a 0a 20 20 20 20 52 30 |...Entry|:. R0|
|00003970| 20 68 61 6e 64 6c 65 20 | 6f 66 20 74 68 65 20 6d | handle |of the m|
|00003980| 65 6e 75 20 6f 72 20 6f | 66 20 74 68 65 20 6d 65 |enu or o|f the me|
|00003990| 6e 75 20 69 74 65 6d 20 | 6f 72 20 7a 65 72 6f 20 |nu item |or zero |
|000039a0| 66 6f 72 20 63 75 72 72 | 65 6e 74 20 6d 65 6e 75 |for curr|ent menu|
|000039b0| 0a 20 20 20 20 52 31 20 | 70 6f 69 6e 74 65 72 20 |. R1 |pointer |
|000039c0| 74 6f 20 69 74 65 6d 20 | 74 65 78 74 0a 20 20 20 |to item |text. |
|000039d0| 20 52 32 20 70 6f 69 6e | 74 65 72 20 74 6f 20 69 | R2 poin|ter to i|
|000039e0| 74 65 6d 20 68 61 6e 64 | 6c 65 72 0a 0a 45 78 69 |tem hand|ler..Exi|
|000039f0| 74 3a 0a 20 20 20 20 52 | 30 20 68 61 6e 64 6c 65 |t:. R|0 handle|
|00003a00| 20 6f 66 20 6d 65 6e 75 | 20 69 74 65 6d 0a 20 20 | of menu| item. |
|00003a10| 20 20 52 31 2c 52 32 20 | 70 72 65 73 65 72 76 65 | R1,R2 |preserve|
|00003a20| 64 0a 0a 0a 54 68 69 73 | 20 63 61 6c 6c 20 61 64 |d...This| call ad|
|00003a30| 64 73 20 6f 6e 65 20 69 | 74 65 6d 20 74 6f 20 74 |ds one i|tem to t|
|00003a40| 68 65 20 65 78 69 73 74 | 69 6e 67 20 6d 65 6e 75 |he exist|ing menu|
|00003a50| 2e 20 49 66 20 68 61 6e | 64 6c 65 20 69 73 20 74 |. If han|dle is t|
|00003a60| 68 65 20 68 61 6e 64 6c | 65 0a 6f 66 20 6d 65 6e |he handl|e.of men|
|00003a70| 75 20 74 68 65 6e 20 6e | 65 77 20 69 74 65 6d 20 |u then n|ew item |
|00003a80| 77 69 6c 6c 20 62 65 20 | 61 64 64 65 64 20 74 6f |will be |added to|
|00003a90| 20 74 68 65 20 65 6e 64 | 20 6f 66 20 74 68 69 73 | the end| of this|
|00003aa0| 20 6d 65 6e 75 2e 20 49 | 66 20 68 61 6e 64 6c 65 | menu. I|f handle|
|00003ab0| 0a 69 73 20 74 68 65 20 | 68 61 6e 64 6c 65 20 6f |.is the |handle o|
|00003ac0| 66 20 74 68 65 20 69 74 | 65 6d 20 74 68 65 6e 20 |f the it|em then |
|00003ad0| 6e 65 77 20 69 74 65 6d | 20 77 69 6c 6c 20 62 65 |new item| will be|
|00003ae0| 20 69 6e 73 65 72 74 65 | 64 20 69 6e 74 6f 20 6d | inserte|d into m|
|00003af0| 65 6e 75 0a 6a 75 73 74 | 20 62 65 66 6f 72 65 20 |enu.just| before |
|00003b00| 74 68 69 73 20 69 74 65 | 6d 2e 20 49 66 20 52 30 |this ite|m. If R0|
|00003b10| 20 69 73 20 7a 65 72 6f | 20 6f 6e 20 65 6e 74 72 | is zero| on entr|
|00003b20| 79 20 74 68 65 6e 20 69 | 74 65 6d 20 77 69 6c 6c |y then i|tem will|
|00003b30| 20 62 65 20 61 64 64 65 | 64 0a 74 6f 20 74 68 65 | be adde|d.to the|
|00003b40| 20 65 6e 64 20 6f 66 20 | 63 75 72 72 65 6e 74 20 | end of |current |
|00003b50| 6d 65 6e 75 2e 0a 0a 44 | 75 72 69 6e 67 20 74 68 |menu...D|uring th|
|00003b60| 69 73 20 63 61 6c 6c 20 | 74 68 65 20 63 75 72 72 |is call |the curr|
|00003b70| 65 6e 74 20 6d 65 6e 75 | 20 6d 61 79 20 62 65 20 |ent menu| may be |
|00003b80| 6d 6f 76 65 64 20 69 6e | 20 6d 65 6d 6f 72 79 20 |moved in| memory |
|00003b90| 73 6f 20 69 66 20 79 6f | 75 0a 6b 65 65 70 20 64 |so if yo|u.keep d|
|00003ba0| 69 72 65 63 74 20 70 6f | 69 6e 74 65 72 73 20 74 |irect po|inters t|
|00003bb0| 6f 20 74 68 65 20 6d 65 | 6e 75 20 64 61 74 61 20 |o the me|nu data |
|00003bc0| 73 74 72 75 63 74 75 72 | 65 20 74 68 65 79 20 6d |structur|e they m|
|00003bd0| 61 79 20 62 65 63 6f 6d | 65 0a 69 6e 76 61 6c 69 |ay becom|e.invali|
|00003be0| 64 2e 20 4f 6e 20 74 68 | 65 20 6f 74 68 65 72 20 |d. On th|e other |
|00003bf0| 68 61 6e 64 20 69 66 20 | 74 68 65 72 65 20 61 72 |hand if |there ar|
|00003c00| 65 20 61 6e 79 20 6d 65 | 6e 75 20 69 74 65 6d 73 |e any me|nu items|
|00003c10| 20 6c 69 6e 6b 65 64 20 | 77 69 74 68 0a 74 68 69 | linked |with.thi|
|00003c20| 73 20 6d 65 6e 75 20 62 | 79 20 6d 65 61 6e 73 20 |s menu b|y means |
|00003c30| 6f 66 20 3c 4d 65 6e 75 | 55 74 69 6c 5f 53 75 62 |of <Menu|Util_Sub|
|00003c40| 6d 65 6e 75 3e 20 74 68 | 65 6e 20 61 6c 6c 20 70 |menu> th|en all p|
|00003c50| 6f 69 6e 74 65 72 73 20 | 77 69 6c 6c 20 62 65 0a |ointers |will be.|
|00003c60| 72 65 63 61 6c 63 75 6c | 61 74 65 64 20 61 75 74 |recalcul|ated aut|
|00003c70| 6f 6d 61 74 69 63 61 6c | 6c 79 20 62 79 20 74 68 |omatical|ly by th|
|00003c80| 65 20 6d 6f 64 75 6c 65 | 20 61 6e 64 20 77 69 6c |e module| and wil|
|00003c90| 6c 20 72 65 6d 61 69 6e | 20 76 61 6c 69 64 2e 0a |l remain| valid..|
|00003ca0| 0a 4d 65 6e 75 55 74 69 | 6c 73 20 6d 61 6b 65 73 |.MenuUti|ls makes|
|00003cb0| 20 68 69 73 20 6f 77 6e | 20 63 6f 70 79 20 6f 66 | his own| copy of|
|00003cc0| 20 74 68 65 20 73 74 72 | 69 6e 67 20 70 6f 69 6e | the str|ing poin|
|00003cd0| 74 65 64 20 74 6f 20 62 | 79 20 52 31 20 62 75 74 |ted to b|y R1 but|
|00003ce0| 0a 69 6e 73 70 69 74 65 | 20 6f 66 20 74 68 69 73 |.inspite| of this|
|00003cf0| 20 79 6f 75 20 73 74 69 | 6c 6c 20 63 61 6e 20 65 | you sti|ll can e|
|00003d00| 61 73 69 6c 79 20 63 68 | 61 6e 67 65 20 69 74 20 |asily ch|ange it |
|00003d10| 77 69 74 68 20 3c 4d 65 | 6e 75 55 74 69 6c 5f 54 |with <Me|nuUtil_T|
|00003d20| 65 78 74 3e 2e 20 49 66 | 20 52 31 0a 69 73 20 7a |ext>. If| R1.is z|
|00003d30| 65 72 6f 20 6f 6e 20 65 | 6e 74 72 79 20 74 68 65 |ero on e|ntry the|
|00003d40| 6e 20 6e 75 6c 6c 20 73 | 74 72 69 6e 67 20 28 22 |n null s|tring ("|
|00003d50| 22 29 20 77 69 6c 6c 20 | 62 65 20 75 73 65 64 20 |") will |be used |
|00003d60| 61 73 20 69 74 65 6d 20 | 74 65 78 74 2e 0a 0a 49 |as item |text...I|
|00003d70| 66 20 52 32 20 69 73 20 | 6e 6f 74 20 7a 65 72 6f |f R2 is |not zero|
|00003d80| 20 6f 6e 20 65 6e 74 72 | 79 20 74 68 65 6e 20 69 | on entr|y then i|
|00003d90| 6e 74 65 72 70 72 65 74 | 61 74 69 6f 6e 20 6f 66 |nterpret|ation of|
|00003da0| 20 69 74 20 63 6f 6e 74 | 65 6e 74 73 20 64 65 70 | it cont|ents dep|
|00003db0| 65 6e 64 73 0a 6f 6e 20 | 74 68 65 20 69 6e 69 74 |ends.on |the init|
|00003dc0| 69 61 6c 69 73 61 74 69 | 6f 6e 20 74 79 70 65 20 |ialisati|on type |
|00003dd0| 73 70 65 63 69 66 69 65 | 64 20 65 61 72 6c 79 20 |specifie|d early |
|00003de0| 64 75 72 69 6e 67 20 74 | 68 65 20 63 61 6c 6c 20 |during t|he call |
|00003df0| 74 6f 0a 3c 4d 65 6e 75 | 55 74 69 6c 5f 49 6e 69 |to.<Menu|Util_Ini|
|00003e00| 74 69 61 6c 69 73 65 3e | 2e 20 49 66 20 69 6e 69 |tialise>|. If ini|
|00003e10| 74 69 61 6c 69 73 61 74 | 69 6f 6e 20 74 79 70 65 |tialisat|ion type|
|00003e20| 20 77 61 73 20 73 70 65 | 63 69 66 69 65 64 20 61 | was spe|cified a|
|00003e30| 73 20 22 42 41 53 49 43 | 22 20 74 68 65 6e 0a 69 |s "BASIC|" then.i|
|00003e40| 74 20 69 73 20 61 73 73 | 75 6d 65 64 20 74 68 61 |t is ass|umed tha|
|00003e50| 74 20 52 32 20 69 73 20 | 61 20 70 6f 69 6e 74 65 |t R2 is |a pointe|
|00003e60| 72 20 74 6f 20 74 68 65 | 20 63 74 72 6c 2d 74 65 |r to the| ctrl-te|
|00003e70| 72 6d 69 6e 61 74 65 64 | 20 74 65 78 74 20 73 74 |rminated| text st|
|00003e80| 72 69 6e 67 2e 0a 49 6e | 20 74 68 69 73 20 63 61 |ring..In| this ca|
|00003e90| 73 65 20 74 68 65 20 6d | 6f 64 75 6c 65 20 6d 61 |se the m|odule ma|
|00003ea0| 6b 65 73 20 68 69 73 20 | 6f 77 6e 20 63 6f 70 79 |kes his |own copy|
|00003eb0| 20 6f 66 20 74 68 65 20 | 73 74 72 69 6e 67 20 66 | of the |string f|
|00003ec0| 6f 72 20 6c 61 74 65 72 | 20 75 73 65 0a 69 6e 20 |or later| use.in |
|00003ed0| 3c 4d 65 6e 75 55 74 69 | 6c 5f 44 65 63 6f 64 65 |<MenuUti|l_Decode|
|00003ee0| 3e 2e 20 49 66 20 69 6e | 69 74 69 61 6c 69 73 61 |>. If in|itialisa|
|00003ef0| 74 69 6f 6e 20 74 79 70 | 65 20 77 61 73 20 22 6d |tion typ|e was "m|
|00003f00| 61 63 68 69 6e 65 20 63 | 6f 64 65 22 20 28 6e 6f |achine c|ode" (no|
|00003f10| 74 0a 73 75 70 70 6f 72 | 74 65 64 20 62 79 20 63 |t.suppor|ted by c|
|00003f20| 75 72 72 65 6e 74 20 76 | 65 72 73 69 6f 6e 29 20 |urrent v|ersion) |
|00003f30| 74 68 65 6e 20 6f 6e 6c | 79 20 74 68 65 20 63 6f |then onl|y the co|
|00003f40| 6e 74 65 6e 74 73 20 6f | 66 20 52 32 20 69 73 20 |ntents o|f R2 is |
|00003f50| 73 61 76 65 64 20 62 79 | 0a 74 68 65 20 6d 6f 64 |saved by|.the mod|
|00003f60| 75 6c 65 2e 20 54 68 69 | 73 20 66 65 61 74 75 72 |ule. Thi|s featur|
|00003f70| 65 20 61 6c 6c 6f 77 73 | 20 79 6f 75 20 74 6f 20 |e allows| you to |
|00003f80| 61 74 74 61 63 68 20 61 | 20 68 61 6e 64 6c 65 72 |attach a| handler|
|00003f90| 20 74 6f 20 74 68 65 20 | 6d 65 6e 75 0a 69 74 65 | to the |menu.ite|
|00003fa0| 6d 2e 20 49 6e 20 63 61 | 73 65 20 6f 66 20 22 42 |m. In ca|se of "B|
|00003fb0| 41 53 49 43 22 20 79 6f | 75 20 63 61 6e 20 70 72 |ASIC" yo|u can pr|
|00003fc0| 6f 76 69 64 65 20 74 68 | 65 20 6e 61 6d 65 20 6f |ovide th|e name o|
|00003fd0| 66 20 42 41 53 49 43 20 | 66 75 6e 63 74 69 6f 6e |f BASIC |function|
|00003fe0| 2e 0a 49 6e 20 63 61 73 | 65 20 6f 66 20 22 6d 61 |..In cas|e of "ma|
|00003ff0| 63 68 69 6e 65 20 63 6f | 64 65 22 20 2d 20 74 68 |chine co|de" - th|
|00004000| 65 20 61 64 64 72 65 73 | 73 20 6f 66 20 41 52 4d |e addres|s of ARM|
|00004010| 20 73 75 62 72 6f 75 74 | 69 6e 65 2e 20 53 65 65 | subrout|ine. See|
|00004020| 20 61 6c 73 6f 0a 3c 4d | 65 6e 75 55 74 69 6c 5f | also.<M|enuUtil_|
|00004030| 44 65 63 6f 64 65 3e 20 | 61 6e 64 20 66 6f 72 20 |Decode> |and for |
|00004040| 70 6f 73 73 69 62 6c 65 | 20 75 73 65 20 6f 66 20 |possible| use of |
|00004050| 69 74 65 6d 20 68 61 6e | 64 6c 65 72 73 2e 0a 20 |item han|dlers.. |
|00004060| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 0a 3c | | .<|
|00004070| 45 78 61 6d 70 6c 65 20 | 63 6f 64 65 2e 2e 2e 3d |Example |code...=|
|00004080| 3e 45 78 5f 41 64 64 3e | 44 41 54 41 f4 02 00 00 |>Ex_Add>|DATA....|
|00004090| 4d 65 6e 75 55 74 69 6c | 5f 43 6f 6c 6f 75 72 4d |MenuUtil|_ColourM|
|000040a0| 65 6e 75 20 28 53 57 49 | 20 26 34 35 42 43 46 29 |enu (SWI| &45BCF)|
|000040b0| 0a 43 72 65 61 74 65 73 | 20 61 20 77 69 6d 70 20 |.Creates| a wimp |
|000040c0| 63 6f 6c 6f 75 72 20 73 | 65 74 74 69 6e 67 20 6d |colour s|etting m|
|000040d0| 65 6e 75 0a 45 6e 74 72 | 79 3a 0a 20 20 20 20 52 |enu.Entr|y:. R|
|000040e0| 31 20 2d 3e 20 6d 65 6e | 75 20 74 69 74 6c 65 20 |1 -> men|u title |
|000040f0| 73 74 72 69 6e 67 0a 20 | 20 20 20 52 32 20 2d 3e |string. | R2 ->|
|00004100| 20 6d 65 6e 75 20 68 61 | 6e 64 6c 65 0a 45 78 69 | menu ha|ndle.Exi|
|00004110| 74 3a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |t: | |
|00004120| 20 20 20 0a 20 20 20 20 | 52 30 20 3d 20 68 61 6e | . |R0 = han|
|00004130| 64 6c 65 20 6f 66 20 74 | 68 65 20 6d 65 6e 75 0a |dle of t|he menu.|
|00004140| 20 20 20 20 52 31 20 70 | 72 65 73 65 72 76 65 64 | R1 p|reserved|
|00004150| 0a 0a 54 68 69 73 20 63 | 61 6c 6c 20 63 72 65 61 |..This c|all crea|
|00004160| 74 65 73 20 73 74 61 6e | 64 61 72 64 20 57 49 4d |tes stan|dard WIM|
|00004170| 50 20 63 6f 6c 6f 75 72 | 0a 73 65 74 74 69 6e 67 |P colour|.setting|
|00004180| 20 6d 65 6e 75 2e 20 52 | 31 20 6f 6e 20 65 6e 74 | menu. R|1 on ent|
|00004190| 72 79 20 70 6f 69 6e 74 | 73 20 74 6f 20 74 68 65 |ry point|s to the|
|000041a0| 0a 74 69 74 6c 65 20 73 | 74 72 69 6e 67 20 66 6f |.title s|tring fo|
|000041b0| 72 20 74 68 65 20 6d 65 | 6e 75 2e 20 49 66 20 52 |r the me|nu. If R|
|000041c0| 32 3c 3e 30 20 74 68 65 | 6e 0a 69 74 20 70 6f 69 |2<>0 the|n.it poi|
|000041d0| 6e 74 73 20 74 6f 20 74 | 68 65 20 68 61 6e 64 6c |nts to t|he handl|
|000041e0| 65 72 20 63 6f 6d 6d 6f | 6e 20 66 6f 72 20 61 6c |er commo|n for al|
|000041f0| 6c 0a 31 36 20 69 74 65 | 6d 73 2e 20 28 53 65 65 |l.16 ite|ms. (See|
|00004200| 20 61 6c 73 6f 20 22 3c | 4d 65 6e 75 55 74 69 6c | also "<|MenuUtil|
|00004210| 5f 41 64 64 3e 22 20 66 | 6f 72 0a 6d 6f 72 65 20 |_Add>" f|or.more |
|00004220| 69 6e 66 6f 20 61 62 6f | 75 74 20 69 74 65 6d 20 |info abo|ut item |
|00004230| 68 61 6e 64 6c 65 72 73 | 29 2e 20 44 65 73 70 69 |handlers|). Despi|
|00004240| 74 65 0a 74 68 65 20 66 | 61 63 74 20 74 68 61 74 |te.the f|act that|
|00004250| 20 74 68 65 20 73 61 6d | 65 20 68 61 6e 64 6c 65 | the sam|e handle|
|00004260| 72 20 69 73 20 69 6e 76 | 6f 6b 65 64 0a 77 69 74 |r is inv|oked.wit|
|00004270| 68 20 61 6c 6c 20 69 74 | 65 6d 73 20 69 74 20 69 |h all it|ems it i|
|00004280| 73 20 73 74 69 6c 6c 20 | 70 6f 73 73 69 62 6c 65 |s still |possible|
|00004290| 20 74 6f 0a 64 69 73 74 | 69 6e 67 75 69 73 68 20 | to.dist|inguish |
|000042a0| 75 73 65 72 20 73 65 6c | 65 63 74 69 6f 6e 2e 20 |user sel|ection. |
|000042b0| 3c 4d 65 6e 75 55 74 69 | 6c 5f 44 65 63 6f 64 65 |<MenuUti|l_Decode|
|000042c0| 3e 0a 72 65 74 75 72 6e | 73 20 6e 6f 74 20 6f 6e |>.return|s not on|
|000042d0| 6c 79 20 70 6f 69 6e 74 | 65 72 20 74 6f 20 74 68 |ly point|er to th|
|000042e0| 65 20 68 61 6e 64 6c 65 | 72 0a 62 75 74 20 61 6c |e handle|r.but al|
|000042f0| 73 6f 20 74 68 65 20 6e | 75 6d 62 65 72 20 28 70 |so the n|umber (p|
|00004300| 6f 73 69 74 69 6f 6e 29 | 20 6f 66 20 73 65 6c 65 |osition)| of sele|
|00004310| 63 74 65 64 0a 69 74 65 | 6d 20 69 6e 20 74 68 65 |cted.ite|m in the|
|00004320| 20 6d 65 6e 75 2e 20 41 | 63 74 75 61 6c 6c 79 20 | menu. A|ctually |
|00004330| 74 68 69 73 20 6e 75 6d | 62 65 72 20 69 73 0a 65 |this num|ber is.e|
|00004340| 71 75 61 6c 20 74 6f 20 | 74 68 65 20 63 6f 6c 6f |qual to |the colo|
|00004350| 75 72 20 6e 75 6d 62 65 | 72 2e 0a 0a 3c 45 78 61 |ur numbe|r...<Exa|
|00004360| 6d 70 6c 65 20 63 6f 64 | 65 2e 2e 2e 3d 3e 45 78 |mple cod|e...=>Ex|
|00004370| 5f 43 6f 6c 6f 75 72 4d | 65 6e 75 3e 46 52 45 45 |_ColourM|enu>FREE|
|00004380| 60 01 00 00 b8 0b 00 00 | 20 39 00 00 46 ff ff ff |`.......| 9..F...|
|00004390| bc ab d1 22 68 07 00 00 | 13 00 00 00 00 00 00 00 |..."h...|........|
|000043a0| 41 64 64 00 88 40 00 00 | 46 ff ff ff be ab d1 22 |Add..@..|F......"|
|000043b0| f4 02 00 00 13 00 00 00 | 00 00 00 00 43 6f 6c 6f |........|....Colo|
|000043c0| 75 72 4d 65 6e 75 00 00 | dc 44 00 00 46 ff ff ff |urMenu..|.D..F...|
|000043d0| bf ab d1 22 7e 01 00 00 | 13 00 00 00 00 00 00 00 |..."~...|........|
|000043e0| 43 6f 6c 6f 75 72 73 00 | 5c 46 00 00 46 ff ff ff |Colours.|\F..F...|
|000043f0| c2 ab d1 22 c8 05 00 00 | 13 00 00 00 00 00 00 00 |..."....|........|
|00004400| 44 65 63 6f 64 65 00 00 | 24 4c 00 00 46 ff ff ff |Decode..|$L..F...|
|00004410| c5 ab d1 22 83 04 00 00 | 13 00 00 00 00 00 00 00 |..."....|........|
|00004420| 44 65 6c 65 74 65 00 00 | a8 50 00 00 46 ff ff ff |Delete..|.P..F...|
|00004430| cc ab d1 22 4d 03 00 00 | 13 00 00 00 00 00 00 00 |..."M...|........|
|00004440| 44 6f 74 73 00 00 00 00 | f8 53 00 00 46 ff ff ff |Dots....|.S..F...|
|00004450| cd ab d1 22 5e 03 00 00 | 13 00 00 00 00 00 00 00 |..."^...|........|
|00004460| 46 61 64 65 00 00 00 00 | 58 57 00 00 46 ff ff ff |Fade....|XW..F...|
|00004470| cf ab d1 22 61 02 00 00 | 13 00 00 00 00 00 00 00 |..."a...|........|
|00004480| 49 6e 66 6f 00 00 00 00 | bc 59 00 00 46 ff ff ff |Info....|.Y..F...|
|00004490| d1 ab d1 22 c9 02 00 00 | 13 00 00 00 00 00 00 00 |..."....|........|
|000044a0| 49 6e 69 74 69 61 6c 69 | 73 65 00 00 88 5c 00 00 |Initiali|se...\..|
|000044b0| 46 ff ff ff d4 ab d1 22 | 89 05 00 00 13 00 00 00 |F......"|........|
|000044c0| 00 00 00 00 4e 65 77 00 | ff ff ff ff ff ff ff ff |....New.|........|
|000044d0| ff ff ff ff ff ff ff ff | ff ff ff ff 44 41 54 41 |........|....DATA|
|000044e0| 7e 01 00 00 4d 65 6e 75 | 55 74 69 6c 5f 43 6f 6c |~...Menu|Util_Col|
|000044f0| 6f 75 72 73 20 28 53 57 | 49 20 26 34 35 42 44 30 |ours (SW|I &45BD0|
|00004500| 29 0a 53 65 74 73 20 6e | 65 77 20 66 6f 72 65 67 |).Sets n|ew foreg|
|00004510| 72 6f 75 6e 64 20 61 6e | 64 20 62 61 63 6b 67 72 |round an|d backgr|
|00004520| 6f 75 6e 64 20 63 6f 6c | 6f 75 72 73 20 6f 66 20 |ound col|ours of |
|00004530| 6d 65 6e 75 20 69 74 65 | 6d 0a 0a 45 6e 74 72 79 |menu ite|m..Entry|
|00004540| 3a 0a 20 20 20 20 52 30 | 20 3d 20 68 61 6e 64 6c |:. R0| = handl|
|00004550| 65 20 6f 66 20 74 68 65 | 20 6d 65 6e 75 20 69 74 |e of the| menu it|
|00004560| 65 6d 20 6f 72 20 7a 65 | 72 6f 20 66 6f 72 20 63 |em or ze|ro for c|
|00004570| 75 72 72 65 6e 74 20 69 | 74 65 6d 0a 20 20 20 20 |urrent i|tem. |
|00004580| 52 31 20 3d 20 66 6f 72 | 65 67 72 6f 75 6e 64 20 |R1 = for|eground |
|00004590| 63 6f 6c 6f 75 72 0a 20 | 20 20 20 52 32 20 3d 20 |colour. | R2 = |
|000045a0| 62 61 63 6b 67 72 6f 75 | 6e 64 20 63 6f 6c 6f 75 |backgrou|nd colou|
|000045b0| 72 0a 45 78 69 74 3a 0a | 20 20 20 20 52 30 2d 52 |r.Exit:.| R0-R|
|000045c0| 32 20 70 72 65 73 65 72 | 76 65 64 0a 0a 54 68 69 |2 preser|ved..Thi|
|000045d0| 73 20 63 61 6c 6c 20 61 | 6c 6c 6f 77 73 20 79 6f |s call a|llows yo|
|000045e0| 75 20 74 6f 20 63 68 61 | 6e 67 65 20 63 6f 6c 6f |u to cha|nge colo|
|000045f0| 75 72 73 20 6f 66 20 70 | 61 72 74 69 63 75 6c 61 |urs of p|articula|
|00004600| 72 20 6d 65 6e 75 20 69 | 74 65 6d 2e 20 43 6f 6c |r menu i|tem. Col|
|00004610| 6f 75 72 73 20 6d 75 73 | 74 0a 62 65 20 73 65 6c |ours mus|t.be sel|
|00004620| 65 63 74 65 64 20 66 72 | 6f 6d 20 31 36 20 57 69 |ected fr|om 16 Wi|
|00004630| 6d 70 20 63 6f 6c 6f 75 | 72 73 2e 0a 0a 3c 45 78 |mp colou|rs...<Ex|
|00004640| 61 6d 70 6c 65 20 63 6f | 64 65 2e 2e 2e 3d 3e 45 |ample co|de...=>E|
|00004650| 78 5f 43 6f 6c 6f 75 72 | 73 3e 00 00 44 41 54 41 |x_Colour|s>..DATA|
|00004660| c8 05 00 00 4d 65 6e 75 | 55 74 69 6c 5f 44 65 63 |....Menu|Util_Dec|
|00004670| 6f 64 65 20 28 53 57 49 | 20 26 34 35 42 43 34 29 |ode (SWI| &45BC4)|
|00004680| 0a 44 65 63 6f 64 65 73 | 20 6d 65 6e 75 20 61 66 |.Decodes| menu af|
|00004690| 74 65 72 20 75 73 65 72 | 20 73 65 6c 65 63 74 69 |ter user| selecti|
|000046a0| 6f 6e 2e 0a 0a 45 6e 74 | 72 79 3a 0a 0a 20 20 20 |on...Ent|ry:.. |
|000046b0| 20 52 30 20 3d 20 6d 65 | 6e 75 20 68 61 6e 64 6c | R0 = me|nu handl|
|000046c0| 65 20 6f 72 20 7a 65 72 | 6f 20 69 66 20 63 75 72 |e or zer|o if cur|
|000046d0| 72 65 6e 74 20 6d 65 6e | 75 0a 20 20 20 20 52 31 |rent men|u. R1|
|000046e0| 20 2d 3e 20 70 6f 69 6e | 74 65 72 20 74 6f 20 74 | -> poin|ter to t|
|000046f0| 68 65 20 3c 6c 69 73 74 | 20 6f 66 20 6d 65 6e 75 |he <list| of menu|
|00004700| 20 73 65 6c 65 63 74 69 | 6f 6e 73 3d 3e 44 65 63 | selecti|ons=>Dec|
|00004710| 4d 53 4c 69 73 74 3e 0a | 45 78 69 74 3a 0a 20 20 |MSList>.|Exit:. |
|00004720| 20 20 52 30 20 2d 3e 20 | 70 6f 69 6e 74 65 72 20 | R0 -> |pointer |
|00004730| 74 6f 20 69 74 65 6d 20 | 68 61 6e 64 6c 65 72 20 |to item |handler |
|00004740| 6f 72 20 7a 65 72 6f 0a | 20 20 20 20 52 31 20 2d |or zero.| R1 -|
|00004750| 3e 20 54 52 55 45 20 69 | 66 20 73 65 6c 65 63 74 |> TRUE i|f select|
|00004760| 69 6f 6e 20 77 61 73 20 | 6d 61 64 65 20 77 69 74 |ion was |made wit|
|00004770| 68 20 41 44 4a 55 53 54 | 2e 0a 20 20 20 20 20 20 |h ADJUST|.. |
|00004780| 20 20 20 20 28 75 6e 64 | 6f 63 75 6d 65 6e 74 65 | (und|ocumente|
|00004790| 64 2c 20 62 75 74 20 75 | 73 65 64 20 69 6e 20 21 |d, but u|sed in !|
|000047a0| 54 65 6d 70 6c 45 64 29 | 0a 20 20 20 20 52 32 20 |TemplEd)|. R2 |
|000047b0| 2d 3e 20 70 6f 69 6e 74 | 65 72 20 74 6f 20 3c 62 |-> point|er to <b|
|000047c0| 6c 6f 63 6b 3d 3e 44 65 | 63 52 32 42 6c 6b 3e 20 |lock=>De|cR2Blk> |
|000047d0| 28 6f 72 69 67 69 6e 61 | 6c 20 64 6f 63 73 20 73 |(origina|l docs s|
|000047e0| 61 69 64 0a 20 20 20 20 | 20 20 20 20 20 20 74 68 |aid. | th|
|000047f0| 69 73 20 77 61 73 20 72 | 65 74 75 72 6e 65 64 20 |is was r|eturned |
|00004800| 69 6e 20 52 31 20 2d 20 | 74 68 69 73 20 61 70 70 |in R1 - |this app|
|00004810| 65 61 72 73 0a 20 20 20 | 20 20 20 20 20 20 20 74 |ears. | t|
|00004820| 6f 20 62 65 20 69 6e 63 | 6f 72 72 65 63 74 21 29 |o be inc|orrect!)|
|00004830| 0a 0a 42 6c 6f 63 6b 20 | 70 6f 69 6e 74 65 64 20 |..Block |pointed |
|00004840| 74 6f 20 62 79 20 52 31 | 20 6d 75 73 74 20 63 6f |to by R1| must co|
|00004850| 6e 74 61 69 6e 20 74 68 | 65 20 6c 69 73 74 20 6f |ntain th|e list o|
|00004860| 66 0a 6d 65 6e 75 20 73 | 65 6c 65 63 74 69 6f 6e |f.menu s|election|
|00004870| 73 20 69 6e 20 74 68 65 | 20 73 61 6d 65 20 66 6f |s in the| same fo|
|00004880| 72 6d 61 74 20 61 73 20 | 72 65 74 75 72 6e 65 64 |rmat as |returned|
|00004890| 20 62 79 0a 57 69 6d 70 | 5f 50 6f 6c 6c 20 69 6e | by.Wimp|_Poll in|
|000048a0| 20 63 61 73 65 20 6f 66 | 20 6d 65 6e 75 20 73 65 | case of| menu se|
|000048b0| 6c 65 63 74 69 6f 6e 20 | 65 76 65 6e 74 2e 0a 0a |lection |event...|
|000048c0| 54 68 69 73 20 63 61 6c | 6c 20 6d 61 70 73 20 74 |This cal|l maps t|
|000048d0| 68 65 20 6c 69 73 74 20 | 6f 66 20 6d 65 6e 75 20 |he list |of menu |
|000048e0| 73 65 6c 65 63 74 69 6f | 6e 73 20 6f 6e 74 6f 0a |selectio|ns onto.|
|000048f0| 6d 65 6e 75 20 64 61 74 | 61 20 73 74 72 75 63 74 |menu dat|a struct|
|00004900| 75 72 65 20 61 6e 64 20 | 64 65 74 65 72 6d 69 6e |ure and |determin|
|00004910| 65 73 20 63 6f 72 72 65 | 73 70 6f 6e 64 69 6e 67 |es corre|sponding|
|00004920| 0a 6d 65 6e 75 20 69 74 | 65 6d 73 2e 20 56 61 72 |.menu it|ems. Var|
|00004930| 69 6f 75 73 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |ious inf|ormation|
|00004940| 20 61 62 6f 75 74 20 6c | 61 73 74 20 74 77 6f 0a | about l|ast two.|
|00004950| 69 74 65 6d 73 20 66 72 | 6f 6d 20 74 68 69 73 20 |items fr|om this |
|00004960| 6c 69 73 74 20 28 73 65 | 6c 65 63 74 65 64 20 69 |list (se|lected i|
|00004970| 74 65 6d 20 61 6e 64 20 | 70 61 72 65 6e 74 0a 69 |tem and |parent.i|
|00004980| 74 65 6d 20 66 72 6f 6d | 20 6d 65 6e 75 20 6f 6e |tem from| menu on|
|00004990| 65 20 6c 65 76 65 6c 20 | 75 70 20 69 66 20 61 6e |e level |up if an|
|000049a0| 79 29 20 69 73 20 77 72 | 69 74 74 65 6e 0a 69 6e |y) is wr|itten.in|
|000049b0| 74 6f 20 73 70 65 63 69 | 61 6c 20 62 6c 6f 63 6b |to speci|al block|
|000049c0| 2e 20 50 6f 69 6e 74 65 | 72 20 74 6f 20 74 68 69 |. Pointe|r to thi|
|000049d0| 73 20 3c 62 6c 6f 63 6b | 3d 3e 44 65 63 52 32 42 |s <block|=>DecR2B|
|000049e0| 6c 6b 3e 20 69 73 0a 72 | 65 74 75 72 6e 65 64 20 |lk> is.r|eturned |
|000049f0| 69 6e 20 52 32 2e 20 0a | 0a 49 66 20 64 75 72 69 |in R2. .|.If duri|
|00004a00| 6e 67 20 63 72 65 61 74 | 69 6f 6e 20 6f 66 20 74 |ng creat|ion of t|
|00004a10| 68 69 73 20 69 74 65 6d | 20 79 6f 75 20 68 61 76 |his item| you hav|
|00004a20| 65 0a 73 70 65 63 69 66 | 69 65 64 20 74 68 65 20 |e.specif|ied the |
|00004a30| 68 61 6e 64 6c 65 72 20 | 74 68 65 6e 20 52 30 20 |handler |then R0 |
|00004a40| 6f 6e 20 65 78 69 74 20 | 77 69 6c 6c 0a 63 6f 6e |on exit |will.con|
|00004a50| 74 61 69 6e 20 74 68 65 | 20 70 6f 69 6e 74 65 72 |tain the| pointer|
|00004a60| 20 74 6f 20 74 68 69 73 | 20 68 61 6e 64 6c 65 72 | to this| handler|
|00004a70| 20 6f 74 68 65 72 77 69 | 73 65 20 52 30 0a 77 69 | otherwi|se R0.wi|
|00004a80| 6c 6c 20 62 65 20 7a 65 | 72 6f 2e 20 49 6e 74 65 |ll be ze|ro. Inte|
|00004a90| 72 70 72 65 74 61 74 69 | 6f 6e 20 6f 66 20 69 74 |rpretati|on of it|
|00004aa0| 65 6d 20 68 61 6e 64 6c | 65 72 20 69 73 0a 64 65 |em handl|er is.de|
|00004ab0| 74 65 72 6d 69 6e 65 64 | 20 62 79 20 69 6e 69 74 |termined| by init|
|00004ac0| 69 61 6c 69 73 61 74 69 | 6f 6e 20 74 79 70 65 20 |ialisati|on type |
|00004ad0| 28 73 65 65 0a 3c 4d 65 | 6e 75 55 74 69 6c 5f 49 |(see.<Me|nuUtil_I|
|00004ae0| 6e 69 74 69 61 6c 69 73 | 65 3e 29 2e 20 49 66 20 |nitialis|e>). If |
|00004af0| 69 6e 69 74 69 61 6c 69 | 73 61 74 69 6f 6e 20 74 |initiali|sation t|
|00004b00| 79 70 65 0a 77 61 73 20 | 22 42 41 53 49 43 22 20 |ype.was |"BASIC" |
|00004b10| 74 68 65 6e 20 52 30 20 | 77 69 6c 6c 20 70 6f 69 |then R0 |will poi|
|00004b20| 6e 74 20 74 6f 20 63 74 | 72 6c 2d 74 65 72 6d 69 |nt to ct|rl-termi|
|00004b30| 6e 61 74 65 64 0a 74 65 | 78 74 20 73 74 72 69 6e |nated.te|xt strin|
|00004b40| 67 2e 20 49 66 20 69 6e | 69 74 69 61 6c 69 73 61 |g. If in|itialisa|
|00004b50| 74 69 6f 6e 20 74 79 70 | 65 20 77 61 73 20 22 6d |tion typ|e was "m|
|00004b60| 61 63 68 69 6e 65 0a 63 | 6f 64 65 22 20 28 6e 6f |achine.c|ode" (no|
|00004b70| 74 20 73 75 70 70 6f 72 | 74 65 64 20 62 79 20 63 |t suppor|ted by c|
|00004b80| 75 72 72 65 6e 74 20 76 | 65 72 73 69 6f 6e 29 20 |urrent v|ersion) |
|00004b90| 74 68 65 6e 20 52 30 0a | 77 69 6c 6c 20 63 6f 6e |then R0.|will con|
|00004ba0| 74 61 69 6e 20 74 68 65 | 20 76 61 6c 75 65 20 70 |tain the| value p|
|00004bb0| 61 73 73 65 64 20 69 6e | 20 52 32 20 74 6f 0a 3c |assed in| R2 to.<|
|00004bc0| 4d 65 6e 75 55 74 69 6c | 5f 41 64 64 3e 2e 20 54 |MenuUtil|_Add>. T|
|00004bd0| 6f 20 69 6e 76 6f 6b 65 | 20 42 41 53 49 43 20 68 |o invoke| BASIC h|
|00004be0| 61 6e 64 6c 65 72 20 79 | 6f 75 20 63 61 6e 0a 75 |andler y|ou can.u|
|00004bf0| 73 65 20 74 68 65 20 45 | 56 41 4c 20 73 74 61 74 |se the E|VAL stat|
|00004c00| 65 6d 65 6e 74 2e 0a 0a | 3c 45 78 61 6d 70 6c 65 |ement...|<Example|
|00004c10| 20 63 6f 64 65 2e 2e 2e | 3d 3e 45 78 5f 44 65 63 | code...|=>Ex_Dec|
|00004c20| 6f 64 65 3e 44 41 54 41 | 83 04 00 00 4d 65 6e 75 |ode>DATA|....Menu|
|00004c30| 55 74 69 6c 5f 44 65 6c | 65 74 65 20 28 53 57 49 |Util_Del|ete (SWI|
|00004c40| 20 26 34 35 42 43 33 29 | 0a 52 65 6d 6f 76 65 73 | &45BC3)|.Removes|
|00004c50| 20 6d 65 6e 75 20 6f 72 | 20 6d 65 6e 75 20 69 74 | menu or| menu it|
|00004c60| 65 6d 0a 0a 45 6e 74 72 | 79 3a 0a 20 20 20 20 52 |em..Entr|y:. R|
|00004c70| 30 20 3d 20 68 61 6e 64 | 6c 65 20 6f 66 20 74 68 |0 = hand|le of th|
|00004c80| 65 20 6d 65 6e 75 20 6f | 72 20 6f 66 20 74 68 65 |e menu o|r of the|
|00004c90| 20 6d 65 6e 75 20 69 74 | 65 6d 20 6f 72 0a 20 20 | menu it|em or. |
|00004ca0| 20 20 20 20 20 20 20 7a | 65 72 6f 20 66 6f 72 20 | z|ero for |
|00004cb0| 63 75 72 72 65 6e 74 20 | 6d 65 6e 75 0a 20 20 20 |current |menu. |
|00004cc0| 20 69 66 20 52 31 5c 3c | 3e 30 20 74 68 65 6e 20 | if R1\<|>0 then |
|00004cd0| 72 65 63 75 72 73 69 76 | 65 6c 79 20 64 65 6c 65 |recursiv|ely dele|
|00004ce0| 74 65 20 61 6c 6c 20 73 | 75 62 6d 65 6e 75 73 20 |te all s|ubmenus |
|00004cf0| 0a 45 78 69 74 3a 0a 20 | 20 20 20 52 30 2c 52 31 |.Exit:. | R0,R1|
|00004d00| 20 70 72 65 73 65 72 76 | 65 64 0a 0a 54 68 69 73 | preserv|ed..This|
|00004d10| 20 63 61 6c 6c 20 61 6c | 6c 6f 77 73 20 79 6f 75 | call al|lows you|
|00004d20| 20 74 6f 20 64 65 6c 65 | 74 65 20 74 68 65 20 77 | to dele|te the w|
|00004d30| 68 6f 6c 65 20 6d 65 6e | 75 20 6f 72 0a 74 68 65 |hole men|u or.the|
|00004d40| 20 70 61 72 74 69 63 75 | 6c 61 72 20 6d 65 6e 75 | particu|lar menu|
|00004d50| 20 69 74 65 6d 2e 20 49 | 66 20 79 6f 75 20 77 69 | item. I|f you wi|
|00004d60| 6c 6c 20 64 65 6c 65 74 | 65 20 6d 65 6e 75 0a 69 |ll delet|e menu.i|
|00004d70| 74 65 6d 20 74 68 65 6e | 20 72 65 6d 61 69 6e 65 |tem then| remaine|
|00004d80| 64 20 69 74 65 6d 73 20 | 6f 66 20 74 68 69 73 20 |d items |of this |
|00004d90| 6d 65 6e 75 20 77 68 69 | 63 68 20 61 72 65 0a 70 |menu whi|ch are.p|
|00004da0| 6f 73 69 74 69 6f 6e 65 | 64 20 62 65 6c 6c 6f 77 |ositione|d bellow|
|00004db0| 20 69 74 20 77 69 6c 6c | 20 62 65 20 61 75 74 6f | it will| be auto|
|00004dc0| 6d 61 74 69 63 61 6c 6c | 79 20 73 68 69 66 74 65 |maticall|y shifte|
|00004dd0| 64 0a 69 6e 20 6d 65 6d | 6f 72 79 20 74 6f 20 66 |d.in mem|ory to f|
|00004de0| 69 6c 6c 20 74 68 65 20 | 68 6f 6c 65 2e 20 44 65 |ill the |hole. De|
|00004df0| 73 70 69 74 65 20 74 68 | 65 20 66 61 63 74 20 74 |spite th|e fact t|
|00004e00| 68 61 74 0a 6d 65 6d 6f | 72 79 20 6c 6f 63 61 74 |hat.memo|ry locat|
|00004e10| 69 6f 6e 20 61 6e 64 20 | 70 6f 73 69 74 69 6f 6e |ion and |position|
|00004e20| 20 69 6e 20 6d 65 6e 75 | 20 6f 66 20 73 6f 6d 65 | in menu| of some|
|00004e30| 20 69 74 65 6d 73 0a 6d | 61 79 20 62 65 20 63 68 | items.m|ay be ch|
|00004e40| 61 6e 67 65 64 20 74 68 | 65 20 68 61 6e 64 6c 65 |anged th|e handle|
|00004e50| 73 20 6f 66 20 74 68 65 | 20 69 74 65 6d 73 20 77 |s of the| items w|
|00004e60| 69 6c 6c 20 72 65 6d 61 | 69 6e 0a 76 61 6c 69 64 |ill rema|in.valid|
|00004e70| 2e 0a 0a 49 66 20 79 6f | 75 20 77 61 6e 74 20 74 |...If yo|u want t|
|00004e80| 6f 20 64 65 6c 65 74 65 | 20 6e 6f 74 20 6f 6e 6c |o delete| not onl|
|00004e90| 79 20 74 68 65 20 69 74 | 65 6d 20 62 75 74 20 61 |y the it|em but a|
|00004ea0| 6c 73 6f 20 74 68 65 0a | 77 68 6f 6c 65 20 6d 65 |lso the.|whole me|
|00004eb0| 6e 75 20 73 75 62 74 72 | 65 65 20 63 6f 6e 6e 65 |nu subtr|ee conne|
|00004ec0| 63 74 65 64 20 77 69 74 | 68 20 69 74 20 74 68 65 |cted wit|h it the|
|00004ed0| 6e 20 79 6f 75 20 6d 75 | 73 74 0a 73 65 74 20 52 |n you mu|st.set R|
|00004ee0| 31 5c 3c 3e 30 20 6f 6e | 20 65 6e 74 72 79 2e 20 |1\<>0 on| entry. |
|00004ef0| 49 66 20 52 30 20 63 6f | 6e 74 61 69 6e 73 20 74 |If R0 co|ntains t|
|00004f00| 68 65 20 68 61 6e 64 6c | 65 20 6f 66 0a 6d 65 6e |he handl|e of.men|
|00004f10| 75 20 74 68 65 6e 20 74 | 68 69 73 20 6d 65 6e 75 |u then t|his menu|
|00004f20| 20 77 69 6c 6c 20 62 65 | 20 64 65 6c 65 74 65 64 | will be| deleted|
|00004f30| 20 61 6c 6f 6e 65 20 6f | 72 20 74 6f 67 65 74 68 | alone o|r togeth|
|00004f40| 65 72 0a 77 69 74 68 20 | 61 6c 6c 20 73 75 62 6d |er.with |all subm|
|00004f50| 65 6e 75 73 20 64 65 70 | 65 6e 64 69 6e 67 20 6f |enus dep|ending o|
|00004f60| 6e 20 52 31 2e 20 0a 0a | 55 73 65 20 72 65 63 75 |n R1. ..|Use recu|
|00004f70| 72 73 69 76 65 20 64 65 | 6c 65 74 69 6f 6e 20 77 |rsive de|letion w|
|00004f80| 69 74 68 20 63 61 75 74 | 69 6f 6e 20 61 73 20 79 |ith caut|ion as y|
|00004f90| 6f 75 20 6d 61 79 0a 61 | 63 63 69 64 65 6e 74 61 |ou may.a|ccidenta|
|00004fa0| 6c 6c 79 20 64 65 6c 65 | 74 65 20 73 75 62 6d 65 |lly dele|te subme|
|00004fb0| 6e 75 73 20 77 68 69 63 | 68 20 61 72 65 20 63 6f |nus whic|h are co|
|00004fc0| 6e 6e 65 63 74 65 64 20 | 77 69 74 68 0a 6f 74 68 |nnected |with.oth|
|00004fd0| 65 72 20 6d 65 6e 75 20 | 69 74 65 6d 73 2e 0a 0a |er menu |items...|
|00004fe0| 54 68 69 73 20 63 61 6c | 6c 20 69 73 20 73 75 70 |This cal|l is sup|
|00004ff0| 70 6f 73 65 64 20 74 6f | 20 62 65 20 75 73 65 64 |posed to| be used|
|00005000| 20 77 68 65 6e 20 6d 65 | 6e 75 73 20 77 69 74 68 | when me|nus with|
|00005010| 0a 76 61 72 69 61 62 6c | 65 20 6e 75 6d 62 65 72 |.variabl|e number|
|00005020| 20 6f 66 20 69 74 65 6d | 73 20 61 72 65 20 6e 65 | of item|s are ne|
|00005030| 65 64 65 64 2e 20 49 74 | 20 6d 61 79 20 62 65 20 |eded. It| may be |
|00005040| 66 6f 72 0a 65 78 61 6d | 70 6c 65 20 6d 65 6e 75 |for.exam|ple menu|
|00005050| 20 77 69 74 68 20 74 68 | 65 20 6c 69 73 74 20 6f | with th|e list o|
|00005060| 66 20 63 75 72 72 65 6e | 74 6c 79 20 6f 70 65 6e |f curren|tly open|
|00005070| 65 64 20 64 6f 63 75 6d | 65 6e 74 73 0a 6f 72 20 |ed docum|ents.or |
|00005080| 61 72 63 68 69 76 65 73 | 2e 0a 0a 3c 45 78 61 6d |archives|...<Exam|
|00005090| 70 6c 65 20 63 6f 64 65 | 2e 2e 2e 3d 3e 45 78 5f |ple code|...=>Ex_|
|000050a0| 44 65 6c 65 74 65 3e 00 | 44 41 54 41 4d 03 00 00 |Delete>.|DATAM...|
|000050b0| 4d 65 6e 75 55 74 69 6c | 5f 44 6f 74 73 20 28 53 |MenuUtil|_Dots (S|
|000050c0| 57 49 20 20 26 34 35 42 | 43 41 29 0a 54 68 69 73 |WI &45B|CA).This|
|000050d0| 20 63 61 6c 6c 20 6d 61 | 79 20 62 65 20 75 73 65 | call ma|y be use|
|000050e0| 64 20 74 6f 20 6d 6f 64 | 69 66 79 20 74 68 65 20 |d to mod|ify the |
|000050f0| 73 74 61 74 65 20 6f 66 | 20 6d 65 6e 75 20 66 6c |state of| menu fl|
|00005100| 61 67 20 77 68 69 63 68 | 20 63 6f 6e 74 72 6f 6c |ag which| control|
|00005110| 73 0a 74 68 65 20 64 6f | 74 74 65 64 20 6c 69 6e |s.the do|tted lin|
|00005120| 65 20 64 69 73 70 6c 61 | 79 65 64 20 62 65 6c 6f |e displa|yed belo|
|00005130| 77 20 74 68 65 20 6d 65 | 6e 75 20 69 74 65 6d 2e |w the me|nu item.|
|00005140| 20 0a 0a 45 6e 74 72 79 | 3a 0a 20 20 20 20 52 30 | ..Entry|:. R0|
|00005150| 20 68 61 6e 64 6c 65 20 | 6f 66 20 6d 65 6e 75 20 | handle |of menu |
|00005160| 69 74 65 6d 20 6f 72 20 | 7a 65 72 6f 20 66 6f 72 |item or |zero for|
|00005170| 20 63 75 72 72 65 6e 74 | 20 6d 65 6e 75 20 69 74 | current| menu it|
|00005180| 65 6d 20 6f 72 20 68 61 | 6e 64 6c 65 20 6f 66 20 |em or ha|ndle of |
|00005190| 6d 65 6e 75 0a 20 20 20 | 20 52 31 20 64 65 66 69 |menu. | R1 defi|
|000051a0| 6e 65 73 20 61 63 74 69 | 6f 6e 0a 20 20 20 20 20 |nes acti|on. |
|000051b0| 20 20 69 66 20 52 31 20 | 3d 30 20 74 68 65 6e 20 | if R1 |=0 then |
|000051c0| 63 6c 65 61 72 20 64 6f | 74 73 20 66 6c 61 67 20 |clear do|ts flag |
|000051d0| 0a 20 20 20 20 20 20 20 | 69 66 20 52 31 20 5c 3c |. |if R1 \<|
|000051e0| 3e 30 20 74 68 65 6e 20 | 73 65 74 20 64 6f 74 73 |>0 then |set dots|
|000051f0| 20 66 6c 61 67 20 20 0a | 45 78 69 74 3a 0a 20 20 | flag .|Exit:. |
|00005200| 20 52 30 2c 52 31 20 70 | 72 65 73 65 72 76 65 64 | R0,R1 p|reserved|
|00005210| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 0a 52 30 |. | .R0|
|00005220| 20 6d 75 73 74 20 63 6f | 6e 74 61 69 6e 20 74 68 | must co|ntain th|
|00005230| 65 20 69 74 65 6d 20 68 | 61 6e 64 6c 65 20 6f 72 |e item h|andle or|
|00005240| 20 7a 65 72 6f 20 66 6f | 72 20 74 68 65 20 63 75 | zero fo|r the cu|
|00005250| 72 72 65 6e 74 20 6d 65 | 6e 75 20 69 74 65 6d 2e |rrent me|nu item.|
|00005260| 20 52 31 0a 64 65 66 69 | 6e 65 73 20 74 6f 20 73 | R1.defi|nes to s|
|00005270| 65 74 20 6f 72 20 74 6f | 20 63 6c 65 61 72 20 74 |et or to| clear t|
|00005280| 68 65 20 66 6c 61 67 2e | 20 49 66 20 52 31 20 69 |he flag.| If R1 i|
|00005290| 73 20 7a 65 72 6f 20 74 | 68 65 6e 20 74 68 65 20 |s zero t|hen the |
|000052a0| 66 6c 61 67 20 77 69 6c | 6c 0a 62 65 20 63 6c 65 |flag wil|l.be cle|
|000052b0| 61 72 65 64 20 61 6e 64 | 20 69 66 20 52 31 20 69 |ared and| if R1 i|
|000052c0| 73 20 6e 6f 6e 20 7a 65 | 72 6f 20 74 68 65 6e 20 |s non ze|ro then |
|000052d0| 74 68 65 20 66 6c 61 67 | 20 77 69 6c 6c 20 62 65 |the flag| will be|
|000052e0| 20 73 65 74 2e 0a 0a 49 | 66 20 52 30 20 69 6e 73 | set...I|f R0 ins|
|000052f0| 74 65 61 64 20 6f 66 20 | 69 74 65 6d 20 68 61 6e |tead of |item han|
|00005300| 64 6c 65 20 63 6f 6e 74 | 61 69 6e 73 20 6d 65 6e |dle cont|ains men|
|00005310| 75 20 68 61 6e 64 6c 65 | 20 74 68 65 6e 20 74 68 |u handle| then th|
|00005320| 65 20 73 74 61 74 65 20 | 6f 66 0a 74 68 65 20 66 |e state |of.the f|
|00005330| 6c 61 67 20 77 69 6c 6c | 20 62 65 20 63 68 61 6e |lag will| be chan|
|00005340| 67 65 64 20 69 6e 20 61 | 6c 6c 20 69 74 65 6d 73 |ged in a|ll items|
|00005350| 20 6f 66 20 74 68 69 73 | 20 6d 65 6e 75 2e 0a 0a | of this| menu...|
|00005360| 49 74 20 69 73 20 63 6f | 6e 76 65 6e 69 65 6e 74 |It is co|nvenient|
|00005370| 20 74 6f 20 70 61 73 73 | 20 69 6e 20 52 31 20 74 | to pass| in R1 t|
|00005380| 68 65 20 72 65 73 75 6c | 74 20 6f 66 20 6c 6f 67 |he resul|t of log|
|00005390| 69 63 61 6c 20 65 78 70 | 72 65 73 73 69 6f 6e 20 |ical exp|ression |
|000053a0| 28 74 6f 0a 73 65 74 20 | 66 6c 61 67 20 69 66 20 |(to.set |flag if |
|000053b0| 72 65 73 75 6c 74 20 69 | 73 20 54 52 55 45 20 61 |result i|s TRUE a|
|000053c0| 6e 64 20 74 6f 20 63 6c | 65 61 72 20 69 74 20 69 |nd to cl|ear it i|
|000053d0| 66 20 46 41 4c 53 45 29 | 2e 0a 0a 3c 45 78 61 6d |f FALSE)|...<Exam|
|000053e0| 70 6c 65 20 63 6f 64 65 | 2e 2e 2e 3d 3e 45 78 5f |ple code|...=>Ex_|
|000053f0| 44 6f 74 73 3e 00 00 00 | 44 41 54 41 5e 03 00 00 |Dots>...|DATA^...|
|00005400| 4d 65 6e 75 55 74 69 6c | 5f 46 61 64 65 20 28 26 |MenuUtil|_Fade (&|
|00005410| 34 35 42 43 42 29 0a 54 | 68 69 73 20 63 61 6c 6c |45BCB).T|his call|
|00005420| 20 63 61 6e 20 62 65 20 | 75 73 65 64 20 74 6f 20 | can be |used to |
|00005430| 6d 61 6b 65 20 6d 65 6e | 75 20 69 74 65 6d 20 6e |make men|u item n|
|00005440| 6f 6e 2d 70 69 63 6b 61 | 62 6c 65 20 0a 0a 45 6e |on-picka|ble ..En|
|00005450| 74 72 79 3a 0a 20 20 20 | 20 52 30 20 68 61 6e 64 |try:. | R0 hand|
|00005460| 6c 65 20 6f 66 20 6d 65 | 6e 75 20 69 74 65 6d 20 |le of me|nu item |
|00005470| 6f 72 20 7a 65 72 6f 20 | 66 6f 72 20 63 75 72 72 |or zero |for curr|
|00005480| 65 6e 74 20 6d 65 6e 75 | 20 69 74 65 6d 0a 20 20 |ent menu| item. |
|00005490| 20 20 20 20 20 6f 72 20 | 68 61 6e 64 6c 65 20 6f | or |handle o|
|000054a0| 66 20 6d 65 6e 75 0a 20 | 20 20 20 52 31 20 64 65 |f menu. | R1 de|
|000054b0| 66 69 6e 65 73 20 61 63 | 74 69 6f 6e 0a 20 20 20 |fines ac|tion. |
|000054c0| 20 20 20 20 69 66 20 52 | 31 20 3d 30 20 63 6c 65 | if R|1 =0 cle|
|000054d0| 61 72 20 73 68 61 64 65 | 64 20 6d 65 6e 75 20 66 |ar shade|d menu f|
|000054e0| 6c 61 67 0a 20 20 20 20 | 20 20 20 69 66 20 52 31 |lag. | if R1|
|000054f0| 20 5c 3c 3e 30 20 66 61 | 64 65 20 74 68 69 73 20 | \<>0 fa|de this |
|00005500| 6d 65 6e 75 20 69 74 65 | 6d 20 28 69 65 2e 20 75 |menu ite|m (ie. u|
|00005510| 6e 70 69 63 6b 61 62 6c | 65 29 20 0a 45 78 69 74 |npickabl|e) .Exit|
|00005520| 3a 0a 20 20 20 52 30 2c | 52 31 20 70 72 65 73 65 |:. R0,|R1 prese|
|00005530| 72 76 65 64 0a 20 20 20 | 20 20 20 20 20 20 20 20 |rved. | |
|00005540| 20 0a 52 30 20 6d 75 73 | 74 20 63 6f 6e 74 61 69 | .R0 mus|t contai|
|00005550| 6e 20 74 68 65 20 69 74 | 65 6d 20 68 61 6e 64 6c |n the it|em handl|
|00005560| 65 20 6f 72 20 7a 65 72 | 6f 20 66 6f 72 20 74 68 |e or zer|o for th|
|00005570| 65 20 63 75 72 72 65 6e | 74 0a 6d 65 6e 75 20 69 |e curren|t.menu i|
|00005580| 74 65 6d 2e 20 52 31 20 | 64 65 66 69 6e 65 73 20 |tem. R1 |defines |
|00005590| 74 6f 20 73 65 74 20 6f | 72 20 74 6f 20 63 6c 65 |to set o|r to cle|
|000055a0| 61 72 20 74 68 65 20 66 | 6c 61 67 20 77 68 69 63 |ar the f|lag whic|
|000055b0| 68 0a 6d 61 6b 65 73 20 | 6d 65 6e 75 20 69 74 65 |h.makes |menu ite|
|000055c0| 6d 20 75 6e 70 69 63 6b | 61 62 6c 65 2e 20 49 66 |m unpick|able. If|
|000055d0| 20 52 31 20 69 73 20 7a | 65 72 6f 20 74 68 65 6e | R1 is z|ero then|
|000055e0| 20 74 68 65 20 66 6c 61 | 67 0a 77 69 6c 6c 20 62 | the fla|g.will b|
|000055f0| 65 20 63 6c 65 61 72 65 | 64 20 61 6e 64 20 69 66 |e cleare|d and if|
|00005600| 20 52 31 20 69 73 20 6e | 6f 6e 20 7a 65 72 6f 20 | R1 is n|on zero |
|00005610| 74 68 65 6e 20 74 68 65 | 20 66 6c 61 67 20 77 69 |then the| flag wi|
|00005620| 6c 6c 0a 62 65 20 73 65 | 74 20 61 6e 64 20 74 68 |ll.be se|t and th|
|00005630| 65 20 69 74 65 6d 20 77 | 69 6c 6c 20 62 65 20 73 |e item w|ill be s|
|00005640| 68 61 64 65 64 2e 0a 0a | 49 66 20 52 30 20 69 6e |haded...|If R0 in|
|00005650| 73 74 65 61 64 20 6f 66 | 20 69 74 65 6d 20 68 61 |stead of| item ha|
|00005660| 6e 64 6c 65 20 63 6f 6e | 74 61 69 6e 73 20 6d 65 |ndle con|tains me|
|00005670| 6e 75 20 68 61 6e 64 6c | 65 20 74 68 65 6e 0a 74 |nu handl|e then.t|
|00005680| 68 65 20 73 74 61 74 65 | 20 6f 66 20 74 68 65 20 |he state| of the |
|00005690| 66 6c 61 67 20 77 69 6c | 6c 20 62 65 20 63 68 61 |flag wil|l be cha|
|000056a0| 6e 67 65 64 20 69 6e 20 | 61 6c 6c 20 69 74 65 6d |nged in |all item|
|000056b0| 73 20 6f 66 0a 74 68 69 | 73 20 6d 65 6e 75 2e 0a |s of.thi|s menu..|
|000056c0| 0a 49 74 20 69 73 20 63 | 6f 6e 76 65 6e 69 65 6e |.It is c|onvenien|
|000056d0| 74 20 74 6f 20 70 61 73 | 73 20 69 6e 20 52 31 20 |t to pas|s in R1 |
|000056e0| 74 68 65 20 72 65 73 75 | 6c 74 20 6f 66 20 6c 6f |the resu|lt of lo|
|000056f0| 67 69 63 61 6c 0a 65 78 | 70 72 65 73 73 69 6f 6e |gical.ex|pression|
|00005700| 20 28 74 6f 20 73 65 74 | 20 66 6c 61 67 20 69 66 | (to set| flag if|
|00005710| 20 72 65 73 75 6c 74 20 | 69 73 20 54 52 55 45 20 | result |is TRUE |
|00005720| 61 6e 64 20 74 6f 20 63 | 6c 65 61 72 0a 69 74 20 |and to c|lear.it |
|00005730| 69 66 20 46 41 4c 53 45 | 29 2e 0a 0a 3c 45 78 61 |if FALSE|)...<Exa|
|00005740| 6d 70 6c 65 20 63 6f 64 | 65 2e 2e 2e 3d 3e 45 78 |mple cod|e...=>Ex|
|00005750| 5f 46 61 64 65 3e 00 00 | 44 41 54 41 61 02 00 00 |_Fade>..|DATAa...|
|00005760| 4d 65 6e 75 55 74 69 6c | 5f 49 6e 66 6f 20 28 53 |MenuUtil|_Info (S|
|00005770| 57 49 20 26 34 35 42 43 | 37 29 0a 54 68 69 73 20 |WI &45BC|7).This |
|00005780| 63 61 6c 6c 20 72 65 74 | 75 72 6e 73 20 76 61 72 |call ret|urns var|
|00005790| 69 6f 75 73 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |ious inf|ormation|
|000057a0| 20 61 62 6f 75 74 20 74 | 68 65 0a 77 68 6f 6c 65 | about t|he.whole|
|000057b0| 20 6d 65 6e 75 20 6f 72 | 20 61 62 6f 75 74 20 74 | menu or| about t|
|000057c0| 68 65 20 70 61 72 74 69 | 63 75 6c 61 72 20 6d 65 |he parti|cular me|
|000057d0| 6e 75 20 69 74 65 6d 2e | 0a 0a 45 6e 74 72 79 3a |nu item.|..Entry:|
|000057e0| 0a 20 20 20 20 52 30 20 | 3d 20 68 61 6e 64 6c 65 |. R0 |= handle|
|000057f0| 20 6f 66 20 74 68 65 20 | 6d 65 6e 75 20 6f 72 20 | of the |menu or |
|00005800| 6f 66 20 74 68 65 20 6d | 65 6e 75 20 69 74 65 6d |of the m|enu item|
|00005810| 0a 20 20 20 20 20 20 20 | 20 20 6f 72 20 7a 65 72 |. | or zer|
|00005820| 6f 20 66 6f 72 20 63 75 | 72 72 65 6e 74 20 69 74 |o for cu|rrent it|
|00005830| 65 6d 0a 45 78 69 74 3a | 0a 20 20 20 20 52 30 20 |em.Exit:|. R0 |
|00005840| 2d 3e 20 70 6f 69 6e 74 | 65 72 20 74 6f 20 62 6c |-> point|er to bl|
|00005850| 6f 63 6b 0a 0a 52 65 74 | 75 72 6e 65 64 20 62 6c |ock..Ret|urned bl|
|00005860| 6f 63 6b 20 63 6f 6e 74 | 61 69 6e 73 20 74 68 65 |ock cont|ains the|
|00005870| 20 66 6f 6c 6c 6f 77 69 | 6e 67 20 69 6e 66 6f 72 | followi|ng infor|
|00005880| 6d 61 74 69 6f 6e 3a 0a | 20 20 20 52 30 20 2b 20 |mation:.| R0 + |
|00005890| 30 20 70 6f 69 6e 74 65 | 72 20 74 6f 20 6d 65 6e |0 pointe|r to men|
|000058a0| 75 20 64 61 74 61 20 73 | 74 72 75 63 74 75 72 65 |u data s|tructure|
|000058b0| 0a 20 20 20 52 30 20 2b | 20 34 20 70 6f 69 6e 74 |. R0 +| 4 point|
|000058c0| 65 72 20 74 6f 20 69 74 | 65 6d 20 64 61 74 61 20 |er to it|em data |
|000058d0| 6f 72 20 7a 65 72 6f 0a | 0a 4d 65 6e 75 73 20 63 |or zero.|.Menus c|
|000058e0| 72 65 61 74 65 64 20 77 | 69 74 68 20 4d 65 6e 75 |reated w|ith Menu|
|000058f0| 55 74 69 6c 73 20 61 72 | 65 20 6e 6f 74 20 73 74 |Utils ar|e not st|
|00005900| 61 74 69 63 20 61 6e 64 | 0a 6d 61 79 20 62 65 20 |atic and|.may be |
|00005910| 6d 6f 76 65 64 20 69 6e | 20 6d 65 6d 6f 72 79 2c |moved in| memory,|
|00005920| 20 66 6f 72 20 65 78 61 | 6d 70 6c 65 20 61 66 74 | for exa|mple aft|
|00005930| 65 72 20 61 64 64 69 6e | 67 0a 6e 65 77 20 69 74 |er addin|g.new it|
|00005940| 65 6d 73 2e 20 53 6f 20 | 79 6f 75 20 6d 75 73 74 |ems. So |you must|
|00005950| 20 75 73 65 20 64 69 72 | 65 63 74 20 70 6f 69 6e | use dir|ect poin|
|00005960| 74 65 72 73 20 74 6f 0a | 74 68 69 73 20 6d 65 6e |ters to.|this men|
|00005970| 75 73 20 77 69 74 68 20 | 63 61 75 74 69 6f 6e 20 |us with |caution |
|00005980| 75 6e 74 69 6c 20 79 6f | 75 20 68 61 76 65 20 63 |until yo|u have c|
|00005990| 6f 6d 70 6c 65 74 65 6c | 79 0a 66 69 6e 69 73 68 |ompletel|y.finish|
|000059a0| 65 64 20 74 68 65 20 6d | 65 6e 75 20 63 6f 6e 73 |ed the m|enu cons|
|000059b0| 74 72 75 63 74 69 6f 6e | 2e 00 00 00 44 41 54 41 |truction|....DATA|
|000059c0| c9 02 00 00 4d 65 6e 75 | 55 74 69 6c 5f 49 6e 69 |....Menu|Util_Ini|
|000059d0| 74 69 61 6c 69 73 65 20 | 28 53 57 49 20 26 34 35 |tialise |(SWI &45|
|000059e0| 42 43 30 29 0a 54 6f 20 | 72 65 67 69 73 74 65 72 |BC0).To |register|
|000059f0| 20 74 68 65 20 74 61 73 | 6b 20 61 73 20 4d 65 6e | the tas|k as Men|
|00005a00| 75 55 74 69 6c 73 20 63 | 6c 69 65 6e 74 0a 0a 45 |uUtils c|lient..E|
|00005a10| 6e 74 72 79 3a 0a 20 20 | 20 20 52 30 20 6c 61 73 |ntry:. | R0 las|
|00005a20| 74 20 4d 65 6e 75 55 74 | 69 6c 73 20 76 65 72 73 |t MenuUt|ils vers|
|00005a30| 69 6f 6e 20 6e 75 6d 62 | 65 72 20 6b 6e 6f 77 6e |ion numb|er known|
|00005a40| 20 74 6f 20 74 61 73 6b | 20 2a 20 31 30 30 20 20 | to task| * 100 |
|00005a50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 0a 20 | | . |
|00005a60| 20 20 20 52 31 20 69 6e | 69 74 69 61 6c 69 73 61 | R1 in|itialisa|
|00005a70| 74 69 6f 6e 20 74 79 70 | 65 20 28 73 65 65 20 6c |tion typ|e (see l|
|00005a80| 61 74 65 72 29 0a 20 20 | 20 20 20 20 20 62 69 74 |ater). | bit|
|00005a90| 20 30 0a 20 20 20 20 20 | 20 20 20 20 20 20 30 20 | 0. | 0 |
|00005aa0| 2d 20 22 42 41 53 49 43 | 22 0a 20 20 20 20 20 20 |- "BASIC|". |
|00005ab0| 20 20 20 20 20 31 20 2d | 20 22 6d 61 63 68 69 6e | 1 -| "machin|
|00005ac0| 65 20 63 6f 64 65 22 20 | 28 6e 6f 74 20 73 75 70 |e code" |(not sup|
|00005ad0| 70 6f 72 74 65 64 20 62 | 79 20 63 75 72 72 65 6e |ported b|y curren|
|00005ae0| 74 20 76 65 72 73 69 6f | 6e 29 0a 45 78 69 74 3a |t versio|n).Exit:|
|00005af0| 0a 20 20 20 20 52 30 20 | 76 65 72 73 69 6f 6e 20 |. R0 |version |
|00005b00| 6e 75 6d 62 65 72 20 2a | 20 31 30 30 0a 20 20 20 |number *| 100. |
|00005b10| 20 52 31 2c 52 32 20 70 | 72 65 73 65 72 76 65 64 | R1,R2 p|reserved|
|00005b20| 20 20 20 20 20 0a 0a 4d | 65 6e 75 55 74 69 6c 5f | ..M|enuUtil_|
|00005b30| 49 6e 69 74 69 61 6c 69 | 73 65 20 73 68 6f 75 6c |Initiali|se shoul|
|00005b40| 64 20 6f 6e 6c 79 20 62 | 65 20 63 61 6c 6c 65 64 |d only b|e called|
|00005b50| 20 6f 6e 63 65 20 77 68 | 65 6e 20 74 68 65 20 74 | once wh|en the t|
|00005b60| 61 73 6b 20 73 74 61 72 | 74 73 20 75 70 2e 20 49 |ask star|ts up. I|
|00005b70| 74 0a 6d 75 73 74 20 62 | 65 20 63 61 6c 6c 65 64 |t.must b|e called|
|00005b80| 20 61 66 74 65 72 20 57 | 69 6d 70 5f 49 6e 69 74 | after W|imp_Init|
|00005b90| 69 61 6c 69 73 65 20 68 | 61 73 20 62 65 65 6e 20 |ialise h|as been |
|00005ba0| 63 61 6c 6c 65 64 20 61 | 6e 64 20 62 65 66 6f 72 |called a|nd befor|
|00005bb0| 65 20 61 6e 79 0a 6f 74 | 68 65 72 20 63 61 6c 6c |e any.ot|her call|
|00005bc0| 20 74 6f 20 74 68 65 20 | 4d 65 6e 75 55 74 69 6c | to the |MenuUtil|
|00005bd0| 73 20 6d 6f 64 75 6c 65 | 20 69 73 20 6d 61 64 65 |s module| is made|
|00005be0| 2e 0a 0a 4d 65 6e 75 55 | 74 69 6c 73 20 70 65 72 |...MenuU|tils per|
|00005bf0| 66 6f 72 6d 73 20 61 6c | 6c 20 74 68 65 20 63 6c |forms al|l the cl|
|00005c00| 6f 73 65 64 6f 77 6e 20 | 77 6f 72 6b 20 61 75 74 |osedown |work aut|
|00005c10| 6f 6d 61 74 69 63 61 6c | 6c 79 20 77 68 65 6e 20 |omatical|ly when |
|00005c20| 74 68 65 0a 74 61 73 6b | 20 66 69 6e 69 73 68 65 |the.task| finishe|
|00005c30| 73 20 73 6f 20 6e 6f 20 | 73 70 65 63 69 61 6c 20 |s so no |special |
|00005c40| 4d 65 6e 75 55 74 69 6c | 5f 43 6c 6f 73 65 44 6f |MenuUtil|_CloseDo|
|00005c50| 77 6e 20 53 57 49 20 69 | 73 20 70 72 6f 76 69 64 |wn SWI i|s provid|
|00005c60| 65 64 2e 0a 0a 3c 45 78 | 61 6d 70 6c 65 20 63 6f |ed...<Ex|ample co|
|00005c70| 64 65 2e 2e 2e 3d 3e 45 | 78 5f 49 6e 69 74 69 61 |de...=>E|x_Initia|
|00005c80| 6c 69 73 65 3e 00 00 00 | 44 41 54 41 89 05 00 00 |lise>...|DATA....|
|00005c90| 4d 65 6e 75 55 74 69 6c | 5f 4e 65 77 20 28 53 57 |MenuUtil|_New (SW|
|00005ca0| 49 20 26 34 35 42 43 31 | 29 0a 43 72 65 61 74 65 |I &45BC1|).Create|
|00005cb0| 73 20 6e 65 77 20 65 6d | 70 74 79 20 6d 65 6e 75 |s new em|pty menu|
|00005cc0| 2e 0a 0a 45 6e 74 72 79 | 3a 0a 20 20 20 20 52 31 |...Entry|:. R1|
|00005cd0| 20 70 6f 69 6e 74 65 72 | 20 74 6f 20 6d 65 6e 75 | pointer| to menu|
|00005ce0| 20 74 69 74 6c 65 20 73 | 74 72 69 6e 67 0a 20 20 | title s|tring. |
|00005cf0| 20 20 52 32 20 61 70 70 | 72 6f 78 69 6d 61 74 65 | R2 app|roximate|
|00005d00| 20 6e 75 6d 62 65 72 20 | 6f 66 20 69 74 65 6d 73 | number |of items|
|00005d10| 20 28 64 65 66 61 75 6c | 74 20 35 29 0a 0a 45 78 | (defaul|t 5)..Ex|
|00005d20| 69 74 3a 0a 20 20 20 20 | 52 30 20 68 61 6e 64 6c |it:. |R0 handl|
|00005d30| 65 20 6f 66 20 63 72 65 | 61 74 65 64 20 6d 65 6e |e of cre|ated men|
|00005d40| 75 0a 20 20 20 20 0a 54 | 68 69 73 20 63 61 6c 6c |u. .T|his call|
|00005d50| 20 63 72 65 61 74 65 73 | 20 6e 65 77 20 65 6d 70 | creates| new emp|
|00005d60| 74 79 20 6d 65 6e 75 20 | 77 69 74 68 20 73 70 65 |ty menu |with spe|
|00005d70| 63 69 66 69 65 64 20 74 | 69 74 6c 65 20 73 74 72 |cified t|itle str|
|00005d80| 69 6e 67 2e 20 43 6f 6c | 6f 75 72 73 0a 61 6e 64 |ing. Col|ours.and|
|00005d90| 20 64 69 6d 65 6e 73 69 | 6f 6e 73 20 6f 66 20 74 | dimensi|ons of t|
|00005da0| 68 65 20 6d 65 6e 75 20 | 61 72 65 20 69 6e 20 73 |he menu |are in s|
|00005db0| 74 61 6e 64 61 72 64 20 | 52 49 53 43 20 4f 53 20 |tandard |RISC OS |
|00005dc0| 73 74 79 6c 65 2e 20 59 | 6f 75 20 63 61 6e 0a 73 |style. Y|ou can.s|
|00005dd0| 70 65 63 69 66 79 20 6e | 75 6d 62 65 72 20 6f 66 |pecify n|umber of|
|00005de0| 20 69 74 65 6d 73 20 79 | 6f 75 20 61 72 65 20 67 | items y|ou are g|
|00005df0| 6f 69 6e 67 20 74 6f 20 | 68 61 76 65 20 69 6e 20 |oing to |have in |
|00005e00| 74 68 69 73 20 6d 65 6e | 75 2e 20 54 68 69 73 20 |this men|u. This |
|00005e10| 69 73 0a 6f 70 74 69 6f | 6e 61 6c 20 62 75 74 20 |is.optio|nal but |
|00005e20| 69 74 20 63 61 6e 20 73 | 70 65 65 64 20 75 70 20 |it can s|peed up |
|00005e30| 74 68 65 20 70 72 6f 63 | 65 73 73 20 6f 66 20 6d |the proc|ess of m|
|00005e40| 65 6e 75 20 63 72 65 61 | 74 69 6f 6e 2e 20 49 74 |enu crea|tion. It|
|00005e50| 0a 6d 61 79 20 62 65 20 | 69 6d 70 6f 72 74 61 6e |.may be |importan|
|00005e60| 74 20 66 6f 72 20 62 69 | 67 20 6d 65 6e 75 73 20 |t for bi|g menus |
|00005e70| 28 66 6f 72 20 65 78 61 | 6d 70 6c 65 20 66 6f 72 |(for exa|mple for|
|00005e80| 20 6f 6c 64 73 74 79 6c | 65 20 66 6f 6e 74 73 20 | oldstyl|e fonts |
|00005e90| 6d 65 6e 75 29 2e 0a 0a | 41 73 20 57 69 6e 64 6f |menu)...|As Windo|
|00005ea0| 77 20 4d 61 6e 61 67 65 | 72 20 64 6f 65 73 6e 27 |w Manage|r doesn'|
|00005eb0| 74 20 61 6c 6c 6f 77 20 | 79 6f 75 20 74 6f 20 68 |t allow |you to h|
|00005ec0| 61 76 65 20 6d 65 6e 75 | 73 20 61 62 73 6f 6c 75 |ave menu|s absolu|
|00005ed0| 74 65 6c 79 20 77 69 74 | 68 6f 75 74 0a 6d 65 6e |tely wit|hout.men|
|00005ee0| 75 20 69 74 65 6d 73 20 | 73 6f 20 65 61 63 68 20 |u items |so each |
|00005ef0| 6e 65 77 20 6d 65 6e 75 | 20 69 73 20 63 72 65 61 |new menu| is crea|
|00005f00| 74 65 64 20 74 6f 67 65 | 74 68 65 72 20 77 69 74 |ted toge|ther wit|
|00005f10| 68 20 6f 6e 65 20 73 70 | 65 63 69 61 6c 20 69 74 |h one sp|ecial it|
|00005f20| 65 6d 2e 0a 54 68 69 73 | 20 69 74 65 6d 20 69 73 |em..This| item is|
|00005f30| 20 63 72 65 61 74 65 64 | 20 77 69 74 68 20 74 68 | created| with th|
|00005f40| 65 20 6f 6e 6c 79 20 61 | 69 6d 20 74 6f 20 70 72 |e only a|im to pr|
|00005f50| 65 76 65 6e 74 20 63 72 | 61 73 68 65 73 20 69 6e |event cr|ashes in|
|00005f60| 20 63 61 73 65 20 79 6f | 75 0a 77 69 6c 6c 20 61 | case yo|u.will a|
|00005f70| 63 63 69 64 65 6e 74 69 | 61 6c 6c 79 20 74 72 79 |ccidenti|ally try|
|00005f80| 20 74 6f 20 6f 70 65 6e | 20 75 6e 66 69 6e 69 73 | to open| unfinis|
|00005f90| 68 65 64 20 6d 65 6e 75 | 2e 20 54 68 65 20 73 70 |hed menu|. The sp|
|00005fa0| 65 63 69 61 6c 20 69 74 | 65 6d 20 77 69 6c 6c 0a |ecial it|em will.|
|00005fb0| 62 65 20 72 65 6d 6f 76 | 65 64 20 61 75 74 6f 6d |be remov|ed autom|
|00005fc0| 61 74 69 63 61 6c 6c 79 | 20 6a 75 73 74 20 61 66 |atically| just af|
|00005fd0| 74 65 72 20 79 6f 75 20 | 61 64 64 20 79 6f 75 72 |ter you |add your|
|00005fe0| 20 66 69 72 73 74 20 69 | 74 65 6d 20 74 6f 20 74 | first i|tem to t|
|00005ff0| 68 69 73 0a 6d 65 6e 75 | 2e 0a 0a 49 66 20 79 6f |his.menu|...If yo|
|00006000| 75 72 20 70 72 6f 67 72 | 61 6d 20 68 61 73 20 63 |ur progr|am has c|
|00006010| 6f 6d 70 6c 65 78 20 6d | 65 6e 75 20 73 74 72 75 |omplex m|enu stru|
|00006020| 63 74 75 72 65 20 77 69 | 74 68 20 73 75 62 6d 65 |cture wi|th subme|
|00006030| 6e 75 73 20 74 68 65 6e | 20 79 6f 75 20 63 61 6e |nus then| you can|
|00006040| 0a 75 73 65 20 74 68 69 | 73 20 63 61 6c 6c 20 74 |.use thi|s call t|
|00006050| 6f 20 63 72 65 61 74 65 | 20 6e 6f 74 20 6f 6e 6c |o create| not onl|
|00006060| 79 20 6d 61 69 6e 20 6d | 65 6e 75 20 62 75 74 20 |y main m|enu but |
|00006070| 61 6c 73 6f 20 61 6c 6c | 20 73 75 62 6d 65 6e 75 |also all| submenu|
|00006080| 73 2e 20 41 6e 64 0a 79 | 6f 75 20 68 61 76 65 20 |s. And.y|ou have |
|00006090| 74 6f 20 72 65 6d 65 6d | 62 65 72 20 74 68 65 20 |to remem|ber the |
|000060a0| 68 61 6e 64 6c 65 73 20 | 6f 66 20 61 6c 6c 20 73 |handles |of all s|
|000060b0| 75 62 6d 65 6e 75 73 20 | 69 6e 20 6f 72 64 65 72 |ubmenus |in order|
|000060c0| 20 74 6f 20 6c 69 6e 6b | 20 74 68 65 6d 0a 6c 61 | to link| them.la|
|000060d0| 74 65 72 20 74 6f 20 63 | 6f 72 72 65 73 70 6f 6e |ter to c|orrespon|
|000060e0| 64 69 6e 67 20 6d 65 6e | 75 20 69 74 65 6d 73 20 |ding men|u items |
|000060f0| 69 6e 20 70 61 72 65 6e | 74 20 6d 65 6e 75 2e 20 |in paren|t menu. |
|00006100| 49 66 20 6f 6e 20 74 68 | 65 20 6f 74 68 65 72 20 |If on th|e other |
|00006110| 68 61 6e 64 0a 79 6f 75 | 72 20 70 72 6f 67 72 61 |hand.you|r progra|
|00006120| 6d 20 68 61 76 65 20 6f | 6e 6c 79 20 6f 6e 65 20 |m have o|nly one |
|00006130| 6d 65 6e 75 20 77 69 74 | 68 6f 75 74 20 73 75 62 |menu wit|hout sub|
|00006140| 6d 65 6e 75 73 20 74 68 | 65 6e 20 79 6f 75 20 6d |menus th|en you m|
|00006150| 61 79 20 69 67 6e 6f 72 | 65 0a 74 68 65 20 72 65 |ay ignor|e.the re|
|00006160| 74 75 72 6e 65 64 20 6d | 65 6e 75 20 68 61 6e 64 |turned m|enu hand|
|00006170| 6c 65 20 62 65 63 61 75 | 73 65 20 69 74 20 77 69 |le becau|se it wi|
|00006180| 6c 6c 20 62 65 20 61 6e | 79 77 61 79 20 75 73 65 |ll be an|yway use|
|00006190| 64 20 61 73 20 64 65 66 | 61 75 6c 74 20 69 6e 0a |d as def|ault in.|
|000061a0| 61 6c 6c 20 66 75 74 75 | 72 65 20 63 61 6c 6c 73 |all futu|re calls|
|000061b0| 20 74 6f 20 4d 65 6e 75 | 55 74 69 6c 73 2e 0a 0a | to Menu|Utils...|
|000061c0| 41 66 74 65 72 20 74 68 | 69 73 20 63 61 6c 6c 20 |After th|is call |
|000061d0| 74 68 65 20 6e 65 77 20 | 6d 65 6e 75 20 62 65 63 |the new |menu bec|
|000061e0| 6f 6d 65 73 20 74 68 65 | 20 63 75 72 72 65 6e 74 |omes the| current|
|000061f0| 20 6d 65 6e 75 2e 0a 0a | 3c 45 78 61 6d 70 6c 65 | menu...|<Example|
|00006200| 20 63 6f 64 65 2e 2e 2e | 3d 3e 45 78 5f 4e 65 77 | code...|=>Ex_New|
|00006210| 3e 00 00 00 44 49 52 24 | 60 02 00 00 58 02 00 00 |>...DIR$|`...X...|
|00006220| 20 39 00 00 46 ff ff ff | bc ab d1 22 68 07 00 00 | 9..F...|..."h...|
|00006230| 13 00 00 00 00 00 00 00 | 41 64 64 00 88 40 00 00 |........|Add..@..|
|00006240| 46 ff ff ff be ab d1 22 | f4 02 00 00 13 00 00 00 |F......"|........|
|00006250| 00 00 00 00 43 6f 6c 6f | 75 72 4d 65 6e 75 00 00 |....Colo|urMenu..|
|00006260| dc 44 00 00 46 ff ff ff | bf ab d1 22 7e 01 00 00 |.D..F...|..."~...|
|00006270| 13 00 00 00 00 00 00 00 | 43 6f 6c 6f 75 72 73 00 |........|Colours.|
|00006280| 5c 46 00 00 46 ff ff ff | c2 ab d1 22 c8 05 00 00 |\F..F...|..."....|
|00006290| 13 00 00 00 00 00 00 00 | 44 65 63 6f 64 65 00 00 |........|Decode..|
|000062a0| 24 4c 00 00 46 ff ff ff | c5 ab d1 22 83 04 00 00 |$L..F...|..."....|
|000062b0| 13 00 00 00 00 00 00 00 | 44 65 6c 65 74 65 00 00 |........|Delete..|
|000062c0| a8 50 00 00 46 ff ff ff | cc ab d1 22 4d 03 00 00 |.P..F...|..."M...|
|000062d0| 13 00 00 00 00 00 00 00 | 44 6f 74 73 00 00 00 00 |........|Dots....|
|000062e0| f8 53 00 00 46 ff ff ff | cd ab d1 22 5e 03 00 00 |.S..F...|..."^...|
|000062f0| 13 00 00 00 00 00 00 00 | 46 61 64 65 00 00 00 00 |........|Fade....|
|00006300| 58 57 00 00 46 ff ff ff | cf ab d1 22 61 02 00 00 |XW..F...|..."a...|
|00006310| 13 00 00 00 00 00 00 00 | 49 6e 66 6f 00 00 00 00 |........|Info....|
|00006320| bc 59 00 00 46 ff ff ff | d1 ab d1 22 c9 02 00 00 |.Y..F...|..."....|
|00006330| 13 00 00 00 00 00 00 00 | 49 6e 69 74 69 61 6c 69 |........|Initiali|
|00006340| 73 65 00 00 88 5c 00 00 | 46 ff ff ff d4 ab d1 22 |se...\..|F......"|
|00006350| 89 05 00 00 13 00 00 00 | 00 00 00 00 4e 65 77 00 |........|....New.|
|00006360| 74 64 00 00 46 ff ff ff | d6 ab d1 22 c2 03 00 00 |td..F...|..."....|
|00006370| 13 00 00 00 00 00 00 00 | 53 68 6f 77 00 00 00 00 |........|Show....|
|00006380| 38 68 00 00 46 ff ff ff | db ab d1 22 98 03 00 00 |8h..F...|..."....|
|00006390| 13 00 00 00 00 00 00 00 | 53 68 6f 77 53 75 62 4d |........|ShowSubM|
|000063a0| 65 6e 75 00 d0 6b 00 00 | 46 ff ff ff dc ab d1 22 |enu..k..|F......"|
|000063b0| 32 03 00 00 13 00 00 00 | 00 00 00 00 53 75 62 6d |2.......|....Subm|
|000063c0| 65 6e 75 00 04 6f 00 00 | 46 ff ff ff de ab d1 22 |enu..o..|F......"|
|000063d0| c8 02 00 00 13 00 00 00 | 00 00 00 00 54 65 78 74 |........|....Text|
|000063e0| 00 00 00 00 cc 71 00 00 | 46 ff ff ff e0 ab d1 22 |.....q..|F......"|
|000063f0| 4e 03 00 00 13 00 00 00 | 00 00 00 00 54 69 63 6b |N.......|....Tick|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.