home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / program / basic / blib / !TestApp / !Runimag < prev    next >
Unknown  |  1993-10-18  |  7.0 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% xdgMime image/x-tga default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 0d 00 0a 05 f4 0d 00 14 | 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 1e 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 28 05 f4 0d | 00 32 04 0d 00 3c 4d f4 |s...(...|.2...<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 46 4c f4 20 20 20 |s. These|..FL. |
|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 50 4c | f4 20 20 20 4f 6e 20 74 |ant...PL|. 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 5a 13 f4 20 20 20 | 61 6c 6c 6f 63 61 74 69 |..Z.. |allocati|
|00000170| 6f 6e 2e 0d 00 64 04 0d | 00 6e 11 f2 6d 65 6d 6f |on...d..|.n..memo|
|00000180| 72 79 28 b9 2c a3 29 20 | 0d 00 78 04 0d 00 82 4c |ry(.,.) |..x....L|
|00000190| f4 20 20 20 4e 65 78 74 | 20 69 6e 69 74 69 61 6c |. Next| initial|
|000001a0| 69 73 65 20 74 68 65 20 | 61 70 70 6c 69 63 61 74 |ise the |applicat|
|000001b0| 69 6f 6e 20 77 69 74 68 | 20 74 68 65 20 57 49 4d |ion with| the WIM|
|000001c0| 50 2c 20 67 69 76 69 6e | 67 20 74 68 65 20 74 61 |P, givin|g the ta|
|000001d0| 73 6b 20 6e 61 6d 65 2c | 0d 00 8c 36 f4 20 20 20 |sk name,|...6. |
|000001e0| 73 70 72 69 74 65 20 6e | 61 6d 65 20 61 6e 64 20 |sprite n|ame and |
|000001f0| 73 65 6c 65 63 74 69 6e | 67 20 62 75 66 66 65 72 |selectin|g buffer|
|00000200| 20 73 69 7a 65 20 6f 66 | 20 31 30 32 34 2e 0d 00 | size of| 1024...|
|00000210| 96 04 0d 00 a0 3a f2 77 | 69 6d 70 5f 69 6e 69 74 |.....:.w|imp_init|
|00000220| 28 22 54 65 73 74 20 41 | 70 70 6c 69 63 61 74 69 |("Test A|pplicati|
|00000230| 6f 6e 22 2c 22 21 74 65 | 73 74 61 70 70 22 2c b9 |on","!te|stapp",.|
|00000240| 2c 31 30 32 34 2c 32 30 | 30 2c 30 29 0d 00 aa 04 |,1024,20|0,0)....|
|00000250| 0d 00 b4 04 0d 00 be 1f | f4 20 20 20 53 65 74 20 |........|. Set |
|00000260| 75 70 20 6f 75 74 20 65 | 72 72 6f 72 20 74 72 61 |up out e|rror tra|
|00000270| 70 20 3a 0d 00 c8 04 0d | 00 d2 37 ee 20 85 20 f2 |p :.....|..7. . .|
|00000280| 77 69 6d 70 5f 65 72 72 | 6f 72 28 31 2c 9f 2c f6 |wimp_err|or(1,.,.|
|00000290| 24 2b 22 20 61 74 20 6c | 69 6e 65 20 22 2b c3 28 |$+" at l|ine "+.(|
|000002a0| 9e 29 29 3a f2 77 69 6d | 70 5f 71 75 69 74 0d 00 |.)):.wim|p_quit..|
|000002b0| dc 04 0d 00 e6 04 0d 00 | f0 36 f4 20 20 20 49 6e |........|.6. In|
|000002c0| 69 74 69 61 6c 69 73 65 | 20 74 68 65 20 77 69 6e |itialise| the win|
|000002d0| 64 6f 77 20 6c 69 62 72 | 61 72 79 2c 20 66 6f 72 |dow libr|ary, for|
|000002e0| 20 32 20 77 69 6e 64 6f | 77 73 20 3a 0d 00 fa 04 | 2 windo|ws :....|
|000002f0| 0d 01 04 04 0d 01 0e 10 | f2 77 69 6e 5f 69 6e 69 |........|.win_ini|
|00000300| 74 28 32 29 0d 01 18 04 | 0d 01 22 04 0d 01 2c 49 |t(2)....|.."...,I|
|00000310| f4 20 20 20 4e 65 78 74 | 20 69 6e 69 74 69 61 6c |. Next| initial|
|00000320| 69 73 65 20 74 68 65 20 | 74 65 6d 70 6c 61 74 65 |ise the |template|
|00000330| 73 20 72 6f 75 74 69 6e | 65 73 2e 20 54 68 69 73 |s routin|es. This|
|00000340| 20 74 61 6b 65 73 20 6e | 6f 20 70 61 72 61 6d 65 | takes n|o parame|
|00000350| 74 65 72 73 2e 0d 01 36 | 04 0d 01 40 0e f2 74 65 |ters...6|...@..te|
|00000360| 6d 70 5f 69 6e 69 74 0d | 01 4a 04 0d 01 54 04 0d |mp_init.|.J...T..|
|00000370| 01 5e 3a f4 20 20 20 4e | 6f 77 20 77 65 20 63 61 |.^:. N|ow we ca|
|00000380| 6e 20 72 65 61 64 20 74 | 68 65 20 61 70 70 6c 69 |n read t|he appli|
|00000390| 63 61 74 69 6f 6e 27 73 | 20 74 65 6d 70 6c 61 74 |cation's| templat|
|000003a0| 65 73 20 66 69 6c 65 20 | 3a 0d 01 68 04 0d 01 72 |es file |:..h...r|
|000003b0| 32 f2 74 65 6d 70 5f 72 | 65 61 64 66 69 6c 65 28 |2.temp_r|eadfile(|
|000003c0| 22 3c 54 65 73 74 41 70 | 70 24 44 69 72 3e 2e 54 |"<TestAp|p$Dir>.T|
|000003d0| 65 6d 70 6c 61 74 65 73 | 22 2c 31 30 32 34 29 0d |emplates|",1024).|
|000003e0| 01 7c 04 0d 01 86 04 0d | 01 90 4b f4 20 20 20 4e |.|......|..K. N|
|000003f0| 65 78 74 20 63 72 65 61 | 74 65 20 74 77 6f 20 77 |ext crea|te two w|
|00000400| 69 6e 64 6f 77 73 20 66 | 72 6f 6d 20 74 68 65 20 |indows f|rom the |
|00000410| 74 65 6d 70 6c 61 74 65 | 73 2c 20 74 68 65 20 69 |template|s, the i|
|00000420| 6e 66 6f 20 77 69 6e 64 | 6f 77 20 61 6e 64 20 74 |nfo wind|ow and t|
|00000430| 68 65 0d 01 9a 47 f4 20 | 20 20 6d 61 69 6e 20 77 |he...G. | main w|
|00000440| 69 6e 64 6f 77 2e 20 42 | 65 6c 6f 77 20 73 68 6f |indow. B|elow sho|
|00000450| 77 73 20 74 77 6f 20 6d | 65 74 68 6f 64 73 20 66 |ws two m|ethods f|
|00000460| 6f 72 20 63 72 65 61 74 | 69 6e 67 20 77 69 6e 64 |or creat|ing wind|
|00000470| 6f 77 73 2c 20 62 6f 74 | 68 0d 01 a4 2c f4 20 20 |ows, bot|h...,. |
|00000480| 20 61 63 74 75 61 6c 6c | 79 20 70 65 72 66 6f 72 | actuall|y perfor|
|00000490| 6d 20 74 68 65 20 73 61 | 6d 65 20 66 75 6e 63 74 |m the sa|me funct|
|000004a0| 69 6f 6e 20 3a 0d 01 ae | 04 0d 01 b8 48 69 6e 66 |ion :...|....Hinf|
|000004b0| 6f 25 20 3d 20 a4 77 69 | 6e 5f 63 72 65 61 74 65 |o% = .wi|n_create|
|000004c0| 77 69 6e 28 22 49 6e 66 | 6f 22 29 20 20 20 3a 20 |win("Inf|o") : |
|000004d0| 20 20 f4 20 20 20 54 68 | 65 20 73 69 6d 70 6c 65 | . Th|e simple|
|000004e0| 20 6d 65 74 68 6f 64 20 | 2d 20 4e 6f 74 65 20 46 | method |- Note F|
|000004f0| 4e 0d 01 c2 04 0d 01 cc | 3d 6d 61 69 6e 25 20 3d |N.......|=main% =|
|00000500| 20 a4 74 65 6d 70 5f 63 | 6f 70 79 28 22 6d 61 69 | .temp_c|opy("mai|
|00000510| 6e 22 29 20 20 20 20 20 | 20 20 3a 20 20 20 f4 20 |n") | : . |
|00000520| 20 20 54 68 65 20 6d 6f | 72 65 20 63 6f 6d 70 6c | The mo|re compl|
|00000530| 65 78 0d 01 d6 4c f2 77 | 69 6e 5f 63 72 65 61 74 |ex...L.w|in_creat|
|00000540| 65 77 69 6e 28 6d 61 69 | 6e 25 29 20 20 20 20 20 |ewin(mai|n%) |
|00000550| 20 20 20 20 20 3a 20 20 | 20 f4 20 20 20 6d 65 74 | : | . met|
|00000560| 68 6f 64 20 75 73 69 6e | 67 20 32 20 63 61 6c 6c |hod usin|g 2 call|
|00000570| 73 2e 20 2d 20 4e 6f 74 | 65 20 50 52 4f 43 0d 01 |s. - Not|e PROC..|
|00000580| e0 04 0d 01 ea 04 0d 01 | f4 31 f4 20 20 20 4c 65 |........|.1. Le|
|00000590| 74 27 73 20 61 64 64 20 | 61 20 6e 65 77 20 74 65 |t's add |a new te|
|000005a0| 78 74 20 69 63 6f 6e 20 | 74 6f 20 74 68 65 20 77 |xt icon |to the w|
|000005b0| 69 6e 64 6f 77 20 3a 0d | 01 fe 04 0d 02 08 40 49 |indow :.|......@I|
|000005c0| 25 3d a4 69 63 6f 6e 5f | 63 5f 74 65 78 74 28 6d |%=.icon_|c_text(m|
|000005d0| 61 69 6e 25 2c 31 30 30 | 2c 2d 35 30 30 2c 34 30 |ain%,100|,-500,40|
|000005e0| 30 2c 2d 34 35 30 2c 31 | 32 2c 37 2c 30 2c 30 2c |0,-450,1|2,7,0,0,|
|000005f0| 22 4e 65 77 20 49 63 6f | 6e 22 29 0d 02 12 46 49 |"New Ico|n")...FI|
|00000600| 25 3d a4 69 63 6f 6e 5f | 63 5f 73 70 72 69 74 65 |%=.icon_|c_sprite|
|00000610| 28 6d 61 69 6e 25 2c 35 | 30 30 2c 2d 35 30 30 2c |(main%,5|00,-500,|
|00000620| 36 30 30 2c 2d 34 30 30 | 2c 31 2c 37 2c 30 2c 31 |600,-400|,1,7,0,1|
|00000630| 3c 3c 32 2c 22 21 77 6f | 72 64 68 6f 75 6e 64 22 |<<2,"!wo|rdhound"|
|00000640| 29 0d 02 1c 04 0d 02 26 | 04 0d 02 30 36 f4 20 20 |)......&|...06. |
|00000650| 20 4e 6f 77 20 69 6e 69 | 74 20 74 68 65 20 73 6c | Now ini|t the sl|
|00000660| 69 64 65 72 20 70 61 72 | 74 20 6f 66 20 74 68 65 |ider par|t of the|
|00000670| 20 69 63 6f 6e 20 6c 69 | 62 72 61 72 79 20 3a 0d | icon li|brary :.|
|00000680| 02 3a 04 0d 02 44 10 f2 | 73 6c 69 64 65 72 5f 69 |.:...D..|slider_i|
|00000690| 6e 69 74 0d 02 4e 04 0d | 02 58 50 f4 20 20 20 41 |nit..N..|.XP. A|
|000006a0| 6e 64 20 6d 61 6b 65 20 | 69 63 6f 6e 73 20 38 2c |nd make |icons 8,|
|000006b0| 20 31 31 20 26 20 31 30 | 20 69 6e 20 6d 61 69 6e | 11 & 10| in main|
|000006c0| 20 77 69 6e 64 6f 77 20 | 61 20 73 6c 69 64 65 72 | window |a slider|
|000006d0| 20 69 63 6f 6e 2c 20 77 | 69 74 68 20 6d 69 6e 20 | icon, w|ith min |
|000006e0| 76 61 6c 75 65 20 30 0d | 02 62 21 f4 20 20 20 61 |value 0.|.b!. a|
|000006f0| 6e 64 20 6d 61 78 20 76 | 61 6c 75 65 20 31 30 2c |nd max v|alue 10,|
|00000700| 20 73 74 65 70 20 31 2e | 0d 02 6c 04 0d 02 76 2e | step 1.|..l...v.|
|00000710| 73 6c 69 64 65 72 25 3d | a4 73 6c 69 64 65 72 5f |slider%=|.slider_|
|00000720| 6e 65 77 28 6d 61 69 6e | 25 2c 38 2c 31 31 2c 31 |new(main|%,8,11,1|
|00000730| 30 2c 30 2c 31 30 30 2c | 31 29 0d 02 80 04 0d 02 |0,0,100,|1)......|
|00000740| 8a 28 f4 20 20 20 53 65 | 74 20 74 68 65 20 6e 65 |.(. Se|t the ne|
|00000750| 77 20 73 6c 69 64 65 72 | 20 74 6f 20 68 61 6c 66 |w slider| to half|
|00000760| 20 77 61 79 20 3a 0d 02 | 94 04 0d 02 9e 1b f2 73 | way :..|.......s|
|00000770| 6c 69 64 65 72 5f 73 65 | 74 28 73 6c 69 64 65 72 |lider_se|t(slider|
|00000780| 25 2c 35 30 29 0d 02 a8 | 04 0d 02 b2 19 f2 69 63 |%,50)...|......ic|
|00000790| 6f 6e 5f 64 65 6c 65 74 | 65 28 6d 61 69 6e 25 2c |on_delet|e(main%,|
|000007a0| 37 29 0d 02 bc 04 0d 02 | c6 48 f4 20 20 20 4e 65 |7)......|.H. Ne|
|000007b0| 78 74 20 69 6e 69 74 69 | 61 6c 69 73 65 20 74 68 |xt initi|alise th|
|000007c0| 65 20 6d 65 6e 75 20 6c | 69 62 72 61 72 79 2c 20 |e menu l|ibrary, |
|000007d0| 73 74 61 74 69 6e 67 20 | 74 68 61 74 20 77 65 20 |stating |that we |
|000007e0| 69 6e 74 65 6e 64 20 74 | 6f 20 68 61 76 65 0d 02 |intend t|o have..|
|000007f0| d0 44 f4 20 20 20 32 20 | 6d 65 6e 75 73 20 28 77 |.D. 2 |menus (w|
|00000800| 65 20 63 61 6e 20 63 68 | 61 6e 67 65 20 74 68 69 |e can ch|ange thi|
|00000810| 73 20 76 61 6c 75 65 20 | 6c 61 74 65 72 20 69 66 |s value |later if|
|00000820| 20 6d 6f 72 65 20 61 72 | 65 20 6e 65 65 64 65 64 | more ar|e needed|
|00000830| 29 2e 0d 02 da 04 0d 02 | e4 11 f2 6d 65 6e 75 5f |).......|...menu_|
|00000840| 69 6e 69 74 28 32 29 0d | 02 ee 04 0d 02 f8 04 0d |init(2).|........|
|00000850| 03 02 4d f4 20 20 20 43 | 72 65 61 74 65 20 74 68 |..M. C|reate th|
|00000860| 65 20 66 69 72 73 74 20 | 28 6e 75 6d 62 65 72 20 |e first |(number |
|00000870| 30 29 20 6d 65 6e 75 2c | 20 67 69 76 69 6e 67 20 |0) menu,| giving |
|00000880| 69 74 20 61 20 74 69 74 | 6c 65 20 6f 66 20 22 54 |it a tit|le of "T|
|00000890| 65 73 74 20 41 70 70 22 | 20 61 6e 64 0d 03 0c 1d |est App"| and....|
|000008a0| f4 20 20 20 67 69 76 69 | 6e 67 20 69 74 20 33 20 |. givi|ng it 3 |
|000008b0| 65 6e 74 72 69 65 73 20 | 3a 0d 03 16 04 0d 03 20 |entries |:...... |
|000008c0| 20 f2 6d 65 6e 75 5f 68 | 65 61 64 65 72 28 22 54 | .menu_h|eader("T|
|000008d0| 65 73 74 20 41 70 70 22 | 2c 30 2c 33 29 0d 03 2a |est App"|,0,3)..*|
|000008e0| 04 0d 03 34 04 0d 03 3e | 49 f4 20 20 20 4e 6f 77 |...4...>|I. Now|
|000008f0| 20 63 72 65 61 74 65 20 | 74 68 65 20 33 20 65 6e | create |the 3 en|
|00000900| 74 72 69 65 73 2c 20 6f | 6e 65 20 62 65 69 6e 67 |tries, o|ne being|
|00000910| 20 22 49 6e 66 6f 22 2c | 20 74 68 65 20 73 65 63 | "Info",| the sec|
|00000920| 6f 6e 64 20 22 53 75 62 | 20 4d 65 6e 75 22 0d 03 |ond "Sub| Menu"..|
|00000930| 48 1d f4 20 20 20 61 6e | 64 20 74 68 65 20 74 68 |H.. an|d the th|
|00000940| 69 72 64 20 22 51 75 69 | 74 22 2e 0d 03 52 04 0d |ird "Qui|t"...R..|
|00000950| 03 5c 1f f2 6d 65 6e 75 | 5f 61 64 64 69 74 65 6d |.\..menu|_additem|
|00000960| 28 30 2c 30 2c 22 49 6e | 66 6f 22 2c 30 29 0d 03 |(0,0,"In|fo",0)..|
|00000970| 66 23 f2 6d 65 6e 75 5f | 61 64 64 69 74 65 6d 28 |f#.menu_|additem(|
|00000980| 30 2c 31 2c 22 53 75 62 | 20 4d 65 6e 75 22 2c 30 |0,1,"Sub| Menu",0|
|00000990| 29 0d 03 70 1f f2 6d 65 | 6e 75 5f 61 64 64 69 74 |)..p..me|nu_addit|
|000009a0| 65 6d 28 30 2c 32 2c 22 | 51 75 69 74 22 2c 30 29 |em(0,2,"|Quit",0)|
|000009b0| 0d 03 7a 04 0d 03 84 04 | 0d 03 8e 3e f4 20 20 20 |..z.....|...>. |
|000009c0| 48 65 61 64 65 72 20 66 | 6f 72 20 74 68 65 20 73 |Header f|or the s|
|000009d0| 65 63 6f 6e 64 20 6d 65 | 6e 75 20 28 6e 75 6d 62 |econd me|nu (numb|
|000009e0| 65 72 20 31 29 20 77 69 | 74 68 20 32 20 65 6e 74 |er 1) wi|th 2 ent|
|000009f0| 72 69 65 73 20 3a 0d 03 | 98 04 0d 03 a2 1e f2 6d |ries :..|.......m|
|00000a00| 65 6e 75 5f 68 65 61 64 | 65 72 28 22 53 65 63 6f |enu_head|er("Seco|
|00000a10| 6e 64 22 2c 31 2c 32 29 | 0d 03 ac 04 0d 03 b6 04 |nd",1,2)|........|
|00000a20| 0d 03 c0 49 f4 20 20 20 | 4e 6f 77 20 74 68 65 20 |...I. |Now the |
|00000a30| 69 74 65 6d 73 2c 20 74 | 68 65 20 66 69 72 73 74 |items, t|he first|
|00000a40| 20 22 53 65 6c 65 63 74 | 22 20 77 68 69 63 68 20 | "Select|" which |
|00000a50| 69 73 20 74 69 63 6b 65 | 64 20 61 6e 64 20 75 6e |is ticke|d and un|
|00000a60| 64 65 72 6c 69 6e 65 64 | 2c 0d 03 ca 46 f4 20 20 |derlined|,...F. |
|00000a70| 20 74 68 65 20 73 65 63 | 6f 6e 64 20 69 73 20 61 | the sec|ond is a|
|00000a80| 20 77 72 69 74 61 62 6c | 65 20 65 6e 74 72 79 20 | writabl|e entry |
|00000a90| 70 6f 69 6e 74 69 6e 67 | 20 74 6f 20 61 20 62 75 |pointing| to a bu|
|00000aa0| 66 66 65 72 20 77 68 69 | 63 68 20 61 6c 73 6f 0d |ffer whi|ch also.|
|00000ab0| 03 d4 1d f4 20 20 20 6e | 65 65 64 73 20 74 6f 20 |.... n|eeds to |
|00000ac0| 62 65 20 64 65 66 69 6e | 65 64 20 3a 0d 03 de 04 |be defin|ed :....|
|00000ad0| 0d 03 e8 41 f2 6d 65 6e | 75 5f 61 64 64 69 74 65 |...A.men|u_addite|
|00000ae0| 6d 28 31 2c 30 2c 22 53 | 65 6c 65 63 74 22 2c 6d |m(1,0,"S|elect",m|
|00000af0| 65 6e 75 5f 74 69 63 6b | 20 2b 20 6d 65 6e 75 5f |enu_tick| + menu_|
|00000b00| 64 6f 74 74 65 64 29 3a | 74 69 63 6b 65 64 25 3d |dotted):|ticked%=|
|00000b10| b9 0d 03 f2 04 0d 03 fc | 31 62 75 66 66 65 72 25 |........|1buffer%|
|00000b20| 3d a4 6d 61 6c 6c 6f 63 | 28 32 35 36 29 20 20 20 |=.malloc|(256) |
|00000b30| 20 3a 20 20 20 f4 20 32 | 35 36 20 62 79 74 65 20 | : . 2|56 byte |
|00000b40| 62 75 66 66 65 72 0d 04 | 06 1d f2 6f 73 5f 70 75 |buffer..|...os_pu|
|00000b50| 74 73 74 72 69 6e 67 28 | 62 75 66 66 65 72 25 2c |tstring(|buffer%,|
|00000b60| 22 22 29 0d 04 10 2d f2 | 6d 65 6e 75 5f 61 64 64 |"")...-.|menu_add|
|00000b70| 77 72 69 74 61 62 6c 65 | 28 31 2c 31 2c 31 30 2c |writable|(1,1,10,|
|00000b80| 30 2c 62 75 66 66 65 72 | 25 2c 30 2c 32 35 36 29 |0,buffer|%,0,256)|
|00000b90| 0d 04 1a 04 0d 04 24 04 | 0d 04 2e 4c f4 20 20 20 |......$.|...L. |
|00000ba0| 4e 6f 77 20 61 6c 6c 20 | 77 65 20 6e 65 65 64 20 |Now all |we need |
|00000bb0| 74 6f 20 64 6f 20 69 73 | 20 6a 6f 69 6e 20 74 68 |to do is| join th|
|00000bc0| 69 6e 67 73 20 74 6f 20 | 74 68 65 20 66 69 72 73 |ings to |the firs|
|00000bd0| 74 20 6d 65 6e 75 2c 20 | 69 65 2e 20 74 68 65 20 |t menu, |ie. the |
|00000be0| 69 6e 66 6f 0d 04 38 24 | f4 20 20 20 77 69 6e 64 |info..8$|. wind|
|00000bf0| 6f 77 20 61 6e 64 20 74 | 68 65 20 73 65 63 6f 6e |ow and t|he secon|
|00000c00| 64 20 6d 65 6e 75 20 3a | 0d 04 42 04 0d 04 4c 1e |d menu :|..B...L.|
|00000c10| f2 6d 65 6e 75 5f 73 75 | 62 77 69 6e 64 6f 77 28 |.menu_su|bwindow(|
|00000c20| 30 2c 30 2c 69 6e 66 6f | 25 29 0d 04 56 18 f2 6d |0,0,info|%)..V..m|
|00000c30| 65 6e 75 5f 73 75 62 6d | 65 6e 75 28 30 2c 31 2c |enu_subm|enu(0,1,|
|00000c40| 31 29 0d 04 60 04 0d 04 | 6a 04 0d 04 74 2b f4 20 |1)..`...|j...t+. |
|00000c50| 20 20 4e 6f 77 20 6a 75 | 73 74 20 70 65 72 66 6f | Now ju|st perfo|
|00000c60| 72 6d 20 61 20 77 69 6d | 70 20 70 6f 6c 6c 20 6c |rm a wim|p poll l|
|00000c70| 6f 6f 70 20 3a 0d 04 7e | 04 0d 04 88 05 f5 0d 04 |oop :..~|........|
|00000c80| 92 17 20 20 f2 77 69 6d | 70 5f 70 6f 6c 6c 28 30 |.. .wim|p_poll(0|
|00000c90| 2c 30 2c 30 29 0d 04 9c | 07 fd 20 a3 0d 04 a6 04 |,0,0)...|.. .....|
|00000ca0| 0d 04 b0 04 0d 04 ba 4d | f4 20 20 20 59 6f 75 20 |.......M|. You |
|00000cb0| 6e 65 65 64 20 74 6f 20 | 73 75 70 70 6c 79 20 73 |need to |supply s|
|00000cc0| 6f 6d 65 20 72 6f 75 74 | 69 6e 65 73 2c 20 74 68 |ome rout|ines, th|
|00000cd0| 65 20 6c 69 62 72 61 72 | 79 20 63 61 6e 27 74 20 |e librar|y can't |
|00000ce0| 73 75 70 70 6c 79 20 65 | 76 65 72 79 74 68 69 6e |supply e|verythin|
|00000cf0| 67 0d 04 c4 04 0d 04 ce | 04 0d 04 d8 4a f4 20 20 |g.......|....J. |
|00000d00| 20 46 6f 72 20 74 68 65 | 20 61 76 6f 76 65 20 73 | For the| avove s|
|00000d10| 65 74 75 70 2c 20 79 6f | 75 20 4e 45 45 44 20 74 |etup, yo|u NEED t|
|00000d20| 6f 20 73 75 70 70 6c 79 | 20 74 77 6f 20 72 6f 75 |o supply| two rou|
|00000d30| 74 69 6e 65 73 2c 20 74 | 68 65 20 66 69 72 73 74 |tines, t|he first|
|00000d40| 20 69 73 0d 04 e2 4a f4 | 20 20 20 63 61 6c 6c 65 | is...J.| calle|
|00000d50| 64 20 77 68 65 6e 20 27 | 6d 65 6e 75 27 20 69 73 |d when '|menu' is|
|00000d60| 20 70 72 65 73 73 65 64 | 20 6f 76 65 72 20 74 68 | pressed| over th|
|00000d70| 65 20 69 63 6f 6e 62 61 | 72 20 69 63 6f 6e 2e 20 |e iconba|r icon. |
|00000d80| 54 68 69 73 20 66 75 6e | 63 74 69 6f 6e 0d 04 ec |This fun|ction...|
|00000d90| 4a f4 20 20 20 28 77 68 | 69 63 68 20 6d 75 73 74 |J. (wh|ich must|
|00000da0| 20 62 65 20 63 61 6c 6c | 65 64 20 46 4e 77 69 6d | be call|ed FNwim|
|00000db0| 70 5f 6d 61 69 6e 6d 65 | 6e 75 29 20 73 68 6f 75 |p_mainme|nu) shou|
|00000dc0| 6c 64 20 74 68 65 6e 20 | 63 72 65 61 74 65 20 74 |ld then |create t|
|00000dd0| 68 65 20 6d 65 6e 75 0d | 04 f6 4d f4 20 20 20 28 |he menu.|..M. (|
|00000de0| 69 66 20 69 74 20 69 73 | 20 6e 6f 74 20 61 6c 72 |if it is| not alr|
|00000df0| 65 61 64 79 20 63 72 65 | 61 74 65 64 29 20 61 6e |eady cre|ated) an|
|00000e00| 64 20 72 65 74 75 72 6e | 20 74 68 65 20 6d 65 6e |d return| the men|
|00000e10| 75 20 6e 75 6d 62 65 72 | 20 6f 66 20 74 68 65 20 |u number| of the |
|00000e20| 6d 61 69 6e 0d 05 00 4a | f4 20 20 20 6d 65 6e 75 |main...J|. menu|
|00000e30| 2e 20 49 6e 20 6f 75 72 | 20 63 61 73 65 20 77 65 |. In our| case we|
|00000e40| 20 68 61 76 65 20 61 6c | 72 65 61 64 79 20 63 72 | have al|ready cr|
|00000e50| 65 61 74 65 64 20 74 68 | 65 20 6d 65 6e 75 73 2c |eated th|e menus,|
|00000e60| 20 61 6e 64 20 6a 75 73 | 74 20 6e 65 65 64 0d 05 | and jus|t need..|
|00000e70| 0a 48 f4 20 20 20 74 6f | 20 72 65 74 75 72 6e 20 |.H. to| return |
|00000e80| 30 20 28 74 68 65 20 6d | 61 69 6e 20 6d 65 6e 75 |0 (the m|ain menu|
|00000e90| 20 6e 75 6d 62 65 72 29 | 2e 20 54 68 69 73 20 66 | number)|. This f|
|00000ea0| 75 6e 63 74 69 6f 6e 20 | 69 73 20 65 78 70 65 63 |unction |is expec|
|00000eb0| 74 65 64 20 74 6f 0d 05 | 14 25 f4 20 20 20 62 65 |ted to..|.%. be|
|00000ec0| 20 74 68 65 72 65 20 62 | 79 20 74 68 65 20 57 49 | there b|y the WI|
|00000ed0| 4d 50 20 6c 69 62 72 61 | 72 79 2e 0d 05 1e 04 0d |MP libra|ry......|
|00000ee0| 05 28 13 dd a4 77 69 6d | 70 5f 6d 61 69 6e 6d 65 |.(...wim|p_mainme|
|00000ef0| 6e 75 0d 05 32 06 3d 30 | 0d 05 3c 04 0d 05 46 04 |nu..2.=0|..<...F.|
|00000f00| 0d 05 50 4c f4 20 20 20 | 54 68 65 20 73 65 63 6f |..PL. |The seco|
|00000f10| 6e 64 20 72 6f 75 74 69 | 6e 65 20 77 65 20 6e 65 |nd routi|ne we ne|
|00000f20| 65 64 20 74 6f 20 73 75 | 70 70 6c 79 20 69 73 20 |ed to su|pply is |
|00000f30| 74 68 65 20 6d 65 6e 75 | 20 73 65 6c 65 63 74 69 |the menu| selecti|
|00000f40| 6f 6e 20 70 72 6f 63 65 | 64 75 72 65 0d 05 5a 4a |on proce|dure..ZJ|
|00000f50| f4 20 20 20 28 77 68 69 | 63 68 20 6d 75 73 74 20 |. (whi|ch must |
|00000f60| 62 65 20 63 61 6c 6c 65 | 64 20 50 52 4f 43 65 76 |be calle|d PROCev|
|00000f70| 65 6e 74 5f 6d 65 6e 75 | 73 65 6c 65 63 74 69 6f |ent_menu|selectio|
|00000f80| 6e 29 20 77 68 69 63 68 | 20 69 73 20 70 61 73 73 |n) which| is pass|
|00000f90| 65 64 20 74 68 65 0d 05 | 64 4c f4 20 20 20 77 69 |ed the..|dL. wi|
|00000fa0| 6d 70 20 70 6f 6c 6c 20 | 62 6c 6f 63 6b 20 75 70 |mp poll |block up|
|00000fb0| 6f 6e 20 61 20 6d 65 6e | 75 20 73 65 6c 65 63 74 |on a men|u select|
|00000fc0| 69 6f 6e 2e 20 54 68 65 | 20 76 61 72 69 61 62 6c |ion. The| variabl|
|00000fd0| 65 20 27 5f 77 69 6d 70 | 5f 6f 6c 64 6d 65 6e 75 |e '_wimp|_oldmenu|
|00000fe0| 25 27 0d 05 6e 4d f4 20 | 20 20 63 6f 6e 74 61 69 |%'..nM. | contai|
|00000ff0| 6e 73 20 74 68 65 20 6d | 65 6e 75 20 6e 75 6d 62 |ns the m|enu numb|
|00001000| 65 72 20 77 68 69 63 68 | 20 77 61 73 20 6c 61 73 |er which| was las|
|00001010| 74 20 70 6f 70 65 64 20 | 75 70 20 62 79 20 74 68 |t poped |up by th|
|00001020| 65 20 70 72 6f 67 72 61 | 6d 2c 20 6a 75 73 74 0d |e progra|m, just.|
|00001030| 05 78 4b f4 20 20 20 69 | 6e 20 63 61 73 65 20 79 |.xK. i|n case y|
|00001040| 6f 75 20 6e 65 65 64 20 | 74 6f 20 6b 6e 6f 77 20 |ou need |to know |
|00001050| 74 68 69 73 20 28 69 65 | 2e 20 69 66 20 79 6f 75 |this (ie|. if you|
|00001060| 20 68 61 76 65 20 6d 6f | 72 65 20 74 68 61 6e 20 | have mo|re than |
|00001070| 6f 6e 65 20 73 65 74 20 | 6f 66 0d 05 82 4d f4 20 |one set |of...M. |
|00001080| 20 20 6d 65 6e 75 73 29 | 2e 20 41 67 61 69 6e 20 | menus)|. Again |
|00001090| 74 68 69 73 20 70 72 6f | 63 65 64 75 72 65 20 69 |this pro|cedure i|
|000010a0| 73 20 65 78 70 65 63 74 | 65 64 20 74 6f 20 62 65 |s expect|ed to be|
|000010b0| 20 74 68 65 72 65 20 69 | 6e 20 65 76 65 72 79 20 | there i|n every |
|000010c0| 70 72 6f 67 72 61 6d 0d | 05 8c 24 f4 20 20 20 77 |program.|..$. w|
|000010d0| 68 69 63 68 20 75 73 65 | 73 20 74 68 65 20 57 49 |hich use|s the WI|
|000010e0| 4d 50 20 6c 69 62 72 61 | 72 79 2e 0d 05 96 04 0d |MP libra|ry......|
|000010f0| 05 a0 1d dd f2 65 76 65 | 6e 74 5f 6d 65 6e 75 73 |.....eve|nt_menus|
|00001100| 65 6c 65 63 74 69 6f 6e | 28 42 25 29 0d 05 aa 04 |election|(B%)....|
|00001110| 0d 05 b4 3a f4 20 20 20 | 46 69 6e 64 20 6f 75 74 |...:. |Find out|
|00001120| 20 77 68 61 74 20 65 6e | 74 72 79 20 69 6e 20 74 | what en|try in t|
|00001130| 68 65 20 66 69 72 73 74 | 20 6d 65 6e 75 20 77 61 |he first| menu wa|
|00001140| 73 20 73 65 6c 65 63 74 | 65 64 0d 05 be 04 0d 05 |s select|ed......|
|00001150| c8 0c c8 8e 20 21 42 25 | 20 ca 0d 05 d2 3f 20 20 |.... !B%| ....? |
|00001160| 20 c9 20 31 20 3a 20 20 | 20 20 20 20 20 20 20 20 | . 1 : | |
|00001170| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 f4 20 20 | | . |
|00001180| 20 53 75 62 20 6d 65 6e | 75 2c 20 66 6f 6c 6c 6f | Sub men|u, follo|
|00001190| 77 20 69 74 20 64 6f 77 | 6e 0d 05 dc 13 20 20 20 |w it dow|n.... |
|000011a0| 20 20 20 c8 8e 20 42 25 | 21 34 20 ca 0d 05 e6 44 | .. B%|!4 ....D|
|000011b0| 20 20 20 20 20 20 20 20 | 20 c9 20 30 20 3a 20 20 | | . 0 : |
|000011c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 f4 | | .|
|000011d0| 20 20 20 4f 75 72 20 27 | 53 65 6c 65 63 74 27 20 | Our '|Select' |
|000011e0| 65 6e 74 72 79 2c 20 74 | 6f 67 67 6c 65 20 69 74 |entry, t|oggle it|
|000011f0| 0d 05 f0 23 20 20 20 20 | 20 20 20 20 20 20 20 20 |...# | |
|00001200| 20 74 69 63 6b 65 64 25 | 3d ac 28 74 69 63 6b 65 | ticked%|=.(ticke|
|00001210| 64 25 29 0d 05 fa 4e 20 | 20 20 20 20 20 20 20 20 |d%)...N | |
|00001220| 20 20 20 20 f2 6d 65 6e | 75 5f 61 64 64 69 74 65 | .men|u_addite|
|00001230| 6d 28 31 2c 30 2c 22 53 | 65 6c 65 63 74 22 2c 28 |m(1,0,"S|elect",(|
|00001240| 74 69 63 6b 65 64 25 20 | 80 20 6d 65 6e 75 5f 74 |ticked% |. menu_t|
|00001250| 69 63 6b 29 2b 6d 65 6e | 75 5f 64 6f 74 74 65 64 |ick)+men|u_dotted|
|00001260| 29 0d 06 04 04 0d 06 0e | 4c 20 20 20 20 20 20 20 |).......|L |
|00001270| 20 20 c9 20 31 20 3a 20 | 20 20 20 20 20 20 20 20 | . 1 : | |
|00001280| 20 20 20 20 20 20 20 20 | f4 20 20 20 57 72 69 74 | |. Writ|
|00001290| 61 62 6c 65 20 65 6e 74 | 72 79 2c 20 73 65 74 20 |able ent|ry, set |
|000012a0| 6d 61 69 6e 20 77 69 6e | 64 6f 77 20 74 69 74 6c |main win|dow titl|
|000012b0| 65 0d 06 18 3c 20 20 20 | 20 20 20 20 20 20 20 20 |e...< | |
|000012c0| 20 20 f2 77 69 6e 5f 73 | 65 74 74 69 74 6c 65 28 | .win_s|ettitle(|
|000012d0| 6d 61 69 6e 25 2c a4 6f | 73 5f 67 65 74 73 74 72 |main%,.o|s_getstr|
|000012e0| 69 6e 67 28 62 75 66 66 | 65 72 25 29 29 0d 06 22 |ing(buff|er%)).."|
|000012f0| 0b 20 20 20 20 20 20 cb | 0d 06 2c 04 0d 06 36 16 |. .|..,...6.|
|00001300| 20 20 c9 20 32 20 3a 20 | f2 77 69 6d 70 5f 71 75 | . 2 : |.wimp_qu|
|00001310| 69 74 0d 06 40 05 cb 0d | 06 4a 05 e1 0d 06 54 04 |it..@...|.J....T.|
|00001320| 0d 06 5e 04 0d 06 68 4c | f4 20 20 20 57 68 65 6e |..^...hL|. When|
|00001330| 20 27 73 65 6c 65 63 74 | 27 20 69 73 20 70 72 65 | 'select|' is pre|
|00001340| 73 73 65 64 20 6f 76 65 | 72 20 74 68 65 20 69 63 |ssed ove|r the ic|
|00001350| 6f 6e 62 61 72 20 69 63 | 6f 6e 2c 20 77 65 20 77 |onbar ic|on, we w|
|00001360| 61 6e 74 20 74 6f 20 70 | 6f 70 75 70 20 74 68 65 |ant to p|opup the|
|00001370| 0d 06 72 41 f4 20 20 20 | 6d 61 69 6e 20 77 69 6e |..rA. |main win|
|00001380| 64 6f 77 2e 20 54 6f 20 | 64 6f 20 74 68 69 73 20 |dow. To |do this |
|00001390| 77 65 20 6a 75 73 74 20 | 64 65 66 69 6e 65 20 61 |we just |define a|
|000013a0| 20 70 72 6f 63 65 64 75 | 72 65 20 63 61 6c 6c 65 | procedu|re calle|
|000013b0| 64 0d 06 7c 49 f4 20 20 | 20 50 52 4f 43 65 76 65 |d..|I. | PROCeve|
|000013c0| 6e 74 5f 69 63 6f 6e 62 | 61 72 73 65 6c 65 63 74 |nt_iconb|arselect|
|000013d0| 2e 20 54 68 69 73 20 70 | 72 6f 63 65 64 75 72 65 |. This p|rocedure|
|000013e0| 20 64 6f 65 73 20 4e 4f | 54 20 6e 65 65 64 20 74 | does NO|T need t|
|000013f0| 6f 20 65 78 69 73 74 20 | 69 6e 0d 06 86 4c f4 20 |o exist |in...L. |
|00001400| 20 20 65 76 65 72 79 20 | 70 72 6f 67 72 61 6d 2c | every |program,|
|00001410| 20 75 6e 6c 69 6b 65 20 | 74 68 65 20 74 77 6f 20 | unlike |the two |
|00001420| 61 62 6f 76 65 2e 20 54 | 68 69 73 20 70 72 6f 63 |above. T|his proc|
|00001430| 65 64 75 72 65 2c 20 77 | 68 69 63 68 20 74 61 6b |edure, w|hich tak|
|00001440| 65 73 20 74 68 65 0d 06 | 90 48 f4 20 20 20 77 69 |es the..|.H. wi|
|00001450| 6d 70 20 70 6f 6c 6c 20 | 62 6c 6f 63 6b 20 61 73 |mp poll |block as|
|00001460| 20 61 20 70 61 72 61 6d | 65 74 65 72 2c 20 77 69 | a param|eter, wi|
|00001470| 6c 6c 20 73 69 6d 70 6c | 79 20 6f 70 65 6e 20 6f |ll simpl|y open o|
|00001480| 75 72 20 6d 61 69 6e 20 | 77 69 6e 64 6f 77 0d 06 |ur main |window..|
|00001490| 9a 24 f4 20 20 20 69 6e | 20 74 68 65 20 63 65 6e |.$. in| the cen|
|000014a0| 74 72 65 20 6f 66 20 74 | 68 65 20 73 63 72 65 65 |tre of t|he scree|
|000014b0| 6e 2e 0d 06 a4 04 0d 06 | ae 1d dd f2 65 76 65 6e |n.......|....even|
|000014c0| 74 5f 69 63 6f 6e 62 61 | 72 73 65 6c 65 63 74 28 |t_iconba|rselect(|
|000014d0| 42 25 29 0d 06 b8 11 ea | 20 58 25 2c 59 25 2c 78 |B%).....| X%,Y%,x|
|000014e0| 25 2c 79 25 0d 06 c2 47 | f2 77 69 6e 5f 67 65 74 |%,y%...G|.win_get|
|000014f0| 73 69 7a 65 28 6d 61 69 | 6e 25 2c 78 25 2c 79 25 |size(mai|n%,x%,y%|
|00001500| 29 20 20 20 20 20 20 20 | 20 20 20 3a 20 20 20 f4 |) | : .|
|00001510| 20 47 65 74 20 77 69 6e | 64 6f 77 20 73 69 7a 65 | Get win|dow size|
|00001520| 20 69 6e 74 6f 20 78 25 | 2c 79 25 0d 06 cc 47 f2 | into x%|,y%...G.|
|00001530| 6f 73 5f 73 63 72 65 65 | 6e 73 69 7a 65 28 58 25 |os_scree|nsize(X%|
|00001540| 2c 59 25 29 20 20 20 20 | 20 20 20 20 20 20 20 20 |,Y%) | |
|00001550| 20 20 3a 20 20 20 f4 20 | 47 65 74 20 73 63 72 65 | : . |Get scre|
|00001560| 65 6e 20 73 69 7a 65 20 | 69 6e 74 6f 20 58 25 2c |en size |into X%,|
|00001570| 59 25 0d 06 d6 2d f2 77 | 69 6e 5f 6d 6f 76 65 77 |Y%...-.w|in_movew|
|00001580| 69 6e 28 6d 61 69 6e 25 | 2c 28 58 25 2d 78 25 29 |in(main%|,(X%-x%)|
|00001590| 81 20 32 2c 28 59 25 2d | 79 25 29 81 20 32 29 0d |. 2,(Y%-|y%). 2).|
|000015a0| 06 e0 05 e1 0d 06 ea 04 | 0d 06 f4 45 f4 20 20 20 |........|...E. |
|000015b0| 4e 4f 54 45 20 3a 20 50 | 52 4f 43 77 69 6e 5f 6d |NOTE : P|ROCwin_m|
|000015c0| 6f 76 65 77 69 6e 20 63 | 61 6e 20 62 65 20 75 73 |ovewin c|an be us|
|000015d0| 65 64 20 69 6e 73 74 65 | 61 64 20 6f 66 20 50 52 |ed inste|ad of PR|
|000015e0| 4f 43 77 69 6e 5f 6f 70 | 65 6e 77 69 6e 0d 06 fe |OCwin_op|enwin...|
|000015f0| 04 0d 07 08 04 0d 07 12 | 49 f4 20 20 20 57 68 65 |........|I. Whe|
|00001600| 6e 20 27 61 64 6a 75 73 | 74 27 20 69 73 20 70 72 |n 'adjus|t' is pr|
|00001610| 65 73 73 65 64 20 6f 76 | 65 72 20 74 68 65 20 69 |essed ov|er the i|
|00001620| 63 6f 6e 62 61 72 20 69 | 63 6f 6e 20 77 65 20 77 |conbar i|con we w|
|00001630| 69 6c 6c 20 63 68 61 6e | 67 65 20 74 68 65 0d 07 |ill chan|ge the..|
|00001640| 1c 4b f4 20 20 20 72 61 | 64 69 6f 20 73 65 6c 65 |.K. ra|dio sele|
|00001650| 63 74 69 6f 6e 20 69 6e | 20 74 68 65 20 6d 61 69 |ction in| the mai|
|00001660| 6e 20 77 69 6e 64 6f 77 | 2e 20 54 68 69 73 20 77 |n window|. This w|
|00001670| 69 6c 6c 20 69 6e 76 6f | 6c 76 65 20 66 69 6e 64 |ill invo|lve find|
|00001680| 69 6e 67 20 77 68 69 63 | 68 0d 07 26 49 f4 20 20 |ing whic|h..&I. |
|00001690| 20 69 63 6f 6e 20 69 73 | 20 63 75 72 72 65 6e 74 | icon is| current|
|000016a0| 6c 79 20 73 65 6c 65 63 | 74 65 64 2c 20 64 65 73 |ly selec|ted, des|
|000016b0| 65 6c 65 63 74 69 6e 67 | 20 69 74 20 28 77 65 20 |electing| it (we |
|000016c0| 73 68 61 6c 6c 20 64 65 | 73 65 6c 65 63 74 20 74 |shall de|select t|
|000016d0| 68 65 0d 07 30 48 f4 20 | 20 20 77 68 6f 6c 65 20 |he..0H. | whole |
|000016e0| 67 72 6f 75 70 20 69 6e | 20 74 68 69 73 20 65 78 |group in| this ex|
|000016f0| 61 6d 70 6c 65 29 20 61 | 6e 64 20 73 65 6c 65 63 |ample) a|nd selec|
|00001700| 74 20 74 68 65 20 6e 65 | 77 20 6f 6e 65 2e 20 52 |t the ne|w one. R|
|00001710| 61 64 69 6f 20 69 63 6f | 6e 73 0d 07 3a 40 f4 20 |adio ico|ns..:@. |
|00001720| 20 20 69 6e 20 74 68 65 | 20 6d 61 69 6e 20 77 69 | in the| main wi|
|00001730| 6e 64 6f 77 20 61 72 65 | 20 69 63 6f 6e 73 20 32 |ndow are| icons 2|
|00001740| 20 74 6f 20 36 20 61 6e | 64 20 68 61 76 65 20 61 | to 6 an|d have a|
|00001750| 6e 20 45 53 47 20 6f 66 | 20 31 0d 07 44 04 0d 07 |n ESG of| 1..D...|
|00001760| 4e 1d dd f2 65 76 65 6e | 74 5f 69 63 6f 6e 62 61 |N...even|t_iconba|
|00001770| 72 61 64 6a 75 73 74 28 | 42 25 29 0d 07 58 0b ea |radjust(|B%)..X..|
|00001780| 20 41 25 2c 53 25 0d 07 | 62 13 53 25 3d 31 3a e3 | A%,S%..|b.S%=1:.|
|00001790| 20 41 25 3d 32 20 b8 20 | 36 0d 07 6c 29 20 20 e7 | A%=2 . |6..l) .|
|000017a0| 20 a4 69 63 6f 6e 5f 67 | 65 74 73 65 6c 65 63 74 | .icon_g|etselect|
|000017b0| 28 6d 61 69 6e 25 2c 41 | 25 29 20 8c 20 53 25 3d |(main%,A|%) . S%=|
|000017c0| 41 25 0d 07 76 05 ed 0d | 07 80 17 53 25 2b 3d 31 |A%..v...|...S%+=1|
|000017d0| 3a e7 20 53 25 3d 37 20 | 8c 20 53 25 3d 32 0d 07 |:. S%=7 |. S%=2..|
|000017e0| 8a 3f f2 69 63 6f 6e 5f | 67 72 6f 75 70 64 65 73 |.?.icon_|groupdes|
|000017f0| 65 6c 65 63 74 28 6d 61 | 69 6e 25 2c 31 29 20 20 |elect(ma|in%,1) |
|00001800| 20 3a 20 f4 20 44 65 73 | 65 6c 65 63 74 20 61 6c | : . Des|elect al|
|00001810| 6c 20 45 53 47 20 31 20 | 69 63 6f 6e 73 0d 07 94 |l ESG 1 |icons...|
|00001820| 1a f2 69 63 6f 6e 5f 73 | 65 6c 65 63 74 28 6d 61 |..icon_s|elect(ma|
|00001830| 69 6e 25 2c 53 25 29 0d | 07 9e 05 e1 0d 07 a8 04 |in%,S%).|........|
|00001840| 0d 07 b2 04 0d 07 bc 4f | f4 20 20 20 46 69 6e 61 |.......O|. Fina|
|00001850| 6c 6c 79 20 77 68 65 6e | 20 74 68 65 20 77 72 69 |lly when| the wri|
|00001860| 74 61 62 6c 65 20 69 63 | 6f 6e 20 28 30 29 20 69 |table ic|on (0) i|
|00001870| 6e 20 74 68 65 20 6d 61 | 69 6e 20 77 69 6e 64 6f |n the ma|in windo|
|00001880| 77 20 68 61 73 20 74 65 | 78 74 20 74 79 70 65 64 |w has te|xt typed|
|00001890| 20 69 6e 0d 07 c6 51 f4 | 20 20 20 69 74 20 61 6e | in...Q.| it an|
|000018a0| 64 20 52 45 54 55 52 4e | 20 69 73 20 70 72 65 73 |d RETURN| is pres|
|000018b0| 73 65 64 2c 20 63 6f 70 | 79 20 74 68 65 20 74 65 |sed, cop|y the te|
|000018c0| 78 74 20 66 72 6f 6d 20 | 74 68 61 74 20 69 63 6f |xt from |that ico|
|000018d0| 6e 20 74 6f 20 74 68 65 | 20 6f 6e 65 20 6e 65 78 |n to the| one nex|
|000018e0| 74 20 74 6f 0d 07 d0 3d | f4 20 20 20 69 74 20 28 |t to...=|. it (|
|000018f0| 31 29 2e 20 54 6f 20 64 | 6f 20 74 68 69 73 20 77 |1). To d|o this w|
|00001900| 65 20 6e 65 65 64 20 74 | 6f 20 74 72 61 70 20 6b |e need t|o trap k|
|00001910| 65 79 20 70 72 65 73 73 | 20 65 76 65 6e 74 73 20 |ey press| events |
|00001920| 3a 0d 07 da 04 0d 07 e4 | 04 0d 07 ee 18 dd f2 65 |:.......|.......e|
|00001930| 76 65 6e 74 5f 6b 65 79 | 70 72 65 73 73 28 42 25 |vent_key|press(B%|
|00001940| 29 0d 07 f8 0b ea 20 57 | 25 2c 54 24 0d 08 02 04 |)..... W|%,T$....|
|00001950| 0d 08 0c 4e f4 20 20 20 | 46 69 72 73 74 20 77 65 |...N. |First we|
|00001960| 20 6e 65 65 64 20 74 6f | 20 67 65 74 20 74 68 65 | need to| get the|
|00001970| 20 27 77 69 6e 64 6f 77 | 27 20 66 6f 72 20 74 68 | 'window|' for th|
|00001980| 65 20 6b 65 79 20 70 72 | 65 73 73 20 65 76 65 6e |e key pr|ess even|
|00001990| 74 2e 20 54 68 69 73 20 | 69 73 20 6e 6f 74 0d 08 |t. This |is not..|
|000019a0| 16 47 f4 20 20 20 74 68 | 65 20 77 69 6e 64 6f 77 |.G. th|e window|
|000019b0| 20 68 61 6e 64 6c 65 20 | 28 69 65 2e 20 21 42 25 | handle |(ie. !B%|
|000019c0| 29 2c 20 62 75 74 20 74 | 68 65 20 42 6c 69 62 20 |), but t|he Blib |
|000019d0| 77 69 6e 64 6f 77 20 6c | 69 62 72 61 72 79 20 77 |window l|ibrary w|
|000019e0| 69 6e 64 6f 77 0d 08 20 | 13 f4 20 20 20 73 74 72 |indow.. |.. str|
|000019f0| 75 63 74 75 72 65 20 3a | 0d 08 2a 04 0d 08 34 18 |ucture :|..*...4.|
|00001a00| 57 25 3d a4 77 69 6e 5f | 66 69 6e 64 77 69 6e 28 |W%=.win_|findwin(|
|00001a10| 21 42 25 29 0d 08 3e 04 | 0d 08 48 4b f4 20 20 20 |!B%)..>.|..HK. |
|00001a20| 49 66 20 74 68 69 73 20 | 69 73 20 6f 75 72 20 6d |If this |is our m|
|00001a30| 61 69 6e 20 77 69 6e 64 | 6f 77 2c 20 61 6e 64 20 |ain wind|ow, and |
|00001a40| 74 68 65 20 69 63 6f 6e | 20 77 61 73 20 69 63 6f |the icon| was ico|
|00001a50| 6e 20 30 20 61 6e 64 20 | 74 68 65 20 6b 65 79 20 |n 0 and |the key |
|00001a60| 77 61 73 0d 08 52 4e f4 | 20 20 20 52 45 54 55 52 |was..RN.| RETUR|
|00001a70| 4e 20 28 31 33 29 20 74 | 68 65 6e 20 63 6f 70 79 |N (13) t|hen copy|
|00001a80| 20 74 68 65 20 69 63 6f | 6e 20 74 65 78 74 2c 20 | the ico|n text, |
|00001a90| 6f 74 68 65 72 77 69 73 | 65 20 70 61 73 73 20 74 |otherwis|e pass t|
|00001aa0| 68 65 20 6b 65 79 70 72 | 65 73 73 20 6f 6e 2e 2e |he keypr|ess on..|
|00001ab0| 2e 0d 08 5c 04 0d 08 66 | 24 e7 20 57 25 3d 6d 61 |...\...f|$. W%=ma|
|00001ac0| 69 6e 25 20 80 20 42 25 | 21 34 3d 30 20 80 20 42 |in% . B%|!4=0 . B|
|00001ad0| 25 21 32 34 3d 31 33 20 | 8c 0d 08 70 1f 20 20 54 |%!24=13 |...p. T|
|00001ae0| 24 3d a4 69 63 6f 6e 5f | 67 65 74 74 65 78 74 28 |$=.icon_|gettext(|
|00001af0| 6d 61 69 6e 25 2c 30 29 | 0d 08 7a 1f 20 20 f2 69 |main%,0)|..z. .i|
|00001b00| 63 6f 6e 5f 73 65 74 74 | 65 78 74 28 6d 61 69 6e |con_sett|ext(main|
|00001b10| 25 2c 31 2c 54 24 29 0d | 08 84 05 cc 0d 08 8e 20 |%,1,T$).|....... |
|00001b20| 20 20 c8 99 20 22 57 69 | 6d 70 5f 50 72 6f 63 65 | .. "Wi|mp_Proce|
|00001b30| 73 73 4b 65 79 22 2c 42 | 25 21 32 34 0d 08 98 05 |ssKey",B|%!24....|
|00001b40| cd 0d 08 a2 04 0d 08 ac | 05 e1 0d 08 ad 04 0d 08 |........|........|
|00001b50| ae 47 f4 20 4e 6f 77 20 | 64 65 66 69 6e 65 20 61 |.G. Now |define a|
|00001b60| 6e 20 65 76 65 6e 74 20 | 66 6f 72 20 74 68 65 20 |n event |for the |
|00001b70| 53 6c 69 64 65 72 2c 20 | 77 68 69 63 68 20 66 69 |Slider, |which fi|
|00001b80| 6c 6c 73 20 69 6e 20 61 | 6e 20 69 63 6f 6e 20 67 |lls in a|n icon g|
|00001b90| 69 76 69 6e 67 0d 08 af | 21 f4 20 74 68 65 20 73 |iving...|!. the s|
|00001ba0| 6c 69 64 65 72 27 73 20 | 63 75 72 72 65 6e 74 20 |lider's |current |
|00001bb0| 76 61 6c 75 65 2e 0d 08 | b6 04 0d 08 c0 19 dd f2 |value...|........|
|00001bc0| 65 76 65 6e 74 5f 73 6c | 69 64 65 72 28 53 25 2c |event_sl|ider(S%,|
|00001bd0| 56 25 29 0d 08 ca 2d f2 | 69 63 6f 6e 5f 73 65 74 |V%)...-.|icon_set|
|00001be0| 74 65 78 74 28 6d 61 69 | 6e 25 2c 39 2c c3 28 a4 |text(mai|n%,9,.(.|
|00001bf0| 73 6c 69 64 65 72 5f 76 | 61 6c 28 53 25 29 29 29 |slider_v|al(S%)))|
|00001c00| 0d 08 d4 05 e1 0d 08 de | 04 0d ff |........|... |
+--------+-------------------------+-------------------------+--------+--------+