home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / progrmng / popmncdf.sit / PopUp.c < prev    next >
MacBinary  |  1990-01-10  |  19.3 KB  |  [TEXT/KAHL]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Wed Jan 10 16:13:18 1990, modified Wed Jan 10 16:13:18 1990, creator Think C, type ASCII, 19129 bytes "PopUp.c" , at 0x4b39 352 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[KAHL]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 07 50 6f 70 55 70 2e | 63 00 00 00 00 00 00 00 |..PopUp.|c.......|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 01 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 4a b9 00 | 00 01 60 a1 d1 55 ee a1 |.....J..|..`..U..|
|00000060| d1 55 ee 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.U......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 b5 df 00 00 |........|........|
|00000080| 2f 2a 0d 09 a9 20 31 39 | 38 38 2c 20 44 61 76 69 |/*... 19|88, Davi|
|00000090| 64 20 57 2e 20 42 65 72 | 72 79 20 26 20 4a 6f 73 |d W. Ber|ry & Jos|
|000000a0| 68 20 50 72 69 74 69 6b | 69 6e 2e 20 20 41 6c 6c |h Pritik|in. All|
|000000b0| 20 52 69 67 68 74 73 20 | 52 65 73 65 72 76 65 64 | Rights |Reserved|
|000000c0| 2e 0d 09 0d 09 54 68 69 | 73 20 69 73 20 73 6f 75 |.....Thi|s is sou|
|000000d0| 72 63 65 20 63 6f 64 65 | 20 66 6f 72 20 61 20 50 |rce code| for a P|
|000000e0| 6f 70 75 70 4d 65 6e 75 | 20 43 44 45 46 2e 20 20 |opupMenu| CDEF. |
|000000f0| 49 6e 20 70 61 72 74 69 | 63 75 6c 61 72 20 69 74 |In parti|cular it|
|00000100| 20 65 6d 62 6f 64 69 65 | 73 20 61 6c 6c 20 74 68 | embodie|s all th|
|00000110| 65 0d 09 41 70 70 6c 65 | 20 48 75 6d 61 6e 20 49 |e..Apple| Human I|
|00000120| 6e 74 65 72 66 61 63 65 | 20 47 75 69 64 65 6c 69 |nterface| Guideli|
|00000130| 6e 65 73 20 64 65 61 6c | 69 6e 67 20 77 69 74 68 |nes deal|ing with|
|00000140| 20 70 6f 70 75 70 20 6d | 65 6e 75 73 2c 20 65 78 | popup m|enus, ex|
|00000150| 63 65 70 74 20 66 6f 72 | 20 63 6f 6c 6f 72 2e 0d |cept for| color..|
|00000160| 09 0d 09 54 6f 20 75 73 | 65 20 69 74 20 64 65 66 |...To us|e it def|
|00000170| 69 6e 65 20 6f 72 20 63 | 72 65 61 74 65 20 61 20 |ine or c|reate a |
|00000180| 63 6f 6e 74 72 6f 6c 20 | 77 68 6f 73 65 20 63 6f |control |whose co|
|00000190| 6e 74 72 6c 52 66 43 6f | 6e 20 66 69 65 6c 64 20 |ntrlRfCo|n field |
|000001a0| 63 6f 6e 74 61 69 6e 73 | 20 74 68 65 20 6d 65 6e |contains| the men|
|000001b0| 75 20 69 64 0d 09 6f 66 | 20 61 20 6d 65 6e 75 20 |u id..of| a menu |
|000001c0| 74 6f 20 62 65 20 75 73 | 65 64 20 61 73 20 61 20 |to be us|ed as a |
|000001d0| 70 6f 70 75 70 20 6d 65 | 6e 75 2e 20 20 49 66 20 |popup me|nu. If |
|000001e0| 74 68 65 20 6d 65 6e 75 | 20 69 73 20 74 6f 20 62 |the menu| is to b|
|000001f0| 65 20 63 72 65 61 74 65 | 64 20 62 79 20 74 68 65 |e create|d by the|
|00000200| 20 63 6f 6e 74 72 6f 6c | 0d 09 69 74 20 6d 75 73 | control|..it mus|
|00000210| 74 20 68 61 76 65 20 61 | 20 4d 45 4e 55 20 72 65 |t have a| MENU re|
|00000220| 73 6f 75 72 63 65 20 64 | 65 66 69 6e 69 74 69 6f |source d|efinitio|
|00000230| 6e 20 77 69 74 68 20 61 | 20 72 65 73 6f 75 72 63 |n with a| resourc|
|00000240| 65 20 69 64 20 74 68 65 | 20 73 61 6d 65 20 61 73 |e id the| same as|
|00000250| 20 74 68 65 20 6d 65 6e | 75 20 69 64 0d 09 66 69 | the men|u id..fi|
|00000260| 65 6c 64 2e 20 20 49 66 | 20 74 68 65 20 6d 65 6e |eld. If| the men|
|00000270| 75 20 69 73 20 63 72 65 | 61 74 65 64 20 62 79 20 |u is cre|ated by |
|00000280| 74 68 65 20 70 72 6f 67 | 72 61 6d 20 62 65 66 6f |the prog|ram befo|
|00000290| 72 65 20 74 68 65 20 63 | 6f 6e 74 72 6f 6c 20 69 |re the c|ontrol i|
|000002a0| 73 20 63 72 65 61 74 65 | 64 20 69 74 20 6d 75 73 |s create|d it mus|
|000002b0| 74 0d 09 62 65 20 69 6e | 73 65 72 74 65 64 20 69 |t..be in|serted i|
|000002c0| 6e 74 6f 20 74 68 65 20 | 6d 65 6e 75 20 62 61 72 |nto the |menu bar|
|000002d0| 20 77 69 74 68 20 49 6e | 73 65 72 74 4d 65 6e 75 | with In|sertMenu|
|000002e0| 28 6d 68 2c 20 68 69 65 | 72 4d 65 6e 75 29 2e 0d |(mh, hie|rMenu)..|
|000002f0| 09 0d 09 49 66 20 74 68 | 65 20 63 6f 6e 74 72 6f |...If th|e contro|
|00000300| 6c 20 68 61 73 20 61 20 | 74 69 74 6c 65 20 69 74 |l has a |title it|
|00000310| 20 77 69 6c 6c 20 62 65 | 20 64 69 73 70 6c 61 79 | will be| display|
|00000320| 65 64 20 74 6f 20 74 68 | 65 20 6c 65 66 74 20 6f |ed to th|e left o|
|00000330| 66 20 74 68 65 20 70 6f | 70 75 70 20 6d 65 6e 75 |f the po|pup menu|
|00000340| 2e 0d 09 54 68 65 20 6d | 65 6e 75 27 73 20 74 69 |...The m|enu's ti|
|00000350| 74 6c 65 20 69 73 20 69 | 67 6e 6f 72 65 64 2e 0d |tle is i|gnored..|
|00000360| 09 0d 49 6d 70 72 6f 76 | 65 6d 65 6e 74 73 2f 46 |..Improv|ements/F|
|00000370| 69 78 65 73 20 74 6f 20 | 6f 72 69 67 69 6e 61 6c |ixes to |original|
|00000380| 20 43 44 45 46 2c 20 43 | 6f 70 79 72 69 67 68 74 | CDEF, C|opyright|
|00000390| 20 31 39 38 39 20 4a 6f | 73 68 20 50 72 69 74 69 | 1989 Jo|sh Priti|
|000003a0| 6b 69 6e 2e 0d 09 0d 09 | 41 64 64 20 74 68 65 73 |kin.....|Add thes|
|000003b0| 65 20 63 6f 6e 73 74 61 | 6e 74 73 20 74 6f 20 74 |e consta|nts to t|
|000003c0| 68 65 20 28 43 44 45 46 | 27 73 20 69 64 29 2a 31 |he (CDEF|'s id)*1|
|000003d0| 36 20 74 6f 20 67 65 74 | 20 74 68 65 20 64 65 73 |6 to get| the des|
|000003e0| 69 72 65 64 20 65 66 66 | 65 63 74 3a 0d 09 0d 09 |ired eff|ect:....|
|000003f0| 31 20 3a 20 49 66 20 74 | 68 65 20 6d 65 6e 75 20 |1 : If t|he menu |
|00000400| 68 61 73 20 61 20 74 69 | 74 6c 65 20 74 68 65 20 |has a ti|tle the |
|00000410| 6d 65 6e 75 20 77 69 6c | 6c 20 62 65 20 63 65 6e |menu wil|l be cen|
|00000420| 74 65 72 65 64 20 61 6e | 64 20 6c 65 66 74 20 6a |tered an|d left j|
|00000430| 75 73 74 69 66 69 65 64 | 0d 09 09 77 69 74 68 20 |ustified|...with |
|00000440| 74 68 65 20 74 69 74 6c | 65 2c 20 6f 74 68 65 72 |the titl|e, other|
|00000450| 77 69 73 65 20 74 68 65 | 20 6d 65 6e 75 20 77 69 |wise the| menu wi|
|00000460| 6c 6c 20 62 65 20 63 65 | 6e 74 65 72 65 64 20 77 |ll be ce|ntered w|
|00000470| 69 74 68 69 6e 20 74 68 | 65 20 43 4e 54 4c 0d 09 |ithin th|e CNTL..|
|00000480| 09 74 65 6d 70 6c 61 74 | 65 27 73 20 72 65 63 74 |.templat|e's rect|
|00000490| 2e 0d 09 32 20 3a 20 59 | 6f 75 20 77 69 6c 6c 20 |...2 : Y|ou will |
|000004a0| 68 61 76 65 20 74 6f 20 | 64 6f 20 74 68 65 20 63 |have to |do the c|
|000004b0| 68 65 63 6b 6d 61 72 6b | 73 20 79 6f 75 72 73 65 |heckmark|s yourse|
|000004c0| 6c 66 2c 20 69 66 20 6e | 6f 74 20 61 64 64 65 64 |lf, if n|ot added|
|000004d0| 20 69 6e 2c 20 74 68 65 | 20 43 44 45 46 0d 09 09 | in, the| CDEF...|
|000004e0| 77 69 6c 6c 20 61 75 74 | 6f 6d 61 67 69 63 61 6c |will aut|omagical|
|000004f0| 6c 79 20 70 75 74 20 74 | 68 65 20 63 68 65 63 6b |ly put t|he check|
|00000500| 6d 61 72 6b 73 20 69 6e | 20 74 68 65 20 72 69 67 |marks in| the rig|
|00000510| 68 74 20 70 6c 61 63 65 | 73 2e 0d 09 0d 43 68 61 |ht place|s....Cha|
|00000520| 6e 67 65 20 48 69 73 74 | 6f 72 79 3a 0d 20 0d 09 |nge Hist|ory:. ..|
|00000530| 31 2e 20 50 6f 72 74 65 | 64 20 74 6f 20 54 68 69 |1. Porte|d to Thi|
|00000540| 6e 6b 20 43 20 34 2e 30 | 2c 20 74 68 65 20 62 65 |nk C 4.0|, the be|
|00000550| 73 74 20 4d 61 63 20 43 | 2e 2e 2e 0d 09 0d 09 32 |st Mac C|.......2|
|00000560| 2e 20 46 69 78 65 64 20 | 5f 47 65 74 52 4d 65 6e |. Fixed |_GetRMen|
|00000570| 75 20 75 73 69 6e 67 20 | 74 65 63 68 6e 6f 74 65 |u using |technote|
|00000580| 20 37 38 20 61 6e 64 20 | 66 69 78 65 64 20 6d 61 | 78 and |fixed ma|
|00000590| 6a 6f 72 20 63 6f 73 6d | 65 74 69 63 20 70 72 6f |jor cosm|etic pro|
|000005a0| 62 6c 65 6d 73 2e 0d 09 | 0d 09 33 2e 20 4e 6f 77 |blems...|..3. Now|
|000005b0| 20 33 32 2d 62 69 74 20 | 63 6c 65 61 6e 2e 0d 09 | 32-bit |clean...|
|000005c0| 0d 09 34 2e 20 42 65 20 | 5f 41 42 53 4f 4c 55 54 |..4. Be |_ABSOLUT|
|000005d0| 45 4c 59 20 53 55 52 45 | 5f 20 74 68 61 74 20 74 |ELY SURE|_ that t|
|000005e0| 68 65 20 6d 65 6e 75 20 | 70 72 6f 63 20 79 6f 75 |he menu |proc you|
|000005f0| 20 73 70 65 63 69 66 79 | 20 69 6e 20 79 6f 75 72 | specify| in your|
|00000600| 20 4d 45 4e 55 20 72 65 | 73 6f 75 72 63 65 0d 20 | MENU re|source. |
|00000610| 09 69 73 20 7a 65 72 6f | 20 6f 72 20 74 68 61 74 |.is zero| or that|
|00000620| 20 79 6f 75 20 68 61 76 | 65 20 61 20 63 75 73 74 | you hav|e a cust|
|00000630| 6f 6d 20 6d 65 6e 75 20 | 70 72 6f 63 2e 20 20 54 |om menu |proc. T|
|00000640| 68 69 73 20 63 61 6e 20 | 68 61 70 70 65 6e 20 69 |his can |happen i|
|00000650| 66 20 79 6f 75 20 65 64 | 69 74 20 61 0d 20 09 6d |f you ed|it a. .m|
|00000660| 65 6e 75 20 77 69 74 68 | 6f 75 74 20 61 20 74 69 |enu with|out a ti|
|00000670| 74 6c 65 20 69 6e 20 52 | 65 73 4d 65 6e 75 2e 20 |tle in R|esMenu. |
|00000680| 20 45 76 65 72 79 74 68 | 69 6e 67 20 63 72 61 73 | Everyth|ing cras|
|00000690| 68 65 73 20 68 6f 72 72 | 69 62 6c 79 20 69 66 20 |hes horr|ibly if |
|000006a0| 79 6f 75 0d 20 09 73 70 | 65 63 69 66 79 20 61 20 |you. .sp|ecify a |
|000006b0| 6d 65 6e 75 20 70 72 6f | 63 20 74 68 61 74 20 64 |menu pro|c that d|
|000006c0| 6f 65 73 6e 27 74 20 65 | 78 69 73 74 21 20 20 57 |oesn't e|xist! W|
|000006d0| 68 65 6e 20 69 74 20 67 | 6f 74 20 6d 65 2c 20 74 |hen it g|ot me, t|
|000006e0| 68 69 73 20 62 75 67 20 | 74 6f 6f 6b 0d 20 09 6d |his bug |took. .m|
|000006f0| 65 20 64 61 79 73 20 74 | 6f 20 66 69 6e 64 2e 0d |e days t|o find..|
|00000700| 20 09 0d 20 09 52 65 6c | 65 61 73 65 20 76 65 72 | .. .Rel|ease ver|
|00000710| 73 69 6f 6e 20 31 2e 30 | 0d 20 0d 31 32 2e 31 2e |sion 1.0|. .12.1.|
|00000720| 38 39 09 09 46 69 78 65 | 64 20 61 20 73 6d 61 6c |89..Fixe|d a smal|
|00000730| 6c 20 62 75 67 20 69 6e | 20 74 68 65 20 68 69 74 |l bug in| the hit|
|00000740| 20 64 65 74 65 63 74 69 | 6f 6e 2e 0d 31 32 2e 32 | detecti|on..12.2|
|00000750| 2e 38 39 09 09 41 64 64 | 65 64 20 61 20 22 74 65 |.89..Add|ed a "te|
|00000760| 73 74 69 6e 67 22 20 63 | 6f 6d 70 69 6c 65 72 20 |sting" c|ompiler |
|00000770| 66 6c 61 67 2e 0d 31 32 | 2e 34 2e 38 39 09 09 31 |flag..12|.4.89..1|
|00000780| 2e 20 41 64 64 65 64 20 | 61 20 62 75 6e 63 68 20 |. Added |a bunch |
|00000790| 6f 66 20 63 6f 64 65 20 | 74 6f 20 73 65 74 75 70 |of code |to setup|
|000007a0| 20 61 6e 64 20 72 65 73 | 74 6f 72 65 20 74 68 65 | and res|tore the|
|000007b0| 20 64 72 61 77 69 6e 67 | 20 65 6e 76 6f 69 72 6e | drawing| envoirn|
|000007c0| 73 2e 0d 09 09 09 54 68 | 69 73 20 73 65 65 6d 73 |s.....Th|is seems|
|000007d0| 20 74 6f 20 68 61 76 65 | 20 66 69 78 65 64 20 74 | to have| fixed t|
|000007e0| 68 65 20 67 72 61 79 2d | 6f 75 74 20 70 72 6f 62 |he gray-|out prob|
|000007f0| 6c 65 6d 2e 0d 09 09 09 | 32 2e 20 41 64 64 65 64 |lem.....|2. Added|
|00000800| 20 63 6f 64 65 20 74 6f | 20 73 65 74 75 70 20 61 | code to| setup a|
|00000810| 6e 64 20 72 65 73 74 6f | 72 65 20 41 35 20 77 68 |nd resto|re A5 wh|
|00000820| 65 6e 20 74 68 65 20 74 | 65 73 74 69 6e 67 20 70 |en the t|esting p|
|00000830| 72 6f 67 72 61 6d 20 69 | 73 0d 09 09 09 72 75 6e |rogram i|s....run|
|00000840| 6e 69 6e 67 2e 20 20 4e | 6f 77 20 79 6f 75 20 64 |ning. N|ow you d|
|00000850| 6f 6e 27 74 20 68 61 76 | 65 20 74 6f 20 65 78 69 |on't hav|e to exi|
|00000860| 74 74 6f 73 68 65 6c 6c | 20 74 6f 20 71 75 69 74 |ttoshell| to quit|
|00000870| 2d 2d 20 74 68 61 74 20 | 77 61 73 20 77 69 65 72 |-- that |was wier|
|00000880| 64 2e 0d 31 32 2e 34 2e | 38 39 09 09 56 65 72 73 |d..12.4.|89..Vers|
|00000890| 69 6f 6e 20 32 2e 30 62 | 30 0d 31 32 2e 36 2e 38 |ion 2.0b|0.12.6.8|
|000008a0| 39 09 09 46 69 78 65 64 | 20 61 20 76 65 72 79 20 |9..Fixed| a very |
|000008b0| 6d 69 6e 6f 72 20 63 65 | 6e 74 65 72 69 6e 67 20 |minor ce|ntering |
|000008c0| 62 75 67 2e 0d 31 32 2e | 31 32 2e 38 39 09 41 64 |bug..12.|12.89.Ad|
|000008d0| 64 65 64 20 61 20 62 75 | 6e 63 68 20 6f 66 20 63 |ded a bu|nch of c|
|000008e0| 6f 64 65 20 74 6f 20 64 | 69 73 70 61 74 63 68 20 |ode to d|ispatch |
|000008f0| 77 69 74 68 20 74 68 65 | 20 6f 6c 64 20 77 61 79 |with the| old way|
|00000900| 20 6f 66 20 64 65 66 65 | 61 74 69 6e 67 0d 09 09 | of defe|ating...|
|00000910| 09 66 6c 69 63 6b 65 72 | 2e 0d 31 32 2e 31 33 2e |.flicker|..12.13.|
|00000920| 38 39 09 54 68 65 20 6e | 75 6d 62 65 72 20 6f 66 |89.The n|umber of|
|00000930| 20 63 6f 6e 74 72 6f 6c | 73 20 74 68 65 20 6d 65 | control|s the me|
|00000940| 6e 75 20 69 73 20 22 73 | 75 62 73 63 72 69 62 65 |nu is "s|ubscribe|
|00000950| 64 22 20 74 6f 20 69 73 | 20 6e 6f 77 20 6b 65 70 |d" to is| now kep|
|00000960| 74 20 69 6e 0d 09 09 09 | 74 68 65 20 6d 65 6e 75 |t in....|the menu|
|00000970| 54 69 74 6c 65 2e 20 20 | 44 6f 6e 27 74 20 45 56 |Title. |Don't EV|
|00000980| 45 52 20 68 61 76 65 20 | 65 78 61 63 6c 79 20 32 |ER have |exacly 2|
|00000990| 20 63 68 61 72 73 20 69 | 6e 20 79 6f 75 72 20 4d | chars i|n your M|
|000009a0| 45 4e 55 0d 09 09 09 74 | 65 6d 70 6c 61 74 65 27 |ENU....t|emplate'|
|000009b0| 73 20 74 69 74 6c 65 20 | 6f 72 20 63 68 61 6e 67 |s title |or chang|
|000009c0| 65 20 74 68 65 20 74 69 | 74 6c 65 20 64 75 72 69 |e the ti|tle duri|
|000009d0| 6e 67 20 72 75 6e 74 69 | 6d 65 2e 20 20 49 74 20 |ng runti|me. It |
|000009e0| 64 6f 65 73 6e 27 74 0d | 09 09 09 6d 61 74 74 65 |doesn't.|...matte|
|000009f0| 72 20 77 68 61 74 20 79 | 6f 75 72 20 74 69 74 6c |r what y|our titl|
|00000a00| 65 20 69 73 20 69 6e 20 | 74 68 65 20 43 4e 54 4c |e is in |the CNTL|
|00000a10| 20 74 65 6d 70 6c 61 74 | 65 20 61 6e 64 20 74 68 | templat|e and th|
|00000a20| 61 74 27 73 20 77 68 61 | 74 0d 09 09 09 63 6f 75 |at's wha|t....cou|
|00000a30| 6e 74 73 2e 0d 31 32 2e | 31 33 2e 38 39 09 56 65 |nts..12.|13.89.Ve|
|00000a40| 72 73 69 6f 6e 20 32 2e | 30 62 31 0d 31 32 2e 31 |rsion 2.|0b1.12.1|
|00000a50| 36 2e 38 39 09 43 68 61 | 6e 67 65 64 20 61 20 62 |6.89.Cha|nged a b|
|00000a60| 69 74 20 6f 66 20 74 68 | 65 20 74 72 61 70 20 70 |it of th|e trap p|
|00000a70| 61 74 63 68 20 73 6f 20 | 69 74 20 64 6f 65 73 6e |atch so |it doesn|
|00000a80| 27 74 20 63 68 61 6e 67 | 65 20 5f 61 6e 79 5f 20 |'t chang|e _any_ |
|00000a90| 72 65 67 69 73 74 65 72 | 73 2e 0d 31 32 2e 31 36 |register|s..12.16|
|00000aa0| 2e 38 39 09 41 64 64 65 | 64 20 61 20 76 61 72 69 |.89.Adde|d a vari|
|00000ab0| 65 6e 74 20 63 6f 64 65 | 20 74 6f 20 64 69 73 61 |ent code| to disa|
|00000ac0| 62 6c 65 20 74 68 65 20 | 63 68 65 63 6b 69 6e 67 |ble the |checking|
|00000ad0| 20 6f 66 20 6d 65 6e 75 | 73 2e 0d 31 32 2e 31 37 | of menu|s..12.17|
|00000ae0| 2e 38 39 09 4e 6f 77 20 | 74 68 65 20 63 6f 6e 74 |.89.Now |the cont|
|00000af0| 72 6f 6c 20 6d 69 6e 20 | 61 6e 64 20 6d 61 78 20 |rol min |and max |
|00000b00| 61 72 65 20 73 65 74 20 | 74 6f 20 31 20 61 6e 64 |are set |to 1 and|
|00000b10| 20 6d 61 78 69 6e 74 20 | 72 65 73 70 65 63 74 66 | maxint |respectf|
|00000b20| 75 6c 6c 79 2e 0d 09 09 | 09 54 68 69 73 20 77 69 |ully....|.This wi|
|00000b30| 6c 6c 20 6c 65 74 20 79 | 6f 75 20 73 65 74 20 74 |ll let y|ou set t|
|00000b40| 68 65 20 63 6f 6e 74 72 | 6f 6c 20 76 61 6c 75 65 |he contr|ol value|
|00000b50| 20 74 6f 20 61 6e 79 74 | 68 69 6e 67 20 72 65 61 | to anyt|hing rea|
|00000b60| 73 6f 6e 61 62 6c 65 0d | 09 09 09 62 75 74 20 62 |sonable.|...but b|
|00000b70| 65 20 63 61 72 65 66 75 | 6c 20 6e 6f 74 20 74 6f |e carefu|l not to|
|00000b80| 20 73 70 65 63 69 66 79 | 20 61 20 76 61 6c 75 65 | specify| a value|
|00000b90| 20 67 72 65 61 74 65 72 | 20 74 68 61 6e 20 43 6f | greater| than Co|
|00000ba0| 75 6e 74 4d 49 74 65 6d | 73 28 6d 68 29 0d 09 09 |untMItem|s(mh)...|
|00000bb0| 09 6f 72 20 6c 65 73 73 | 20 74 68 61 6e 20 31 20 |.or less| than 1 |
|00000bc0| 62 65 63 61 75 73 65 20 | 74 68 65 20 70 6f 70 75 |because |the popu|
|00000bd0| 70 20 77 6f 6e 74 20 68 | 61 76 65 20 74 68 65 20 |p wont h|ave the |
|00000be0| 63 6f 72 72 65 63 74 20 | 69 74 65 6d 20 73 65 6c |correct |item sel|
|00000bf0| 65 63 74 65 64 0d 09 09 | 09 77 68 65 6e 20 69 74 |ected...|.when it|
|00000c00| 73 20 62 72 6f 75 67 68 | 74 20 75 70 2e 0d 31 32 |s brough|t up..12|
|00000c10| 2e 31 38 2e 38 39 09 54 | 68 65 20 70 6f 70 75 70 |.18.89.T|he popup|
|00000c20| 20 77 61 73 6e 27 74 20 | 62 65 69 6e 67 20 75 70 | wasn't |being up|
|00000c30| 64 61 74 65 64 20 70 72 | 6f 70 65 72 6c 79 20 69 |dated pr|operly i|
|00000c40| 66 20 53 65 74 43 74 6c | 56 61 6c 75 65 20 77 61 |f SetCtl|Value wa|
|00000c50| 73 20 63 61 6c 6c 65 64 | 2e 0d 09 09 09 4e 6f 77 |s called|.....Now|
|00000c60| 20 69 74 20 69 73 2e 0d | 31 32 2e 32 30 2e 38 39 | it is..|12.20.89|
|00000c70| 09 49 74 20 73 65 65 6d | 73 20 74 68 65 20 43 6f |.It seem|s the Co|
|00000c80| 6e 74 72 6f 6c 20 4d 67 | 72 20 75 6e 6c 6f 63 6b |ntrol Mg|r unlock|
|00000c90| 73 20 6f 75 72 20 66 61 | 76 6f 72 69 74 65 20 43 |s our fa|vorite C|
|00000ca0| 44 45 46 20 65 76 65 72 | 79 20 74 69 6d 65 20 77 |DEF ever|y time w|
|00000cb0| 65 0d 09 09 09 67 65 74 | 20 63 61 6c 6c 65 64 2e |e....get| called.|
|00000cc0| 20 54 68 65 79 20 6d 75 | 73 74 20 6e 6f 74 20 75 | They mu|st not u|
|00000cd0| 73 65 20 48 47 65 74 2f | 53 65 74 53 74 61 74 65 |se HGet/|SetState|
|00000ce0| 20 77 68 69 63 68 20 69 | 73 20 76 65 72 79 20 62 | which i|s very b|
|00000cf0| 61 64 20 73 69 6e 63 65 | 0d 09 09 09 74 68 65 20 |ad since|....the |
|00000d00| 74 72 61 70 20 70 61 74 | 63 68 20 77 61 73 20 69 |trap pat|ch was i|
|00000d10| 6e 20 74 68 65 20 43 44 | 45 46 20 69 74 73 65 6c |n the CD|EF itsel|
|00000d20| 66 2e 0d 09 09 09 53 6f | 2c 20 49 20 68 61 63 6b |f.....So|, I hack|
|00000d30| 65 64 20 6f 75 74 20 61 | 20 6e 65 77 20 76 65 72 |ed out a| new ver|
|00000d40| 73 69 6f 6e 20 6f 66 20 | 74 68 65 20 54 72 61 63 |sion of |the Trac|
|00000d50| 6b 43 6f 6e 74 72 6f 6c | 20 70 61 74 63 68 2e 20 |kControl| patch. |
|00000d60| 57 65 20 6d 61 6b 65 0d | 09 09 09 61 20 70 74 72 |We make.|...a ptr|
|00000d70| 20 61 6e 64 20 63 6f 70 | 79 20 6f 75 72 20 70 61 | and cop|y our pa|
|00000d80| 74 63 68 20 69 6e 2e 20 | 49 74 20 63 6f 75 6c 64 |tch in. |It could|
|00000d90| 20 62 65 20 75 73 65 64 | 20 61 73 20 61 20 67 6f | be used| as a go|
|00000da0| 6f 64 20 65 78 61 6d 70 | 6c 65 0d 09 09 09 6f 66 |od examp|le....of|
|00000db0| 20 61 20 74 72 61 70 20 | 70 61 74 63 68 2e 20 49 | a trap |patch. I|
|00000dc0| 74 20 73 61 76 65 73 20 | 5f 61 6c 6c 5f 20 74 68 |t saves |_all_ th|
|00000dd0| 65 20 72 65 67 69 73 74 | 65 72 73 20 61 6e 64 20 |e regist|ers and |
|00000de0| 64 6f 65 73 6e 27 74 20 | 74 61 69 6c 20 70 61 74 |doesn't |tail pat|
|00000df0| 63 68 0d 09 09 09 61 6e | 79 74 68 69 6e 67 2e 20 |ch....an|ything. |
|00000e00| 49 20 6b 69 6e 64 61 20 | 6c 69 6b 65 20 69 74 20 |I kinda |like it |
|00000e10| 6d 79 73 65 6c 66 2e 0d | 31 32 2e 32 30 2e 38 39 |myself..|12.20.89|
|00000e20| 09 56 65 72 73 69 6f 6e | 20 32 2e 30 62 32 0d 31 |.Version| 2.0b2.1|
|00000e30| 32 2e 33 30 2e 38 39 09 | 46 6f 75 6e 64 20 61 6e |2.30.89.|Found an|
|00000e40| 64 20 66 69 78 65 64 20 | 61 6e 6f 74 68 65 72 20 |d fixed |another |
|00000e50| 73 75 62 74 6c 65 20 64 | 72 61 77 69 6e 67 20 62 |subtle d|rawing b|
|00000e60| 75 67 2e 0d 31 2e 31 30 | 2e 39 30 09 09 52 65 6c |ug..1.10|.90..Rel|
|00000e70| 65 61 73 65 20 32 2e 30 | 0d 0d 20 0d 20 41 6e 64 |ease 2.0|.. . And|
|00000e80| 20 69 6e 20 74 68 65 20 | 6e 65 78 74 20 76 65 72 | in the |next ver|
|00000e90| 73 69 6f 6e 20 79 6f 75 | 20 73 68 6f 75 6c 64 20 |sion you| should |
|00000ea0| 6c 6f 6f 6b 20 66 6f 72 | 77 61 72 64 20 74 6f 20 |look for|ward to |
|00000eb0| 66 75 6c 6c 20 63 6f 6c | 6f 72 20 6f 6e 20 63 6f |full col|or on co|
|00000ec0| 6c 6f 72 20 6d 61 63 68 | 69 6e 65 73 21 0d 20 0d |lor mach|ines!. .|
|00000ed0| 20 4a 6f 73 68 20 50 72 | 69 74 69 6b 69 6e 0d 0d | Josh Pr|itikin..|
|00000ee0| 49 20 63 61 6e 20 62 65 | 20 72 65 61 63 68 65 64 |I can be| reached|
|00000ef0| 20 61 74 20 64 69 66 66 | 65 72 65 6e 74 20 73 70 | at diff|erent sp|
|00000f00| 65 65 64 20 61 74 3a 0d | 66 61 73 74 2d 3e 09 09 |eed at:.|fast->..|
|00000f10| 09 28 65 76 65 72 79 20 | 64 61 79 29 0d 09 69 6e |.(every |day)..in|
|00000f20| 74 65 72 6e 65 74 3a 20 | 36 35 30 30 73 74 6f 6d |ternet: |6500stom|
|00000f30| 40 75 63 73 62 75 78 61 | 2e 75 63 73 62 2e 65 64 |@ucsbuxa|.ucsb.ed|
|00000f40| 75 0d 09 41 70 70 6c 65 | 4c 69 6e 6b 3a 20 36 35 |u..Apple|Link: 65|
|00000f50| 30 30 73 74 6f 6d 25 75 | 63 73 62 75 78 61 40 68 |00stom%u|csbuxa@h|
|00000f60| 75 62 2e 75 63 73 62 2e | 65 64 75 40 44 41 53 4e |ub.ucsb.|edu@DASN|
|00000f70| 45 54 23 0d 09 43 49 53 | 3a 20 3e 49 4e 54 45 52 |ET#..CIS|: >INTER|
|00000f80| 4e 45 54 3a 36 35 30 30 | 73 74 6f 6d 25 75 63 73 |NET:6500|stom%ucs|
|00000f90| 62 75 78 61 40 68 75 62 | 2e 75 63 73 62 2e 65 64 |buxa@hub|.ucsb.ed|
|00000fa0| 75 0d 09 6f 74 68 65 72 | 20 67 61 74 65 77 61 79 |u..other| gateway|
|00000fb0| 73 20 74 6f 20 74 68 65 | 20 69 6e 74 65 72 6e 65 |s to the| interne|
|00000fc0| 74 0d 73 6c 6f 77 2d 3e | 09 09 09 28 6f 6e 63 65 |t.slow->|...(once|
|00000fd0| 20 61 20 77 65 65 6b 29 | 0d 09 47 45 6e 69 65 3a | a week)|..GEnie:|
|00000fe0| 20 4a 2e 50 72 69 74 69 | 6b 69 6e 0d 09 41 70 70 | J.Priti|kin..App|
|00000ff0| 6c 65 4c 69 6e 6b 3a 20 | 4a 6f 73 68 2e 50 0d 76 |leLink: |Josh.P.v|
|00001000| 65 72 79 20 73 6c 6f 77 | 2d 3e 09 09 28 6f 6e 63 |ery slow|->..(onc|
|00001010| 65 20 61 20 6d 6f 6e 74 | 68 2c 20 69 66 20 79 65 |e a mont|h, if ye|
|00001020| 72 20 6c 75 63 6b 79 29 | 0d 09 43 49 53 3a 20 37 |r lucky)|..CIS: 7|
|00001030| 30 37 37 31 2c 32 31 33 | 31 0d 20 2a 2f 0d 0d 23 |0771,213|1. */..#|
|00001040| 69 6e 63 6c 75 64 65 20 | 3c 53 65 74 75 70 41 34 |include |<SetupA4|
|00001050| 2e 68 3e 0d 0d 2f 2a 20 | 59 4f 55 20 4d 55 53 54 |.h>../* |YOU MUST|
|00001060| 20 4d 41 4b 45 20 53 55 | 52 45 20 54 48 49 53 20 | MAKE SU|RE THIS |
|00001070| 49 53 20 52 49 47 48 54 | 20 49 46 20 59 4f 55 20 |IS RIGHT| IF YOU |
|00001080| 44 4f 4e 27 54 20 57 41 | 4e 54 20 4c 49 4e 4b 20 |DON'T WA|NT LINK |
|00001090| 45 52 52 4f 52 53 21 20 | 2a 2f 0d 2f 2a 20 23 64 |ERRORS! |*/./* #d|
|000010a0| 65 66 69 6e 65 20 74 65 | 73 74 69 6e 67 20 2a 2f |efine te|sting */|
|000010b0| 0d 0d 2f 2a 20 49 20 6d | 75 73 74 20 67 69 76 65 |../* I m|ust give|
|000010c0| 20 50 65 74 65 20 47 6f | 6e 74 69 65 72 20 63 72 | Pete Go|ntier cr|
|000010d0| 65 64 69 74 20 66 6f 72 | 20 75 72 67 69 6e 67 20 |edit for| urging |
|000010e0| 6d 65 20 74 6f 20 64 6f | 20 74 68 65 20 6e 6f 2d |me to do| the no-|
|000010f0| 66 6c 69 63 6b 65 72 20 | 63 6f 64 65 0d 74 68 65 |flicker |code.the|
|00001100| 20 68 61 72 64 2c 20 65 | 6c 65 67 61 6e 74 20 77 | hard, e|legant w|
|00001110| 61 79 20 62 75 74 20 77 | 69 74 68 6f 75 74 20 65 |ay but w|ithout e|
|00001120| 76 65 6e 20 6d 6f 72 65 | 20 69 6e 74 65 72 65 73 |ven more| interes|
|00001130| 74 69 6e 67 20 61 6e 64 | 20 73 68 61 64 79 20 6b |ting and| shady k|
|00001140| 6c 75 64 67 65 73 2e 20 | 2a 2f 0d 0d 69 6e 74 09 |ludges. |*/..int.|
|00001150| 09 6e 75 6d 70 6f 70 75 | 70 73 20 3d 20 30 3b 09 |.numpopu|ps = 0;.|
|00001160| 09 2f 2a 20 6e 75 6d 62 | 65 72 20 6f 66 20 70 6f |./* numb|er of po|
|00001170| 70 75 70 73 20 77 65 20 | 6d 69 67 68 74 20 62 65 |pups we |might be|
|00001180| 20 63 61 6c 6c 65 64 20 | 74 6f 20 63 6f 6e 74 72 | called |to contr|
|00001190| 6f 6c 20 2a 2f 0d 73 68 | 6f 72 74 09 6e 6f 64 72 |ol */.sh|ort.nodr|
|000011a0| 61 77 73 20 3d 20 30 3b | 09 09 2f 2a 20 63 6f 75 |aws = 0;|../* cou|
|000011b0| 6e 74 65 72 20 66 6f 72 | 20 74 69 6d 65 73 20 54 |nter for| times T|
|000011c0| 72 61 63 6b 43 6f 6e 74 | 72 6f 6c 20 73 65 6e 64 |rackCont|rol send|
|000011d0| 73 20 64 72 61 77 20 6d | 73 67 20 2a 2f 0d 6c 6f |s draw m|sg */.lo|
|000011e0| 6e 67 09 6f 6c 64 54 72 | 61 63 6b 43 6e 74 6c 41 |ng.oldTr|ackCntlA|
|000011f0| 64 64 72 3b 09 2f 2a 20 | 70 6c 61 63 65 20 74 6f |ddr;./* |place to|
|00001200| 20 4a 4d 50 20 74 6f 20 | 66 72 6f 6d 20 6d 79 54 | JMP to |from myT|
|00001210| 72 61 63 6b 43 6f 6e 74 | 72 6f 6c 20 2a 2f 0d 48 |rackCont|rol */.H|
|00001220| 61 6e 64 6c 65 09 70 6f | 70 75 70 43 44 45 46 3b |andle.po|pupCDEF;|
|00001230| 09 09 09 2f 2a 20 68 61 | 6e 64 6c 65 20 74 6f 20 |.../* ha|ndle to |
|00001240| 43 44 45 46 20 72 65 73 | 6f 75 72 63 65 20 2a 2f |CDEF res|ource */|
|00001250| 0d 50 74 72 09 09 74 72 | 61 63 6b 70 61 74 63 68 |.Ptr..tr|ackpatch|
|00001260| 3b 09 09 09 2f 2a 20 70 | 74 72 20 74 6f 20 6f 75 |;.../* p|tr to ou|
|00001270| 72 20 54 72 61 63 6b 43 | 6f 6e 74 72 6f 6c 20 70 |r TrackC|ontrol p|
|00001280| 61 74 63 68 20 2a 2f 0d | 0d 23 69 66 64 65 66 20 |atch */.|.#ifdef |
|00001290| 74 65 73 74 69 6e 67 0d | 65 78 74 65 72 6e 20 48 |testing.|extern H|
|000012a0| 61 6e 64 6c 65 09 74 68 | 65 44 65 66 3b 0d 23 65 |andle.th|eDef;.#e|
|000012b0| 6e 64 69 66 0d 0d 74 79 | 70 65 64 65 66 20 73 74 |ndif..ty|pedef st|
|000012c0| 72 75 63 74 20 7b 0d 09 | 4d 65 6e 75 48 61 6e 64 |ruct {..|MenuHand|
|000012d0| 6c 65 09 74 68 65 6d 68 | 3b 0d 09 52 65 63 74 09 |le.themh|;..Rect.|
|000012e0| 09 4c 61 73 74 44 72 61 | 77 52 65 63 74 3b 0d 7d |.LastDra|wRect;.}|
|000012f0| 20 70 6f 70 75 70 52 65 | 63 2c 20 2a 70 6f 70 75 | popupRe|c, *popu|
|00001300| 70 50 74 72 2c 20 2a 2a | 70 6f 70 75 70 48 64 6c |pPtr, **|popupHdl|
|00001310| 3b 0d 0d 23 64 65 66 69 | 6e 65 20 74 68 65 6d 68 |;..#defi|ne themh|
|00001320| 09 09 09 28 2a 2a 28 70 | 6f 70 75 70 48 64 6c 29 |...(**(p|opupHdl)|
|00001330| 28 2a 2a 63 6f 6e 74 72 | 6f 6c 29 2e 63 6f 6e 74 |(**contr|ol).cont|
|00001340| 72 6c 44 61 74 61 29 2e | 74 68 65 6d 68 0d 23 64 |rlData).|themh.#d|
|00001350| 65 66 69 6e 65 20 4c 61 | 73 74 44 72 61 77 52 65 |efine La|stDrawRe|
|00001360| 63 74 09 28 2a 2a 28 70 | 6f 70 75 70 48 64 6c 29 |ct.(**(p|opupHdl)|
|00001370| 28 2a 2a 63 6f 6e 74 72 | 6f 6c 29 2e 63 6f 6e 74 |(**contr|ol).cont|
|00001380| 72 6c 44 61 74 61 29 2e | 4c 61 73 74 44 72 61 77 |rlData).|LastDraw|
|00001390| 52 65 63 74 0d 0d 6c 6f | 6e 67 09 09 48 69 74 50 |Rect..lo|ng..HitP|
|000013a0| 6f 70 55 70 28 29 2c 20 | 44 72 61 67 50 6f 70 55 |opUp(), |DragPopU|
|000013b0| 70 28 29 3b 0d 4d 65 6e | 75 48 61 6e 64 6c 65 09 |p();.Men|uHandle.|
|000013c0| 47 65 74 4d 65 6e 75 48 | 61 6e 64 6c 65 28 29 3b |GetMenuH|andle();|
|000013d0| 0d 0d 2f 2a 20 44 4f 4e | 27 54 20 43 48 41 4e 47 |../* DON|'T CHANG|
|000013e0| 45 20 54 48 45 53 45 20 | 42 45 43 41 55 53 45 20 |E THESE |BECAUSE |
|000013f0| 4d 41 4e 59 20 53 50 45 | 43 49 41 4c 20 4b 4c 55 |MANY SPE|CIAL KLU|
|00001400| 44 47 45 53 20 41 52 45 | 20 42 41 53 45 44 20 4f |DGES ARE| BASED O|
|00001410| 4e 20 54 48 45 4d 21 21 | 21 20 2a 2f 0d 23 64 65 |N THEM!!|! */.#de|
|00001420| 66 69 6e 65 09 09 48 53 | 65 70 61 72 61 74 69 6f |fine..HS|eparatio|
|00001430| 6e 09 33 09 09 2f 2a 20 | 64 69 73 74 61 6e 63 65 |n.3../* |distance|
|00001440| 20 62 65 74 77 65 65 6e | 20 6c 61 62 65 6c 20 61 | between| label a|
|00001450| 6e 64 20 70 6f 70 75 70 | 20 62 6f 78 20 2a 2f 0d |nd popup| box */.|
|00001460| 23 64 65 66 69 6e 65 09 | 09 48 53 70 61 63 65 09 |#define.|.HSpace.|
|00001470| 09 39 09 09 2f 2a 20 68 | 6f 72 69 7a 6f 6e 74 61 |.9../* h|orizonta|
|00001480| 6c 20 77 68 69 74 65 73 | 70 61 63 65 20 61 72 6f |l whites|pace aro|
|00001490| 75 6e 64 20 70 6f 70 75 | 70 20 62 6f 78 20 2a 2f |und popu|p box */|
|000014a0| 0d 09 09 09 09 09 09 09 | 09 2f 2a 20 6e 65 65 64 |........|./* need|
|000014b0| 73 20 74 6f 20 62 65 20 | 68 61 6c 66 20 6f 66 20 |s to be |half of |
|000014c0| 31 38 20 66 6f 72 20 63 | 6f 72 72 65 63 74 20 73 |18 for c|orrect s|
|000014d0| 70 61 63 69 6e 67 2e 2e | 2e 20 2a 2f 0d 23 64 65 |pacing..|. */.#de|
|000014e0| 66 69 6e 65 09 09 56 53 | 70 61 63 65 09 09 31 09 |fine..VS|pace..1.|
|000014f0| 09 2f 2a 20 76 65 72 74 | 69 63 61 6c 20 77 68 69 |./* vert|ical whi|
|00001500| 74 65 73 70 61 63 65 20 | 61 72 6f 75 6e 64 20 70 |tespace |around p|
|00001510| 6f 70 75 70 20 62 6f 78 | 20 2a 2f 0d 0d 23 69 66 |opup box| */..#if|
|00001520| 64 65 66 20 74 65 73 74 | 69 6e 67 0d 70 61 73 63 |def test|ing.pasc|
|00001530| 61 6c 20 6c 6f 6e 67 20 | 50 6f 70 75 70 4d 65 6e |al long |PopupMen|
|00001540| 75 28 73 68 6f 72 74 20 | 76 61 72 63 6f 64 65 2c |u(short |varcode,|
|00001550| 20 43 6f 6e 74 72 6f 6c | 48 61 6e 64 6c 65 20 63 | Control|Handle c|
|00001560| 6f 6e 74 72 6f 6c 2c 20 | 73 68 6f 72 74 20 6d 65 |ontrol, |short me|
|00001570| 73 73 61 67 65 2c 20 6c | 6f 6e 67 20 70 61 72 61 |ssage, l|ong para|
|00001580| 6d 29 0d 23 65 6c 73 65 | 0d 70 61 73 63 61 6c 20 |m).#else|.pascal |
|00001590| 6c 6f 6e 67 20 6d 61 69 | 6e 28 73 68 6f 72 74 20 |long mai|n(short |
|000015a0| 76 61 72 63 6f 64 65 2c | 20 43 6f 6e 74 72 6f 6c |varcode,| Control|
|000015b0| 48 61 6e 64 6c 65 20 63 | 6f 6e 74 72 6f 6c 2c 20 |Handle c|ontrol, |
|000015c0| 73 68 6f 72 74 20 6d 65 | 73 73 61 67 65 2c 20 6c |short me|ssage, l|
|000015d0| 6f 6e 67 20 70 61 72 61 | 6d 29 0d 23 65 6e 64 69 |ong para|m).#endi|
|000015e0| 66 0d 7b 0d 09 6c 6f 6e | 67 09 72 65 73 75 6c 74 |f.{..lon|g.result|
|000015f0| 3d 30 3b 0d 09 69 6e 74 | 09 09 76 61 72 3b 0d 09 |=0;..int|..var;..|
|00001600| 52 65 63 74 09 73 61 76 | 65 64 4f 72 69 67 3b 0d |Rect.sav|edOrig;.|
|00001610| 09 47 72 61 66 50 74 72 | 09 61 50 6f 72 74 3b 0d |.GrafPtr|.aPort;.|
|00001620| 09 69 6e 74 09 09 73 61 | 76 65 64 46 6f 6e 74 2c |.int..sa|vedFont,|
|00001630| 20 73 61 76 65 64 53 69 | 7a 65 2c 20 73 61 76 65 | savedSi|ze, save|
|00001640| 64 4d 6f 64 65 2c 20 73 | 61 76 65 64 50 65 6e 56 |dMode, s|avedPenV|
|00001650| 69 73 3b 0d 09 53 74 79 | 6c 65 09 73 61 76 65 64 |is;..Sty|le.saved|
|00001660| 46 61 63 65 3b 0d 09 0d | 09 23 69 66 64 65 66 20 |Face;...|.#ifdef |
|00001670| 74 65 73 74 69 6e 67 0d | 09 09 53 65 74 55 70 41 |testing.|..SetUpA|
|00001680| 35 28 29 3b 0d 09 09 70 | 6f 70 75 70 43 44 45 46 |5();...p|opupCDEF|
|00001690| 20 3d 20 74 68 65 44 65 | 66 3b 0d 09 23 65 6c 73 | = theDe|f;..#els|
|000016a0| 65 0d 09 09 52 65 6d 65 | 6d 62 65 72 41 30 28 29 |e...Reme|mberA0()|
|000016b0| 3b 0d 09 09 53 65 74 55 | 70 41 34 28 29 3b 0d 09 |;...SetU|pA4();..|
|000016c0| 0d 09 09 61 73 6d 20 7b | 0d 09 09 09 5f 52 65 63 |...asm {|...._Rec|
|000016d0| 6f 76 65 72 48 61 6e 64 | 6c 65 09 09 2f 2a 20 70 |overHand|le../* p|
|000016e0| 74 72 20 74 6f 20 43 44 | 45 46 20 69 73 20 61 6c |tr to CD|EF is al|
|000016f0| 72 65 61 64 79 20 69 6e | 20 41 30 3b 20 74 68 61 |ready in| A0; tha|
|00001700| 6e 78 2c 20 54 48 49 4e | 4b 20 2a 2f 0d 09 09 09 |nx, THIN|K */....|
|00001710| 6d 6f 76 65 2e 6c 09 41 | 30 2c 70 6f 70 75 70 43 |move.l.A|0,popupC|
|00001720| 44 45 46 0d 09 09 7d 0d | 09 23 65 6e 64 69 66 0d |DEF...}.|.#endif.|
|00001730| 09 0d 20 09 2f 2a 20 49 | 27 6d 20 6e 6f 74 20 73 |.. ./* I|'m not s|
|00001740| 75 72 65 20 77 68 79 20 | 69 74 73 20 61 20 67 6f |ure why |its a go|
|00001750| 6f 64 20 69 64 65 61 20 | 74 6f 20 75 73 65 20 47 |od idea |to use G|
|00001760| 65 74 43 56 61 72 69 61 | 6e 74 20 62 75 74 20 69 |etCVaria|nt but i|
|00001770| 74 73 20 63 68 65 61 70 | 20 2a 2f 0d 09 69 66 20 |ts cheap| */..if |
|00001780| 28 63 6f 6e 74 72 6f 6c | 29 0d 09 09 76 61 72 20 |(control|)...var |
|00001790| 3d 20 47 65 74 43 56 61 | 72 69 61 6e 74 28 63 6f |= GetCVa|riant(co|
|000017a0| 6e 74 72 6f 6c 29 3b 0d | 09 0d 09 47 65 74 50 6f |ntrol);.|...GetPo|
|000017b0| 72 74 28 26 61 50 6f 72 | 74 29 3b 09 09 2f 2a 20 |rt(&aPor|t);../* |
|000017c0| 74 68 65 50 6f 72 74 20 | 6d 69 67 68 74 20 62 65 |thePort |might be|
|000017d0| 20 69 6e 76 61 6c 69 64 | 20 2a 2f 0d 09 0d 09 73 | invalid| */....s|
|000017e0| 61 76 65 64 4f 72 69 67 | 20 3d 20 61 50 6f 72 74 |avedOrig| = aPort|
|000017f0| 2d 3e 70 6f 72 74 52 65 | 63 74 3b 0d 09 53 65 74 |->portRe|ct;..Set|
|00001800| 4f 72 69 67 69 6e 28 30 | 2c 30 29 3b 0d 09 73 61 |Origin(0|,0);..sa|
|00001810| 76 65 64 50 65 6e 56 69 | 73 20 3d 20 61 50 6f 72 |vedPenVi|s = aPor|
|00001820| 74 2d 3e 70 6e 56 69 73 | 3b 0d 09 61 50 6f 72 74 |t->pnVis|;..aPort|
|00001830| 2d 3e 70 6e 56 69 73 20 | 3d 20 30 3b 0d 09 0d 09 |->pnVis |= 0;....|
|00001840| 73 61 76 65 64 46 6f 6e | 74 20 3d 20 61 50 6f 72 |savedFon|t = aPor|
|00001850| 74 2d 3e 74 78 46 6f 6e | 74 3b 0d 09 73 61 76 65 |t->txFon|t;..save|
|00001860| 64 53 69 7a 65 20 3d 20 | 61 50 6f 72 74 2d 3e 74 |dSize = |aPort->t|
|00001870| 78 53 69 7a 65 3b 0d 09 | 73 61 76 65 64 46 61 63 |xSize;..|savedFac|
|00001880| 65 20 3d 20 61 50 6f 72 | 74 2d 3e 74 78 46 61 63 |e = aPor|t->txFac|
|00001890| 65 3b 0d 09 73 61 76 65 | 64 4d 6f 64 65 20 3d 20 |e;..save|dMode = |
|000018a0| 61 50 6f 72 74 2d 3e 74 | 78 4d 6f 64 65 3b 0d 09 |aPort->t|xMode;..|
|000018b0| 54 65 78 74 46 6f 6e 74 | 28 73 79 73 74 65 6d 46 |TextFont|(systemF|
|000018c0| 6f 6e 74 29 3b 0d 09 54 | 65 78 74 53 69 7a 65 28 |ont);..T|extSize(|
|000018d0| 30 29 3b 0d 09 54 65 78 | 74 46 61 63 65 28 30 29 |0);..Tex|tFace(0)|
|000018e0| 3b 0d 09 54 65 78 74 4d | 6f 64 65 28 73 72 63 4f |;..TextM|ode(srcO|
|000018f0| 72 29 3b 0d 0d 09 73 77 | 69 74 63 68 28 6d 65 73 |r);...sw|itch(mes|
|00001900| 73 61 67 65 29 20 7b 0d | 09 63 61 73 65 20 64 72 |sage) {.|.case dr|
|00001910| 61 77 43 6e 74 6c 3a 0d | 09 09 44 72 61 77 50 6f |awCntl:.|..DrawPo|
|00001920| 70 55 70 28 76 61 72 2c | 20 63 6f 6e 74 72 6f 6c |pUp(var,| control|
|00001930| 2c 20 70 61 72 61 6d 2c | 20 66 61 6c 73 65 29 3b |, param,| false);|
|00001940| 0d 09 09 62 72 65 61 6b | 3b 0d 09 63 61 73 65 20 |...break|;..case |
|00001950| 74 65 73 74 43 6e 74 6c | 3a 0d 09 09 72 65 73 75 |testCntl|:...resu|
|00001960| 6c 74 20 3d 20 48 69 74 | 50 6f 70 55 70 28 76 61 |lt = Hit|PopUp(va|
|00001970| 72 2c 20 63 6f 6e 74 72 | 6f 6c 2c 20 70 61 72 61 |r, contr|ol, para|
|00001980| 6d 29 3b 0d 09 09 62 72 | 65 61 6b 3b 0d 09 63 61 |m);...br|eak;..ca|
|00001990| 73 65 20 69 6e 69 74 43 | 6e 74 6c 3a 0d 09 09 4e |se initC|ntl:...N|
|000019a0| 65 77 50 6f 70 55 70 28 | 76 61 72 2c 20 63 6f 6e |ewPopUp(|var, con|
|000019b0| 74 72 6f 6c 2c 20 70 61 | 72 61 6d 29 3b 0d 09 09 |trol, pa|ram);...|
|000019c0| 62 72 65 61 6b 3b 0d 09 | 63 61 73 65 20 63 61 6c |break;..|case cal|
|000019d0| 63 43 52 67 6e 73 3a 0d | 09 09 43 61 6c 63 50 6f |cCRgns:.|..CalcPo|
|000019e0| 70 55 70 28 76 61 72 2c | 20 63 6f 6e 74 72 6f 6c |pUp(var,| control|
|000019f0| 2c 20 70 61 72 61 6d 29 | 3b 0d 09 09 62 72 65 61 |, param)|;...brea|
|00001a00| 6b 3b 0d 09 63 61 73 65 | 20 64 72 61 67 43 6e 74 |k;..case| dragCnt|
|00001a10| 6c 3a 0d 09 09 72 65 73 | 75 6c 74 20 3d 20 44 72 |l:...res|ult = Dr|
|00001a20| 61 67 50 6f 70 55 70 28 | 76 61 72 2c 20 63 6f 6e |agPopUp(|var, con|
|00001a30| 74 72 6f 6c 2c 20 70 61 | 72 61 6d 29 3b 0d 09 09 |trol, pa|ram);...|
|00001a40| 62 72 65 61 6b 3b 0d 09 | 63 61 73 65 20 64 69 73 |break;..|case dis|
|00001a50| 70 43 6e 74 6c 3a 0d 09 | 09 44 69 73 70 50 6f 70 |pCntl:..|.DispPop|
|00001a60| 55 70 28 76 61 72 2c 20 | 63 6f 6e 74 72 6f 6c 2c |Up(var, |control,|
|00001a70| 20 70 61 72 61 6d 29 3b | 0d 09 09 62 72 65 61 6b | param);|...break|
|00001a80| 3b 0d 09 63 61 73 65 20 | 61 75 74 6f 54 72 61 63 |;..case |autoTrac|
|00001a90| 6b 3a 0d 09 09 54 72 61 | 63 6b 50 6f 70 55 70 28 |k:...Tra|ckPopUp(|
|00001aa0| 76 61 72 2c 20 63 6f 6e | 74 72 6f 6c 2c 20 70 61 |var, con|trol, pa|
|00001ab0| 72 61 6d 29 3b 0d 09 09 | 62 72 65 61 6b 3b 0d 09 |ram);...|break;..|
|00001ac0| 63 61 73 65 20 31 30 3a | 20 63 61 73 65 20 31 31 |case 10:| case 11|
|00001ad0| 3a 09 2f 2a 20 63 61 6c | 63 43 6e 74 6c 52 67 6e |:./* cal|cCntlRgn|
|00001ae0| 20 26 20 63 61 6c 63 54 | 68 75 6d 62 52 67 6e 20 | & calcT|humbRgn |
|00001af0| 2a 2f 0d 09 09 4e 65 77 | 43 61 6c 63 50 6f 70 55 |*/...New|CalcPopU|
|00001b00| 70 28 76 61 72 2c 20 63 | 6f 6e 74 72 6f 6c 2c 20 |p(var, c|ontrol, |
|00001b10| 70 61 72 61 6d 29 3b 0d | 09 09 62 72 65 61 6b 3b |param);.|..break;|
|00001b20| 0d 09 63 61 73 65 20 30 | 78 38 30 3a 09 09 09 2f |..case 0|x80:.../|
|00001b30| 2a 20 69 73 20 74 68 69 | 73 20 6c 65 67 61 6c 3f |* is thi|s legal?|
|00001b40| 20 2a 2f 0d 09 09 50 72 | 65 70 61 72 65 54 72 61 | */...Pr|epareTra|
|00001b50| 63 6b 69 6e 67 28 63 6f | 6e 74 72 6f 6c 29 3b 0d |cking(co|ntrol);.|
|00001b60| 09 09 62 72 65 61 6b 3b | 0d 09 7d 0d 09 0d 09 61 |..break;|..}....a|
|00001b70| 50 6f 72 74 2d 3e 70 6e | 56 69 73 20 3d 20 73 61 |Port->pn|Vis = sa|
|00001b80| 76 65 64 50 65 6e 56 69 | 73 3b 0d 09 61 50 6f 72 |vedPenVi|s;..aPor|
|00001b90| 74 2d 3e 70 6f 72 74 52 | 65 63 74 20 3d 20 73 61 |t->portR|ect = sa|
|00001ba0| 76 65 64 4f 72 69 67 3b | 0d 09 54 65 78 74 46 6f |vedOrig;|..TextFo|
|00001bb0| 6e 74 28 73 61 76 65 64 | 46 6f 6e 74 29 3b 0d 09 |nt(saved|Font);..|
|00001bc0| 54 65 78 74 53 69 7a 65 | 28 73 61 76 65 64 53 69 |TextSize|(savedSi|
|00001bd0| 7a 65 29 3b 0d 09 54 65 | 78 74 46 61 63 65 28 73 |ze);..Te|xtFace(s|
|00001be0| 61 76 65 64 46 61 63 65 | 29 3b 0d 09 54 65 78 74 |avedFace|);..Text|
|00001bf0| 4d 6f 64 65 28 73 61 76 | 65 64 4d 6f 64 65 29 3b |Mode(sav|edMode);|
|00001c00| 0d 0d 09 23 69 66 64 65 | 66 20 74 65 73 74 69 6e |...#ifde|f testin|
|00001c10| 67 0d 09 52 65 73 74 6f | 72 65 41 35 28 29 3b 0d |g..Resto|reA5();.|
|00001c20| 09 23 65 6c 73 65 0d 09 | 52 65 73 74 6f 72 65 41 |.#else..|RestoreA|
|00001c30| 34 28 29 3b 0d 09 23 65 | 6e 64 69 66 0d 09 0d 09 |4();..#e|ndif....|
|00001c40| 72 65 74 75 72 6e 20 72 | 65 73 75 6c 74 3b 0d 7d |return r|esult;.}|
|00001c50| 0d 0d 2f 2a 20 64 72 61 | 77 20 74 68 65 20 63 6f |../* dra|w the co|
|00001c60| 6e 74 72 6f 6c 20 75 70 | 6f 6e 20 74 68 65 20 73 |ntrol up|on the s|
|00001c70| 63 72 65 65 6e 2e 20 20 | 4e 6f 74 65 20 74 68 61 |creen. |Note tha|
|00001c80| 74 20 74 68 65 72 65 20 | 61 72 65 20 73 65 76 65 |t there |are seve|
|00001c90| 72 61 6c 20 70 6f 73 73 | 69 62 6c 65 0d 09 63 61 |ral poss|ible..ca|
|00001ca0| 73 65 73 20 68 65 72 65 | 3a 0d 09 0d 09 63 6f 6e |ses here|:....con|
|00001cb0| 74 72 6c 56 69 73 20 69 | 73 20 30 3a 09 09 09 54 |trlVis i|s 0:...T|
|00001cc0| 68 65 20 63 6f 6e 74 72 | 6f 6c 20 69 73 6e 27 74 |he contr|ol isn't|
|00001cd0| 20 76 69 73 69 62 6c 65 | 2e 20 20 4e 6f 20 72 65 | visible|. No re|
|00001ce0| 61 6c 20 72 65 61 73 6f | 6e 20 66 6f 72 20 75 73 |al reaso|n for us|
|00001cf0| 20 74 6f 0d 09 09 09 09 | 09 09 68 61 76 65 20 67 | to.....|..have g|
|00001d00| 6f 74 74 65 6e 20 68 65 | 72 65 2c 20 62 75 74 20 |otten he|re, but |
|00001d10| 69 6e 20 61 6e 79 20 63 | 61 73 65 2c 20 77 65 20 |in any c|ase, we |
|00001d20| 64 6f 6e 27 74 20 64 72 | 61 77 20 61 6e 79 74 68 |don't dr|aw anyth|
|00001d30| 69 6e 67 0d 09 0d 09 70 | 61 72 61 6d 3a 09 09 09 |ing....p|aram:...|
|00001d40| 09 09 54 68 69 73 20 69 | 73 20 6e 6f 6d 69 6e 61 |..This i|s nomina|
|00001d50| 6c 6c 79 20 74 68 65 20 | 70 61 72 74 20 74 68 61 |lly the |part tha|
|00001d60| 74 20 6e 65 65 64 73 20 | 72 65 64 72 61 77 69 6e |t needs |redrawin|
|00001d70| 67 2e 20 20 53 69 6e 63 | 65 0d 09 09 09 09 09 09 |g. Sinc|e.......|
|00001d80| 77 65 20 64 6f 6e 27 74 | 20 68 61 76 65 20 6d 61 |we don't| have ma|
|00001d90| 6e 79 20 70 61 72 74 73 | 20 77 65 20 6a 75 73 74 |ny parts| we just|
|00001da0| 20 61 6c 77 61 79 73 20 | 64 72 61 77 20 74 68 65 | always |draw the|
|00001db0| 6d 20 61 6c 6c 2e 20 20 | 54 68 65 72 65 0d 09 09 |m all. |There...|
|00001dc0| 09 09 09 09 69 73 20 61 | 20 73 70 65 63 69 61 6c |....is a| special|
|00001dd0| 20 63 61 73 65 20 76 61 | 6c 75 65 20 6f 66 20 31 | case va|lue of 1|
|00001de0| 32 39 20 77 68 69 63 68 | 20 6d 65 61 6e 73 20 74 |29 which| means t|
|00001df0| 68 61 74 20 74 68 65 20 | 76 61 6c 75 65 0d 09 09 |hat the |value...|
|00001e00| 09 09 09 09 68 61 73 20 | 62 65 65 6e 20 63 68 61 |....has |been cha|
|00001e10| 6e 67 65 64 20 61 6e 64 | 20 61 70 70 72 6f 70 72 |nged and| appropr|
|00001e20| 69 61 74 65 20 6d 65 61 | 73 75 72 65 73 20 6e 65 |iate mea|sures ne|
|00001e30| 65 64 20 74 6f 20 62 65 | 20 74 61 6b 65 6e 2e 0d |ed to be| taken..|
|00001e40| 09 09 09 09 09 09 57 65 | 20 75 73 65 20 74 68 69 |......We| use thi|
|00001e50| 73 20 74 6f 20 75 6e 63 | 68 65 63 6b 20 74 68 65 |s to unc|heck the|
|00001e60| 20 6f 6c 64 20 76 61 6c | 75 65 20 61 6e 64 20 63 | old val|ue and c|
|00001e70| 68 65 63 6b 20 74 68 65 | 20 6e 65 77 20 6f 6e 65 |heck the| new one|
|00001e80| 2e 0d 09 0d 09 63 6f 6e | 74 72 6c 48 69 6c 69 74 |.....con|trlHilit|
|00001e90| 65 20 69 73 20 32 35 35 | 3a 09 54 68 65 20 63 6f |e is 255|:.The co|
|00001ea0| 6e 74 72 6f 6c 20 69 73 | 20 69 6e 61 63 74 69 76 |ntrol is| inactiv|
|00001eb0| 65 2e 20 20 49 74 20 67 | 65 74 27 73 20 64 72 61 |e. It g|et's dra|
|00001ec0| 77 6e 2c 20 6a 75 73 74 | 20 6c 69 6b 65 0d 09 09 |wn, just| like...|
|00001ed0| 09 09 09 09 6e 6f 72 6d | 61 6c 2c 20 62 75 74 20 |....norm|al, but |
|00001ee0| 74 68 65 6e 20 67 72 65 | 79 27 65 64 20 6f 75 74 |then gre|y'ed out|
|00001ef0| 2e 0d 2a 2f 0d 0d 44 72 | 61 77 50 6f 70 55 70 28 |..*/..Dr|awPopUp(|
|00001f00| 76 61 72 63 6f 64 65 2c | 20 63 6f 6e 74 72 6f 6c |varcode,| control|
|00001f10| 2c 20 70 61 72 61 6d 2c | 20 6d 65 29 0d 69 6e 74 |, param,| me).int|
|00001f20| 20 76 61 72 63 6f 64 65 | 3b 0d 43 6f 6e 74 72 6f | varcode|;.Contro|
|00001f30| 6c 48 61 6e 64 6c 65 20 | 63 6f 6e 74 72 6f 6c 3b |lHandle |control;|
|00001f40| 0d 6c 6f 6e 67 20 70 61 | 72 61 6d 3b 0d 42 6f 6f |.long pa|ram;.Boo|
|00001f50| 6c 65 61 6e 20 6d 65 3b | 0d 7b 0d 09 53 74 72 32 |lean me;|.{..Str2|
|00001f60| 35 35 09 09 73 74 72 69 | 6e 67 3b 0d 09 4d 65 6e |55..stri|ng;..Men|
|00001f70| 75 48 61 6e 64 6c 65 09 | 6d 68 3b 0d 09 52 65 63 |uHandle.|mh;..Rec|
|00001f80| 74 09 09 72 65 63 74 2c | 20 6f 6c 64 3b 0d 09 50 |t..rect,| old;..P|
|00001f90| 65 6e 53 74 61 74 65 09 | 70 73 3b 0d 09 0d 09 69 |enState.|ps;....i|
|00001fa0| 66 20 28 21 6d 65 20 26 | 26 20 6e 6f 64 72 61 77 |f (!me &|& nodraw|
|00001fb0| 73 29 20 7b 0d 09 09 2d | 2d 6e 6f 64 72 61 77 73 |s) {...-|-nodraws|
|00001fc0| 3b 0d 09 09 72 65 74 75 | 72 6e 3b 0d 09 7d 0d 09 |;...retu|rn;..}..|
|00001fd0| 0d 09 69 66 20 28 28 2a | 2a 63 6f 6e 74 72 6f 6c |..if ((*|*control|
|00001fe0| 29 2e 63 6f 6e 74 72 6c | 56 69 73 20 3d 3d 20 30 |).contrl|Vis == 0|
|00001ff0| 29 0d 09 09 72 65 74 75 | 72 6e 3b 0d 09 0d 09 47 |)...retu|rn;....G|
|00002000| 65 74 50 65 6e 53 74 61 | 74 65 28 26 70 73 29 3b |etPenSta|te(&ps);|
|00002010| 0d 09 50 65 6e 4e 6f 72 | 6d 61 6c 28 29 3b 0d 09 |..PenNor|mal();..|
|00002020| 09 0d 09 2f 2a 20 67 65 | 74 20 74 68 65 20 6d 65 |.../* ge|t the me|
|00002030| 6e 75 20 68 61 6e 64 6c | 65 20 73 69 6e 63 65 20 |nu handl|e since |
|00002040| 77 65 27 72 65 20 67 6f | 69 6e 67 20 74 6f 20 6e |we're go|ing to n|
|00002050| 65 65 64 20 69 74 20 65 | 76 65 6e 74 75 61 6c 6c |eed it e|ventuall|
|00002060| 79 20 2a 2f 0d 09 6d 68 | 20 3d 20 47 65 74 4d 65 |y */..mh| = GetMe|
|00002070| 6e 75 48 61 6e 64 6c 65 | 28 63 6f 6e 74 72 6f 6c |nuHandle|(control|
|00002080| 29 3b 0d 09 0d 09 2f 2a | 20 67 65 74 20 74 68 65 |);..../*| get the|
|00002090| 20 61 63 74 75 61 6c 20 | 62 6f 75 6e 64 73 20 6f | actual |bounds o|
|000020a0| 66 20 74 68 65 20 69 74 | 65 6d 2c 20 74 68 69 73 |f the it|em, this|
|000020b0| 20 76 61 72 69 65 73 20 | 61 73 20 74 68 65 20 6c | varies |as the l|
|000020c0| 65 6e 67 74 68 0d 09 09 | 6f 66 20 74 68 65 20 73 |ength...|of the s|
|000020d0| 74 72 69 6e 67 20 64 69 | 73 70 6c 61 79 65 64 20 |tring di|splayed |
|000020e0| 64 6f 65 73 20 73 69 6e | 63 65 20 69 74 20 6c 6f |does sin|ce it lo|
|000020f0| 6f 6b 73 20 73 69 63 6b | 20 74 6f 20 68 61 76 65 |oks sick| to have|
|00002100| 20 74 68 69 73 0d 09 09 | 62 69 67 20 6c 6f 6e 67 | this...|big long|
|00002110| 20 72 65 63 74 61 6e 67 | 6c 65 20 77 69 74 68 20 | rectang|le with |
|00002120| 22 31 22 20 69 6e 20 69 | 74 20 2a 2f 0d 09 43 61 |"1" in i|t */..Ca|
|00002130| 6c 63 50 6f 70 55 70 52 | 65 63 74 28 76 61 72 63 |lcPopUpR|ect(varc|
|00002140| 6f 64 65 2c 20 63 6f 6e | 74 72 6f 6c 2c 20 26 72 |ode, con|trol, &r|
|00002150| 65 63 74 29 3b 0d 0d 09 | 69 66 20 28 21 45 6d 70 |ect);...|if (!Emp|
|00002160| 74 79 52 65 63 74 28 26 | 4c 61 73 74 44 72 61 77 |tyRect(&|LastDraw|
|00002170| 52 65 63 74 29 29 20 7b | 09 09 2f 2a 20 3c 2d 20 |Rect)) {|../* <- |
|00002180| 6d 61 79 62 65 20 73 68 | 6f 75 6c 64 20 62 65 20 |maybe sh|ould be |
|00002190| 6c 6f 63 6b 65 64 20 64 | 6f 77 6e 20 2a 2f 0d 09 |locked d|own */..|
|000021a0| 09 69 6e 74 09 09 73 61 | 76 65 3b 0d 09 09 0d 09 |.int..sa|ve;.....|
|000021b0| 09 6f 6c 64 20 3d 20 4c | 61 73 74 44 72 61 77 52 |.old = L|astDrawR|
|000021c0| 65 63 74 3b 0d 09 09 0d | 09 09 49 6e 73 65 74 52 |ect;....|..InsetR|
|000021d0| 65 63 74 28 26 72 65 63 | 74 2c 20 2d 31 2c 20 2d |ect(&rec|t, -1, -|
|000021e0| 31 29 3b 0d 09 09 49 6e | 73 65 74 52 65 63 74 28 |1);...In|setRect(|
|000021f0| 26 6f 6c 64 2c 20 2d 31 | 2c 20 2d 31 29 3b 0d 09 |&old, -1|, -1);..|
|00002200| 09 0d 09 09 69 66 20 28 | 6f 6c 64 2e 72 69 67 68 |....if (|old.righ|
|00002210| 74 20 3e 20 72 65 63 74 | 2e 72 69 67 68 74 29 20 |t > rect|.right) |
|00002220| 7b 0d 09 09 09 73 61 76 | 65 20 3d 20 6f 6c 64 2e |{....sav|e = old.|
|00002230| 6c 65 66 74 3b 0d 09 09 | 09 6f 6c 64 2e 6c 65 66 |left;...|.old.lef|
|00002240| 74 20 3d 20 72 65 63 74 | 2e 72 69 67 68 74 2d 31 |t = rect|.right-1|
|00002250| 3b 0d 09 09 09 45 72 61 | 73 65 52 65 63 74 28 26 |;....Era|seRect(&|
|00002260| 6f 6c 64 29 3b 0d 09 09 | 09 6f 6c 64 2e 6c 65 66 |old);...|.old.lef|
|00002270| 74 20 3d 20 73 61 76 65 | 3b 0d 09 09 7d 0d 09 09 |t = save|;...}...|
|00002280| 69 66 20 28 6f 6c 64 2e | 6c 65 66 74 20 3c 20 72 |if (old.|left < r|
|00002290| 65 63 74 2e 6c 65 66 74 | 29 20 7b 0d 09 09 09 6f |ect.left|) {....o|
|000022a0| 6c 64 2e 72 69 67 68 74 | 20 3d 20 72 65 63 74 2e |ld.right| = rect.|
|000022b0| 6c 65 66 74 2b 33 3b 0d | 09 09 09 45 72 61 73 65 |left+3;.|...Erase|
|000022c0| 52 65 63 74 28 26 6f 6c | 64 29 3b 0d 09 09 7d 0d |Rect(&ol|d);...}.|
|000022d0| 09 7d 0d 09 0d 09 43 61 | 6c 63 50 6f 70 55 70 52 |.}....Ca|lcPopUpR|
|000022e0| 65 63 74 28 76 61 72 63 | 6f 64 65 2c 20 63 6f 6e |ect(varc|ode, con|
|000022f0| 74 72 6f 6c 2c 20 26 72 | 65 63 74 29 3b 0d 09 4c |trol, &r|ect);..L|
|00002300| 61 73 74 44 72 61 77 52 | 65 63 74 20 3d 20 72 65 |astDrawR|ect = re|
|00002310| 63 74 3b 0d 0d 09 2f 2a | 20 69 66 20 74 68 65 20 |ct;.../*| if the |
|00002320| 63 6f 6e 74 72 6f 6c 20 | 68 61 73 20 61 20 74 69 |control |has a ti|
|00002330| 74 6c 65 20 64 72 61 77 | 20 69 74 20 69 6e 20 2a |tle draw| it in *|
|00002340| 2f 0d 09 69 66 20 28 2a | 28 2a 2a 63 6f 6e 74 72 |/..if (*|(**contr|
|00002350| 6f 6c 29 2e 63 6f 6e 74 | 72 6c 54 69 74 6c 65 29 |ol).cont|rlTitle)|
|00002360| 0d 09 7b 0d 09 09 4d 6f | 76 65 54 6f 28 28 2a 2a |..{...Mo|veTo((**|
|00002370| 63 6f 6e 74 72 6f 6c 29 | 2e 63 6f 6e 74 72 6c 52 |control)|.contrlR|
|00002380| 65 63 74 2e 6c 65 66 74 | 2c 20 72 65 63 74 2e 62 |ect.left|, rect.b|
|00002390| 6f 74 74 6f 6d 20 2d 20 | 47 65 74 46 6f 6e 74 4f |ottom - |GetFontO|
|000023a0| 66 66 73 65 74 28 29 20 | 2d 20 56 53 70 61 63 65 |ffset() |- VSpace|
|000023b0| 29 3b 0d 09 09 44 72 61 | 77 53 74 72 69 6e 67 28 |);...Dra|wString(|
|000023c0| 28 2a 2a 63 6f 6e 74 72 | 6f 6c 29 2e 63 6f 6e 74 |(**contr|ol).cont|
|000023d0| 72 6c 54 69 74 6c 65 29 | 3b 0d 09 7d 0d 09 0d 09 |rlTitle)|;..}....|
|000023e0| 2f 2a 20 69 66 20 66 6f | 72 20 73 6f 6d 65 20 72 |/* if fo|r some r|
|000023f0| 65 61 73 6f 6e 20 74 68 | 65 20 6d 65 6e 75 20 68 |eason th|e menu h|
|00002400| 61 73 6e 27 74 20 62 65 | 65 6e 20 64 65 66 69 6e |asn't be|en defin|
|00002410| 65 64 2c 20 6e 65 76 65 | 72 20 66 65 61 72 0d 09 |ed, neve|r fear..|
|00002420| 09 77 65 20 6a 75 73 74 | 20 64 72 61 77 20 74 68 |.we just| draw th|
|00002430| 65 20 74 69 74 6c 65 20 | 61 6e 64 20 65 78 69 74 |e title |and exit|
|00002440| 20 2a 2f 0d 09 69 66 20 | 28 6d 68 29 20 7b 0d 09 | */..if |(mh) {..|
|00002450| 09 2f 2a 20 67 65 74 20 | 74 68 65 20 63 75 72 72 |./* get |the curr|
|00002460| 65 6e 74 6c 79 20 73 65 | 6c 65 63 74 65 64 20 69 |ently se|lected i|
|00002470| 74 65 6d 27 73 20 73 74 | 72 69 6e 67 20 2a 2f 0d |tem's st|ring */.|
|00002480| 09 09 47 65 74 49 74 65 | 6d 28 6d 68 2c 20 28 2a |..GetIte|m(mh, (*|
|00002490| 2a 63 6f 6e 74 72 6f 6c | 29 2e 63 6f 6e 74 72 6c |*control|).contrl|
|000024a0| 56 61 6c 75 65 2c 20 26 | 73 74 72 69 6e 67 29 3b |Value, &|string);|
|000024b0| 0d 09 09 0d 09 09 2f 2a | 20 65 72 61 73 65 2c 20 |....../*| erase, |
|000024c0| 66 72 61 6d 65 20 61 6e | 64 20 64 72 6f 70 20 73 |frame an|d drop s|
|000024d0| 68 61 64 6f 77 20 74 68 | 65 20 66 75 74 75 72 65 |hadow th|e future|
|000024e0| 20 6d 65 6e 75 20 69 74 | 65 6d 20 2a 2f 0d 09 09 | menu it|em */...|
|000024f0| 2d 2d 72 65 63 74 2e 74 | 6f 70 3b 09 09 09 09 2f |--rect.t|op;..../|
|00002500| 2a 20 6b 6c 75 64 67 65 | 20 69 74 20 2a 2f 0d 09 |* kludge| it */..|
|00002510| 09 45 72 61 73 65 52 65 | 63 74 28 26 72 65 63 74 |.EraseRe|ct(&rect|
|00002520| 29 3b 0d 09 09 46 72 61 | 6d 65 52 65 63 74 28 26 |);...Fra|meRect(&|
|00002530| 72 65 63 74 29 3b 0d 09 | 09 4d 6f 76 65 54 6f 28 |rect);..|.MoveTo(|
|00002540| 72 65 63 74 2e 6c 65 66 | 74 20 2b 20 33 2c 20 72 |rect.lef|t + 3, r|
|00002550| 65 63 74 2e 62 6f 74 74 | 6f 6d 29 3b 0d 09 09 4c |ect.bott|om);...L|
|00002560| 69 6e 65 54 6f 28 72 65 | 63 74 2e 72 69 67 68 74 |ineTo(re|ct.right|
|00002570| 2c 20 72 65 63 74 2e 62 | 6f 74 74 6f 6d 29 3b 0d |, rect.b|ottom);.|
|00002580| 09 09 4c 69 6e 65 54 6f | 28 72 65 63 74 2e 72 69 |..LineTo|(rect.ri|
|00002590| 67 68 74 2c 20 72 65 63 | 74 2e 74 6f 70 20 2b 20 |ght, rec|t.top + |
|000025a0| 33 29 3b 0d 09 09 2b 2b | 72 65 63 74 2e 74 6f 70 |3);...++|rect.top|
|000025b0| 3b 0d 09 0d 09 09 2f 2a | 20 64 72 61 77 20 74 68 |;...../*| draw th|
|000025c0| 65 20 61 63 74 75 61 6c | 20 6d 65 6e 75 20 69 74 |e actual| menu it|
|000025d0| 65 6d 20 69 74 73 65 6c | 66 20 2a 2f 0d 09 09 4d |em itsel|f */...M|
|000025e0| 6f 76 65 54 6f 28 72 65 | 63 74 2e 6c 65 66 74 20 |oveTo(re|ct.left |
|000025f0| 2b 20 48 53 70 61 63 65 | 2c 20 72 65 63 74 2e 62 |+ HSpace|, rect.b|
|00002600| 6f 74 74 6f 6d 20 2d 20 | 47 65 74 46 6f 6e 74 4f |ottom - |GetFontO|
|00002610| 66 66 73 65 74 28 29 20 | 2d 20 56 53 70 61 63 65 |ffset() |- VSpace|
|00002620| 29 3b 0d 09 09 44 72 61 | 77 53 74 72 69 6e 67 28 |);...Dra|wString(|
|00002630| 73 74 72 69 6e 67 29 3b | 0d 09 7d 0d 09 0d 09 2f |string);|..}..../|
|00002640| 2a 20 74 68 65 20 63 6f | 6e 74 72 6f 6c 20 69 73 |* the co|ntrol is|
|00002650| 20 69 6e 61 63 74 69 76 | 65 20 73 6f 20 67 72 65 | inactiv|e so gre|
|00002660| 79 20 69 74 20 6f 75 74 | 20 2a 2f 0d 09 69 66 20 |y it out| */..if |
|00002670| 28 28 2a 2a 63 6f 6e 74 | 72 6f 6c 29 2e 63 6f 6e |((**cont|rol).con|
|00002680| 74 72 6c 48 69 6c 69 74 | 65 20 3d 3d 20 32 35 35 |trlHilit|e == 255|
|00002690| 29 20 7b 0d 09 09 6c 6f | 6e 67 09 09 09 67 72 61 |) {...lo|ng...gra|
|000026a0| 79 5b 32 5d 3b 0d 09 09 | 0d 09 09 2f 2a 20 67 6f |y[2];...|.../* go|
|000026b0| 6f 64 20 70 61 74 74 65 | 72 6e 20 66 6f 72 20 63 |od patte|rn for c|
|000026c0| 6c 65 61 72 69 6e 67 20 | 62 69 74 73 20 2a 2f 0d |learing |bits */.|
|000026d0| 09 09 50 65 6e 4d 6f 64 | 65 28 70 61 74 42 69 63 |..PenMod|e(patBic|
|000026e0| 29 3b 0d 09 09 0d 09 09 | 2f 2a 20 35 30 25 20 67 |);......|/* 50% g|
|000026f0| 72 65 79 20 70 61 74 74 | 65 72 6e 20 73 6f 27 73 |rey patt|ern so's|
|00002700| 20 77 65 20 64 6f 6e 27 | 74 20 68 61 76 65 20 74 | we don'|t have t|
|00002710| 6f 20 72 65 6c 79 20 6f | 6e 20 66 69 6e 64 69 6e |o rely o|n findin|
|00002720| 67 20 6f 6e 65 0d 09 09 | 09 73 6f 6d 65 77 68 65 |g one...|.somewhe|
|00002730| 72 65 20 2a 2f 0d 09 09 | 67 72 61 79 5b 30 5d 20 |re */...|gray[0] |
|00002740| 3d 20 67 72 61 79 5b 31 | 5d 20 3d 20 30 78 61 61 |= gray[1|] = 0xaa|
|00002750| 35 35 61 61 35 35 3b 0d | 09 09 50 65 6e 50 61 74 |55aa55;.|..PenPat|
|00002760| 28 67 72 61 79 29 3b 0d | 09 09 0d 09 09 2f 2a 20 |(gray);.|...../* |
|00002770| 67 72 65 79 20 6f 75 74 | 20 74 68 65 20 77 68 6f |grey out| the who|
|00002780| 6c 65 20 63 6f 6e 74 72 | 6f 6c 2c 20 69 6e 63 6c |le contr|ol, incl|
|00002790| 75 64 69 6e 67 20 74 68 | 65 20 74 69 74 6c 65 20 |uding th|e title |
|000027a0| 2a 2f 0d 09 09 72 65 63 | 74 2e 6c 65 66 74 20 3d |*/...rec|t.left =|
|000027b0| 20 28 2a 2a 63 6f 6e 74 | 72 6f 6c 29 2e 63 6f 6e | (**cont|rol).con|
|000027c0| 74 72 6c 52 65 63 74 2e | 6c 65 66 74 3b 0d 09 09 |trlRect.|left;...|
|000027d0| 49 6e 73 65 74 52 65 63 | 74 28 26 72 65 63 74 2c |InsetRec|t(&rect,|
|000027e0| 20 2d 31 2c 20 2d 31 29 | 3b 0d 09 09 50 61 69 6e | -1, -1)|;...Pain|
|000027f0| 74 52 65 63 74 28 26 72 | 65 63 74 29 3b 0d 09 7d |tRect(&r|ect);..}|
|00002800| 0d 09 0d 09 2f 2a 20 72 | 65 73 74 6f 72 65 20 74 |..../* r|estore t|
|00002810| 68 65 20 73 61 76 65 64 | 20 70 61 72 61 6d 65 74 |he saved| paramet|
|00002820| 65 72 73 20 2a 2f 0d 09 | 53 65 74 50 65 6e 53 74 |ers */..|SetPenSt|
|00002830| 61 74 65 28 26 70 73 29 | 3b 0d 7d 0d 0d 6c 6f 6e |ate(&ps)|;.}..lon|
|00002840| 67 20 48 69 74 50 6f 70 | 55 70 28 76 61 72 63 6f |g HitPop|Up(varco|
|00002850| 64 65 2c 20 63 6f 6e 74 | 72 6f 6c 2c 20 70 61 72 |de, cont|rol, par|
|00002860| 61 6d 29 0d 69 6e 74 09 | 09 09 09 76 61 72 63 6f |am).int.|...varco|
|00002870| 64 65 3b 0d 43 6f 6e 74 | 72 6f 6c 48 61 6e 64 6c |de;.Cont|rolHandl|
|00002880| 65 09 63 6f 6e 74 72 6f | 6c 3b 0d 50 6f 69 6e 74 |e.contro|l;.Point|
|00002890| 09 09 09 70 61 72 61 6d | 3b 0d 7b 0d 09 52 65 63 |...param|;.{..Rec|
|000028a0| 74 09 09 72 65 63 74 3b | 0d 09 0d 09 69 66 28 28 |t..rect;|....if((|
|000028b0| 2a 2a 63 6f 6e 74 72 6f | 6c 29 2e 63 6f 6e 74 72 |**contro|l).contr|
|000028c0| 6c 56 69 73 29 0d 09 7b | 0d 09 09 2f 2a 20 66 69 |lVis)..{|.../* fi|
|000028d0| 6e 64 20 6f 75 74 20 70 | 6f 72 74 69 6f 6e 20 6f |nd out p|ortion o|
|000028e0| 66 20 74 68 65 20 64 69 | 61 6c 6f 67 20 74 68 65 |f the di|alog the|
|000028f0| 20 70 6f 70 75 70 20 70 | 6f 72 74 69 6f 6e 20 61 | popup p|ortion a|
|00002900| 63 74 75 61 6c 6c 79 0d | 09 09 09 6f 63 63 75 70 |ctually.|...occup|
|00002910| 69 65 73 20 61 6e 64 20 | 63 68 65 63 6b 20 74 6f |ies and |check to|
|00002920| 20 73 65 65 20 69 66 20 | 74 68 65 20 6d 6f 75 73 | see if |the mous|
|00002930| 65 20 69 73 20 69 6e 20 | 69 74 20 2a 2f 0d 09 09 |e is in |it */...|
|00002940| 43 61 6c 63 50 6f 70 55 | 70 52 65 63 74 28 76 61 |CalcPopU|pRect(va|
|00002950| 72 63 6f 64 65 2c 20 63 | 6f 6e 74 72 6f 6c 2c 20 |rcode, c|ontrol, |
|00002960| 26 72 65 63 74 29 3b 0d | 09 09 2d 2d 72 65 63 74 |&rect);.|..--rect|
|00002970| 2e 62 6f 74 74 6f 6d 3b | 09 09 2f 2a 20 66 69 78 |.bottom;|../* fix|
|00002980| 20 6c 69 74 74 6c 65 20 | 62 75 67 67 79 73 2c 20 | little |buggys, |
|00002990| 74 68 65 20 6b 6c 75 64 | 67 65 20 77 61 79 20 2a |the klud|ge way *|
|000029a0| 2f 0d 09 09 2b 2b 72 65 | 63 74 2e 6c 65 66 74 3b |/...++re|ct.left;|
|000029b0| 0d 09 09 69 66 28 50 74 | 49 6e 52 65 63 74 28 70 |...if(Pt|InRect(p|
|000029c0| 61 72 61 6d 2c 20 26 72 | 65 63 74 29 29 0d 09 09 |aram, &r|ect))...|
|000029d0| 09 72 65 74 75 72 6e 20 | 69 6e 42 75 74 74 6f 6e |.return |inButton|
|000029e0| 3b 0d 09 09 65 6c 73 65 | 0d 09 09 09 72 65 74 75 |;...else|....retu|
|000029f0| 72 6e 20 30 3b 0d 09 7d | 0d 09 09 0d 09 72 65 74 |rn 0;..}|.....ret|
|00002a00| 75 72 6e 20 30 3b 0d 7d | 0d 0d 43 61 6c 63 50 6f |urn 0;.}|..CalcPo|
|00002a10| 70 55 70 28 76 61 72 63 | 6f 64 65 2c 20 63 6f 6e |pUp(varc|ode, con|
|00002a20| 74 72 6f 6c 2c 20 70 61 | 72 61 6d 29 0d 69 6e 74 |trol, pa|ram).int|
|00002a30| 09 09 09 09 76 61 72 63 | 6f 64 65 3b 0d 43 6f 6e |....varc|ode;.Con|
|00002a40| 74 72 6f 6c 48 61 6e 64 | 6c 65 09 63 6f 6e 74 72 |trolHand|le.contr|
|00002a50| 6f 6c 3b 0d 52 67 6e 48 | 61 6e 64 6c 65 09 09 70 |ol;.RgnH|andle..p|
|00002a60| 61 72 61 6d 3b 0d 7b 0d | 09 52 65 63 74 09 09 72 |aram;.{.|.Rect..r|
|00002a70| 65 63 74 3b 0d 09 0d 09 | 2f 2a 20 72 65 63 6f 6d |ect;....|/* recom|
|00002a80| 6d 65 6e 64 65 64 20 77 | 61 79 20 74 6f 20 63 6c |mended w|ay to cl|
|00002a90| 65 61 72 20 62 79 74 65 | 20 64 65 73 63 72 69 62 |ear byte| describ|
|00002aa0| 65 64 20 6f 6e 20 49 2d | 33 33 31 20 2d 20 49 20 |ed on I-|331 - I |
|00002ab0| 64 6f 6e 27 74 20 6b 6e | 6f 77 20 77 68 65 72 65 |don't kn|ow where|
|00002ac0| 0d 09 09 49 20 73 61 77 | 20 77 68 79 20 74 6f 20 |...I saw| why to |
|00002ad0| 63 6c 65 61 72 20 6f 6e | 6c 79 20 74 68 65 20 68 |clear on|ly the h|
|00002ae0| 69 67 68 20 62 69 74 20 | 2a 2f 0d 09 70 61 72 61 |igh bit |*/..para|
|00002af0| 6d 20 3d 20 28 52 67 6e | 48 61 6e 64 6c 65 29 20 |m = (Rgn|Handle) |
|00002b00| 28 28 6c 6f 6e 67 29 70 | 61 72 61 6d 20 26 20 30 |((long)p|aram & 0|
|00002b10| 78 37 66 66 66 66 66 66 | 66 29 3b 0d 09 0d 09 43 |x7ffffff|f);....C|
|00002b20| 61 6c 63 50 6f 70 55 70 | 52 65 63 74 28 76 61 72 |alcPopUp|Rect(var|
|00002b30| 63 6f 64 65 2c 20 63 6f | 6e 74 72 6f 6c 2c 20 26 |code, co|ntrol, &|
|00002b40| 72 65 63 74 29 3b 0d 09 | 52 65 63 74 52 67 6e 28 |rect);..|RectRgn(|
|00002b50| 70 61 72 61 6d 2c 20 26 | 28 2a 2a 63 6f 6e 74 72 |param, &|(**contr|
|00002b60| 6f 6c 29 2e 63 6f 6e 74 | 72 6c 52 65 63 74 29 3b |ol).cont|rlRect);|
|00002b70| 0d 7d 0d 0d 4e 65 77 43 | 61 6c 63 50 6f 70 55 70 |.}..NewC|alcPopUp|
|00002b80| 28 76 61 72 63 6f 64 65 | 2c 20 63 6f 6e 74 72 6f |(varcode|, contro|
|00002b90| 6c 2c 20 70 61 72 61 6d | 29 0d 69 6e 74 09 09 09 |l, param|).int...|
|00002ba0| 09 76 61 72 63 6f 64 65 | 3b 0d 43 6f 6e 74 72 6f |.varcode|;.Contro|
|00002bb0| 6c 48 61 6e 64 6c 65 09 | 63 6f 6e 74 72 6f 6c 3b |lHandle.|control;|
|00002bc0| 0d 52 67 6e 48 61 6e 64 | 6c 65 09 09 70 61 72 61 |.RgnHand|le..para|
|00002bd0| 6d 3b 0d 7b 0d 09 52 65 | 63 74 09 09 72 65 63 74 |m;.{..Re|ct..rect|
|00002be0| 3b 0d 09 0d 09 43 61 6c | 63 50 6f 70 55 70 52 65 |;....Cal|cPopUpRe|
|00002bf0| 63 74 28 76 61 72 63 6f | 64 65 2c 20 63 6f 6e 74 |ct(varco|de, cont|
|00002c00| 72 6f 6c 2c 20 26 72 65 | 63 74 29 3b 0d 09 52 65 |rol, &re|ct);..Re|
|00002c10| 63 74 52 67 6e 28 70 61 | 72 61 6d 2c 20 26 28 2a |ctRgn(pa|ram, &(*|
|00002c20| 2a 63 6f 6e 74 72 6f 6c | 29 2e 63 6f 6e 74 72 6c |*control|).contrl|
|00002c30| 52 65 63 74 29 3b 0d 7d | 0d 0d 50 72 65 70 61 72 |Rect);.}|..Prepar|
|00002c40| 65 54 72 61 63 6b 69 6e | 67 28 43 6f 6e 74 72 6f |eTrackin|g(Contro|
|00002c50| 6c 48 61 6e 64 6c 65 20 | 63 6f 6e 74 72 6f 6c 29 |lHandle |control)|
|00002c60| 0d 7b 0d 09 6e 6f 64 72 | 61 77 73 20 3d 20 32 3b |.{..nodr|aws = 2;|
|00002c70| 0d 7d 0d 0d 49 6e 73 74 | 61 6c 6c 54 43 50 61 74 |.}..Inst|allTCPat|
|00002c80| 63 68 28 29 0d 7b 0d 09 | 50 74 72 09 09 70 61 74 |ch().{..|Ptr..pat|
|00002c90| 63 68 3b 0d 09 0d 09 6f | 6c 64 54 72 61 63 6b 43 |ch;....o|ldTrackC|
|00002ca0| 6e 74 6c 41 64 64 72 20 | 3d 20 4e 47 65 74 54 72 |ntlAddr |= NGetTr|
|00002cb0| 61 70 41 64 64 72 65 73 | 73 28 30 78 61 39 36 38 |apAddres|s(0xa968|
|00002cc0| 2c 20 54 6f 6f 6c 54 72 | 61 70 29 3b 09 2f 2a 20 |, ToolTr|ap);./* |
|00002cd0| 74 72 61 63 6b 63 6f 6e | 74 72 6f 6c 20 2a 2f 0d |trackcon|trol */.|
|00002ce0| 09 0d 09 61 73 6d 20 7b | 0d 09 09 6c 65 61 09 09 |...asm {|...lea..|
|00002cf0| 40 72 65 61 6c 2c 61 30 | 09 09 09 09 2f 2a 20 66 |@real,a0|..../* f|
|00002d00| 69 6c 6c 20 69 6e 20 76 | 61 6c 75 65 73 20 2a 2f |ill in v|alues */|
|00002d10| 0d 09 09 6d 6f 76 65 2e | 6c 09 6f 6c 64 54 72 61 |...move.|l.oldTra|
|00002d20| 63 6b 43 6e 74 6c 41 64 | 64 72 2c 28 61 30 29 0d |ckCntlAd|dr,(a0).|
|00002d30| 09 09 0d 09 09 6c 65 61 | 09 09 40 63 64 65 66 2c |.....lea|..@cdef,|
|00002d40| 61 30 0d 09 09 6d 6f 76 | 65 2e 6c 09 70 6f 70 75 |a0...mov|e.l.popu|
|00002d50| 70 43 44 45 46 2c 28 61 | 30 29 0d 09 09 0d 09 09 |pCDEF,(a|0)......|
|00002d60| 6c 65 61 09 09 40 65 6e | 64 70 61 74 63 68 2c 61 |lea..@en|dpatch,a|
|00002d70| 31 09 09 2f 2a 20 6d 61 | 6b 65 20 61 20 70 74 72 |1../* ma|ke a ptr|
|00002d80| 20 66 6f 72 20 6f 75 72 | 20 70 61 74 63 68 20 2a | for our| patch *|
|00002d90| 2f 0d 09 09 6c 65 61 09 | 09 40 73 74 70 61 74 63 |/...lea.|.@stpatc|
|00002da0| 68 2c 61 32 0d 09 09 73 | 75 62 61 2e 6c 09 61 32 |h,a2...s|uba.l.a2|
|00002db0| 2c 61 31 0d 09 09 6d 6f | 76 65 2e 6c 09 61 31 2c |,a1...mo|ve.l.a1,|
|00002dc0| 64 30 0d 09 09 5f 4e 65 | 77 50 74 72 0d 09 09 74 |d0..._Ne|wPtr...t|
|00002dd0| 73 74 09 09 64 30 0d 09 | 09 62 6e 65 09 09 40 6e |st..d0..|.bne..@n|
|00002de0| 6f 70 61 74 63 68 0d 09 | 09 0d 09 09 6d 6f 76 65 |opatch..|....move|
|00002df0| 2e 6c 09 61 30 2c 74 72 | 61 63 6b 70 61 74 63 68 |.l.a0,tr|ackpatch|
|00002e00| 09 09 2f 2a 20 6f 75 72 | 20 70 61 74 63 68 20 2a |../* our| patch *|
|00002e10| 2f 0d 09 09 6d 6f 76 65 | 2e 6c 09 61 31 2c 64 30 |/...move|.l.a1,d0|
|00002e20| 09 09 09 09 2f 2a 20 70 | 74 72 20 73 69 7a 65 20 |..../* p|tr size |
|00002e30| 2a 2f 0d 09 09 6d 6f 76 | 65 2e 6c 09 61 30 2c 61 |*/...mov|e.l.a0,a|
|00002e40| 31 0d 09 09 0d 09 09 6c | 65 61 09 09 40 73 74 70 |1......l|ea..@stp|
|00002e50| 61 74 63 68 2c 61 30 09 | 09 09 2f 2a 20 6d 6f 76 |atch,a0.|../* mov|
|00002e60| 65 20 6f 75 72 20 70 61 | 74 63 68 20 69 6e 74 6f |e our pa|tch into|
|00002e70| 20 61 20 70 74 72 20 2a | 2f 0d 09 09 5f 42 6c 6f | a ptr *|/..._Blo|
|00002e80| 63 6b 4d 6f 76 65 0d 09 | 7d 0d 09 0d 09 4e 53 65 |ckMove..|}....NSe|
|00002e90| 74 54 72 61 70 41 64 64 | 72 65 73 73 28 28 6c 6f |tTrapAdd|ress((lo|
|00002ea0| 6e 67 29 74 72 61 63 6b | 70 61 74 63 68 2c 20 30 |ng)track|patch, 0|
|00002eb0| 78 61 39 36 38 2c 20 54 | 6f 6f 6c 54 72 61 70 29 |xa968, T|oolTrap)|
|00002ec0| 3b 0d 6e 6f 70 61 74 63 | 68 3a 0d 09 72 65 74 75 |;.nopatc|h:..retu|
|00002ed0| 72 6e 3b 0d 09 0d 09 2f | 2a 20 54 72 61 63 6b 43 |rn;..../|* TrackC|
|00002ee0| 6f 6e 74 72 6f 6c 28 43 | 6f 6e 74 72 6f 6c 48 61 |ontrol(C|ontrolHa|
|00002ef0| 6e 64 6c 65 20 63 74 6c | 2c 20 50 6f 69 6e 74 20 |ndle ctl|, Point |
|00002f00| 70 74 2c 20 50 72 6f 63 | 50 74 72 20 61 63 74 69 |pt, Proc|Ptr acti|
|00002f10| 6f 6e 29 3b 20 2a 2f 0d | 09 0d 09 61 73 6d 20 7b |on); */.|...asm {|
|00002f20| 0d 40 73 74 70 61 74 63 | 68 0d 09 09 6c 69 6e 6b |.@stpatc|h...link|
|00002f30| 09 61 36 2c 23 30 09 09 | 09 2f 2a 20 73 61 76 65 |.a6,#0..|./* save|
|00002f40| 20 65 76 65 72 79 74 68 | 69 6e 67 20 77 65 20 6d | everyth|ing we m|
|00002f50| 69 67 68 74 20 63 68 61 | 6e 67 65 20 2a 2f 0d 09 |ight cha|nge */..|
|00002f60| 09 6d 6f 76 65 6d 2e 6c | 09 64 30 2f 61 30 2d 61 |.movem.l|.d0/a0-a|
|00002f70| 35 2c 2d 28 73 70 29 0d | 09 09 0d 09 09 62 72 61 |5,-(sp).|.....bra|
|00002f80| 09 09 40 31 0d 40 63 64 | 65 66 09 64 63 2e 6c 09 |..@1.@cd|ef.dc.l.|
|00002f90| 31 09 09 09 09 2f 2a 20 | 63 64 65 66 20 68 61 6e |1..../* |cdef han|
|00002fa0| 64 6c 65 20 2a 2f 0d 40 | 31 09 09 6d 6f 76 65 2e |dle */.@|1..move.|
|00002fb0| 6c 09 40 63 64 65 66 2c | 61 30 0d 09 09 6d 6f 76 |l.@cdef,|a0...mov|
|00002fc0| 65 2e 6c 09 61 30 2c 64 | 30 0d 09 09 5f 53 74 72 |e.l.a0,d|0..._Str|
|00002fd0| 69 70 41 64 64 72 65 73 | 73 0d 09 09 6d 6f 76 65 |ipAddres|s...move|
|00002fe0| 2e 6c 09 64 30 2c 64 31 | 0d 09 09 0d 09 09 6d 6f |.l.d0,d1|......mo|
|00002ff0| 76 65 2e 6c 09 30 78 31 | 30 28 61 36 29 2c 61 31 |ve.l.0x1|0(a6),a1|
|00003000| 09 09 2f 2a 20 74 68 65 | 20 43 4e 54 4c 20 2a 2f |../* the| CNTL */|
|00003010| 0d 09 09 6d 6f 76 65 2e | 6c 09 28 61 31 29 2c 61 |...move.|l.(a1),a|
|00003020| 31 0d 09 09 6d 6f 76 65 | 2e 6c 09 6f 66 66 73 65 |1...move|.l.offse|
|00003030| 74 28 43 6f 6e 74 72 6f | 6c 52 65 63 6f 72 64 2c |t(Contro|lRecord,|
|00003040| 20 63 6f 6e 74 72 6c 44 | 65 66 50 72 6f 63 29 28 | contrlD|efProc)(|
|00003050| 61 31 29 2c 61 31 0d 09 | 09 6d 6f 76 65 2e 6c 09 |a1),a1..|.move.l.|
|00003060| 61 31 2c 64 30 0d 09 09 | 5f 53 74 72 69 70 41 64 |a1,d0...|_StripAd|
|00003070| 64 72 65 73 73 0d 09 09 | 0d 09 09 63 6d 70 2e 6c |dress...|...cmp.l|
|00003080| 09 64 30 2c 64 31 09 09 | 09 2f 2a 20 63 6f 6d 70 |.d0,d1..|./* comp|
|00003090| 61 72 65 20 6f 75 72 20 | 61 6e 64 20 74 68 65 20 |are our |and the |
|000030a0| 43 4e 54 4c 27 73 20 64 | 65 66 70 72 6f 63 20 2a |CNTL's d|efproc *|
|000030b0| 2f 0d 09 09 62 6e 65 09 | 09 40 73 6b 69 70 0d 09 |/...bne.|.@skip..|
|000030c0| 09 0d 09 09 6d 6f 76 65 | 2e 6c 09 61 30 2c 2d 28 |....move|.l.a0,-(|
|000030d0| 73 70 29 0d 09 09 5f 4c | 6f 61 64 52 65 73 6f 75 |sp)..._L|oadResou|
|000030e0| 72 63 65 09 09 09 2f 2a | 20 69 66 20 77 65 20 67 |rce.../*| if we g|
|000030f0| 6f 74 20 68 65 72 65 20 | 69 74 20 68 61 73 20 74 |ot here |it has t|
|00003100| 6f 20 62 65 20 76 61 6c | 69 64 21 20 2a 2f 0d 09 |o be val|id! */..|
|00003110| 09 5f 48 4e 6f 50 75 72 | 67 65 0d 09 09 5f 48 4c |._HNoPur|ge..._HL|
|00003120| 6f 63 6b 0d 09 09 74 73 | 74 09 09 64 30 0d 09 09 |ock...ts|t..d0...|
|00003130| 62 6e 65 09 09 40 73 6b | 69 70 0d 09 09 0d 09 09 |bne..@sk|ip......|
|00003140| 6d 6f 76 65 2e 6c 09 28 | 61 30 29 2c 61 30 0d 09 |move.l.(|a0),a0..|
|00003150| 09 0d 2f 2a 20 50 6f 70 | 75 70 4d 65 6e 75 28 73 |../* Pop|upMenu(s|
|00003160| 68 6f 72 74 20 76 61 72 | 63 6f 64 65 2c 20 43 6f |hort var|code, Co|
|00003170| 6e 74 72 6f 6c 48 61 6e | 64 6c 65 20 63 6f 6e 74 |ntrolHan|dle cont|
|00003180| 72 6f 6c 2c 20 73 68 6f | 72 74 20 6d 65 73 73 61 |rol, sho|rt messa|
|00003190| 67 65 2c 20 6c 6f 6e 67 | 20 70 61 72 61 6d 29 20 |ge, long| param) |
|000031a0| 2a 2f 0d 09 09 73 75 62 | 71 09 23 36 2c 73 70 09 |*/...sub|q.#6,sp.|
|000031b0| 09 09 2f 2a 20 72 6f 6f | 6d 20 66 6f 72 20 72 65 |../* roo|m for re|
|000031c0| 74 75 72 6e 20 6c 6f 6e | 67 20 74 6f 6f 20 2a 2f |turn lon|g too */|
|000031d0| 0d 09 09 63 6c 72 2e 6c | 09 2d 28 73 70 29 0d 09 |...clr.l|.-(sp)..|
|000031e0| 09 6d 6f 76 65 2e 77 09 | 23 30 78 38 30 2c 2d 28 |.move.w.|#0x80,-(|
|000031f0| 73 70 29 09 09 2f 2a 20 | 6d 65 73 73 61 67 65 23 |sp)../* |message#|
|00003200| 20 2a 2f 0d 09 09 73 75 | 62 71 09 23 34 2c 73 70 | */...su|bq.#4,sp|
|00003210| 0d 09 09 6a 73 72 09 09 | 28 61 30 29 09 09 09 2f |...jsr..|(a0).../|
|00003220| 2a 20 63 61 6c 6c 20 6f | 75 72 20 43 44 45 46 20 |* call o|ur CDEF |
|00003230| 2a 2f 0d 09 09 61 64 64 | 71 09 23 34 2c 73 70 09 |*/...add|q.#4,sp.|
|00003240| 09 09 2f 2a 20 70 6f 70 | 20 72 65 74 75 72 6e 20 |../* pop| return |
|00003250| 76 61 6c 75 65 20 2a 2f | 0d 09 09 0d 09 09 6d 6f |value */|......mo|
|00003260| 76 65 2e 6c 09 40 63 64 | 65 66 2c 61 30 0d 09 09 |ve.l.@cd|ef,a0...|
|00003270| 5f 48 55 6e 6c 6f 63 6b | 0d 09 09 5f 48 50 75 72 |_HUnlock|..._HPur|
|00003280| 67 65 0d 09 09 0d 40 73 | 6b 69 70 09 6d 6f 76 65 |ge....@s|kip.move|
|00003290| 6d 2e 6c 09 28 73 70 29 | 2b 2c 64 30 2f 61 30 2d |m.l.(sp)|+,d0/a0-|
|000032a0| 61 35 0d 09 09 75 6e 6c | 6b 09 61 36 0d 09 09 62 |a5...unl|k.a6...b|
|000032b0| 72 61 09 09 40 32 0d 40 | 72 65 61 6c 09 64 63 2e |ra..@2.@|real.dc.|
|000032c0| 6c 09 31 09 09 09 09 2f | 2a 20 72 65 61 6c 20 74 |l.1..../|* real t|
|000032d0| 72 61 70 20 61 64 64 72 | 65 73 73 20 2a 2f 0d 40 |rap addr|ess */.@|
|000032e0| 32 09 09 6d 6f 76 65 2e | 6c 09 40 72 65 61 6c 2c |2..move.|l.@real,|
|000032f0| 2d 28 73 70 29 0d 09 09 | 72 74 73 0d 40 65 6e 64 |-(sp)...|rts.@end|
|00003300| 70 61 74 63 68 0d 09 7d | 0d 7d 0d 0d 53 75 62 73 |patch..}|.}..Subs|
|00003310| 63 72 69 62 65 4d 48 28 | 4d 65 6e 75 48 61 6e 64 |cribeMH(|MenuHand|
|00003320| 6c 65 20 6d 68 29 0d 7b | 0d 09 75 6c 6f 6e 67 09 |le mh).{|..ulong.|
|00003330| 63 6f 75 6e 74 65 72 3b | 0d 09 0d 09 69 66 20 28 |counter;|....if (|
|00003340| 28 28 63 68 61 72 2a 29 | 26 28 2a 2a 6d 68 29 2e |((char*)|&(**mh).|
|00003350| 6d 65 6e 75 44 61 74 61 | 29 5b 30 5d 20 21 3d 20 |menuData|)[0] != |
|00003360| 32 29 20 7b 0d 09 09 63 | 6f 75 6e 74 65 72 20 3d |2) {...c|ounter =|
|00003370| 20 30 78 30 32 30 30 30 | 30 30 30 3b 0d 09 09 4d | 0x02000|000;...M|
|00003380| 75 6e 67 65 72 28 6d 68 | 2c 20 28 6c 6f 6e 67 29 |unger(mh|, (long)|
|00003390| 20 26 28 28 4d 65 6e 75 | 49 6e 66 6f 2a 29 30 29 | &((Menu|Info*)0)|
|000033a0| 2d 3e 6d 65 6e 75 44 61 | 74 61 2c 0d 09 09 09 26 |->menuDa|ta,....&|
|000033b0| 28 2a 2a 6d 68 29 2e 6d | 65 6e 75 44 61 74 61 2c |(**mh).m|enuData,|
|000033c0| 20 2a 28 63 68 61 72 2a | 29 28 26 28 2a 2a 6d 68 | *(char*|)(&(**mh|
|000033d0| 29 2e 6d 65 6e 75 44 61 | 74 61 29 2b 31 2c 20 26 |).menuDa|ta)+1, &|
|000033e0| 63 6f 75 6e 74 65 72 2c | 20 33 29 3b 0d 09 09 49 |counter,| 3);...I|
|000033f0| 6e 73 65 72 74 4d 65 6e | 75 28 6d 68 2c 20 68 69 |nsertMen|u(mh, hi|
|00003400| 65 72 4d 65 6e 75 29 3b | 0d 09 7d 0d 09 0d 09 28 |erMenu);|..}....(|
|00003410| 2a 28 69 6e 74 2a 29 28 | 28 63 68 61 72 2a 29 26 |*(int*)(|(char*)&|
|00003420| 28 2a 2a 6d 68 29 2e 6d | 65 6e 75 44 61 74 61 2b |(**mh).m|enuData+|
|00003430| 31 29 29 2b 2b 3b 0d 7d | 0d 0d 4e 65 77 50 6f 70 |1))++;.}|..NewPop|
|00003440| 55 70 28 76 61 72 63 6f | 64 65 2c 20 63 6f 6e 74 |Up(varco|de, cont|
|00003450| 72 6f 6c 2c 20 70 61 72 | 61 6d 29 0d 69 6e 74 09 |rol, par|am).int.|
|00003460| 09 09 09 76 61 72 63 6f | 64 65 3b 0d 43 6f 6e 74 |...varco|de;.Cont|
|00003470| 72 6f 6c 48 61 6e 64 6c | 65 09 63 6f 6e 74 72 6f |rolHandl|e.contro|
|00003480| 6c 3b 0d 6c 6f 6e 67 09 | 09 09 70 61 72 61 6d 3b |l;.long.|..param;|
|00003490| 0d 7b 0d 09 4d 65 6e 75 | 48 61 6e 64 6c 65 09 6d |.{..Menu|Handle.m|
|000034a0| 68 3b 0d 09 50 72 6f 63 | 50 74 72 09 09 72 65 73 |h;..Proc|Ptr..res|
|000034b0| 65 72 72 3b 0d 09 69 6e | 74 09 09 09 69 64 3b 0d |err;..in|t...id;.|
|000034c0| 09 0d 09 69 66 20 28 21 | 6e 75 6d 70 6f 70 75 70 |...if (!|numpopup|
|000034d0| 73 2b 2b 29 0d 09 09 49 | 6e 73 74 61 6c 6c 54 43 |s++)...I|nstallTC|
|000034e0| 50 61 74 63 68 28 29 3b | 0d 09 0d 09 69 66 20 28 |Patch();|....if (|
|000034f0| 28 6d 68 20 3d 20 47 65 | 74 4d 48 61 6e 64 6c 65 |(mh = Ge|tMHandle|
|00003500| 28 28 6c 6f 6e 67 29 20 | 28 2a 2a 63 6f 6e 74 72 |((long) |(**contr|
|00003510| 6f 6c 29 2e 63 6f 6e 74 | 72 6c 52 66 43 6f 6e 29 |ol).cont|rlRfCon)|
|00003520| 29 20 3d 3d 20 30 6c 29 | 20 7b 0d 09 09 72 65 73 |) == 0l)| {...res|
|00003530| 65 72 72 20 3d 20 52 65 | 73 45 72 72 50 72 6f 63 |err = Re|sErrProc|
|00003540| 3b 0d 09 09 52 65 73 45 | 72 72 50 72 6f 63 20 3d |;...ResE|rrProc =|
|00003550| 20 6e 69 6c 3b 09 09 2f | 2a 20 74 65 63 68 6e 6f | nil;../|* techno|
|00003560| 74 65 20 23 37 38 20 2a | 2f 0d 09 09 69 64 20 3d |te #78 *|/...id =|
|00003570| 20 28 69 6e 74 29 20 28 | 2a 2a 63 6f 6e 74 72 6f | (int) (|**contro|
|00003580| 6c 29 2e 63 6f 6e 74 72 | 6c 52 66 43 6f 6e 3b 0d |l).contr|lRfCon;.|
|00003590| 09 09 0d 09 09 69 66 20 | 28 28 6d 68 20 3d 20 28 |.....if |((mh = (|
|000035a0| 4d 65 6e 75 48 61 6e 64 | 6c 65 29 47 65 74 52 65 |MenuHand|le)GetRe|
|000035b0| 73 6f 75 72 63 65 28 27 | 4d 45 4e 55 27 2c 20 69 |source('|MENU', i|
|000035c0| 64 29 29 20 21 3d 20 30 | 6c 29 0d 09 09 09 6d 68 |d)) != 0|l)....mh|
|000035d0| 20 3d 20 47 65 74 4d 65 | 6e 75 28 69 64 29 3b 0d | = GetMe|nu(id);.|
|000035e0| 09 09 0d 09 09 52 65 73 | 45 72 72 50 72 6f 63 20 |.....Res|ErrProc |
|000035f0| 3d 20 72 65 73 65 72 72 | 3b 0d 09 7d 0d 09 69 66 |= reserr|;..}..if|
|00003600| 20 28 6d 68 29 0d 09 09 | 53 75 62 73 63 72 69 62 | (mh)...|Subscrib|
|00003610| 65 4d 48 28 6d 68 29 3b | 0d 09 0d 09 28 2a 2a 63 |eMH(mh);|....(**c|
|00003620| 6f 6e 74 72 6f 6c 29 2e | 63 6f 6e 74 72 6c 44 61 |ontrol).|contrlDa|
|00003630| 74 61 20 3d 20 4e 65 77 | 48 61 6e 64 6c 65 28 73 |ta = New|Handle(s|
|00003640| 69 7a 65 6f 66 28 70 6f | 70 75 70 52 65 63 29 29 |izeof(po|pupRec))|
|00003650| 3b 0d 09 69 66 20 28 28 | 2a 2a 63 6f 6e 74 72 6f |;..if ((|**contro|
|00003660| 6c 29 2e 63 6f 6e 74 72 | 6c 44 61 74 61 20 3d 3d |l).contr|lData ==|
|00003670| 20 6e 69 6c 29 20 7b 0d | 09 09 44 65 62 75 67 53 | nil) {.|..DebugS|
|00003680| 74 72 28 22 5c 70 4f 75 | 74 20 6f 66 20 6d 65 6d |tr("\pOu|t of mem|
|00003690| 6f 72 79 21 22 29 3b 0d | 09 09 72 65 74 75 72 6e |ory!");.|..return|
|000036a0| 3b 0d 09 7d 0d 09 0d 09 | 74 68 65 6d 68 20 3d 20 |;..}....|themh = |
|000036b0| 6d 68 3b 0d 09 0d 09 48 | 4c 6f 63 6b 28 63 6f 6e |mh;....H|Lock(con|
|000036c0| 74 72 6f 6c 29 3b 0d 09 | 53 65 74 52 65 63 74 28 |trol);..|SetRect(|
|000036d0| 26 4c 61 73 74 44 72 61 | 77 52 65 63 74 2c 20 30 |&LastDra|wRect, 0|
|000036e0| 2c 30 2c 30 2c 30 29 3b | 0d 09 48 55 6e 6c 6f 63 |,0,0,0);|..HUnloc|
|000036f0| 6b 28 63 6f 6e 74 72 6f | 6c 29 3b 0d 09 0d 09 28 |k(contro|l);....(|
|00003700| 2a 2a 63 6f 6e 74 72 6f | 6c 29 2e 63 6f 6e 74 72 |**contro|l).contr|
|00003710| 6c 41 63 74 69 6f 6e 20 | 3d 20 28 50 72 6f 63 50 |lAction |= (ProcP|
|00003720| 74 72 29 20 2d 31 3b 0d | 09 0d 09 69 66 20 28 6d |tr) -1;.|...if (m|
|00003730| 68 29 20 7b 0d 09 09 2f | 2a 20 6d 61 6b 65 20 73 |h) {.../|* make s|
|00003740| 75 72 65 20 74 68 65 20 | 63 6f 6e 74 72 6f 6c 20 |ure the |control |
|00003750| 76 61 6c 75 65 20 69 73 | 20 77 69 74 68 69 6e 20 |value is| within |
|00003760| 62 6f 75 6e 64 73 20 62 | 79 20 72 65 73 65 74 74 |bounds b|y resett|
|00003770| 69 6e 67 20 69 74 20 2a | 2f 0d 09 09 28 2a 2a 63 |ing it *|/...(**c|
|00003780| 6f 6e 74 72 6f 6c 29 2e | 63 6f 6e 74 72 6c 56 61 |ontrol).|contrlVa|
|00003790| 6c 75 65 20 3d 20 31 3b | 0d 09 09 28 2a 2a 63 6f |lue = 1;|...(**co|
|000037a0| 6e 74 72 6f 6c 29 2e 63 | 6f 6e 74 72 6c 4d 69 6e |ntrol).c|ontrlMin|
|000037b0| 20 3d 20 31 3b 0d 09 09 | 28 2a 2a 63 6f 6e 74 72 | = 1;...|(**contr|
|000037c0| 6f 6c 29 2e 63 6f 6e 74 | 72 6c 4d 61 78 20 3d 20 |ol).cont|rlMax = |
|000037d0| 6d 61 78 69 6e 74 3b 09 | 09 2f 2a 20 6c 65 74 20 |maxint;.|./* let |
|000037e0| 74 68 65 20 75 73 65 72 | 20 64 6f 20 63 6c 69 70 |the user| do clip|
|000037f0| 70 69 6e 67 20 2a 2f 0d | 09 7d 0d 7d 0d 0d 44 69 |ping */.|.}.}..Di|
|00003800| 73 70 50 6f 70 55 70 28 | 76 61 72 63 6f 64 65 2c |spPopUp(|varcode,|
|00003810| 20 63 6f 6e 74 72 6f 6c | 2c 20 70 61 72 61 6d 29 | control|, param)|
|00003820| 0d 69 6e 74 09 09 09 09 | 76 61 72 63 6f 64 65 3b |.int....|varcode;|
|00003830| 0d 43 6f 6e 74 72 6f 6c | 48 61 6e 64 6c 65 09 63 |.Control|Handle.c|
|00003840| 6f 6e 74 72 6f 6c 3b 0d | 6c 6f 6e 67 09 09 09 70 |ontrol;.|long...p|
|00003850| 61 72 61 6d 3b 0d 7b 0d | 09 4d 65 6e 75 48 61 6e |aram;.{.|.MenuHan|
|00003860| 64 6c 65 09 6d 68 3b 0d | 09 0d 09 69 66 28 28 6d |dle.mh;.|...if((m|
|00003870| 68 20 3d 20 47 65 74 4d | 65 6e 75 48 61 6e 64 6c |h = GetM|enuHandl|
|00003880| 65 28 63 6f 6e 74 72 6f | 6c 29 29 20 21 3d 20 30 |e(contro|l)) != 0|
|00003890| 29 20 7b 0d 09 09 69 66 | 20 28 2d 2d 2a 28 69 6e |) {...if| (--*(in|
|000038a0| 74 2a 29 28 28 63 68 61 | 72 2a 29 26 28 2a 2a 6d |t*)((cha|r*)&(**m|
|000038b0| 68 29 2e 6d 65 6e 75 44 | 61 74 61 2b 31 29 20 3d |h).menuD|ata+1) =|
|000038c0| 3d 20 30 29 20 7b 0d 09 | 09 09 44 65 6c 65 74 65 |= 0) {..|..Delete|
|000038d0| 4d 65 6e 75 28 28 2a 2a | 6d 68 29 2e 6d 65 6e 75 |Menu((**|mh).menu|
|000038e0| 49 44 29 3b 0d 09 09 09 | 44 69 73 70 6f 73 65 4d |ID);....|DisposeM|
|000038f0| 65 6e 75 28 6d 68 29 3b | 0d 09 09 7d 0d 09 7d 0d |enu(mh);|...}..}.|
|00003900| 09 0d 09 69 66 20 28 21 | 20 2d 2d 6e 75 6d 70 6f |...if (!| --numpo|
|00003910| 70 75 70 73 29 20 7b 0d | 09 09 4e 53 65 74 54 72 |pups) {.|..NSetTr|
|00003920| 61 70 41 64 64 72 65 73 | 73 28 28 6c 6f 6e 67 29 |apAddres|s((long)|
|00003930| 6f 6c 64 54 72 61 63 6b | 43 6e 74 6c 41 64 64 72 |oldTrack|CntlAddr|
|00003940| 2c 20 30 78 61 39 36 38 | 2c 20 54 6f 6f 6c 54 72 |, 0xa968|, ToolTr|
|00003950| 61 70 29 3b 0d 09 09 44 | 69 73 70 6f 73 50 74 72 |ap);...D|isposPtr|
|00003960| 28 74 72 61 63 6b 70 61 | 74 63 68 29 3b 0d 09 7d |(trackpa|tch);..}|
|00003970| 0d 09 0d 09 44 69 73 70 | 6f 73 48 61 6e 64 6c 65 |....Disp|osHandle|
|00003980| 28 28 2a 2a 63 6f 6e 74 | 72 6f 6c 29 2e 63 6f 6e |((**cont|rol).con|
|00003990| 74 72 6c 44 61 74 61 29 | 3b 0d 7d 0d 0d 2f 2a 20 |trlData)|;.}../* |
|000039a0| 74 68 65 20 63 6f 6e 74 | 72 6f 6c 20 68 61 73 20 |the cont|rol has |
|000039b0| 62 65 65 6e 20 63 6c 69 | 63 6b 65 64 20 69 6e 20 |been cli|cked in |
|000039c0| 61 6e 64 20 6e 65 65 64 | 73 20 74 6f 20 62 65 20 |and need|s to be |
|000039d0| 64 72 61 67 67 65 64 2c | 0d 09 74 68 65 20 73 70 |dragged,|..the sp|
|000039e0| 65 63 69 61 6c 20 63 61 | 73 65 20 68 65 72 65 20 |ecial ca|se here |
|000039f0| 69 73 20 74 68 61 74 20 | 69 66 20 70 61 72 61 6d |is that |if param|
|00003a00| 20 69 73 20 30 20 74 68 | 65 20 63 6f 6e 74 72 6f | is 0 th|e contro|
|00003a10| 6c 0d 09 6d 61 6e 61 67 | 65 72 20 77 61 6e 74 73 |l..manag|er wants|
|00003a20| 20 74 68 65 20 77 68 6f | 6c 65 20 63 6f 6e 74 72 | the who|le contr|
|00003a30| 6f 6c 20 64 72 61 67 67 | 65 64 20 28 66 6f 72 20 |ol dragg|ed (for |
|00003a40| 69 6e 73 74 61 6e 63 65 | 0d 09 62 79 20 52 65 73 |instance|..by Res|
|00003a50| 45 64 69 74 29 20 61 6e | 64 20 77 65 20 64 6f 6e |Edit) an|d we don|
|00003a60| 27 74 20 6d 75 63 6b 20 | 77 69 74 68 20 74 68 61 |'t muck |with tha|
|00003a70| 74 2c 20 6a 75 73 74 20 | 6c 65 74 20 74 68 65 0d |t, just |let the.|
|00003a80| 09 63 6f 6e 74 72 6f 6c | 20 6d 61 6e 61 67 65 72 |.control| manager|
|00003a90| 20 68 61 6e 64 6c 65 20 | 69 74 20 2a 2f 0d 6c 6f | handle |it */.lo|
|00003aa0| 6e 67 20 44 72 61 67 50 | 6f 70 55 70 28 76 61 72 |ng DragP|opUp(var|
|00003ab0| 63 6f 64 65 2c 20 63 6f | 6e 74 72 6f 6c 2c 20 70 |code, co|ntrol, p|
|00003ac0| 61 72 61 6d 29 0d 69 6e | 74 09 09 09 09 76 61 72 |aram).in|t....var|
|00003ad0| 63 6f 64 65 3b 0d 43 6f | 6e 74 72 6f 6c 48 61 6e |code;.Co|ntrolHan|
|00003ae0| 64 6c 65 09 63 6f 6e 74 | 72 6f 6c 3b 0d 6c 6f 6e |dle.cont|rol;.lon|
|00003af0| 67 09 09 09 70 61 72 61 | 6d 3b 0d 7b 0d 09 6c 6f |g...para|m;.{..lo|
|00003b00| 6e 67 09 09 6d 65 6e 75 | 2c 20 63 6f 75 6e 74 3b |ng..menu|, count;|
|00003b10| 0d 09 52 65 63 74 09 09 | 72 65 63 74 2c 20 69 6e |..Rect..|rect, in|
|00003b20| 76 65 72 74 3b 0d 09 4d | 65 6e 75 48 61 6e 64 6c |vert;..M|enuHandl|
|00003b30| 65 09 6d 68 3b 0d 09 69 | 6e 74 09 09 09 73 61 76 |e.mh;..i|nt...sav|
|00003b40| 65 3b 0d 0d 09 69 66 20 | 28 21 70 61 72 61 6d 29 |e;...if |(!param)|
|00003b50| 09 09 09 09 2f 2a 20 69 | 66 20 64 72 61 67 20 77 |..../* i|f drag w|
|00003b60| 68 6f 6c 65 20 63 6f 6e | 74 72 6f 6c 2c 20 6c 65 |hole con|trol, le|
|00003b70| 74 20 63 6f 6e 74 72 6f | 6c 20 6d 61 6e 61 67 65 |t contro|l manage|
|00003b80| 72 20 64 6f 20 69 74 20 | 2a 2f 0d 09 7b 0d 09 09 |r do it |*/..{...|
|00003b90| 72 65 74 75 72 6e 20 30 | 3b 0d 09 7d 0d 09 0d 09 |return 0|;..}....|
|00003ba0| 2f 2a 20 67 65 74 20 74 | 68 65 20 6d 65 6e 75 20 |/* get t|he menu |
|00003bb0| 68 61 6e 64 6c 65 20 66 | 6f 72 20 6f 75 72 20 6d |handle f|or our m|
|00003bc0| 65 6e 75 2e 20 20 49 66 | 20 77 65 20 64 6f 6e 27 |enu. If| we don'|
|00003bd0| 74 20 68 61 76 65 20 61 | 20 6d 65 6e 75 0d 09 09 |t have a| menu...|
|00003be0| 74 68 65 72 65 27 73 20 | 6e 6f 74 20 6d 75 63 68 |there's |not much|
|00003bf0| 20 65 6c 73 65 20 77 65 | 20 63 61 6e 20 64 6f 20 | else we| can do |
|00003c00| 2a 2f 0d 09 69 66 28 6d | 68 20 3d 20 47 65 74 4d |*/..if(m|h = GetM|
|00003c10| 65 6e 75 48 61 6e 64 6c | 65 28 63 6f 6e 74 72 6f |enuHandl|e(contro|
|00003c20| 6c 29 29 0d 09 7b 0d 09 | 09 69 66 20 28 28 2a 2a |l))..{..|.if ((**|
|00003c30| 63 6f 6e 74 72 6f 6c 29 | 2e 63 6f 6e 74 72 6c 56 |control)|.contrlV|
|00003c40| 61 6c 75 65 20 3c 20 31 | 20 7c 7c 20 28 2a 2a 63 |alue < 1| || (**c|
|00003c50| 6f 6e 74 72 6f 6c 29 2e | 63 6f 6e 74 72 6c 56 61 |ontrol).|contrlVa|
|00003c60| 6c 75 65 20 3e 0d 09 09 | 09 09 43 6f 75 6e 74 4d |lue >...|..CountM|
|00003c70| 49 74 65 6d 73 28 6d 68 | 29 29 0d 09 09 09 28 2a |Items(mh|))....(*|
|00003c80| 2a 63 6f 6e 74 72 6f 6c | 29 2e 63 6f 6e 74 72 6c |*control|).contrl|
|00003c90| 56 61 6c 75 65 20 3d 20 | 31 3b 0d 09 09 0d 09 09 |Value = |1;......|
|00003ca0| 69 66 20 28 21 28 76 61 | 72 63 6f 64 65 20 2f 20 |if (!(va|rcode / |
|00003cb0| 32 29 29 20 7b 0d 09 09 | 09 2f 2a 20 65 72 61 73 |2)) {...|./* eras|
|00003cc0| 65 20 61 6c 6c 20 70 72 | 69 6f 72 20 63 68 65 63 |e all pr|ior chec|
|00003cd0| 6b 6d 61 72 6b 73 20 61 | 6e 64 20 63 68 65 63 6b |kmarks a|nd check|
|00003ce0| 20 74 68 65 20 72 69 67 | 68 74 20 6f 6e 65 20 2a | the rig|ht one *|
|00003cf0| 2f 0d 09 09 09 66 6f 72 | 20 28 73 61 76 65 3d 31 |/....for| (save=1|
|00003d00| 3b 20 73 61 76 65 20 3c | 3d 20 43 6f 75 6e 74 4d |; save <|= CountM|
|00003d10| 49 74 65 6d 73 28 6d 68 | 29 3b 20 73 61 76 65 2b |Items(mh|); save+|
|00003d20| 2b 29 0d 09 09 09 09 43 | 68 65 63 6b 49 74 65 6d |+).....C|heckItem|
|00003d30| 28 6d 68 2c 20 73 61 76 | 65 2c 20 66 61 6c 73 65 |(mh, sav|e, false|
|00003d40| 29 3b 0d 09 09 09 43 68 | 65 63 6b 49 74 65 6d 28 |);....Ch|eckItem(|
|00003d50| 6d 68 2c 20 28 2a 2a 63 | 6f 6e 74 72 6f 6c 29 2e |mh, (**c|ontrol).|
|00003d60| 63 6f 6e 74 72 6c 56 61 | 6c 75 65 2c 20 74 72 75 |contrlVa|lue, tru|
|00003d70| 65 29 3b 0d 09 09 7d 0d | 09 09 0d 09 09 43 61 6c |e);...}.|.....Cal|
|00003d80| 63 50 6f 70 55 70 52 65 | 63 74 28 76 61 72 63 6f |cPopUpRe|ct(varco|
|00003d90| 64 65 2c 20 63 6f 6e 74 | 72 6f 6c 2c 20 26 72 65 |de, cont|rol, &re|
|00003da0| 63 74 29 3b 0d 09 09 0d | 09 09 2f 2a 20 69 6e 76 |ct);....|../* inv|
|00003db0| 65 72 74 20 74 68 65 20 | 74 69 74 6c 65 20 61 72 |ert the |title ar|
|00003dc0| 65 61 20 2a 2f 0d 09 09 | 53 65 74 52 65 63 74 28 |ea */...|SetRect(|
|00003dd0| 26 69 6e 76 65 72 74 2c | 0d 09 09 09 09 28 2a 2a |&invert,|.....(**|
|00003de0| 63 6f 6e 74 72 6f 6c 29 | 2e 63 6f 6e 74 72 6c 52 |control)|.contrlR|
|00003df0| 65 63 74 2e 6c 65 66 74 | 2c 20 72 65 63 74 2e 74 |ect.left|, rect.t|
|00003e00| 6f 70 2c 0d 09 09 09 09 | 72 65 63 74 2e 6c 65 66 |op,.....|rect.lef|
|00003e10| 74 2c 20 72 65 63 74 2e | 62 6f 74 74 6f 6d 2d 56 |t, rect.|bottom-V|
|00003e20| 53 70 61 63 65 29 3b 0d | 09 09 69 66 28 2a 28 2a |Space);.|..if(*(*|
|00003e30| 2a 63 6f 6e 74 72 6f 6c | 29 2e 63 6f 6e 74 72 6c |*control|).contrl|
|00003e40| 54 69 74 6c 65 29 0d 09 | 09 09 49 6e 76 65 72 74 |Title)..|..Invert|
|00003e50| 52 65 63 74 28 26 69 6e | 76 65 72 74 29 3b 0d 09 |Rect(&in|vert);..|
|00003e60| 0d 09 09 2f 2a 20 63 6f | 6e 76 65 72 74 20 74 68 |.../* co|nvert th|
|00003e70| 65 20 63 6f 6f 72 64 69 | 6e 61 74 65 73 20 62 65 |e coordi|nates be|
|00003e80| 63 61 75 73 65 20 70 6f | 70 75 70 6d 65 6e 75 73 |cause po|pupmenus|
|00003e90| 65 6c 65 63 74 20 77 61 | 6e 74 73 20 74 68 65 6d |elect wa|nts them|
|00003ea0| 20 69 6e 0d 09 09 09 67 | 6c 6f 62 61 6c 20 61 6e | in....g|lobal an|
|00003eb0| 64 20 77 65 27 76 65 20 | 73 6f 20 66 61 72 20 67 |d we've |so far g|
|00003ec0| 6f 74 20 74 68 65 6d 20 | 69 6e 20 6c 6f 63 61 6c |ot them |in local|
|00003ed0| 2e 20 20 4e 6f 74 65 20 | 74 68 61 74 20 77 65 20 |. Note |that we |
|00003ee0| 61 6c 69 67 6e 0d 09 09 | 09 74 68 65 20 74 6f 70 |align...|.the top|
|00003ef0| 20 6c 65 66 74 20 6f 66 | 20 74 68 65 20 63 75 72 | left of| the cur|
|00003f00| 72 65 6e 74 6c 79 20 73 | 65 6c 65 63 74 65 64 20 |rently s|elected |
|00003f10| 69 74 65 6d 20 77 69 74 | 68 20 74 68 65 20 74 6f |item wit|h the to|
|00003f20| 70 20 6c 65 66 74 0d 09 | 09 09 6f 66 20 77 68 65 |p left..|..of whe|
|00003f30| 72 65 20 69 74 27 73 20 | 63 75 72 72 65 6e 74 6c |re it's |currentl|
|00003f40| 79 20 64 72 61 77 6e 20 | 73 6f 20 74 68 61 74 20 |y drawn |so that |
|00003f50| 28 6c 69 6b 65 20 74 68 | 65 20 75 73 65 72 20 69 |(like th|e user i|
|00003f60| 6e 74 65 72 66 61 63 65 | 0d 09 09 09 64 65 6d 61 |nterface|....dema|
|00003f70| 6e 64 73 29 20 74 68 65 | 20 75 73 65 72 20 64 6f |nds) the| user do|
|00003f80| 65 73 6e 27 74 20 67 65 | 74 20 74 6f 20 63 68 61 |esn't ge|t to cha|
|00003f90| 6e 67 65 20 74 68 69 6e | 67 73 20 62 79 20 73 75 |nge thin|gs by su|
|00003fa0| 72 70 72 69 73 65 2e 20 | 2a 2f 0d 09 09 4c 6f 63 |rprise. |*/...Loc|
|00003fb0| 61 6c 54 6f 47 6c 6f 62 | 61 6c 28 28 50 6f 69 6e |alToGlob|al((Poin|
|00003fc0| 74 20 2a 29 20 26 72 65 | 63 74 29 3b 0d 09 09 0d |t *) &re|ct);....|
|00003fd0| 09 09 6d 65 6e 75 20 3d | 20 50 6f 70 55 70 4d 65 |..menu =| PopUpMe|
|00003fe0| 6e 75 53 65 6c 65 63 74 | 28 6d 68 2c 0d 09 09 09 |nuSelect|(mh,....|
|00003ff0| 09 09 09 09 20 20 20 72 | 65 63 74 2e 74 6f 70 2c |.... r|ect.top,|
|00004000| 0d 09 09 09 09 09 09 09 | 20 20 20 72 65 63 74 2e |........| rect.|
|00004010| 6c 65 66 74 2b 31 2c 09 | 09 09 2f 2a 20 4b 4c 55 |left+1,.|../* KLU|
|00004020| 44 47 45 21 20 2a 2f 0d | 09 09 09 09 09 09 09 20 |DGE! */.|....... |
|00004030| 20 20 28 2a 2a 63 6f 6e | 74 72 6f 6c 29 2e 63 6f | (**con|trol).co|
|00004040| 6e 74 72 6c 56 61 6c 75 | 65 29 3b 0d 09 09 0d 09 |ntrlValu|e);.....|
|00004050| 09 69 66 28 2a 28 2a 2a | 63 6f 6e 74 72 6f 6c 29 |.if(*(**|control)|
|00004060| 2e 63 6f 6e 74 72 6c 54 | 69 74 6c 65 29 0d 09 09 |.contrlT|itle)...|
|00004070| 09 49 6e 76 65 72 74 52 | 65 63 74 28 26 69 6e 76 |.InvertR|ect(&inv|
|00004080| 65 72 74 29 3b 0d 09 09 | 0d 09 09 69 66 20 28 6d |ert);...|...if (m|
|00004090| 65 6e 75 20 26 20 30 78 | 66 66 66 66 30 30 30 30 |enu & 0x|ffff0000|
|000040a0| 20 26 26 20 28 2a 2a 63 | 6f 6e 74 72 6f 6c 29 2e | && (**c|ontrol).|
|000040b0| 63 6f 6e 74 72 6c 56 61 | 6c 75 65 20 21 3d 20 28 |contrlVa|lue != (|
|000040c0| 6d 65 6e 75 20 26 20 30 | 78 66 66 66 66 29 29 20 |menu & 0|xffff)) |
|000040d0| 7b 0d 09 09 09 28 2a 2a | 63 6f 6e 74 72 6f 6c 29 |{....(**|control)|
|000040e0| 2e 63 6f 6e 74 72 6c 56 | 61 6c 75 65 20 3d 20 6d |.contrlV|alue = m|
|000040f0| 65 6e 75 20 26 20 30 78 | 66 66 66 66 3b 09 2f 2a |enu & 0x|ffff;./*|
|00004100| 20 77 65 20 64 6f 6e 27 | 74 20 77 61 6e 74 20 74 | we don'|t want t|
|00004110| 6f 20 64 72 61 77 20 79 | 65 74 20 2a 2f 0d 09 09 |o draw y|et */...|
|00004120| 09 44 72 61 77 50 6f 70 | 55 70 28 76 61 72 63 6f |.DrawPop|Up(varco|
|00004130| 64 65 2c 20 63 6f 6e 74 | 72 6f 6c 2c 20 70 61 72 |de, cont|rol, par|
|00004140| 61 6d 2c 20 74 72 75 65 | 29 3b 09 2f 2a 20 6f 76 |am, true|);./* ov|
|00004150| 65 72 72 69 64 65 20 6c | 6f 63 6b 20 2a 2f 0d 09 |erride l|ock */..|
|00004160| 09 7d 0d 09 7d 0d 09 0d | 09 2f 2a 20 69 6e 20 61 |.}..}...|./* in a|
|00004170| 6e 79 20 63 61 73 65 2c | 20 74 65 6c 6c 20 74 68 |ny case,| tell th|
|00004180| 65 20 63 6f 6e 74 72 6f | 6c 20 6d 61 6e 61 67 65 |e contro|l manage|
|00004190| 72 20 77 65 20 64 6f 6e | 65 20 65 76 65 72 79 74 |r we don|e everyt|
|000041a0| 68 69 6e 67 20 74 68 61 | 74 20 6e 65 65 64 73 0d |hing tha|t needs.|
|000041b0| 09 09 64 6f 6e 27 69 6e | 20 2a 2f 0d 09 72 65 74 |..don'in| */..ret|
|000041c0| 75 72 6e 20 31 3b 0d 7d | 0d 0d 2f 2a 20 61 72 67 |urn 1;.}|../* arg|
|000041d0| 2c 20 49 27 6d 20 6e 6f | 74 20 73 75 72 65 20 77 |, I'm no|t sure w|
|000041e0| 68 79 20 74 68 69 73 20 | 69 73 20 72 65 61 6c 6c |hy this |is reall|
|000041f0| 79 20 6e 65 63 65 73 73 | 61 72 79 20 62 75 74 20 |y necess|ary but |
|00004200| 69 74 20 73 65 65 6d 73 | 20 74 68 65 20 63 6f 6e |it seems| the con|
|00004210| 74 72 6f 6c 0d 09 6d 61 | 6e 61 67 65 72 20 69 73 |trol..ma|nager is|
|00004220| 20 61 20 6c 69 74 74 6c | 65 20 63 6f 6e 66 75 73 | a littl|e confus|
|00004230| 65 64 2e 20 20 49 66 20 | 77 65 20 6a 75 73 74 20 |ed. If |we just |
|00004240| 63 61 6c 6c 20 74 68 65 | 20 61 62 6f 76 65 20 69 |call the| above i|
|00004250| 74 20 61 6c 6c 20 73 65 | 65 6d 73 20 74 6f 0d 09 |t all se|ems to..|
|00004260| 77 6f 72 6b 20 74 68 6f | 75 67 68 20 2a 2f 0d 54 |work tho|ugh */.T|
|00004270| 72 61 63 6b 50 6f 70 55 | 70 28 76 61 72 63 6f 64 |rackPopU|p(varcod|
|00004280| 65 2c 20 63 6f 6e 74 72 | 6f 6c 2c 20 70 61 72 61 |e, contr|ol, para|
|00004290| 6d 29 0d 69 6e 74 09 09 | 09 09 09 76 61 72 63 6f |m).int..|...varco|
|000042a0| 64 65 3b 0d 43 6f 6e 74 | 72 6f 6c 48 61 6e 64 6c |de;.Cont|rolHandl|
|000042b0| 65 09 09 63 6f 6e 74 72 | 6f 6c 3b 0d 6c 6f 6e 67 |e..contr|ol;.long|
|000042c0| 09 09 09 09 70 61 72 61 | 6d 3b 0d 7b 0d 09 44 72 |....para|m;.{..Dr|
|000042d0| 61 67 50 6f 70 55 70 28 | 76 61 72 63 6f 64 65 2c |agPopUp(|varcode,|
|000042e0| 20 63 6f 6e 74 72 6f 6c | 2c 20 70 61 72 61 6d 29 | control|, param)|
|000042f0| 3b 0d 7d 0d 0d 2f 2a 20 | 66 69 67 67 65 72 20 6f |;.}../* |figger o|
|00004300| 75 74 20 77 68 61 74 20 | 61 72 65 61 20 6f 66 20 |ut what |area of |
|00004310| 74 68 65 20 73 63 72 65 | 65 6e 20 74 68 65 20 73 |the scre|en the s|
|00004320| 65 6c 65 63 74 61 62 6c | 65 20 70 6f 72 74 69 6f |electabl|e portio|
|00004330| 6e 20 6f 66 20 74 68 65 | 20 63 6f 6e 74 72 6f 6c |n of the| control|
|00004340| 0d 09 6f 63 63 75 70 69 | 65 73 2e 20 20 54 68 69 |..occupi|es. Thi|
|00004350| 73 20 69 73 20 6f 6e 65 | 20 6d 65 6e 75 20 6c 69 |s is one| menu li|
|00004360| 6e 65 20 68 69 67 68 2c | 20 74 68 65 20 77 69 64 |ne high,| the wid|
|00004370| 74 68 20 6f 66 20 74 68 | 65 20 61 70 70 72 6f 70 |th of th|e approp|
|00004380| 72 69 61 74 65 20 6d 65 | 6e 75 0d 09 69 74 65 6d |riate me|nu..item|
|00004390| 2c 20 61 6e 64 20 70 6f | 73 73 69 62 6c 79 20 6f |, and po|ssibly o|
|000043a0| 66 66 73 65 74 20 74 6f | 20 72 69 67 68 74 20 74 |ffset to| right t|
|000043b0| 6f 20 63 65 6e 74 65 72 | 20 74 68 65 20 69 74 65 |o center| the ite|
|000043c0| 6d 2e 20 2a 2f 0d 43 61 | 6c 63 50 6f 70 55 70 52 |m. */.Ca|lcPopUpR|
|000043d0| 65 63 74 28 76 61 72 63 | 6f 64 65 2c 20 63 6f 6e |ect(varc|ode, con|
|000043e0| 74 72 6f 6c 2c 20 70 52 | 65 63 74 29 0d 69 6e 74 |trol, pR|ect).int|
|000043f0| 09 09 09 09 76 61 72 63 | 6f 64 65 3b 0d 43 6f 6e |....varc|ode;.Con|
|00004400| 74 72 6f 6c 48 61 6e 64 | 6c 65 09 63 6f 6e 74 72 |trolHand|le.contr|
|00004410| 6f 6c 3b 0d 52 65 63 74 | 09 09 09 2a 70 52 65 63 |ol;.Rect|...*pRec|
|00004420| 74 3b 0d 7b 0d 09 52 65 | 63 74 09 09 72 65 63 74 |t;.{..Re|ct..rect|
|00004430| 3b 0d 09 53 74 72 32 35 | 35 09 09 69 74 65 6d 3b |;..Str25|5..item;|
|00004440| 0d 09 4d 65 6e 75 48 61 | 6e 64 6c 65 09 6d 68 3b |..MenuHa|ndle.mh;|
|00004450| 0d 09 0d 09 0d 09 72 65 | 63 74 20 3d 20 28 2a 2a |......re|ct = (**|
|00004460| 63 6f 6e 74 72 6f 6c 29 | 2e 63 6f 6e 74 72 6c 52 |control)|.contrlR|
|00004470| 65 63 74 3b 0d 0d 09 69 | 66 20 28 6d 68 20 3d 20 |ect;...i|f (mh = |
|00004480| 47 65 74 4d 65 6e 75 48 | 61 6e 64 6c 65 28 63 6f |GetMenuH|andle(co|
|00004490| 6e 74 72 6f 6c 29 29 20 | 7b 0d 09 09 47 65 74 49 |ntrol)) |{...GetI|
|000044a0| 74 65 6d 28 74 68 65 6d | 68 2c 20 28 2a 2a 63 6f |tem(them|h, (**co|
|000044b0| 6e 74 72 6f 6c 29 2e 63 | 6f 6e 74 72 6c 56 61 6c |ntrol).c|ontrlVal|
|000044c0| 75 65 2c 0d 09 09 09 26 | 69 74 65 6d 29 3b 0d 09 |ue,....&|item);..|
|000044d0| 0d 09 09 2f 2a 20 69 66 | 20 74 68 65 72 65 27 73 |.../* if| there's|
|000044e0| 20 61 20 74 69 74 6c 65 | 20 74 68 61 74 20 6d 6f | a title| that mo|
|000044f0| 76 65 20 74 68 65 20 6c | 65 66 74 20 6f 76 65 72 |ve the l|eft over|
|00004500| 20 74 68 65 20 77 69 64 | 74 68 20 6f 66 20 74 68 | the wid|th of th|
|00004510| 65 20 74 69 74 6c 65 0d | 09 09 09 70 6c 75 73 20 |e title.|...plus |
|00004520| 61 20 6c 69 74 74 6c 65 | 20 66 75 64 67 65 20 2a |a little| fudge *|
|00004530| 2f 0d 09 09 69 66 28 2a | 28 2a 2a 63 6f 6e 74 72 |/...if(*|(**contr|
|00004540| 6f 6c 29 2e 63 6f 6e 74 | 72 6c 54 69 74 6c 65 29 |ol).cont|rlTitle)|
|00004550| 0d 09 09 09 72 65 63 74 | 2e 6c 65 66 74 20 2b 3d |....rect|.left +=|
|00004560| 20 53 74 72 69 6e 67 57 | 69 64 74 68 28 28 2a 2a | StringW|idth((**|
|00004570| 63 6f 6e 74 72 6f 6c 29 | 2e 63 6f 6e 74 72 6c 54 |control)|.contrlT|
|00004580| 69 74 6c 65 29 20 2b 20 | 48 53 65 70 61 72 61 74 |itle) + |HSeparat|
|00004590| 69 6f 6e 3b 0d 09 09 09 | 0d 09 09 2f 2a 20 73 65 |ion;....|.../* se|
|000045a0| 74 20 74 68 65 20 77 69 | 64 74 68 20 6f 66 20 74 |t the wi|dth of t|
|000045b0| 68 65 20 72 65 67 69 6f | 6e 20 74 6f 20 74 68 65 |he regio|n to the|
|000045c0| 20 77 69 64 74 68 20 6f | 66 20 74 68 65 20 69 74 | width o|f the it|
|000045d0| 65 6d 20 74 6f 20 62 65 | 20 64 72 61 77 6e 0d 09 |em to be| drawn..|
|000045e0| 09 09 70 6c 75 73 20 66 | 75 64 67 65 20 2a 2f 0d |..plus f|udge */.|
|000045f0| 09 09 72 65 63 74 2e 72 | 69 67 68 74 20 3d 20 72 |..rect.r|ight = r|
|00004600| 65 63 74 2e 6c 65 66 74 | 20 2b 20 53 74 72 69 6e |ect.left| + Strin|
|00004610| 67 57 69 64 74 68 28 69 | 74 65 6d 29 20 2b 20 48 |gWidth(i|tem) + H|
|00004620| 53 70 61 63 65 2a 32 3b | 0d 09 09 0d 09 09 2f 2a |Space*2;|....../*|
|00004630| 20 74 68 65 20 74 6f 70 | 20 69 73 20 74 68 65 20 | the top| is the |
|00004640| 62 6f 74 74 6f 6d 20 6d | 69 6e 75 73 20 66 75 64 |bottom m|inus fud|
|00004650| 67 65 20 6d 69 6e 75 73 | 20 74 68 65 20 68 65 69 |ge minus| the hei|
|00004660| 67 68 74 20 6f 66 20 61 | 6e 20 69 74 65 6d 2e 20 |ght of a|n item. |
|00004670| 20 57 65 0d 09 09 09 63 | 6f 75 6c 64 20 68 61 76 | We....c|ould hav|
|00004680| 65 20 64 6f 6e 65 20 74 | 68 69 73 20 66 72 6f 6d |e done t|his from|
|00004690| 20 74 68 65 20 74 6f 70 | 20 49 20 73 75 70 70 6f | the top| I suppo|
|000046a0| 73 65 2e 2e 2e 20 2a 2f | 0d 09 09 72 65 63 74 2e |se... */|...rect.|
|000046b0| 74 6f 70 20 3d 20 72 65 | 63 74 2e 62 6f 74 74 6f |top = re|ct.botto|
|000046c0| 6d 20 2d 20 56 53 70 61 | 63 65 20 2d 20 47 65 74 |m - VSpa|ce - Get|
|000046d0| 46 6f 6e 74 48 65 69 67 | 68 74 28 29 3b 0d 0d 09 |FontHeig|ht();...|
|000046e0| 09 2f 2a 20 69 66 20 74 | 68 65 20 69 74 65 6d 20 |./* if t|he item |
|000046f0| 73 68 6f 75 6c 64 20 62 | 65 20 63 65 6e 74 65 72 |should b|e center|
|00004700| 65 64 20 74 68 61 6e 20 | 6f 66 66 73 65 74 20 69 |ed than |offset i|
|00004710| 74 20 62 79 20 61 6e 20 | 61 70 70 72 6f 70 72 69 |t by an |appropri|
|00004720| 61 74 65 20 61 6d 6f 75 | 6e 74 20 2a 2f 0d 09 09 |ate amou|nt */...|
|00004730| 69 66 20 28 76 61 72 63 | 6f 64 65 20 25 20 32 29 |if (varc|ode % 2)|
|00004740| 20 7b 0d 09 09 09 69 66 | 28 2a 28 2a 2a 63 6f 6e | {....if|(*(**con|
|00004750| 74 72 6f 6c 29 2e 63 6f | 6e 74 72 6c 54 69 74 6c |trol).co|ntrlTitl|
|00004760| 65 29 20 7b 0d 09 09 09 | 09 43 61 6c 63 4d 65 6e |e) {....|.CalcMen|
|00004770| 75 53 69 7a 65 28 6d 68 | 29 3b 0d 09 09 09 09 4f |uSize(mh|);.....O|
|00004780| 66 66 73 65 74 52 65 63 | 74 28 26 72 65 63 74 2c |ffsetRec|t(&rect,|
|00004790| 20 28 28 2a 2a 6d 68 29 | 2e 6d 65 6e 75 57 69 64 | ((**mh)|.menuWid|
|000047a0| 74 68 2d 32 20 2b 20 72 | 65 63 74 2e 6c 65 66 74 |th-2 + r|ect.left|
|000047b0| 20 2d 20 72 65 63 74 2e | 72 69 67 68 74 29 0d 09 | - rect.|right)..|
|000047c0| 09 09 09 09 2f 20 32 2c | 20 30 29 3b 0d 09 09 09 |..../ 2,| 0);....|
|000047d0| 7d 20 65 6c 73 65 0d 09 | 09 09 09 4f 66 66 73 65 |} else..|...Offse|
|000047e0| 74 52 65 63 74 28 26 72 | 65 63 74 2c 20 28 28 2a |tRect(&r|ect, ((*|
|000047f0| 2a 63 6f 6e 74 72 6f 6c | 29 2e 63 6f 6e 74 72 6c |*control|).contrl|
|00004800| 52 65 63 74 2e 72 69 67 | 68 74 20 2d 0d 09 09 09 |Rect.rig|ht -....|
|00004810| 09 09 28 2a 2a 63 6f 6e | 74 72 6f 6c 29 2e 63 6f |..(**con|trol).co|
|00004820| 6e 74 72 6c 52 65 63 74 | 2e 6c 65 66 74 20 2b 20 |ntrlRect|.left + |
|00004830| 72 65 63 74 2e 6c 65 66 | 74 20 2d 20 72 65 63 74 |rect.lef|t - rect|
|00004840| 2e 72 69 67 68 74 29 20 | 2f 0d 09 09 09 09 09 32 |.right) |/......2|
|00004850| 2c 20 30 29 3b 0d 09 09 | 7d 0d 0d 09 09 2a 70 52 |, 0);...|}....*pR|
|00004860| 65 63 74 20 3d 20 72 65 | 63 74 3b 0d 09 7d 20 65 |ect = re|ct;..} e|
|00004870| 6c 73 65 0d 09 09 53 65 | 74 52 65 63 74 28 70 52 |lse...Se|tRect(pR|
|00004880| 65 63 74 2c 20 72 65 63 | 74 2e 74 6f 70 2c 20 72 |ect, rec|t.top, r|
|00004890| 65 63 74 2e 6c 65 66 74 | 2c 20 72 65 63 74 2e 74 |ect.left|, rect.t|
|000048a0| 6f 70 2c 20 72 65 63 74 | 2e 6c 65 66 74 29 3b 0d |op, rect|.left);.|
|000048b0| 7d 0d 0d 2f 2a 20 66 69 | 6e 64 20 74 68 65 20 6d |}../* fi|nd the m|
|000048c0| 65 6e 75 20 68 61 6e 64 | 6c 65 20 66 6f 72 20 6f |enu hand|le for o|
|000048d0| 75 72 20 6d 65 6e 75 2e | 20 20 49 74 27 73 20 65 |ur menu.| It's e|
|000048e0| 69 74 68 65 72 20 69 6e | 20 74 68 65 20 64 61 74 |ither in| the dat|
|000048f0| 61 20 66 69 65 6c 64 20 | 6f 66 20 74 68 65 20 63 |a field |of the c|
|00004900| 6f 6e 74 72 6f 6c 0d 09 | 6f 72 20 63 61 6e 20 62 |ontrol..|or can b|
|00004910| 65 20 66 6f 75 6e 64 20 | 62 79 20 73 65 61 72 63 |e found |by searc|
|00004920| 68 69 6e 67 20 66 6f 72 | 20 61 20 6d 65 6e 75 20 |hing for| a menu |
|00004930| 6f 66 20 74 68 65 20 63 | 6f 72 72 65 63 74 20 6d |of the c|orrect m|
|00004940| 65 6e 75 20 69 64 20 69 | 6e 20 74 68 65 20 6d 65 |enu id i|n the me|
|00004950| 6e 75 20 62 61 72 2e 20 | 2a 2f 0d 4d 65 6e 75 48 |nu bar. |*/.MenuH|
|00004960| 61 6e 64 6c 65 20 47 65 | 74 4d 65 6e 75 48 61 6e |andle Ge|tMenuHan|
|00004970| 64 6c 65 28 63 6f 6e 74 | 72 6f 6c 29 0d 43 6f 6e |dle(cont|rol).Con|
|00004980| 74 72 6f 6c 48 61 6e 64 | 6c 65 09 09 63 6f 6e 74 |trolHand|le..cont|
|00004990| 72 6f 6c 3b 0d 7b 0d 09 | 4d 65 6e 75 48 61 6e 64 |rol;.{..|MenuHand|
|000049a0| 6c 65 09 09 6d 68 3b 0d | 09 0d 09 69 66 28 21 28 |le..mh;.|...if(!(|
|000049b0| 6d 68 20 3d 20 74 68 65 | 6d 68 20 29 29 0d 09 09 |mh = the|mh ))...|
|000049c0| 6d 68 20 3d 20 47 65 74 | 4d 48 61 6e 64 6c 65 28 |mh = Get|MHandle(|
|000049d0| 28 2a 2a 63 6f 6e 74 72 | 6f 6c 29 2e 63 6f 6e 74 |(**contr|ol).cont|
|000049e0| 72 6c 52 66 43 6f 6e 29 | 3b 0d 09 72 65 74 75 72 |rlRfCon)|;..retur|
|000049f0| 6e 20 6d 68 3b 0d 7d 0d | 0d 2f 2a 20 66 69 67 75 |n mh;.}.|./* figu|
|00004a00| 72 65 20 6f 75 74 20 68 | 6f 77 20 68 69 67 68 20 |re out h|ow high |
|00004a10| 61 20 6c 69 6e 65 20 69 | 73 20 69 6e 20 74 68 65 |a line i|s in the|
|00004a20| 20 63 75 72 72 65 6e 74 | 20 66 6f 6e 74 20 2a 2f | current| font */|
|00004a30| 0d 47 65 74 46 6f 6e 74 | 48 65 69 67 68 74 28 29 |.GetFont|Height()|
|00004a40| 0d 7b 0d 09 46 6f 6e 74 | 49 6e 66 6f 09 09 66 69 |.{..Font|Info..fi|
|00004a50| 3b 0d 09 0d 09 47 65 74 | 46 6f 6e 74 49 6e 66 6f |;....Get|FontInfo|
|00004a60| 28 26 66 69 29 3b 0d 09 | 72 65 74 75 72 6e 20 66 |(&fi);..|return f|
|00004a70| 69 2e 61 73 63 65 6e 74 | 20 2b 20 66 69 2e 6c 65 |i.ascent| + fi.le|
|00004a80| 61 64 69 6e 67 20 2b 20 | 66 69 2e 64 65 73 63 65 |ading + |fi.desce|
|00004a90| 6e 74 3b 0d 7d 0d 0d 2f | 2a 20 66 69 67 75 72 65 |nt;.}../|* figure|
|00004aa0| 20 6f 75 74 20 68 6f 77 | 20 66 61 72 20 61 62 6f | out how| far abo|
|00004ab0| 76 65 20 74 68 65 20 62 | 61 73 65 20 6c 69 6e 65 |ve the b|ase line|
|00004ac0| 20 61 20 63 68 61 72 61 | 63 74 65 72 20 73 68 6f | a chara|cter sho|
|00004ad0| 75 6c 64 20 62 65 20 64 | 72 61 77 6e 20 2a 2f 0d |uld be d|rawn */.|
|00004ae0| 47 65 74 46 6f 6e 74 4f | 66 66 73 65 74 28 29 0d |GetFontO|ffset().|
|00004af0| 7b 0d 09 46 6f 6e 74 49 | 6e 66 6f 09 09 66 69 3b |{..FontI|nfo..fi;|
|00004b00| 0d 09 0d 09 47 65 74 46 | 6f 6e 74 49 6e 66 6f 28 |....GetF|ontInfo(|
|00004b10| 26 66 69 29 3b 0d 09 72 | 65 74 75 72 6e 20 66 69 |&fi);..r|eturn fi|
|00004b20| 2e 6c 65 61 64 69 6e 67 | 20 2b 20 66 69 2e 64 65 |.leading| + fi.de|
|00004b30| 73 63 65 6e 74 3b 0d 7d | 0d 00 00 00 00 00 00 00 |scent;.}|........|
|00004b40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004b50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004b60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004b70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004b80| 00 00 01 00 00 00 01 1a | 00 00 00 1a 00 00 00 46 |........|.......F|
|00004b90| 6e 64 20 50 68 69 6c 20 | 47 6f 6c 64 6d 61 6e 0d |nd Phil |Goldman.|
|00004ba0| 0d a9 41 70 70 6c 65 20 | 43 6f 6d 70 75 74 65 72 |..Apple |Computer|
|00004bb0| 07 50 6f 70 55 70 2e 63 | 02 00 00 00 54 45 58 54 |.PopUp.c|....TEXT|
|00004bc0| 4b 41 48 4c 01 00 00 38 | 00 72 00 00 00 00 4c 72 |KAHL...8|.r....Lr|
|00004bd0| 00 00 54 45 58 54 4b 41 | 48 4c 01 00 00 38 00 72 |..TEXTKA|HL...8.r|
|00004be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004bf0| 00 00 9e 58 97 9e 00 00 | 4a b9 00 00 01 60 6c 65 |...X....|J....`le|
|00004c00| 72 20 36 2e 30 2e 33 00 | 00 00 00 00 23 00 12 00 |r 6.0.3.|....#...|
|00004c10| 64 01 12 88 86 41 6c 6c | 20 6f 66 20 74 68 65 20 |d....All| of the |
|00004c20| 44 41 73 20 28 44 65 73 | 6b 20 41 63 63 65 73 73 |DAs (Des|k Access|
|00004c30| 6f 72 69 65 73 29 20 61 | 72 65 20 67 72 6f 75 70 |ories) a|re group|
|00004c40| 65 64 20 69 6e 74 6f 20 | 74 68 69 73 20 6c 61 79 |ed into |this lay|
|00004c50| 65 72 2e 20 54 6f 20 63 | 6c 6f 73 65 20 61 6c 6c |er. To c|lose all|
|00004c60| 20 6f 66 20 74 68 65 20 | 44 41 73 20 61 74 20 6f | of the |DAs at o|
|00004c70| 6e 63 65 2c 20 73 65 6c | 65 63 74 20 74 68 65 20 |nce, sel|ect the |
|00004c80| 00 00 00 04 00 06 00 04 | 00 00 00 0e 00 09 0b 50 |........|.......P|
|00004c90| 72 6f 67 72 61 6d 6d 69 | 6e 67 00 00 01 00 00 00 |rogrammi|ng......|
|00004ca0| 01 1a 00 00 00 1a 00 00 | 00 46 00 55 63 d4 15 ac |........|.F.Uc...|
|00004cb0| 00 00 00 1c 00 46 00 01 | 45 54 41 42 00 00 00 12 |.....F..|ETAB....|
|00004cc0| 45 46 4e 54 00 00 00 1e | 03 ec ff ff 00 00 00 00 |EFNT....|........|
|00004cd0| 00 55 63 1c 03 eb ff ff | 00 00 00 08 00 55 63 0c |.Uc.....|.....Uc.|
|00004ce0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004cf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+