home *** CD-ROM | disk | FTP | other *** search
Unknown | 1993-02-18 | 6.3 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.
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| file
| data
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 0d 00 01 05 f4 0d 00 02 | 47 f4 20 20 21 54 65 73 |........|G. !Tes|
|00000010| 74 41 70 70 20 20 2d 20 | 20 41 20 74 65 73 74 20 |tApp - | A test |
|00000020| 61 70 70 6c 69 63 61 74 | 69 6f 6e 20 66 6f 72 20 |applicat|ion for |
|00000030| 64 65 6d 6f 6e 73 74 72 | 61 74 69 6e 67 20 68 6f |demonstr|ating ho|
|00000040| 77 20 74 6f 20 75 73 65 | 20 74 68 65 0d 00 03 26 |w to use| the...&|
|00000050| f4 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00000060| 42 6c 69 62 20 49 49 20 | 6c 69 62 72 61 72 69 65 |Blib II |librarie|
|00000070| 73 2e 0d 00 04 05 f4 0d | 00 05 04 0d 00 06 4d f4 |s.......|......M.|
|00000080| 20 20 20 46 69 72 73 74 | 20 6f 66 20 61 6c 6c 20 | First| of all |
|00000090| 69 6e 69 74 69 61 6c 69 | 73 65 20 74 68 65 20 64 |initiali|se the d|
|000000a0| 79 6e 61 6d 69 63 20 6d | 65 6d 6f 72 79 20 61 6c |ynamic m|emory al|
|000000b0| 6c 6f 63 61 74 69 6f 6e | 20 72 6f 75 74 69 6e 65 |location| routine|
|000000c0| 73 2e 20 54 68 65 73 65 | 0d 00 07 4c f4 20 20 20 |s. These|...L. |
|000000d0| 72 6f 75 74 69 6e 65 73 | 20 61 72 65 20 75 73 65 |routines| are use|
|000000e0| 64 20 62 79 20 6d 6f 73 | 74 20 6f 66 20 74 68 65 |d by mos|t of the|
|000000f0| 20 6c 69 62 72 61 72 79 | 2c 20 73 6f 20 74 68 69 | library|, so thi|
|00000100| 73 20 69 73 20 56 45 52 | 59 20 69 6d 70 6f 72 74 |s is VER|Y import|
|00000110| 61 6e 74 2e 0d 00 08 4c | f4 20 20 20 4f 6e 20 74 |ant....L|. On t|
|00000120| 68 69 73 20 6f 63 63 61 | 73 69 6f 6e 20 77 65 20 |his occa|sion we |
|00000130| 73 68 61 6c 6c 20 73 65 | 6c 65 63 74 20 45 52 52 |shall se|lect ERR|
|00000140| 4f 52 20 6d 65 73 73 61 | 67 65 73 20 61 6e 64 20 |OR messa|ges and |
|00000150| 74 68 65 20 4c 41 52 47 | 45 20 6d 65 6d 6f 72 79 |the LARG|E memory|
|00000160| 0d 00 09 13 f4 20 20 20 | 61 6c 6c 6f 63 61 74 69 |..... |allocati|
|00000170| 6f 6e 2e 0d 00 0a 04 0d | 00 0b 11 f2 6d 65 6d 6f |on......|....memo|
|00000180| 72 79 28 b9 2c a3 29 20 | 0d 00 0c 04 0d 00 0d 04 |ry(.,.) |........|
|00000190| 0d 00 0e 4c f4 20 20 20 | 4e 65 78 74 20 69 6e 69 |...L. |Next ini|
|000001a0| 74 69 61 6c 69 73 65 20 | 74 68 65 20 61 70 70 6c |tialise |the appl|
|000001b0| 69 63 61 74 69 6f 6e 20 | 77 69 74 68 20 74 68 65 |ication |with the|
|000001c0| 20 57 49 4d 50 2c 20 67 | 69 76 69 6e 67 20 74 68 | WIMP, g|iving th|
|000001d0| 65 20 74 61 73 6b 20 6e | 61 6d 65 2c 0d 00 0f 36 |e task n|ame,...6|
|000001e0| f4 20 20 20 73 70 72 69 | 74 65 20 6e 61 6d 65 20 |. spri|te name |
|000001f0| 61 6e 64 20 73 65 6c 65 | 63 74 69 6e 67 20 62 75 |and sele|cting bu|
|00000200| 66 66 65 72 20 73 69 7a | 65 20 6f 66 20 31 30 32 |ffer siz|e of 102|
|00000210| 34 2e 0d 00 10 04 0d 00 | 11 3a f2 77 69 6d 70 5f |4.......|.:.wimp_|
|00000220| 69 6e 69 74 28 22 54 65 | 73 74 20 41 70 70 6c 69 |init("Te|st Appli|
|00000230| 63 61 74 69 6f 6e 22 2c | 22 21 74 65 73 74 61 70 |cation",|"!testap|
|00000240| 70 22 2c b9 2c 31 30 32 | 34 2c 32 30 30 2c 30 29 |p",.,102|4,200,0)|
|00000250| 0d 00 12 04 0d 00 13 04 | 0d 00 14 1f f4 20 20 20 |........|..... |
|00000260| 53 65 74 20 75 70 20 6f | 75 74 20 65 72 72 6f 72 |Set up o|ut error|
|00000270| 20 74 72 61 70 20 3a 0d | 00 15 04 0d 00 16 37 ee | trap :.|......7.|
|00000280| 20 85 20 f2 77 69 6d 70 | 5f 65 72 72 6f 72 28 31 | . .wimp|_error(1|
|00000290| 2c 9f 2c f6 24 2b 22 20 | 61 74 20 6c 69 6e 65 20 |,.,.$+" |at line |
|000002a0| 22 2b c3 28 9e 29 29 3a | f2 77 69 6d 70 5f 71 75 |"+.(.)):|.wimp_qu|
|000002b0| 69 74 0d 00 17 04 0d 00 | 18 04 0d 00 19 36 f4 20 |it......|.....6. |
|000002c0| 20 20 49 6e 69 74 69 61 | 6c 69 73 65 20 74 68 65 | Initia|lise the|
|000002d0| 20 77 69 6e 64 6f 77 20 | 6c 69 62 72 61 72 79 2c | window |library,|
|000002e0| 20 66 6f 72 20 32 20 77 | 69 6e 64 6f 77 73 20 3a | for 2 w|indows :|
|000002f0| 0d 00 1a 04 0d 00 1b 04 | 0d 00 1c 10 f2 77 69 6e |........|.....win|
|00000300| 5f 69 6e 69 74 28 32 29 | 0d 00 1d 04 0d 00 1e 04 |_init(2)|........|
|00000310| 0d 00 1f 49 f4 20 20 20 | 4e 65 78 74 20 69 6e 69 |...I. |Next ini|
|00000320| 74 69 61 6c 69 73 65 20 | 74 68 65 20 74 65 6d 70 |tialise |the temp|
|00000330| 6c 61 74 65 73 20 72 6f | 75 74 69 6e 65 73 2e 20 |lates ro|utines. |
|00000340| 54 68 69 73 20 74 61 6b | 65 73 20 6e 6f 20 70 61 |This tak|es no pa|
|00000350| 72 61 6d 65 74 65 72 73 | 2e 0d 00 20 04 0d 00 21 |rameters|... ...!|
|00000360| 0e f2 74 65 6d 70 5f 69 | 6e 69 74 0d 00 22 04 0d |..temp_i|nit.."..|
|00000370| 00 23 04 0d 00 24 3a f4 | 20 20 20 4e 6f 77 20 77 |.#...$:.| Now w|
|00000380| 65 20 63 61 6e 20 72 65 | 61 64 20 74 68 65 20 61 |e can re|ad the a|
|00000390| 70 70 6c 69 63 61 74 69 | 6f 6e 27 73 20 74 65 6d |pplicati|on's tem|
|000003a0| 70 6c 61 74 65 73 20 66 | 69 6c 65 20 3a 0d 00 25 |plates f|ile :..%|
|000003b0| 04 0d 00 26 32 f2 74 65 | 6d 70 5f 72 65 61 64 66 |...&2.te|mp_readf|
|000003c0| 69 6c 65 28 22 3c 54 65 | 73 74 41 70 70 24 44 69 |ile("<Te|stApp$Di|
|000003d0| 72 3e 2e 54 65 6d 70 6c | 61 74 65 73 22 2c 31 30 |r>.Templ|ates",10|
|000003e0| 32 34 29 0d 00 27 04 0d | 00 28 04 0d 00 29 4b f4 |24)..'..|.(...)K.|
|000003f0| 20 20 20 4e 65 78 74 20 | 63 72 65 61 74 65 20 74 | Next |create t|
|00000400| 77 6f 20 77 69 6e 64 6f | 77 73 20 66 72 6f 6d 20 |wo windo|ws from |
|00000410| 74 68 65 20 74 65 6d 70 | 6c 61 74 65 73 2c 20 74 |the temp|lates, t|
|00000420| 68 65 20 69 6e 66 6f 20 | 77 69 6e 64 6f 77 20 61 |he info |window a|
|00000430| 6e 64 20 74 68 65 0d 00 | 2a 47 f4 20 20 20 6d 61 |nd the..|*G. ma|
|00000440| 69 6e 20 77 69 6e 64 6f | 77 2e 20 42 65 6c 6f 77 |in windo|w. Below|
|00000450| 20 73 68 6f 77 73 20 74 | 77 6f 20 6d 65 74 68 6f | shows t|wo metho|
|00000460| 64 73 20 66 6f 72 20 63 | 72 65 61 74 69 6e 67 20 |ds for c|reating |
|00000470| 77 69 6e 64 6f 77 73 2c | 20 62 6f 74 68 0d 00 2b |windows,| both..+|
|00000480| 2c f4 20 20 20 61 63 74 | 75 61 6c 6c 79 20 70 65 |,. act|ually pe|
|00000490| 72 66 6f 72 6d 20 74 68 | 65 20 73 61 6d 65 20 66 |rform th|e same f|
|000004a0| 75 6e 63 74 69 6f 6e 20 | 3a 0d 00 2c 04 0d 00 2d |unction |:..,...-|
|000004b0| 48 69 6e 66 6f 25 20 3d | 20 a4 77 69 6e 5f 63 72 |Hinfo% =| .win_cr|
|000004c0| 65 61 74 65 77 69 6e 28 | 22 49 6e 66 6f 22 29 20 |eatewin(|"Info") |
|000004d0| 20 20 3a 20 20 20 f4 20 | 20 20 54 68 65 20 73 69 | : . | The si|
|000004e0| 6d 70 6c 65 20 6d 65 74 | 68 6f 64 20 2d 20 4e 6f |mple met|hod - No|
|000004f0| 74 65 20 46 4e 0d 00 2e | 04 0d 00 2f 3d 6d 61 69 |te FN...|.../=mai|
|00000500| 6e 25 20 3d 20 a4 74 65 | 6d 70 5f 63 6f 70 79 28 |n% = .te|mp_copy(|
|00000510| 22 6d 61 69 6e 22 29 20 | 20 20 20 20 20 20 3a 20 |"main") | : |
|00000520| 20 20 f4 20 20 20 54 68 | 65 20 6d 6f 72 65 20 63 | . Th|e more c|
|00000530| 6f 6d 70 6c 65 78 0d 00 | 30 4c f2 77 69 6e 5f 63 |omplex..|0L.win_c|
|00000540| 72 65 61 74 65 77 69 6e | 28 6d 61 69 6e 25 29 20 |reatewin|(main%) |
|00000550| 20 20 20 20 20 20 20 20 | 20 3a 20 20 20 f4 20 20 | | : . |
|00000560| 20 6d 65 74 68 6f 64 20 | 75 73 69 6e 67 20 32 20 | method |using 2 |
|00000570| 63 61 6c 6c 73 2e 20 2d | 20 4e 6f 74 65 20 50 52 |calls. -| Note PR|
|00000580| 4f 43 0d 00 31 04 0d 00 | 32 04 0d 00 33 48 f4 20 |OC..1...|2...3H. |
|00000590| 20 20 4e 65 78 74 20 69 | 6e 69 74 69 61 6c 69 73 | Next i|nitialis|
|000005a0| 65 20 74 68 65 20 6d 65 | 6e 75 20 6c 69 62 72 61 |e the me|nu libra|
|000005b0| 72 79 2c 20 73 74 61 74 | 69 6e 67 20 74 68 61 74 |ry, stat|ing that|
|000005c0| 20 77 65 20 69 6e 74 65 | 6e 64 20 74 6f 20 68 61 | we inte|nd to ha|
|000005d0| 76 65 0d 00 34 44 f4 20 | 20 20 32 20 6d 65 6e 75 |ve..4D. | 2 menu|
|000005e0| 73 20 28 77 65 20 63 61 | 6e 20 63 68 61 6e 67 65 |s (we ca|n change|
|000005f0| 20 74 68 69 73 20 76 61 | 6c 75 65 20 6c 61 74 65 | this va|lue late|
|00000600| 72 20 69 66 20 6d 6f 72 | 65 20 61 72 65 20 6e 65 |r if mor|e are ne|
|00000610| 65 64 65 64 29 2e 0d 00 | 35 04 0d 00 36 11 f2 6d |eded)...|5...6..m|
|00000620| 65 6e 75 5f 69 6e 69 74 | 28 32 29 0d 00 37 04 0d |enu_init|(2)..7..|
|00000630| 00 38 04 0d 00 39 4d f4 | 20 20 20 43 72 65 61 74 |.8...9M.| Creat|
|00000640| 65 20 74 68 65 20 66 69 | 72 73 74 20 28 6e 75 6d |e the fi|rst (num|
|00000650| 62 65 72 20 30 29 20 6d | 65 6e 75 2c 20 67 69 76 |ber 0) m|enu, giv|
|00000660| 69 6e 67 20 69 74 20 61 | 20 74 69 74 6c 65 20 6f |ing it a| title o|
|00000670| 66 20 22 54 65 73 74 20 | 41 70 70 22 20 61 6e 64 |f "Test |App" and|
|00000680| 0d 00 3a 1d f4 20 20 20 | 67 69 76 69 6e 67 20 69 |..:.. |giving i|
|00000690| 74 20 33 20 65 6e 74 72 | 69 65 73 20 3a 0d 00 3b |t 3 entr|ies :..;|
|000006a0| 04 0d 00 3c 20 f2 6d 65 | 6e 75 5f 68 65 61 64 65 |...< .me|nu_heade|
|000006b0| 72 28 22 54 65 73 74 20 | 41 70 70 22 2c 30 2c 33 |r("Test |App",0,3|
|000006c0| 29 0d 00 3d 04 0d 00 3e | 04 0d 00 3f 49 f4 20 20 |)..=...>|...?I. |
|000006d0| 20 4e 6f 77 20 63 72 65 | 61 74 65 20 74 68 65 20 | Now cre|ate the |
|000006e0| 33 20 65 6e 74 72 69 65 | 73 2c 20 6f 6e 65 20 62 |3 entrie|s, one b|
|000006f0| 65 69 6e 67 20 22 49 6e | 66 6f 22 2c 20 74 68 65 |eing "In|fo", the|
|00000700| 20 73 65 63 6f 6e 64 20 | 22 53 75 62 20 4d 65 6e | second |"Sub Men|
|00000710| 75 22 0d 00 40 1d f4 20 | 20 20 61 6e 64 20 74 68 |u"..@.. | and th|
|00000720| 65 20 74 68 69 72 64 20 | 22 51 75 69 74 22 2e 0d |e third |"Quit"..|
|00000730| 00 41 04 0d 00 42 1f f2 | 6d 65 6e 75 5f 61 64 64 |.A...B..|menu_add|
|00000740| 69 74 65 6d 28 30 2c 30 | 2c 22 49 6e 66 6f 22 2c |item(0,0|,"Info",|
|00000750| 30 29 0d 00 43 23 f2 6d | 65 6e 75 5f 61 64 64 69 |0)..C#.m|enu_addi|
|00000760| 74 65 6d 28 30 2c 31 2c | 22 53 75 62 20 4d 65 6e |tem(0,1,|"Sub Men|
|00000770| 75 22 2c 30 29 0d 00 44 | 1f f2 6d 65 6e 75 5f 61 |u",0)..D|..menu_a|
|00000780| 64 64 69 74 65 6d 28 30 | 2c 32 2c 22 51 75 69 74 |dditem(0|,2,"Quit|
|00000790| 22 2c 30 29 0d 00 45 04 | 0d 00 46 04 0d 00 47 3e |",0)..E.|..F...G>|
|000007a0| f4 20 20 20 48 65 61 64 | 65 72 20 66 6f 72 20 74 |. Head|er for t|
|000007b0| 68 65 20 73 65 63 6f 6e | 64 20 6d 65 6e 75 20 28 |he secon|d menu (|
|000007c0| 6e 75 6d 62 65 72 20 31 | 29 20 77 69 74 68 20 32 |number 1|) with 2|
|000007d0| 20 65 6e 74 72 69 65 73 | 20 3a 0d 00 48 04 0d 00 | entries| :..H...|
|000007e0| 49 1e f2 6d 65 6e 75 5f | 68 65 61 64 65 72 28 22 |I..menu_|header("|
|000007f0| 53 65 63 6f 6e 64 22 2c | 31 2c 32 29 0d 00 4a 04 |Second",|1,2)..J.|
|00000800| 0d 00 4b 04 0d 00 4c 49 | f4 20 20 20 4e 6f 77 20 |..K...LI|. Now |
|00000810| 74 68 65 20 69 74 65 6d | 73 2c 20 74 68 65 20 66 |the item|s, the f|
|00000820| 69 72 73 74 20 22 53 65 | 6c 65 63 74 22 20 77 68 |irst "Se|lect" wh|
|00000830| 69 63 68 20 69 73 20 74 | 69 63 6b 65 64 20 61 6e |ich is t|icked an|
|00000840| 64 20 75 6e 64 65 72 6c | 69 6e 65 64 2c 0d 00 4d |d underl|ined,..M|
|00000850| 46 f4 20 20 20 74 68 65 | 20 73 65 63 6f 6e 64 20 |F. the| second |
|00000860| 69 73 20 61 20 77 72 69 | 74 61 62 6c 65 20 65 6e |is a wri|table en|
|00000870| 74 72 79 20 70 6f 69 6e | 74 69 6e 67 20 74 6f 20 |try poin|ting to |
|00000880| 61 20 62 75 66 66 65 72 | 20 77 68 69 63 68 20 61 |a buffer| which a|
|00000890| 6c 73 6f 0d 00 4e 1d f4 | 20 20 20 6e 65 65 64 73 |lso..N..| needs|
|000008a0| 20 74 6f 20 62 65 20 64 | 65 66 69 6e 65 64 20 3a | to be d|efined :|
|000008b0| 0d 00 4f 04 0d 00 50 41 | f2 6d 65 6e 75 5f 61 64 |..O...PA|.menu_ad|
|000008c0| 64 69 74 65 6d 28 31 2c | 30 2c 22 53 65 6c 65 63 |ditem(1,|0,"Selec|
|000008d0| 74 22 2c 6d 65 6e 75 5f | 74 69 63 6b 20 2b 20 6d |t",menu_|tick + m|
|000008e0| 65 6e 75 5f 64 6f 74 74 | 65 64 29 3a 74 69 63 6b |enu_dott|ed):tick|
|000008f0| 65 64 25 3d b9 0d 00 51 | 04 0d 00 52 31 62 75 66 |ed%=...Q|...R1buf|
|00000900| 66 65 72 25 3d a4 6d 61 | 6c 6c 6f 63 28 32 35 36 |fer%=.ma|lloc(256|
|00000910| 29 20 20 20 20 3a 20 20 | 20 f4 20 32 35 36 20 62 |) : | . 256 b|
|00000920| 79 74 65 20 62 75 66 66 | 65 72 0d 00 53 1d f2 6f |yte buff|er..S..o|
|00000930| 73 5f 70 75 74 73 74 72 | 69 6e 67 28 62 75 66 66 |s_putstr|ing(buff|
|00000940| 65 72 25 2c 22 22 29 0d | 00 54 2d f2 6d 65 6e 75 |er%,"").|.T-.menu|
|00000950| 5f 61 64 64 77 72 69 74 | 61 62 6c 65 28 31 2c 31 |_addwrit|able(1,1|
|00000960| 2c 31 30 2c 30 2c 62 75 | 66 66 65 72 25 2c 30 2c |,10,0,bu|ffer%,0,|
|00000970| 32 35 36 29 0d 00 55 04 | 0d 00 56 04 0d 00 57 4c |256)..U.|..V...WL|
|00000980| f4 20 20 20 4e 6f 77 20 | 61 6c 6c 20 77 65 20 6e |. Now |all we n|
|00000990| 65 65 64 20 74 6f 20 64 | 6f 20 69 73 20 6a 6f 69 |eed to d|o is joi|
|000009a0| 6e 20 74 68 69 6e 67 73 | 20 74 6f 20 74 68 65 20 |n things| to the |
|000009b0| 66 69 72 73 74 20 6d 65 | 6e 75 2c 20 69 65 2e 20 |first me|nu, ie. |
|000009c0| 74 68 65 20 69 6e 66 6f | 0d 00 58 24 f4 20 20 20 |the info|..X$. |
|000009d0| 77 69 6e 64 6f 77 20 61 | 6e 64 20 74 68 65 20 73 |window a|nd the s|
|000009e0| 65 63 6f 6e 64 20 6d 65 | 6e 75 20 3a 0d 00 59 04 |econd me|nu :..Y.|
|000009f0| 0d 00 5a 1e f2 6d 65 6e | 75 5f 73 75 62 77 69 6e |..Z..men|u_subwin|
|00000a00| 64 6f 77 28 30 2c 30 2c | 69 6e 66 6f 25 29 0d 00 |dow(0,0,|info%)..|
|00000a10| 5b 18 f2 6d 65 6e 75 5f | 73 75 62 6d 65 6e 75 28 |[..menu_|submenu(|
|00000a20| 30 2c 31 2c 31 29 0d 00 | 5c 04 0d 00 5d 04 0d 00 |0,1,1)..|\...]...|
|00000a30| 5e 2b f4 20 20 20 4e 6f | 77 20 6a 75 73 74 20 70 |^+. No|w just p|
|00000a40| 65 72 66 6f 72 6d 20 61 | 20 77 69 6d 70 20 70 6f |erform a| wimp po|
|00000a50| 6c 6c 20 6c 6f 6f 70 20 | 3a 0d 00 5f 04 0d 00 60 |ll loop |:.._...`|
|00000a60| 05 f5 0d 00 61 17 20 20 | f2 77 69 6d 70 5f 70 6f |....a. |.wimp_po|
|00000a70| 6c 6c 28 30 2c 30 2c 30 | 29 0d 00 62 07 fd 20 a3 |ll(0,0,0|)..b.. .|
|00000a80| 0d 00 63 04 0d 00 64 04 | 0d 00 65 4d f4 20 20 20 |..c...d.|..eM. |
|00000a90| 59 6f 75 20 6e 65 65 64 | 20 74 6f 20 73 75 70 70 |You need| to supp|
|00000aa0| 6c 79 20 73 6f 6d 65 20 | 72 6f 75 74 69 6e 65 73 |ly some |routines|
|00000ab0| 2c 20 74 68 65 20 6c 69 | 62 72 61 72 79 20 63 61 |, the li|brary ca|
|00000ac0| 6e 27 74 20 73 75 70 70 | 6c 79 20 65 76 65 72 79 |n't supp|ly every|
|00000ad0| 74 68 69 6e 67 0d 00 66 | 04 0d 00 67 04 0d 00 68 |thing..f|...g...h|
|00000ae0| 4a f4 20 20 20 46 6f 72 | 20 74 68 65 20 61 76 6f |J. For| the avo|
|00000af0| 76 65 20 73 65 74 75 70 | 2c 20 79 6f 75 20 4e 45 |ve setup|, you NE|
|00000b00| 45 44 20 74 6f 20 73 75 | 70 70 6c 79 20 74 77 6f |ED to su|pply two|
|00000b10| 20 72 6f 75 74 69 6e 65 | 73 2c 20 74 68 65 20 66 | routine|s, the f|
|00000b20| 69 72 73 74 20 69 73 0d | 00 69 4a f4 20 20 20 63 |irst is.|.iJ. c|
|00000b30| 61 6c 6c 65 64 20 77 68 | 65 6e 20 27 6d 65 6e 75 |alled wh|en 'menu|
|00000b40| 27 20 69 73 20 70 72 65 | 73 73 65 64 20 6f 76 65 |' is pre|ssed ove|
|00000b50| 72 20 74 68 65 20 69 63 | 6f 6e 62 61 72 20 69 63 |r the ic|onbar ic|
|00000b60| 6f 6e 2e 20 54 68 69 73 | 20 66 75 6e 63 74 69 6f |on. This| functio|
|00000b70| 6e 0d 00 6a 4a f4 20 20 | 20 28 77 68 69 63 68 20 |n..jJ. | (which |
|00000b80| 6d 75 73 74 20 62 65 20 | 63 61 6c 6c 65 64 20 46 |must be |called F|
|00000b90| 4e 77 69 6d 70 5f 6d 61 | 69 6e 6d 65 6e 75 29 20 |Nwimp_ma|inmenu) |
|00000ba0| 73 68 6f 75 6c 64 20 74 | 68 65 6e 20 63 72 65 61 |should t|hen crea|
|00000bb0| 74 65 20 74 68 65 20 6d | 65 6e 75 0d 00 6b 4d f4 |te the m|enu..kM.|
|00000bc0| 20 20 20 28 69 66 20 69 | 74 20 69 73 20 6e 6f 74 | (if i|t is not|
|00000bd0| 20 61 6c 72 65 61 64 79 | 20 63 72 65 61 74 65 64 | already| created|
|00000be0| 29 20 61 6e 64 20 72 65 | 74 75 72 6e 20 74 68 65 |) and re|turn the|
|00000bf0| 20 6d 65 6e 75 20 6e 75 | 6d 62 65 72 20 6f 66 20 | menu nu|mber of |
|00000c00| 74 68 65 20 6d 61 69 6e | 0d 00 6c 4a f4 20 20 20 |the main|..lJ. |
|00000c10| 6d 65 6e 75 2e 20 49 6e | 20 6f 75 72 20 63 61 73 |menu. In| our cas|
|00000c20| 65 20 77 65 20 68 61 76 | 65 20 61 6c 72 65 61 64 |e we hav|e alread|
|00000c30| 79 20 63 72 65 61 74 65 | 64 20 74 68 65 20 6d 65 |y create|d the me|
|00000c40| 6e 75 73 2c 20 61 6e 64 | 20 6a 75 73 74 20 6e 65 |nus, and| just ne|
|00000c50| 65 64 0d 00 6d 48 f4 20 | 20 20 74 6f 20 72 65 74 |ed..mH. | to ret|
|00000c60| 75 72 6e 20 30 20 28 74 | 68 65 20 6d 61 69 6e 20 |urn 0 (t|he main |
|00000c70| 6d 65 6e 75 20 6e 75 6d | 62 65 72 29 2e 20 54 68 |menu num|ber). Th|
|00000c80| 69 73 20 66 75 6e 63 74 | 69 6f 6e 20 69 73 20 65 |is funct|ion is e|
|00000c90| 78 70 65 63 74 65 64 20 | 74 6f 0d 00 6e 25 f4 20 |xpected |to..n%. |
|00000ca0| 20 20 62 65 20 74 68 65 | 72 65 20 62 79 20 74 68 | be the|re by th|
|00000cb0| 65 20 57 49 4d 50 20 6c | 69 62 72 61 72 79 2e 0d |e WIMP l|ibrary..|
|00000cc0| 00 6f 04 0d 00 70 13 dd | a4 77 69 6d 70 5f 6d 61 |.o...p..|.wimp_ma|
|00000cd0| 69 6e 6d 65 6e 75 0d 00 | 71 06 3d 30 0d 00 72 04 |inmenu..|q.=0..r.|
|00000ce0| 0d 00 73 04 0d 00 74 4c | f4 20 20 20 54 68 65 20 |..s...tL|. The |
|00000cf0| 73 65 63 6f 6e 64 20 72 | 6f 75 74 69 6e 65 20 77 |second r|outine w|
|00000d00| 65 20 6e 65 65 64 20 74 | 6f 20 73 75 70 70 6c 79 |e need t|o supply|
|00000d10| 20 69 73 20 74 68 65 20 | 6d 65 6e 75 20 73 65 6c | is the |menu sel|
|00000d20| 65 63 74 69 6f 6e 20 70 | 72 6f 63 65 64 75 72 65 |ection p|rocedure|
|00000d30| 0d 00 75 4a f4 20 20 20 | 28 77 68 69 63 68 20 6d |..uJ. |(which m|
|00000d40| 75 73 74 20 62 65 20 63 | 61 6c 6c 65 64 20 50 52 |ust be c|alled PR|
|00000d50| 4f 43 65 76 65 6e 74 5f | 6d 65 6e 75 73 65 6c 65 |OCevent_|menusele|
|00000d60| 63 74 69 6f 6e 29 20 77 | 68 69 63 68 20 69 73 20 |ction) w|hich is |
|00000d70| 70 61 73 73 65 64 20 74 | 68 65 0d 00 76 4c f4 20 |passed t|he..vL. |
|00000d80| 20 20 77 69 6d 70 20 70 | 6f 6c 6c 20 62 6c 6f 63 | wimp p|oll bloc|
|00000d90| 6b 20 75 70 6f 6e 20 61 | 20 6d 65 6e 75 20 73 65 |k upon a| menu se|
|00000da0| 6c 65 63 74 69 6f 6e 2e | 20 54 68 65 20 76 61 72 |lection.| The var|
|00000db0| 69 61 62 6c 65 20 27 5f | 77 69 6d 70 5f 6f 6c 64 |iable '_|wimp_old|
|00000dc0| 6d 65 6e 75 25 27 0d 00 | 77 4d f4 20 20 20 63 6f |menu%'..|wM. co|
|00000dd0| 6e 74 61 69 6e 73 20 74 | 68 65 20 6d 65 6e 75 20 |ntains t|he menu |
|00000de0| 6e 75 6d 62 65 72 20 77 | 68 69 63 68 20 77 61 73 |number w|hich was|
|00000df0| 20 6c 61 73 74 20 70 6f | 70 65 64 20 75 70 20 62 | last po|ped up b|
|00000e00| 79 20 74 68 65 20 70 72 | 6f 67 72 61 6d 2c 20 6a |y the pr|ogram, j|
|00000e10| 75 73 74 0d 00 78 4b f4 | 20 20 20 69 6e 20 63 61 |ust..xK.| in ca|
|00000e20| 73 65 20 79 6f 75 20 6e | 65 65 64 20 74 6f 20 6b |se you n|eed to k|
|00000e30| 6e 6f 77 20 74 68 69 73 | 20 28 69 65 2e 20 69 66 |now this| (ie. if|
|00000e40| 20 79 6f 75 20 68 61 76 | 65 20 6d 6f 72 65 20 74 | you hav|e more t|
|00000e50| 68 61 6e 20 6f 6e 65 20 | 73 65 74 20 6f 66 0d 00 |han one |set of..|
|00000e60| 79 4d f4 20 20 20 6d 65 | 6e 75 73 29 2e 20 41 67 |yM. me|nus). Ag|
|00000e70| 61 69 6e 20 74 68 69 73 | 20 70 72 6f 63 65 64 75 |ain this| procedu|
|00000e80| 72 65 20 69 73 20 65 78 | 70 65 63 74 65 64 20 74 |re is ex|pected t|
|00000e90| 6f 20 62 65 20 74 68 65 | 72 65 20 69 6e 20 65 76 |o be the|re in ev|
|00000ea0| 65 72 79 20 70 72 6f 67 | 72 61 6d 0d 00 7a 24 f4 |ery prog|ram..z$.|
|00000eb0| 20 20 20 77 68 69 63 68 | 20 75 73 65 73 20 74 68 | which| uses th|
|00000ec0| 65 20 57 49 4d 50 20 6c | 69 62 72 61 72 79 2e 0d |e WIMP l|ibrary..|
|00000ed0| 00 7b 04 0d 00 7c 1d dd | f2 65 76 65 6e 74 5f 6d |.{...|..|.event_m|
|00000ee0| 65 6e 75 73 65 6c 65 63 | 74 69 6f 6e 28 42 25 29 |enuselec|tion(B%)|
|00000ef0| 0d 00 7d 04 0d 00 7e 3a | f4 20 20 20 46 69 6e 64 |..}...~:|. Find|
|00000f00| 20 6f 75 74 20 77 68 61 | 74 20 65 6e 74 72 79 20 | out wha|t entry |
|00000f10| 69 6e 20 74 68 65 20 66 | 69 72 73 74 20 6d 65 6e |in the f|irst men|
|00000f20| 75 20 77 61 73 20 73 65 | 6c 65 63 74 65 64 0d 00 |u was se|lected..|
|00000f30| 7f 04 0d 00 80 0c c8 8e | 20 21 42 25 20 ca 0d 00 |........| !B% ...|
|00000f40| 81 3f 20 20 20 c9 20 31 | 20 3a 20 20 20 20 20 20 |.? . 1| : |
|00000f50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000f60| 20 f4 20 20 20 53 75 62 | 20 6d 65 6e 75 2c 20 66 | . Sub| menu, f|
|00000f70| 6f 6c 6c 6f 77 20 69 74 | 20 64 6f 77 6e 0d 00 82 |ollow it| down...|
|00000f80| 13 20 20 20 20 20 20 c8 | 8e 20 42 25 21 34 20 ca |. .|. B%!4 .|
|00000f90| 0d 00 83 44 20 20 20 20 | 20 20 20 20 20 c9 20 30 |...D | . 0|
|00000fa0| 20 3a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | : | |
|00000fb0| 20 20 20 f4 20 20 20 4f | 75 72 20 27 53 65 6c 65 | . O|ur 'Sele|
|00000fc0| 63 74 27 20 65 6e 74 72 | 79 2c 20 74 6f 67 67 6c |ct' entr|y, toggl|
|00000fd0| 65 20 69 74 0d 00 84 23 | 20 20 20 20 20 20 20 20 |e it...#| |
|00000fe0| 20 20 20 20 20 74 69 63 | 6b 65 64 25 3d ac 28 74 | tic|ked%=.(t|
|00000ff0| 69 63 6b 65 64 25 29 0d | 00 85 4e 20 20 20 20 20 |icked%).|..N |
|00001000| 20 20 20 20 20 20 20 20 | f2 6d 65 6e 75 5f 61 64 | |.menu_ad|
|00001010| 64 69 74 65 6d 28 31 2c | 30 2c 22 53 65 6c 65 63 |ditem(1,|0,"Selec|
|00001020| 74 22 2c 28 74 69 63 6b | 65 64 25 20 80 20 6d 65 |t",(tick|ed% . me|
|00001030| 6e 75 5f 74 69 63 6b 29 | 2b 6d 65 6e 75 5f 64 6f |nu_tick)|+menu_do|
|00001040| 74 74 65 64 29 0d 00 86 | 04 0d 00 87 4c 20 20 20 |tted)...|....L |
|00001050| 20 20 20 20 20 20 c9 20 | 31 20 3a 20 20 20 20 20 | . |1 : |
|00001060| 20 20 20 20 20 20 20 20 | 20 20 20 20 f4 20 20 20 | | . |
|00001070| 57 72 69 74 61 62 6c 65 | 20 65 6e 74 72 79 2c 20 |Writable| entry, |
|00001080| 73 65 74 20 6d 61 69 6e | 20 77 69 6e 64 6f 77 20 |set main| window |
|00001090| 74 69 74 6c 65 0d 00 88 | 3c 20 20 20 20 20 20 20 |title...|< |
|000010a0| 20 20 20 20 20 20 f2 77 | 69 6e 5f 73 65 74 74 69 | .w|in_setti|
|000010b0| 74 6c 65 28 6d 61 69 6e | 25 2c a4 6f 73 5f 67 65 |tle(main|%,.os_ge|
|000010c0| 74 73 74 72 69 6e 67 28 | 62 75 66 66 65 72 25 29 |tstring(|buffer%)|
|000010d0| 29 0d 00 89 0b 20 20 20 | 20 20 20 cb 0d 00 8a 04 |).... | .....|
|000010e0| 0d 00 8b 16 20 20 c9 20 | 32 20 3a 20 f2 77 69 6d |.... . |2 : .wim|
|000010f0| 70 5f 71 75 69 74 0d 00 | 8c 05 cb 0d 00 8d 05 e1 |p_quit..|........|
|00001100| 0d 00 8e 04 0d 00 8f 04 | 0d 00 90 4c f4 20 20 20 |........|...L. |
|00001110| 57 68 65 6e 20 27 73 65 | 6c 65 63 74 27 20 69 73 |When 'se|lect' is|
|00001120| 20 70 72 65 73 73 65 64 | 20 6f 76 65 72 20 74 68 | pressed| over th|
|00001130| 65 20 69 63 6f 6e 62 61 | 72 20 69 63 6f 6e 2c 20 |e iconba|r icon, |
|00001140| 77 65 20 77 61 6e 74 20 | 74 6f 20 70 6f 70 75 70 |we want |to popup|
|00001150| 20 74 68 65 0d 00 91 41 | f4 20 20 20 6d 61 69 6e | the...A|. main|
|00001160| 20 77 69 6e 64 6f 77 2e | 20 54 6f 20 64 6f 20 74 | window.| To do t|
|00001170| 68 69 73 20 77 65 20 6a | 75 73 74 20 64 65 66 69 |his we j|ust defi|
|00001180| 6e 65 20 61 20 70 72 6f | 63 65 64 75 72 65 20 63 |ne a pro|cedure c|
|00001190| 61 6c 6c 65 64 0d 00 92 | 49 f4 20 20 20 50 52 4f |alled...|I. PRO|
|000011a0| 43 65 76 65 6e 74 5f 69 | 63 6f 6e 62 61 72 73 65 |Cevent_i|conbarse|
|000011b0| 6c 65 63 74 2e 20 54 68 | 69 73 20 70 72 6f 63 65 |lect. Th|is proce|
|000011c0| 64 75 72 65 20 64 6f 65 | 73 20 4e 4f 54 20 6e 65 |dure doe|s NOT ne|
|000011d0| 65 64 20 74 6f 20 65 78 | 69 73 74 20 69 6e 0d 00 |ed to ex|ist in..|
|000011e0| 93 4c f4 20 20 20 65 76 | 65 72 79 20 70 72 6f 67 |.L. ev|ery prog|
|000011f0| 72 61 6d 2c 20 75 6e 6c | 69 6b 65 20 74 68 65 20 |ram, unl|ike the |
|00001200| 74 77 6f 20 61 62 6f 76 | 65 2e 20 54 68 69 73 20 |two abov|e. This |
|00001210| 70 72 6f 63 65 64 75 72 | 65 2c 20 77 68 69 63 68 |procedur|e, which|
|00001220| 20 74 61 6b 65 73 20 74 | 68 65 0d 00 94 48 f4 20 | takes t|he...H. |
|00001230| 20 20 77 69 6d 70 20 70 | 6f 6c 6c 20 62 6c 6f 63 | wimp p|oll bloc|
|00001240| 6b 20 61 73 20 61 20 70 | 61 72 61 6d 65 74 65 72 |k as a p|arameter|
|00001250| 2c 20 77 69 6c 6c 20 73 | 69 6d 70 6c 79 20 6f 70 |, will s|imply op|
|00001260| 65 6e 20 6f 75 72 20 6d | 61 69 6e 20 77 69 6e 64 |en our m|ain wind|
|00001270| 6f 77 0d 00 95 24 f4 20 | 20 20 69 6e 20 74 68 65 |ow...$. | in the|
|00001280| 20 63 65 6e 74 72 65 20 | 6f 66 20 74 68 65 20 73 | centre |of the s|
|00001290| 63 72 65 65 6e 2e 0d 00 | 96 04 0d 00 97 1d dd f2 |creen...|........|
|000012a0| 65 76 65 6e 74 5f 69 63 | 6f 6e 62 61 72 73 65 6c |event_ic|onbarsel|
|000012b0| 65 63 74 28 42 25 29 0d | 00 98 11 ea 20 58 25 2c |ect(B%).|.... X%,|
|000012c0| 59 25 2c 78 25 2c 79 25 | 0d 00 99 47 f2 77 69 6e |Y%,x%,y%|...G.win|
|000012d0| 5f 67 65 74 73 69 7a 65 | 28 6d 61 69 6e 25 2c 78 |_getsize|(main%,x|
|000012e0| 25 2c 79 25 29 20 20 20 | 20 20 20 20 20 20 20 3a |%,y%) | :|
|000012f0| 20 20 20 f4 20 47 65 74 | 20 77 69 6e 64 6f 77 20 | . Get| window |
|00001300| 73 69 7a 65 20 69 6e 74 | 6f 20 78 25 2c 79 25 0d |size int|o x%,y%.|
|00001310| 00 9a 47 f2 6f 73 5f 73 | 63 72 65 65 6e 73 69 7a |..G.os_s|creensiz|
|00001320| 65 28 58 25 2c 59 25 29 | 20 20 20 20 20 20 20 20 |e(X%,Y%)| |
|00001330| 20 20 20 20 20 20 3a 20 | 20 20 f4 20 47 65 74 20 | : | . Get |
|00001340| 73 63 72 65 65 6e 20 73 | 69 7a 65 20 69 6e 74 6f |screen s|ize into|
|00001350| 20 58 25 2c 59 25 0d 00 | 9b 2d f2 77 69 6e 5f 6d | X%,Y%..|.-.win_m|
|00001360| 6f 76 65 77 69 6e 28 6d | 61 69 6e 25 2c 28 58 25 |ovewin(m|ain%,(X%|
|00001370| 2d 78 25 29 81 20 32 2c | 28 59 25 2d 79 25 29 81 |-x%). 2,|(Y%-y%).|
|00001380| 20 32 29 0d 00 9c 05 e1 | 0d 00 9d 04 0d 00 9e 45 | 2).....|.......E|
|00001390| f4 20 20 20 4e 4f 54 45 | 20 3a 20 50 52 4f 43 77 |. NOTE| : PROCw|
|000013a0| 69 6e 5f 6d 6f 76 65 77 | 69 6e 20 63 61 6e 20 62 |in_movew|in can b|
|000013b0| 65 20 75 73 65 64 20 69 | 6e 73 74 65 61 64 20 6f |e used i|nstead o|
|000013c0| 66 20 50 52 4f 43 77 69 | 6e 5f 6f 70 65 6e 77 69 |f PROCwi|n_openwi|
|000013d0| 6e 0d 00 9f 04 0d 00 a0 | 04 0d 00 a1 49 f4 20 20 |n.......|....I. |
|000013e0| 20 57 68 65 6e 20 27 61 | 64 6a 75 73 74 27 20 69 | When 'a|djust' i|
|000013f0| 73 20 70 72 65 73 73 65 | 64 20 6f 76 65 72 20 74 |s presse|d over t|
|00001400| 68 65 20 69 63 6f 6e 62 | 61 72 20 69 63 6f 6e 20 |he iconb|ar icon |
|00001410| 77 65 20 77 69 6c 6c 20 | 63 68 61 6e 67 65 20 74 |we will |change t|
|00001420| 68 65 0d 00 a2 4b f4 20 | 20 20 72 61 64 69 6f 20 |he...K. | radio |
|00001430| 73 65 6c 65 63 74 69 6f | 6e 20 69 6e 20 74 68 65 |selectio|n in the|
|00001440| 20 6d 61 69 6e 20 77 69 | 6e 64 6f 77 2e 20 54 68 | main wi|ndow. Th|
|00001450| 69 73 20 77 69 6c 6c 20 | 69 6e 76 6f 6c 76 65 20 |is will |involve |
|00001460| 66 69 6e 64 69 6e 67 20 | 77 68 69 63 68 0d 00 a3 |finding |which...|
|00001470| 49 f4 20 20 20 69 63 6f | 6e 20 69 73 20 63 75 72 |I. ico|n is cur|
|00001480| 72 65 6e 74 6c 79 20 73 | 65 6c 65 63 74 65 64 2c |rently s|elected,|
|00001490| 20 64 65 73 65 6c 65 63 | 74 69 6e 67 20 69 74 20 | deselec|ting it |
|000014a0| 28 77 65 20 73 68 61 6c | 6c 20 64 65 73 65 6c 65 |(we shal|l desele|
|000014b0| 63 74 20 74 68 65 0d 00 | a4 48 f4 20 20 20 77 68 |ct the..|.H. wh|
|000014c0| 6f 6c 65 20 67 72 6f 75 | 70 20 69 6e 20 74 68 69 |ole grou|p in thi|
|000014d0| 73 20 65 78 61 6d 70 6c | 65 29 20 61 6e 64 20 73 |s exampl|e) and s|
|000014e0| 65 6c 65 63 74 20 74 68 | 65 20 6e 65 77 20 6f 6e |elect th|e new on|
|000014f0| 65 2e 20 52 61 64 69 6f | 20 69 63 6f 6e 73 0d 00 |e. Radio| icons..|
|00001500| a5 40 f4 20 20 20 69 6e | 20 74 68 65 20 6d 61 69 |.@. in| the mai|
|00001510| 6e 20 77 69 6e 64 6f 77 | 20 61 72 65 20 69 63 6f |n window| are ico|
|00001520| 6e 73 20 32 20 74 6f 20 | 36 20 61 6e 64 20 68 61 |ns 2 to |6 and ha|
|00001530| 76 65 20 61 6e 20 45 53 | 47 20 6f 66 20 31 0d 00 |ve an ES|G of 1..|
|00001540| a6 04 0d 00 a7 1d dd f2 | 65 76 65 6e 74 5f 69 63 |........|event_ic|
|00001550| 6f 6e 62 61 72 61 64 6a | 75 73 74 28 42 25 29 0d |onbaradj|ust(B%).|
|00001560| 00 a8 0b ea 20 41 25 2c | 53 25 0d 00 a9 13 53 25 |.... A%,|S%....S%|
|00001570| 3d 31 3a e3 20 41 25 3d | 32 20 b8 20 36 0d 00 aa |=1:. A%=|2 . 6...|
|00001580| 29 20 20 e7 20 a4 69 63 | 6f 6e 5f 67 65 74 73 65 |) . .ic|on_getse|
|00001590| 6c 65 63 74 28 6d 61 69 | 6e 25 2c 41 25 29 20 8c |lect(mai|n%,A%) .|
|000015a0| 20 53 25 3d 41 25 0d 00 | ab 05 ed 0d 00 ac 17 53 | S%=A%..|.......S|
|000015b0| 25 2b 3d 31 3a e7 20 53 | 25 3d 37 20 8c 20 53 25 |%+=1:. S|%=7 . S%|
|000015c0| 3d 32 0d 00 ad 3f f2 69 | 63 6f 6e 5f 67 72 6f 75 |=2...?.i|con_grou|
|000015d0| 70 64 65 73 65 6c 65 63 | 74 28 6d 61 69 6e 25 2c |pdeselec|t(main%,|
|000015e0| 31 29 20 20 20 3a 20 f4 | 20 44 65 73 65 6c 65 63 |1) : .| Deselec|
|000015f0| 74 20 61 6c 6c 20 45 53 | 47 20 31 20 69 63 6f 6e |t all ES|G 1 icon|
|00001600| 73 0d 00 ae 1a f2 69 63 | 6f 6e 5f 73 65 6c 65 63 |s.....ic|on_selec|
|00001610| 74 28 6d 61 69 6e 25 2c | 53 25 29 0d 00 af 05 e1 |t(main%,|S%).....|
|00001620| 0d 00 b0 04 0d 00 b1 04 | 0d 00 b2 4f f4 20 20 20 |........|...O. |
|00001630| 46 69 6e 61 6c 6c 79 20 | 77 68 65 6e 20 74 68 65 |Finally |when the|
|00001640| 20 77 72 69 74 61 62 6c | 65 20 69 63 6f 6e 20 28 | writabl|e icon (|
|00001650| 30 29 20 69 6e 20 74 68 | 65 20 6d 61 69 6e 20 77 |0) in th|e main w|
|00001660| 69 6e 64 6f 77 20 68 61 | 73 20 74 65 78 74 20 74 |indow ha|s text t|
|00001670| 79 70 65 64 20 69 6e 0d | 00 b3 51 f4 20 20 20 69 |yped in.|..Q. i|
|00001680| 74 20 61 6e 64 20 52 45 | 54 55 52 4e 20 69 73 20 |t and RE|TURN is |
|00001690| 70 72 65 73 73 65 64 2c | 20 63 6f 70 79 20 74 68 |pressed,| copy th|
|000016a0| 65 20 74 65 78 74 20 66 | 72 6f 6d 20 74 68 61 74 |e text f|rom that|
|000016b0| 20 69 63 6f 6e 20 74 6f | 20 74 68 65 20 6f 6e 65 | icon to| the one|
|000016c0| 20 6e 65 78 74 20 74 6f | 0d 00 b4 3d f4 20 20 20 | next to|...=. |
|000016d0| 69 74 20 28 31 29 2e 20 | 54 6f 20 64 6f 20 74 68 |it (1). |To do th|
|000016e0| 69 73 20 77 65 20 6e 65 | 65 64 20 74 6f 20 74 72 |is we ne|ed to tr|
|000016f0| 61 70 20 6b 65 79 20 70 | 72 65 73 73 20 65 76 65 |ap key p|ress eve|
|00001700| 6e 74 73 20 3a 0d 00 b5 | 04 0d 00 b6 04 0d 00 b7 |nts :...|........|
|00001710| 18 dd f2 65 76 65 6e 74 | 5f 6b 65 79 70 72 65 73 |...event|_keypres|
|00001720| 73 28 42 25 29 0d 00 b8 | 0b ea 20 57 25 2c 54 24 |s(B%)...|.. W%,T$|
|00001730| 0d 00 b9 04 0d 00 ba 4e | f4 20 20 20 46 69 72 73 |.......N|. Firs|
|00001740| 74 20 77 65 20 6e 65 65 | 64 20 74 6f 20 67 65 74 |t we nee|d to get|
|00001750| 20 74 68 65 20 27 77 69 | 6e 64 6f 77 27 20 66 6f | the 'wi|ndow' fo|
|00001760| 72 20 74 68 65 20 6b 65 | 79 20 70 72 65 73 73 20 |r the ke|y press |
|00001770| 65 76 65 6e 74 2e 20 54 | 68 69 73 20 69 73 20 6e |event. T|his is n|
|00001780| 6f 74 0d 00 bb 47 f4 20 | 20 20 74 68 65 20 77 69 |ot...G. | the wi|
|00001790| 6e 64 6f 77 20 68 61 6e | 64 6c 65 20 28 69 65 2e |ndow han|dle (ie.|
|000017a0| 20 21 42 25 29 2c 20 62 | 75 74 20 74 68 65 20 42 | !B%), b|ut the B|
|000017b0| 6c 69 62 20 77 69 6e 64 | 6f 77 20 6c 69 62 72 61 |lib wind|ow libra|
|000017c0| 72 79 20 77 69 6e 64 6f | 77 0d 00 bc 13 f4 20 20 |ry windo|w..... |
|000017d0| 20 73 74 72 75 63 74 75 | 72 65 20 3a 0d 00 bd 04 | structu|re :....|
|000017e0| 0d 00 be 18 57 25 3d a4 | 77 69 6e 5f 66 69 6e 64 |....W%=.|win_find|
|000017f0| 77 69 6e 28 21 42 25 29 | 0d 00 bf 04 0d 00 c0 4b |win(!B%)|.......K|
|00001800| f4 20 20 20 49 66 20 74 | 68 69 73 20 69 73 20 6f |. If t|his is o|
|00001810| 75 72 20 6d 61 69 6e 20 | 77 69 6e 64 6f 77 2c 20 |ur main |window, |
|00001820| 61 6e 64 20 74 68 65 20 | 69 63 6f 6e 20 77 61 73 |and the |icon was|
|00001830| 20 69 63 6f 6e 20 30 20 | 61 6e 64 20 74 68 65 20 | icon 0 |and the |
|00001840| 6b 65 79 20 77 61 73 0d | 00 c1 4e f4 20 20 20 52 |key was.|..N. R|
|00001850| 45 54 55 52 4e 20 28 31 | 33 29 20 74 68 65 6e 20 |ETURN (1|3) then |
|00001860| 63 6f 70 79 20 74 68 65 | 20 69 63 6f 6e 20 74 65 |copy the| icon te|
|00001870| 78 74 2c 20 6f 74 68 65 | 72 77 69 73 65 20 70 61 |xt, othe|rwise pa|
|00001880| 73 73 20 74 68 65 20 6b | 65 79 70 72 65 73 73 20 |ss the k|eypress |
|00001890| 6f 6e 2e 2e 2e 0d 00 c2 | 04 0d 00 c3 24 e7 20 57 |on......|....$. W|
|000018a0| 25 3d 6d 61 69 6e 25 20 | 80 20 42 25 21 34 3d 30 |%=main% |. B%!4=0|
|000018b0| 20 80 20 42 25 21 32 34 | 3d 31 33 20 8c 0d 00 c4 | . B%!24|=13 ....|
|000018c0| 1f 20 20 54 24 3d a4 69 | 63 6f 6e 5f 67 65 74 74 |. T$=.i|con_gett|
|000018d0| 65 78 74 28 6d 61 69 6e | 25 2c 30 29 0d 00 c5 1f |ext(main|%,0)....|
|000018e0| 20 20 f2 69 63 6f 6e 5f | 73 65 74 74 65 78 74 28 | .icon_|settext(|
|000018f0| 6d 61 69 6e 25 2c 31 2c | 54 24 29 0d 00 c6 05 cc |main%,1,|T$).....|
|00001900| 0d 00 c7 20 20 20 c8 99 | 20 22 57 69 6d 70 5f 50 |... ..| "Wimp_P|
|00001910| 72 6f 63 65 73 73 4b 65 | 79 22 2c 42 25 21 32 34 |rocessKe|y",B%!24|
|00001920| 0d 00 c8 05 cd 0d 00 c9 | 04 0d 00 ca 05 e1 0d 00 |........|........|
|00001930| cb 04 0d 00 cc 04 0d ff | |........| |
+--------+-------------------------+-------------------------+--------+--------+