home *** CD-ROM | disk | FTP | other *** search
/ Mac Power 1997 January / macpower199701.bin / AMUG / Programming_10 / ICPAppSource+ICprogKit / ICAppSourceKit 1.3.sit / ICAppSourceKit1.3 / ICDialogs.p < prev    next >
MacBinary  |  1996-07-14  |  18.3 KB  |  [TEXT/CWIE]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

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

You can browse this item here: ICDialogs.p

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert ZX81 Sinclair BASIC (image/sinclairBASIC) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Applause Picture (image/applausePicture) ext Unsupported
1% dexvert bsdiff patch (other/bsdiffPatch) ext Unsupported
1% dexvert imgdiff patch (other/imgdiffPatch) ext Unsupported
1% dexvert MATLAB p-code (other/matlabPCode) ext Unsupported
1% dexvert WSUS Patch Storage File (other/wsusPatchStorageFile) ext Unsupported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Sun Jul 14 16:56:48 1996, modified Sun Jul 14 16:56:48 1996, creator 'CWIE', type ASCII, 17955 bytes "ICDialogs.p" , at 0x46a3 410 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[CWIE]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0b 49 43 44 69 61 6c | 6f 67 73 2e 70 00 00 00 |..ICDial|ogs.p...|
|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 43 57 49 | 45 01 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 46 23 00 | 00 01 9a ae 0f 0f 90 ae |.....F#.|........|
|00000060| 0f 0f 90 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 14 1a 00 00 |........|........|
|00000080| 75 6e 69 74 20 49 43 44 | 69 61 6c 6f 67 73 3b 0d |unit ICD|ialogs;.|
|00000090| 0d 69 6e 74 65 72 66 61 | 63 65 0d 0d 09 75 73 65 |.interfa|ce...use|
|000000a0| 73 0d 09 09 51 75 69 63 | 6b 64 72 61 77 2c 20 44 |s...Quic|kdraw, D|
|000000b0| 69 61 6c 6f 67 73 3b 0d | 09 09 0d 09 63 6f 6e 73 |ialogs;.|....cons|
|000000c0| 74 0d 09 09 69 5f 6f 6b | 20 3d 20 31 3b 0d 09 09 |t...i_ok| = 1;...|
|000000d0| 69 5f 63 61 6e 63 65 6c | 20 3d 20 32 3b 0d 09 09 |i_cancel| = 2;...|
|000000e0| 69 5f 64 69 73 63 61 72 | 64 20 3d 20 33 3b 0d 0d |i_discar|d = 3;..|
|000000f0| 09 74 79 70 65 0d 09 09 | 53 61 76 65 64 57 69 6e |.type...|SavedWin|
|00000100| 64 6f 77 49 6e 66 6f 20 | 3d 20 72 65 63 6f 72 64 |dowInfo |= record|
|00000110| 0d 09 09 09 09 6f 6c 64 | 70 6f 72 74 3a 20 47 72 |.....old|port: Gr|
|00000120| 61 66 50 74 72 3b 0d 09 | 09 09 09 74 68 69 73 70 |afPtr;..|...thisp|
|00000130| 6f 72 74 3a 20 47 72 61 | 66 50 74 72 3b 0d 09 09 |ort: Gra|fPtr;...|
|00000140| 09 09 66 6f 6e 74 3a 20 | 69 6e 74 65 67 65 72 3b |..font: |integer;|
|00000150| 0d 09 09 09 09 73 69 7a | 65 3a 20 69 6e 74 65 67 |.....siz|e: integ|
|00000160| 65 72 3b 0d 09 09 09 09 | 66 61 63 65 3a 20 53 74 |er;.....|face: St|
|00000170| 79 6c 65 3b 0d 09 09 09 | 65 6e 64 3b 0d 0d 09 70 |yle;....|end;...p|
|00000180| 72 6f 63 65 64 75 72 65 | 20 45 6e 74 65 72 57 69 |rocedure| EnterWi|
|00000190| 6e 64 6f 77 20 28 77 69 | 6e 64 6f 77 3a 20 57 69 |ndow (wi|ndow: Wi|
|000001a0| 6e 64 6f 77 50 74 72 3b | 20 66 6f 6e 74 2c 20 73 |ndowPtr;| font, s|
|000001b0| 69 7a 65 3a 20 69 6e 74 | 65 67 65 72 3b 20 66 61 |ize: int|eger; fa|
|000001c0| 63 65 3a 20 53 74 79 6c | 65 3b 20 76 61 72 20 73 |ce: Styl|e; var s|
|000001d0| 61 76 65 64 3a 20 53 61 | 76 65 64 57 69 6e 64 6f |aved: Sa|vedWindo|
|000001e0| 77 49 6e 66 6f 29 3b 0d | 09 70 72 6f 63 65 64 75 |wInfo);.|.procedu|
|000001f0| 72 65 20 45 78 69 74 57 | 69 6e 64 6f 77 20 28 73 |re ExitW|indow (s|
|00000200| 61 76 65 64 3a 20 53 61 | 76 65 64 57 69 6e 64 6f |aved: Sa|vedWindo|
|00000210| 77 49 6e 66 6f 29 3b 0d | 09 70 72 6f 63 65 64 75 |wInfo);.|.procedu|
|00000220| 72 65 20 53 65 74 49 74 | 65 6d 54 65 78 74 20 28 |re SetIt|emText (|
|00000230| 64 6c 67 3a 20 64 69 61 | 6c 6f 67 50 74 72 3b 20 |dlg: dia|logPtr; |
|00000240| 69 74 65 6d 3a 20 69 6e | 74 65 67 65 72 3b 20 74 |item: in|teger; t|
|00000250| 65 78 74 3a 20 73 74 72 | 32 35 35 29 3b 0d 09 70 |ext: str|255);..p|
|00000260| 72 6f 63 65 64 75 72 65 | 20 47 65 74 49 74 65 6d |rocedure| GetItem|
|00000270| 54 65 78 74 20 28 64 6c | 67 3a 20 64 69 61 6c 6f |Text (dl|g: dialo|
|00000280| 67 50 74 72 3b 20 69 74 | 65 6d 3a 20 69 6e 74 65 |gPtr; it|em: inte|
|00000290| 67 65 72 3b 20 76 61 72 | 20 74 65 78 74 3a 20 73 |ger; var| text: s|
|000002a0| 74 72 32 35 35 29 3b 0d | 09 66 75 6e 63 74 69 6f |tr255);.|.functio|
|000002b0| 6e 20 47 65 74 49 74 65 | 6d 54 65 78 74 46 20 28 |n GetIte|mTextF (|
|000002c0| 64 6c 67 3a 20 64 69 61 | 6c 6f 67 50 74 72 3b 20 |dlg: dia|logPtr; |
|000002d0| 69 74 65 6d 3a 20 69 6e | 74 65 67 65 72 29 3a 20 |item: in|teger): |
|000002e0| 73 74 72 32 35 35 3b 0d | 09 70 72 6f 63 65 64 75 |str255;.|.procedu|
|000002f0| 72 65 20 4f 75 74 6c 69 | 6e 65 44 65 66 61 75 6c |re Outli|neDefaul|
|00000300| 74 31 20 28 64 70 3a 20 | 64 69 61 6c 6f 67 50 74 |t1 (dp: |dialogPt|
|00000310| 72 3b 20 69 74 65 6d 3a | 20 69 6e 74 65 67 65 72 |r; item:| integer|
|00000320| 29 3b 0d 09 70 72 6f 63 | 65 64 75 72 65 20 53 65 |);..proc|edure Se|
|00000330| 74 55 70 44 65 66 61 75 | 6c 74 4f 75 74 6c 69 6e |tUpDefau|ltOutlin|
|00000340| 65 20 28 64 70 3a 20 64 | 69 61 6c 6f 67 50 74 72 |e (dp: d|ialogPtr|
|00000350| 3b 20 64 65 66 5f 69 74 | 65 6d 2c 20 75 73 65 72 |; def_it|em, user|
|00000360| 5f 69 74 65 6d 3a 20 69 | 6e 74 65 67 65 72 29 3b |_item: i|nteger);|
|00000370| 0d 09 70 72 6f 63 65 64 | 75 72 65 20 46 6c 61 73 |..proced|ure Flas|
|00000380| 68 49 74 65 6d 20 28 64 | 6c 67 3a 20 64 69 61 6c |hItem (d|lg: dial|
|00000390| 6f 67 50 74 72 3b 20 69 | 74 65 6d 3a 20 69 6e 74 |ogPtr; i|tem: int|
|000003a0| 65 67 65 72 29 3b 0d 09 | 70 72 6f 63 65 64 75 72 |eger);..|procedur|
|000003b0| 65 20 49 6e 76 61 6c 44 | 49 74 65 6d 28 64 6c 67 |e InvalD|Item(dlg|
|000003c0| 20 3a 20 44 69 61 6c 6f | 67 50 74 72 3b 20 69 74 | : Dialo|gPtr; it|
|000003d0| 65 6d 20 3a 20 69 6e 74 | 65 67 65 72 29 3b 0d 09 |em : int|eger);..|
|000003e0| 70 72 6f 63 65 64 75 72 | 65 20 53 65 74 44 49 74 |procedur|e SetDIt|
|000003f0| 65 6d 52 65 63 74 20 28 | 64 70 3a 20 64 69 61 6c |emRect (|dp: dial|
|00000400| 6f 67 50 74 72 3b 20 69 | 74 65 6d 3a 20 69 6e 74 |ogPtr; i|tem: int|
|00000410| 65 67 65 72 3b 20 72 72 | 3a 20 72 65 63 74 29 3b |eger; rr|: rect);|
|00000420| 0d 09 70 72 6f 63 65 64 | 75 72 65 20 47 65 74 44 |..proced|ure GetD|
|00000430| 49 74 65 6d 52 65 63 74 | 20 28 64 70 3a 20 64 69 |ItemRect| (dp: di|
|00000440| 61 6c 6f 67 50 74 72 3b | 20 69 74 65 6d 3a 20 69 |alogPtr;| item: i|
|00000450| 6e 74 65 67 65 72 3b 20 | 76 61 72 20 72 72 3a 20 |nteger; |var rr: |
|00000460| 72 65 63 74 29 3b 0d 09 | 70 72 6f 63 65 64 75 72 |rect);..|procedur|
|00000470| 65 20 53 65 74 44 49 74 | 65 6d 4b 69 6e 64 20 28 |e SetDIt|emKind (|
|00000480| 64 70 3a 20 64 69 61 6c | 6f 67 50 74 72 3b 20 69 |dp: dial|ogPtr; i|
|00000490| 74 65 6d 3a 20 69 6e 74 | 65 67 65 72 3b 20 6b 3a |tem: int|eger; k:|
|000004a0| 20 69 6e 74 65 67 65 72 | 29 3b 0d 09 70 72 6f 63 | integer|);..proc|
|000004b0| 65 64 75 72 65 20 47 65 | 74 44 49 74 65 6d 4b 69 |edure Ge|tDItemKi|
|000004c0| 6e 64 20 28 64 70 3a 20 | 64 69 61 6c 6f 67 50 74 |nd (dp: |dialogPt|
|000004d0| 72 3b 20 69 74 65 6d 3a | 20 69 6e 74 65 67 65 72 |r; item:| integer|
|000004e0| 3b 20 76 61 72 20 6b 3a | 20 69 6e 74 65 67 65 72 |; var k:| integer|
|000004f0| 29 3b 0d 09 66 75 6e 63 | 74 69 6f 6e 20 47 65 74 |);..func|tion Get|
|00000500| 44 43 6f 6e 74 72 6f 6c | 48 61 6e 64 6c 65 20 28 |DControl|Handle (|
|00000510| 64 70 3a 20 64 69 61 6c | 6f 67 50 74 72 3b 20 69 |dp: dial|ogPtr; i|
|00000520| 74 65 6d 3a 20 69 6e 74 | 65 67 65 72 29 3a 20 63 |tem: int|eger): c|
|00000530| 6f 6e 74 72 6f 6c 48 61 | 6e 64 6c 65 3b 0d 09 66 |ontrolHa|ndle;..f|
|00000540| 75 6e 63 74 69 6f 6e 20 | 47 65 74 44 49 74 65 6d |unction |GetDItem|
|00000550| 48 61 6e 64 6c 65 20 28 | 64 70 3a 20 64 69 61 6c |Handle (|dp: dial|
|00000560| 6f 67 50 74 72 3b 20 69 | 74 65 6d 3a 20 69 6e 74 |ogPtr; i|tem: int|
|00000570| 65 67 65 72 29 3a 20 68 | 61 6e 64 6c 65 3b 0d 09 |eger): h|andle;..|
|00000580| 70 72 6f 63 65 64 75 72 | 65 20 53 65 74 44 49 74 |procedur|e SetDIt|
|00000590| 65 6d 48 61 6e 64 6c 65 | 20 28 64 70 3a 20 64 69 |emHandle| (dp: di|
|000005a0| 61 6c 6f 67 50 74 72 3b | 20 69 74 65 6d 3a 20 69 |alogPtr;| item: i|
|000005b0| 6e 74 65 67 65 72 3b 20 | 68 3a 20 75 6e 69 76 20 |nteger; |h: univ |
|000005c0| 68 61 6e 64 6c 65 29 3b | 0d 09 66 75 6e 63 74 69 |handle);|..functi|
|000005d0| 6f 6e 20 47 65 74 44 43 | 74 6c 45 6e 61 62 6c 65 |on GetDC|tlEnable|
|000005e0| 20 28 64 6c 67 3a 20 64 | 69 61 6c 6f 67 50 74 72 | (dlg: d|ialogPtr|
|000005f0| 3b 20 69 74 65 6d 3a 20 | 69 6e 74 65 67 65 72 29 |; item: |integer)|
|00000600| 3a 20 62 6f 6f 6c 65 61 | 6e 3b 0d 09 70 72 6f 63 |: boolea|n;..proc|
|00000610| 65 64 75 72 65 20 53 65 | 74 44 43 74 6c 45 6e 61 |edure Se|tDCtlEna|
|00000620| 62 6c 65 20 28 64 70 3a | 20 64 69 61 6c 6f 67 50 |ble (dp:| dialogP|
|00000630| 74 72 3b 20 69 74 65 6d | 3a 20 69 6e 74 65 67 65 |tr; item|: intege|
|00000640| 72 3b 20 6f 6e 3a 20 62 | 6f 6f 6c 65 61 6e 29 3b |r; on: b|oolean);|
|00000650| 0d 09 66 75 6e 63 74 69 | 6f 6e 20 47 65 74 44 43 |..functi|on GetDC|
|00000660| 74 6c 54 69 74 6c 65 20 | 28 64 70 3a 20 64 69 61 |tlTitle |(dp: dia|
|00000670| 6c 6f 67 50 74 72 3b 20 | 69 74 65 6d 3a 20 69 6e |logPtr; |item: in|
|00000680| 74 65 67 65 72 29 3a 20 | 73 74 72 32 35 35 3b 0d |teger): |str255;.|
|00000690| 09 70 72 6f 63 65 64 75 | 72 65 20 53 65 74 44 43 |.procedu|re SetDC|
|000006a0| 74 6c 54 69 74 6c 65 20 | 28 64 70 3a 20 64 69 61 |tlTitle |(dp: dia|
|000006b0| 6c 6f 67 50 74 72 3b 20 | 69 74 65 6d 3a 20 69 6e |logPtr; |item: in|
|000006c0| 74 65 67 65 72 3b 20 73 | 3a 20 73 74 72 32 35 35 |teger; s|: str255|
|000006d0| 29 3b 0d 09 66 75 6e 63 | 74 69 6f 6e 20 47 65 74 |);..func|tion Get|
|000006e0| 44 43 74 6c 42 6f 6f 6c | 65 61 6e 20 28 64 70 3a |DCtlBool|ean (dp:|
|000006f0| 20 64 69 61 6c 6f 67 50 | 74 72 3b 20 69 74 65 6d | dialogP|tr; item|
|00000700| 3a 20 69 6e 74 65 67 65 | 72 29 3a 20 62 6f 6f 6c |: intege|r): bool|
|00000710| 65 61 6e 3b 0d 09 70 72 | 6f 63 65 64 75 72 65 20 |ean;..pr|ocedure |
|00000720| 53 65 74 44 43 74 6c 42 | 6f 6f 6c 65 61 6e 20 28 |SetDCtlB|oolean (|
|00000730| 64 70 3a 20 64 69 61 6c | 6f 67 50 74 72 3b 20 69 |dp: dial|ogPtr; i|
|00000740| 74 65 6d 3a 20 69 6e 74 | 65 67 65 72 3b 20 76 61 |tem: int|eger; va|
|00000750| 6c 75 65 3a 20 62 6f 6f | 6c 65 61 6e 29 3b 0d 09 |lue: boo|lean);..|
|00000760| 70 72 6f 63 65 64 75 72 | 65 20 54 6f 67 67 6c 65 |procedur|e Toggle|
|00000770| 44 43 74 6c 42 6f 6f 6c | 65 61 6e 20 28 64 70 3a |DCtlBool|ean (dp:|
|00000780| 20 64 69 61 6c 6f 67 50 | 74 72 3b 20 69 74 65 6d | dialogP|tr; item|
|00000790| 3a 20 69 6e 74 65 67 65 | 72 29 3b 0d 09 66 75 6e |: intege|r);..fun|
|000007a0| 63 74 69 6f 6e 20 47 65 | 74 44 43 74 6c 56 61 6c |ction Ge|tDCtlVal|
|000007b0| 75 65 20 28 64 70 3a 20 | 64 69 61 6c 6f 67 50 74 |ue (dp: |dialogPt|
|000007c0| 72 3b 20 69 74 65 6d 3a | 20 69 6e 74 65 67 65 72 |r; item:| integer|
|000007d0| 29 3a 20 69 6e 74 65 67 | 65 72 3b 0d 09 70 72 6f |): integ|er;..pro|
|000007e0| 63 65 64 75 72 65 20 53 | 65 74 44 43 74 6c 56 61 |cedure S|etDCtlVa|
|000007f0| 6c 75 65 20 28 64 70 3a | 20 64 69 61 6c 6f 67 50 |lue (dp:| dialogP|
|00000800| 74 72 3b 20 69 74 65 6d | 3a 20 69 6e 74 65 67 65 |tr; item|: intege|
|00000810| 72 3b 20 76 61 6c 75 65 | 3a 20 69 6e 74 65 67 65 |r; value|: intege|
|00000820| 72 29 3b 0d 09 70 72 6f | 63 65 64 75 72 65 20 44 |r);..pro|cedure D|
|00000830| 72 61 77 44 49 74 65 6d | 20 28 64 70 3a 20 64 69 |rawDItem| (dp: di|
|00000840| 61 6c 6f 67 50 74 72 3b | 20 69 74 65 6d 3a 20 69 |alogPtr;| item: i|
|00000850| 6e 74 65 67 65 72 29 3b | 0d 09 66 75 6e 63 74 69 |nteger);|..functi|
|00000860| 6f 6e 20 47 65 74 50 6f | 70 75 70 4d 48 61 6e 64 |on GetPo|pupMHand|
|00000870| 6c 65 20 28 64 6c 67 3a | 20 64 69 61 6c 6f 67 50 |le (dlg:| dialogP|
|00000880| 74 72 3b 20 69 74 65 6d | 3a 20 69 6e 74 65 67 65 |tr; item|: intege|
|00000890| 72 29 3a 20 6d 65 6e 75 | 48 61 6e 64 6c 65 3b 0d |r): menu|Handle;.|
|000008a0| 09 70 72 6f 63 65 64 75 | 72 65 20 53 65 74 50 6f |.procedu|re SetPo|
|000008b0| 70 55 70 4d 65 6e 75 4f | 6e 4d 6f 75 73 65 44 6f |pUpMenuO|nMouseDo|
|000008c0| 77 6e 20 28 64 6c 67 3a | 20 64 69 61 6c 6f 67 50 |wn (dlg:| dialogP|
|000008d0| 74 72 3b 20 69 74 65 6d | 3a 20 69 6e 74 65 67 65 |tr; item|: intege|
|000008e0| 72 3b 20 74 65 78 74 3a | 20 73 74 72 32 35 35 29 |r; text:| str255)|
|000008f0| 3b 0d 09 70 72 6f 63 65 | 64 75 72 65 20 47 65 74 |;..proce|dure Get|
|00000900| 50 6f 70 55 70 49 74 65 | 6d 54 65 78 74 20 28 64 |PopUpIte|mText (d|
|00000910| 6c 67 3a 20 64 69 61 6c | 6f 67 50 74 72 3b 20 69 |lg: dial|ogPtr; i|
|00000920| 74 65 6d 3a 20 69 6e 74 | 65 67 65 72 3b 20 76 61 |tem: int|eger; va|
|00000930| 72 20 74 65 78 74 3a 20 | 73 74 72 32 35 35 29 3b |r text: |str255);|
|00000940| 0d 09 70 72 6f 63 65 64 | 75 72 65 20 47 65 74 44 |..proced|ure GetD|
|00000950| 41 46 6f 6e 74 20 28 76 | 61 72 20 66 6f 6e 74 3a |AFont (v|ar font:|
|00000960| 20 69 6e 74 65 67 65 72 | 29 3b 0d 09 70 72 6f 63 | integer|);..proc|
|00000970| 65 64 75 72 65 20 53 65 | 74 57 69 6e 64 6f 77 54 |edure Se|tWindowT|
|00000980| 69 74 6c 65 20 28 77 69 | 6e 64 6f 77 3a 20 77 69 |itle (wi|ndow: wi|
|00000990| 6e 64 6f 77 50 74 72 3b | 20 74 69 74 6c 65 3a 20 |ndowPtr;| title: |
|000009a0| 73 74 72 32 35 35 29 3b | 0d 09 66 75 6e 63 74 69 |str255);|..functi|
|000009b0| 6f 6e 20 53 65 6c 65 63 | 74 65 64 54 65 78 74 49 |on Selec|tedTextI|
|000009c0| 74 65 6d 20 28 64 6c 67 | 3a 20 44 69 61 6c 6f 67 |tem (dlg|: Dialog|
|000009d0| 50 74 72 29 3a 20 69 6e | 74 65 67 65 72 3b 0d 09 |Ptr): in|teger;..|
|000009e0| 70 72 6f 63 65 64 75 72 | 65 20 44 72 61 77 54 68 |procedur|e DrawTh|
|000009f0| 65 46 72 69 67 67 69 6e | 67 47 72 6f 77 49 63 6f |eFriggin|gGrowIco|
|00000a00| 6e 20 28 77 69 6e 64 6f | 77 3a 20 77 69 6e 64 6f |n (windo|w: windo|
|00000a10| 77 50 74 72 3b 20 62 6f | 75 6e 64 73 3a 20 72 65 |wPtr; bo|unds: re|
|00000a20| 63 74 29 3b 0d 09 70 72 | 6f 63 65 64 75 72 65 20 |ct);..pr|ocedure |
|00000a30| 44 69 73 70 6c 61 79 53 | 74 79 6c 65 64 53 74 72 |DisplayS|tyledStr|
|00000a40| 69 6e 67 20 28 64 6c 67 | 3a 20 64 69 61 6c 6f 67 |ing (dlg|: dialog|
|00000a50| 50 74 72 3b 20 69 74 65 | 6d 3a 20 69 6e 74 65 67 |Ptr; ite|m: integ|
|00000a60| 65 72 3b 20 73 3a 20 73 | 74 72 32 35 35 29 3b 0d |er; s: s|tr255);.|
|00000a70| 7b 20 73 3d 20 22 66 6f | 6e 74 3a 73 69 7a 65 3a |{ s= "fo|nt:size:|
|00000a80| 73 74 79 6c 65 3a 6a 75 | 73 74 3a 74 65 78 74 22 |style:ju|st:text"|
|00000a90| 20 7d 0d 09 70 72 6f 63 | 65 64 75 72 65 20 53 68 | }..proc|edure Sh|
|00000aa0| 69 66 74 54 61 62 20 28 | 64 6c 67 3a 20 44 69 61 |iftTab (|dlg: Dia|
|00000ab0| 6c 6f 67 50 74 72 29 3b | 0d 09 66 75 6e 63 74 69 |logPtr);|..functi|
|00000ac0| 6f 6e 20 43 6f 75 6e 74 | 44 49 74 65 6d 73 20 28 |on Count|DItems (|
|00000ad0| 64 6c 67 3a 20 44 69 61 | 6c 6f 67 50 74 72 29 3a |dlg: Dia|logPtr):|
|00000ae0| 20 69 6e 74 65 67 65 72 | 3b 0d 09 66 75 6e 63 74 | integer|;..funct|
|00000af0| 69 6f 6e 20 4f 4b 4d 6f | 64 61 6c 46 69 6c 74 65 |ion OKMo|dalFilte|
|00000b00| 72 20 28 64 6c 67 3a 20 | 44 69 61 6c 6f 67 50 74 |r (dlg: |DialogPt|
|00000b10| 72 3b 20 76 61 72 20 65 | 72 3a 20 45 76 65 6e 74 |r; var e|r: Event|
|00000b20| 52 65 63 6f 72 64 3b 20 | 76 61 72 20 69 74 65 6d |Record; |var item|
|00000b30| 3a 20 69 6e 74 65 67 65 | 72 29 3a 20 62 6f 6f 6c |: intege|r): bool|
|00000b40| 65 61 6e 3b 0d 09 66 75 | 6e 63 74 69 6f 6e 20 43 |ean;..fu|nction C|
|00000b50| 61 6e 63 65 6c 4d 6f 64 | 61 6c 46 69 6c 74 65 72 |ancelMod|alFilter|
|00000b60| 20 28 64 6c 67 3a 20 44 | 69 61 6c 6f 67 50 74 72 | (dlg: D|ialogPtr|
|00000b70| 3b 20 76 61 72 20 65 72 | 3a 20 45 76 65 6e 74 52 |; var er|: EventR|
|00000b80| 65 63 6f 72 64 3b 20 76 | 61 72 20 69 74 65 6d 3a |ecord; v|ar item:|
|00000b90| 20 69 6e 74 65 67 65 72 | 29 3a 20 62 6f 6f 6c 65 | integer|): boole|
|00000ba0| 61 6e 3b 0d 09 66 75 6e | 63 74 69 6f 6e 20 43 61 |an;..fun|ction Ca|
|00000bb0| 6e 63 65 6c 44 69 73 63 | 61 72 64 4d 6f 64 61 6c |ncelDisc|ardModal|
|00000bc0| 46 69 6c 74 65 72 20 28 | 64 6c 67 3a 20 44 69 61 |Filter (|dlg: Dia|
|00000bd0| 6c 6f 67 50 74 72 3b 20 | 76 61 72 20 65 72 3a 20 |logPtr; |var er: |
|00000be0| 45 76 65 6e 74 52 65 63 | 6f 72 64 3b 20 76 61 72 |EventRec|ord; var|
|00000bf0| 20 69 74 65 6d 3a 20 69 | 6e 74 65 67 65 72 29 3a | item: i|nteger):|
|00000c00| 20 62 6f 6f 6c 65 61 6e | 3b 0d 09 70 72 6f 63 65 | boolean|;..proce|
|00000c10| 64 75 72 65 20 44 72 61 | 77 47 72 61 79 52 65 63 |dure Dra|wGrayRec|
|00000c20| 74 20 28 64 6c 67 3a 20 | 44 69 61 6c 6f 67 50 74 |t (dlg: |DialogPt|
|00000c30| 72 3b 20 69 74 65 6d 3a | 20 69 6e 74 65 67 65 72 |r; item:| integer|
|00000c40| 3b 20 74 69 74 6c 65 3a | 20 73 74 72 32 35 35 29 |; title:| str255)|
|00000c50| 3b 0d 09 66 75 6e 63 74 | 69 6f 6e 20 54 72 61 63 |;..funct|ion Trac|
|00000c60| 6b 49 74 65 6d 73 28 77 | 69 6e 64 6f 77 3a 57 69 |kItems(w|indow:Wi|
|00000c70| 6e 64 6f 77 50 74 72 3b | 20 69 31 2c 69 32 2c 69 |ndowPtr;| i1,i2,i|
|00000c80| 33 3a 69 6e 74 65 67 65 | 72 29 3a 62 6f 6f 6c 65 |3:intege|r):boole|
|00000c90| 61 6e 3b 0d 0d 69 6d 70 | 6c 65 6d 65 6e 74 61 74 |an;..imp|lementat|
|00000ca0| 69 6f 6e 0d 0d 09 75 73 | 65 73 0d 09 09 54 65 78 |ion...us|es...Tex|
|00000cb0| 74 55 74 69 6c 73 2c 20 | 46 6f 6e 74 73 2c 20 49 |tUtils, |Fonts, I|
|00000cc0| 43 4d 69 73 63 53 75 62 | 73 3b 0d 09 09 0d 09 70 |CMiscSub|s;.....p|
|00000cd0| 72 6f 63 65 64 75 72 65 | 20 53 65 74 49 74 65 6d |rocedure| SetItem|
|00000ce0| 54 65 78 74 20 28 64 6c | 67 3a 20 64 69 61 6c 6f |Text (dl|g: dialo|
|00000cf0| 67 50 74 72 3b 20 69 74 | 65 6d 3a 20 69 6e 74 65 |gPtr; it|em: inte|
|00000d00| 67 65 72 3b 20 74 65 78 | 74 3a 20 73 74 72 32 35 |ger; tex|t: str25|
|00000d10| 35 29 3b 0d 09 09 76 61 | 72 0d 09 09 09 69 74 3a |5);...va|r....it:|
|00000d20| 20 69 6e 74 65 67 65 72 | 3b 0d 09 09 09 69 68 3a | integer|;....ih:|
|00000d30| 20 68 61 6e 64 6c 65 3b | 0d 09 09 09 62 6f 78 3a | handle;|....box:|
|00000d40| 20 72 65 63 74 3b 0d 09 | 09 09 6f 6c 64 74 65 78 | rect;..|..oldtex|
|00000d50| 74 3a 20 73 74 72 32 35 | 35 3b 0d 09 62 65 67 69 |t: str25|5;..begi|
|00000d60| 6e 0d 09 09 47 65 74 44 | 69 61 6c 6f 67 49 74 65 |n...GetD|ialogIte|
|00000d70| 6d 28 64 6c 67 2c 20 69 | 74 65 6d 2c 20 69 74 2c |m(dlg, i|tem, it,|
|00000d80| 20 69 68 2c 20 62 6f 78 | 29 3b 0d 09 09 47 65 74 | ih, box|);...Get|
|00000d90| 44 69 61 6c 6f 67 49 74 | 65 6d 54 65 78 74 28 69 |DialogIt|emText(i|
|00000da0| 68 2c 20 6f 6c 64 74 65 | 78 74 29 3b 0d 09 09 69 |h, oldte|xt);...i|
|00000db0| 66 20 6f 6c 64 74 65 78 | 74 20 3c 3e 20 74 65 78 |f oldtex|t <> tex|
|00000dc0| 74 20 74 68 65 6e 0d 09 | 09 09 53 65 74 44 69 61 |t then..|..SetDia|
|00000dd0| 6c 6f 67 49 74 65 6d 54 | 65 78 74 28 69 68 2c 20 |logItemT|ext(ih, |
|00000de0| 74 65 78 74 29 3b 0d 09 | 65 6e 64 3b 0d 0d 09 70 |text);..|end;...p|
|00000df0| 72 6f 63 65 64 75 72 65 | 20 47 65 74 49 74 65 6d |rocedure| GetItem|
|00000e00| 54 65 78 74 20 28 64 6c | 67 3a 20 64 69 61 6c 6f |Text (dl|g: dialo|
|00000e10| 67 50 74 72 3b 20 69 74 | 65 6d 3a 20 69 6e 74 65 |gPtr; it|em: inte|
|00000e20| 67 65 72 3b 20 76 61 72 | 20 74 65 78 74 3a 20 73 |ger; var| text: s|
|00000e30| 74 72 32 35 35 29 3b 0d | 09 09 76 61 72 0d 09 09 |tr255);.|..var...|
|00000e40| 09 69 74 3a 20 69 6e 74 | 65 67 65 72 3b 0d 09 09 |.it: int|eger;...|
|00000e50| 09 69 68 3a 20 68 61 6e | 64 6c 65 3b 0d 09 09 09 |.ih: han|dle;....|
|00000e60| 62 6f 78 3a 20 72 65 63 | 74 3b 0d 09 62 65 67 69 |box: rec|t;..begi|
|00000e70| 6e 0d 09 09 47 65 74 44 | 69 61 6c 6f 67 49 74 65 |n...GetD|ialogIte|
|00000e80| 6d 28 64 6c 67 2c 20 69 | 74 65 6d 2c 20 69 74 2c |m(dlg, i|tem, it,|
|00000e90| 20 69 68 2c 20 62 6f 78 | 29 3b 0d 09 09 47 65 74 | ih, box|);...Get|
|00000ea0| 44 69 61 6c 6f 67 49 74 | 65 6d 54 65 78 74 28 69 |DialogIt|emText(i|
|00000eb0| 68 2c 20 74 65 78 74 29 | 3b 0d 09 65 6e 64 3b 0d |h, text)|;..end;.|
|00000ec0| 0d 09 66 75 6e 63 74 69 | 6f 6e 20 47 65 74 49 74 |..functi|on GetIt|
|00000ed0| 65 6d 54 65 78 74 46 20 | 28 64 6c 67 3a 20 64 69 |emTextF |(dlg: di|
|00000ee0| 61 6c 6f 67 50 74 72 3b | 20 69 74 65 6d 3a 20 69 |alogPtr;| item: i|
|00000ef0| 6e 74 65 67 65 72 29 3a | 20 73 74 72 32 35 35 3b |nteger):| str255;|
|00000f00| 0d 09 09 76 61 72 0d 09 | 09 09 74 65 78 74 3a 20 |...var..|..text: |
|00000f10| 73 74 72 32 35 35 3b 0d | 09 62 65 67 69 6e 0d 09 |str255;.|.begin..|
|00000f20| 09 47 65 74 49 74 65 6d | 54 65 78 74 28 64 6c 67 |.GetItem|Text(dlg|
|00000f30| 2c 20 69 74 65 6d 2c 20 | 74 65 78 74 29 3b 0d 09 |, item, |text);..|
|00000f40| 09 47 65 74 49 74 65 6d | 54 65 78 74 46 20 3a 3d |.GetItem|TextF :=|
|00000f50| 20 74 65 78 74 3b 0d 09 | 65 6e 64 3b 0d 0d 09 70 | text;..|end;...p|
|00000f60| 72 6f 63 65 64 75 72 65 | 20 4f 75 74 6c 69 6e 65 |rocedure| Outline|
|00000f70| 44 65 66 61 75 6c 74 31 | 20 28 64 70 3a 20 64 69 |Default1| (dp: di|
|00000f80| 61 6c 6f 67 50 74 72 3b | 20 69 74 65 6d 3a 20 69 |alogPtr;| item: i|
|00000f90| 6e 74 65 67 65 72 29 3b | 0d 09 09 76 61 72 0d 09 |nteger);|...var..|
|00000fa0| 09 09 6b 69 6e 64 3a 20 | 69 6e 74 65 67 65 72 3b |..kind: |integer;|
|00000fb0| 0d 09 09 09 68 3a 20 68 | 61 6e 64 6c 65 3b 0d 09 |....h: h|andle;..|
|00000fc0| 09 09 72 3a 20 72 65 63 | 74 3b 0d 09 62 65 67 69 |..r: rec|t;..begi|
|00000fd0| 6e 0d 09 09 69 74 65 6d | 20 3a 3d 20 69 74 65 6d |n...item| := item|
|00000fe0| 3b 20 7b 20 55 6e 75 73 | 65 64 20 7d 0d 09 09 53 |; { Unus|ed }...S|
|00000ff0| 65 74 50 6f 72 74 28 64 | 70 29 3b 0d 09 09 47 65 |etPort(d|p);...Ge|
|00001000| 74 44 69 61 6c 6f 67 49 | 74 65 6d 28 64 70 2c 20 |tDialogI|tem(dp, |
|00001010| 31 2c 20 6b 69 6e 64 2c | 20 68 2c 20 72 29 3b 0d |1, kind,| h, r);.|
|00001020| 09 09 50 65 6e 53 69 7a | 65 28 33 2c 20 33 29 3b |..PenSiz|e(3, 3);|
|00001030| 0d 09 09 49 6e 73 65 74 | 52 65 63 74 28 72 2c 20 |...Inset|Rect(r, |
|00001040| 2d 34 2c 20 2d 34 29 3b | 0d 09 09 69 66 20 63 6f |-4, -4);|...if co|
|00001050| 6e 74 72 6f 6c 48 61 6e | 64 6c 65 28 68 29 5e 5e |ntrolHan|dle(h)^^|
|00001060| 2e 63 6f 6e 74 72 6c 48 | 69 6c 69 74 65 20 3d 20 |.contrlH|ilite = |
|00001070| 32 35 35 20 74 68 65 6e | 0d 09 09 09 50 65 6e 50 |255 then|....PenP|
|00001080| 61 74 28 71 64 2e 67 72 | 61 79 29 3b 0d 09 09 46 |at(qd.gr|ay);...F|
|00001090| 72 61 6d 65 52 6f 75 6e | 64 52 65 63 74 28 72 2c |rameRoun|dRect(r,|
|000010a0| 20 31 36 2c 20 31 36 29 | 3b 0d 09 09 69 66 20 63 | 16, 16)|;...if c|
|000010b0| 6f 6e 74 72 6f 6c 48 61 | 6e 64 6c 65 28 68 29 5e |ontrolHa|ndle(h)^|
|000010c0| 5e 2e 63 6f 6e 74 72 6c | 48 69 6c 69 74 65 20 3d |^.contrl|Hilite =|
|000010d0| 20 32 35 35 20 74 68 65 | 6e 0d 09 09 09 50 65 6e | 255 the|n....Pen|
|000010e0| 50 61 74 28 71 64 2e 62 | 6c 61 63 6b 29 3b 0d 09 |Pat(qd.b|lack);..|
|000010f0| 09 50 65 6e 4e 6f 72 6d | 61 6c 3b 0d 09 65 6e 64 |.PenNorm|al;..end|
|00001100| 3b 0d 0d 09 70 72 6f 63 | 65 64 75 72 65 20 53 65 |;...proc|edure Se|
|00001110| 74 55 70 44 65 66 61 75 | 6c 74 4f 75 74 6c 69 6e |tUpDefau|ltOutlin|
|00001120| 65 20 28 64 70 3a 20 64 | 69 61 6c 6f 67 50 74 72 |e (dp: d|ialogPtr|
|00001130| 3b 20 64 65 66 5f 69 74 | 65 6d 2c 20 75 73 65 72 |; def_it|em, user|
|00001140| 5f 69 74 65 6d 3a 20 69 | 6e 74 65 67 65 72 29 3b |_item: i|nteger);|
|00001150| 0d 09 09 76 61 72 0d 09 | 09 09 6b 69 6e 64 3a 20 |...var..|..kind: |
|00001160| 69 6e 74 65 67 65 72 3b | 0d 09 09 09 68 3a 20 68 |integer;|....h: h|
|00001170| 61 6e 64 6c 65 3b 0d 09 | 09 09 72 3a 20 72 65 63 |andle;..|..r: rec|
|00001180| 74 3b 0d 09 62 65 67 69 | 6e 0d 09 09 69 66 20 64 |t;..begi|n...if d|
|00001190| 65 66 5f 69 74 65 6d 20 | 3c 3e 20 31 20 74 68 65 |ef_item |<> 1 the|
|000011a0| 6e 0d 09 09 09 44 65 62 | 75 67 53 74 72 28 27 53 |n....Deb|ugStr('S|
|000011b0| 65 74 55 70 44 65 66 61 | 75 6c 74 4f 75 74 6c 69 |etUpDefa|ultOutli|
|000011c0| 6e 65 3a 43 61 6e 74 20 | 68 61 6e 64 6c 65 20 61 |ne:Cant |handle a|
|000011d0| 6e 79 74 68 69 6e 67 20 | 65 78 63 65 70 74 20 31 |nything |except 1|
|000011e0| 20 79 65 74 27 29 3b 0d | 09 09 47 65 74 44 69 61 | yet');.|..GetDia|
|000011f0| 6c 6f 67 49 74 65 6d 28 | 64 70 2c 20 75 73 65 72 |logItem(|dp, user|
|00001200| 5f 69 74 65 6d 2c 20 6b | 69 6e 64 2c 20 68 2c 20 |_item, k|ind, h, |
|00001210| 72 29 3b 0d 09 09 49 6e | 73 65 74 52 65 63 74 28 |r);...In|setRect(|
|00001220| 72 2c 20 2d 31 30 2c 20 | 2d 31 30 29 3b 0d 09 09 |r, -10, |-10);...|
|00001230| 53 65 74 44 69 61 6c 6f | 67 49 74 65 6d 28 64 70 |SetDialo|gItem(dp|
|00001240| 2c 20 75 73 65 72 5f 69 | 74 65 6d 2c 20 75 73 65 |, user_i|tem, use|
|00001250| 72 49 74 65 6d 2c 20 68 | 61 6e 64 6c 65 28 40 4f |rItem, h|andle(@O|
|00001260| 75 74 6c 69 6e 65 44 65 | 66 61 75 6c 74 31 29 2c |utlineDe|fault1),|
|00001270| 20 72 29 3b 0d 09 65 6e | 64 3b 0d 0d 09 70 72 6f | r);..en|d;...pro|
|00001280| 63 65 64 75 72 65 20 46 | 6c 61 73 68 49 74 65 6d |cedure F|lashItem|
|00001290| 20 28 64 6c 67 3a 20 64 | 69 61 6c 6f 67 50 74 72 | (dlg: d|ialogPtr|
|000012a0| 3b 20 69 74 65 6d 3a 20 | 69 6e 74 65 67 65 72 29 |; item: |integer)|
|000012b0| 3b 0d 09 09 76 61 72 0d | 09 09 09 6b 69 6e 64 3a |;...var.|...kind:|
|000012c0| 20 69 6e 74 65 67 65 72 | 3b 0d 09 09 09 68 3a 20 | integer|;....h: |
|000012d0| 68 61 6e 64 6c 65 3b 0d | 09 09 09 72 3a 20 72 65 |handle;.|...r: re|
|000012e0| 63 74 3b 0d 09 09 09 66 | 3a 20 6c 6f 6e 67 49 6e |ct;....f|: longIn|
|000012f0| 74 3b 0d 09 62 65 67 69 | 6e 0d 09 09 47 65 74 44 |t;..begi|n...GetD|
|00001300| 69 61 6c 6f 67 49 74 65 | 6d 28 64 6c 67 2c 20 69 |ialogIte|m(dlg, i|
|00001310| 74 65 6d 2c 20 6b 69 6e | 64 2c 20 68 2c 20 72 29 |tem, kin|d, h, r)|
|00001320| 3b 0d 09 09 48 69 6c 69 | 74 65 43 6f 6e 74 72 6f |;...Hili|teContro|
|00001330| 6c 28 63 6f 6e 74 72 6f | 6c 48 61 6e 64 6c 65 28 |l(contro|lHandle(|
|00001340| 68 29 2c 20 6b 43 6f 6e | 74 72 6f 6c 42 75 74 74 |h), kCon|trolButt|
|00001350| 6f 6e 50 61 72 74 29 3b | 0d 09 09 44 65 6c 61 79 |onPart);|...Delay|
|00001360| 28 32 2c 20 66 29 3b 0d | 09 09 48 69 6c 69 74 65 |(2, f);.|..Hilite|
|00001370| 43 6f 6e 74 72 6f 6c 28 | 63 6f 6e 74 72 6f 6c 48 |Control(|controlH|
|00001380| 61 6e 64 6c 65 28 68 29 | 2c 20 30 29 3b 0d 09 65 |andle(h)|, 0);..e|
|00001390| 6e 64 3b 0d 0d 09 70 72 | 6f 63 65 64 75 72 65 20 |nd;...pr|ocedure |
|000013a0| 49 6e 76 61 6c 44 49 74 | 65 6d 28 64 6c 67 20 3a |InvalDIt|em(dlg :|
|000013b0| 20 44 69 61 6c 6f 67 50 | 74 72 3b 20 69 74 65 6d | DialogP|tr; item|
|000013c0| 20 3a 20 69 6e 74 65 67 | 65 72 29 3b 0d 09 09 76 | : integ|er);...v|
|000013d0| 61 72 0d 09 09 09 6f 6c | 64 5f 70 6f 72 74 20 3a |ar....ol|d_port :|
|000013e0| 20 47 72 61 66 50 74 72 | 3b 0d 09 09 09 72 20 3a | GrafPtr|;....r :|
|000013f0| 20 52 65 63 74 3b 0d 09 | 62 65 67 69 6e 0d 09 09 | Rect;..|begin...|
|00001400| 47 65 74 50 6f 72 74 28 | 6f 6c 64 5f 70 6f 72 74 |GetPort(|old_port|
|00001410| 29 3b 0d 09 09 53 65 74 | 50 6f 72 74 28 64 6c 67 |);...Set|Port(dlg|
|00001420| 29 3b 0d 09 09 47 65 74 | 44 49 74 65 6d 52 65 63 |);...Get|DItemRec|
|00001430| 74 28 64 6c 67 2c 20 69 | 74 65 6d 2c 20 72 29 3b |t(dlg, i|tem, r);|
|00001440| 0d 09 09 49 6e 76 61 6c | 52 65 63 74 28 72 29 3b |...Inval|Rect(r);|
|00001450| 0d 09 09 53 65 74 50 6f | 72 74 28 6f 6c 64 5f 70 |...SetPo|rt(old_p|
|00001460| 6f 72 74 29 3b 0d 09 65 | 6e 64 3b 20 28 2a 20 49 |ort);..e|nd; (* I|
|00001470| 6e 76 61 6c 44 49 74 65 | 6d 20 2a 29 0d 09 0d 09 |nvalDIte|m *)....|
|00001480| 70 72 6f 63 65 64 75 72 | 65 20 53 65 74 44 49 74 |procedur|e SetDIt|
|00001490| 65 6d 52 65 63 74 20 28 | 64 70 3a 20 64 69 61 6c |emRect (|dp: dial|
|000014a0| 6f 67 50 74 72 3b 20 69 | 74 65 6d 3a 20 69 6e 74 |ogPtr; i|tem: int|
|000014b0| 65 67 65 72 3b 20 72 72 | 3a 20 72 65 63 74 29 3b |eger; rr|: rect);|
|000014c0| 0d 09 09 76 61 72 0d 09 | 09 09 6b 69 6e 64 3a 20 |...var..|..kind: |
|000014d0| 69 6e 74 65 67 65 72 3b | 0d 09 09 09 68 3a 20 68 |integer;|....h: h|
|000014e0| 61 6e 64 6c 65 3b 0d 09 | 09 09 72 3a 20 72 65 63 |andle;..|..r: rec|
|000014f0| 74 3b 0d 09 62 65 67 69 | 6e 0d 09 09 47 65 74 44 |t;..begi|n...GetD|
|00001500| 69 61 6c 6f 67 49 74 65 | 6d 28 64 70 2c 20 69 74 |ialogIte|m(dp, it|
|00001510| 65 6d 2c 20 6b 69 6e 64 | 2c 20 68 2c 20 72 29 3b |em, kind|, h, r);|
|00001520| 0d 09 09 53 65 74 44 69 | 61 6c 6f 67 49 74 65 6d |...SetDi|alogItem|
|00001530| 28 64 70 2c 20 69 74 65 | 6d 2c 20 6b 69 6e 64 2c |(dp, ite|m, kind,|
|00001540| 20 68 2c 20 72 72 29 3b | 0d 09 65 6e 64 3b 0d 0d | h, rr);|..end;..|
|00001550| 09 70 72 6f 63 65 64 75 | 72 65 20 47 65 74 44 49 |.procedu|re GetDI|
|00001560| 74 65 6d 52 65 63 74 20 | 28 64 70 3a 20 64 69 61 |temRect |(dp: dia|
|00001570| 6c 6f 67 50 74 72 3b 20 | 69 74 65 6d 3a 20 69 6e |logPtr; |item: in|
|00001580| 74 65 67 65 72 3b 20 76 | 61 72 20 72 72 3a 20 72 |teger; v|ar rr: r|
|00001590| 65 63 74 29 3b 0d 09 09 | 76 61 72 0d 09 09 09 6b |ect);...|var....k|
|000015a0| 69 6e 64 3a 20 69 6e 74 | 65 67 65 72 3b 0d 09 09 |ind: int|eger;...|
|000015b0| 09 68 3a 20 68 61 6e 64 | 6c 65 3b 0d 09 62 65 67 |.h: hand|le;..beg|
|000015c0| 69 6e 0d 09 09 47 65 74 | 44 69 61 6c 6f 67 49 74 |in...Get|DialogIt|
|000015d0| 65 6d 28 64 70 2c 20 69 | 74 65 6d 2c 20 6b 69 6e |em(dp, i|tem, kin|
|000015e0| 64 2c 20 68 2c 20 72 72 | 29 3b 0d 09 65 6e 64 3b |d, h, rr|);..end;|
|000015f0| 0d 0d 09 70 72 6f 63 65 | 64 75 72 65 20 53 65 74 |...proce|dure Set|
|00001600| 44 49 74 65 6d 4b 69 6e | 64 20 28 64 70 3a 20 64 |DItemKin|d (dp: d|
|00001610| 69 61 6c 6f 67 50 74 72 | 3b 20 69 74 65 6d 3a 20 |ialogPtr|; item: |
|00001620| 69 6e 74 65 67 65 72 3b | 20 6b 3a 20 69 6e 74 65 |integer;| k: inte|
|00001630| 67 65 72 29 3b 0d 09 09 | 76 61 72 0d 09 09 09 6b |ger);...|var....k|
|00001640| 6b 3a 20 69 6e 74 65 67 | 65 72 3b 0d 09 09 09 68 |k: integ|er;....h|
|00001650| 3a 20 68 61 6e 64 6c 65 | 3b 0d 09 09 09 72 3a 20 |: handle|;....r: |
|00001660| 72 65 63 74 3b 0d 09 62 | 65 67 69 6e 0d 09 09 47 |rect;..b|egin...G|
|00001670| 65 74 44 69 61 6c 6f 67 | 49 74 65 6d 28 64 70 2c |etDialog|Item(dp,|
|00001680| 20 69 74 65 6d 2c 20 6b | 6b 2c 20 68 2c 20 72 29 | item, k|k, h, r)|
|00001690| 3b 0d 09 09 53 65 74 44 | 69 61 6c 6f 67 49 74 65 |;...SetD|ialogIte|
|000016a0| 6d 28 64 70 2c 20 69 74 | 65 6d 2c 20 6b 2c 20 68 |m(dp, it|em, k, h|
|000016b0| 2c 20 72 29 3b 0d 09 65 | 6e 64 3b 0d 0d 09 70 72 |, r);..e|nd;...pr|
|000016c0| 6f 63 65 64 75 72 65 20 | 47 65 74 44 49 74 65 6d |ocedure |GetDItem|
|000016d0| 4b 69 6e 64 20 28 64 70 | 3a 20 64 69 61 6c 6f 67 |Kind (dp|: dialog|
|000016e0| 50 74 72 3b 20 69 74 65 | 6d 3a 20 69 6e 74 65 67 |Ptr; ite|m: integ|
|000016f0| 65 72 3b 20 76 61 72 20 | 6b 3a 20 69 6e 74 65 67 |er; var |k: integ|
|00001700| 65 72 29 3b 0d 09 09 76 | 61 72 0d 09 09 09 72 3a |er);...v|ar....r:|
|00001710| 20 72 65 63 74 3b 0d 09 | 09 09 68 3a 20 68 61 6e | rect;..|..h: han|
|00001720| 64 6c 65 3b 0d 09 62 65 | 67 69 6e 0d 09 09 47 65 |dle;..be|gin...Ge|
|00001730| 74 44 69 61 6c 6f 67 49 | 74 65 6d 28 64 70 2c 20 |tDialogI|tem(dp, |
|00001740| 69 74 65 6d 2c 20 6b 2c | 20 68 2c 20 72 29 3b 0d |item, k,| h, r);.|
|00001750| 09 65 6e 64 3b 0d 0d 09 | 66 75 6e 63 74 69 6f 6e |.end;...|function|
|00001760| 20 47 65 74 44 43 6f 6e | 74 72 6f 6c 48 61 6e 64 | GetDCon|trolHand|
|00001770| 6c 65 20 28 64 70 3a 20 | 64 69 61 6c 6f 67 50 74 |le (dp: |dialogPt|
|00001780| 72 3b 20 69 74 65 6d 3a | 20 69 6e 74 65 67 65 72 |r; item:| integer|
|00001790| 29 3a 20 63 6f 6e 74 72 | 6f 6c 48 61 6e 64 6c 65 |): contr|olHandle|
|000017a0| 3b 0d 09 62 65 67 69 6e | 0d 09 09 47 65 74 44 43 |;..begin|...GetDC|
|000017b0| 6f 6e 74 72 6f 6c 48 61 | 6e 64 6c 65 20 3a 3d 20 |ontrolHa|ndle := |
|000017c0| 43 6f 6e 74 72 6f 6c 48 | 61 6e 64 6c 65 28 47 65 |ControlH|andle(Ge|
|000017d0| 74 44 49 74 65 6d 48 61 | 6e 64 6c 65 28 64 70 2c |tDItemHa|ndle(dp,|
|000017e0| 20 69 74 65 6d 29 29 3b | 0d 09 65 6e 64 3b 0d 0d | item));|..end;..|
|000017f0| 09 66 75 6e 63 74 69 6f | 6e 20 47 65 74 44 49 74 |.functio|n GetDIt|
|00001800| 65 6d 68 61 6e 64 6c 65 | 20 28 64 70 3a 20 64 69 |emhandle| (dp: di|
|00001810| 61 6c 6f 67 50 74 72 3b | 20 69 74 65 6d 3a 20 69 |alogPtr;| item: i|
|00001820| 6e 74 65 67 65 72 29 3a | 20 68 61 6e 64 6c 65 3b |nteger):| handle;|
|00001830| 0d 09 09 76 61 72 0d 09 | 09 09 6b 69 6e 64 3a 20 |...var..|..kind: |
|00001840| 69 6e 74 65 67 65 72 3b | 0d 09 09 09 68 3a 20 68 |integer;|....h: h|
|00001850| 61 6e 64 6c 65 3b 0d 09 | 09 09 72 3a 20 72 65 63 |andle;..|..r: rec|
|00001860| 74 3b 0d 09 62 65 67 69 | 6e 0d 09 09 47 65 74 44 |t;..begi|n...GetD|
|00001870| 69 61 6c 6f 67 49 74 65 | 6d 28 64 70 2c 20 69 74 |ialogIte|m(dp, it|
|00001880| 65 6d 2c 20 6b 69 6e 64 | 2c 20 68 2c 20 72 29 3b |em, kind|, h, r);|
|00001890| 0d 09 09 47 65 74 44 49 | 74 65 6d 68 61 6e 64 6c |...GetDI|temhandl|
|000018a0| 65 20 3a 3d 20 68 3b 0d | 09 65 6e 64 3b 0d 0d 09 |e := h;.|.end;...|
|000018b0| 70 72 6f 63 65 64 75 72 | 65 20 53 65 74 44 49 74 |procedur|e SetDIt|
|000018c0| 65 6d 48 61 6e 64 6c 65 | 20 28 64 70 3a 20 64 69 |emHandle| (dp: di|
|000018d0| 61 6c 6f 67 50 74 72 3b | 20 69 74 65 6d 3a 20 69 |alogPtr;| item: i|
|000018e0| 6e 74 65 67 65 72 3b 20 | 68 3a 20 75 6e 69 76 20 |nteger; |h: univ |
|000018f0| 68 61 6e 64 6c 65 29 3b | 0d 09 09 76 61 72 0d 09 |handle);|...var..|
|00001900| 09 09 6b 69 6e 64 3a 20 | 69 6e 74 65 67 65 72 3b |..kind: |integer;|
|00001910| 0d 09 09 09 68 68 3a 20 | 68 61 6e 64 6c 65 3b 0d |....hh: |handle;.|
|00001920| 09 09 09 72 3a 20 72 65 | 63 74 3b 0d 09 62 65 67 |...r: re|ct;..beg|
|00001930| 69 6e 0d 09 09 47 65 74 | 44 69 61 6c 6f 67 49 74 |in...Get|DialogIt|
|00001940| 65 6d 28 64 70 2c 20 69 | 74 65 6d 2c 20 6b 69 6e |em(dp, i|tem, kin|
|00001950| 64 2c 20 68 68 2c 20 72 | 29 3b 0d 09 09 53 65 74 |d, hh, r|);...Set|
|00001960| 44 69 61 6c 6f 67 49 74 | 65 6d 28 64 70 2c 20 69 |DialogIt|em(dp, i|
|00001970| 74 65 6d 2c 20 6b 69 6e | 64 2c 20 68 2c 20 72 29 |tem, kin|d, h, r)|
|00001980| 3b 0d 09 65 6e 64 3b 0d | 0d 09 66 75 6e 63 74 69 |;..end;.|..functi|
|00001990| 6f 6e 20 47 65 74 44 43 | 74 6c 45 6e 61 62 6c 65 |on GetDC|tlEnable|
|000019a0| 20 28 64 6c 67 3a 20 64 | 69 61 6c 6f 67 50 74 72 | (dlg: d|ialogPtr|
|000019b0| 3b 20 69 74 65 6d 3a 20 | 69 6e 74 65 67 65 72 29 |; item: |integer)|
|000019c0| 3a 20 62 6f 6f 6c 65 61 | 6e 3b 0d 09 09 76 61 72 |: boolea|n;...var|
|000019d0| 0d 09 09 09 6b 3a 20 69 | 6e 74 65 67 65 72 3b 0d |....k: i|nteger;.|
|000019e0| 09 09 09 68 3a 20 68 61 | 6e 64 6c 65 3b 0d 09 09 |...h: ha|ndle;...|
|000019f0| 09 72 3a 20 72 65 63 74 | 3b 0d 09 62 65 67 69 6e |.r: rect|;..begin|
|00001a00| 0d 09 09 47 65 74 44 69 | 61 6c 6f 67 49 74 65 6d |...GetDi|alogItem|
|00001a10| 28 64 6c 67 2c 20 69 74 | 65 6d 2c 20 6b 2c 20 68 |(dlg, it|em, k, h|
|00001a20| 2c 20 72 29 3b 0d 09 09 | 47 65 74 44 43 74 6c 45 |, r);...|GetDCtlE|
|00001a30| 6e 61 62 6c 65 20 3a 3d | 20 63 6f 6e 74 72 6f 6c |nable :=| control|
|00001a40| 48 61 6e 64 6c 65 28 68 | 29 5e 5e 2e 63 6f 6e 74 |Handle(h|)^^.cont|
|00001a50| 72 6c 48 69 6c 69 74 65 | 20 3c 3e 20 32 35 35 3b |rlHilite| <> 255;|
|00001a60| 0d 09 65 6e 64 3b 0d 0d | 09 70 72 6f 63 65 64 75 |..end;..|.procedu|
|00001a70| 72 65 20 53 65 74 44 43 | 74 6c 45 6e 61 62 6c 65 |re SetDC|tlEnable|
|00001a80| 20 28 64 70 3a 20 64 69 | 61 6c 6f 67 50 74 72 3b | (dp: di|alogPtr;|
|00001a90| 20 69 74 65 6d 3a 20 69 | 6e 74 65 67 65 72 3b 20 | item: i|nteger; |
|00001aa0| 6f 6e 3a 20 62 6f 6f 6c | 65 61 6e 29 3b 0d 09 09 |on: bool|ean);...|
|00001ab0| 76 61 72 0d 09 09 09 63 | 68 3a 20 43 6f 6e 74 72 |var....c|h: Contr|
|00001ac0| 6f 6c 48 61 6e 64 6c 65 | 3b 0d 09 09 09 68 69 6c |olHandle|;....hil|
|00001ad0| 69 74 65 3a 20 69 6e 74 | 65 67 65 72 3b 0d 09 62 |ite: int|eger;..b|
|00001ae0| 65 67 69 6e 0d 09 09 63 | 68 20 3a 3d 20 47 65 74 |egin...c|h := Get|
|00001af0| 44 43 6f 6e 74 72 6f 6c | 48 61 6e 64 6c 65 28 64 |DControl|Handle(d|
|00001b00| 70 2c 20 69 74 65 6d 29 | 3b 0d 09 09 68 69 6c 69 |p, item)|;...hili|
|00001b10| 74 65 20 3a 3d 20 32 35 | 35 20 2a 20 6f 72 64 28 |te := 25|5 * ord(|
|00001b20| 6e 6f 74 20 6f 6e 29 3b | 0d 09 09 69 66 20 63 68 |not on);|...if ch|
|00001b30| 5e 5e 2e 63 6f 6e 74 72 | 6c 48 69 6c 69 74 65 20 |^^.contr|lHilite |
|00001b40| 3c 3e 20 68 69 6c 69 74 | 65 20 74 68 65 6e 20 62 |<> hilit|e then b|
|00001b50| 65 67 69 6e 0d 09 09 09 | 48 69 6c 69 74 65 43 6f |egin....|HiliteCo|
|00001b60| 6e 74 72 6f 6c 28 63 68 | 2c 20 68 69 6c 69 74 65 |ntrol(ch|, hilite|
|00001b70| 29 3b 0d 09 09 65 6e 64 | 3b 0d 09 65 6e 64 3b 0d |);...end|;..end;.|
|00001b80| 0d 09 66 75 6e 63 74 69 | 6f 6e 20 47 65 74 44 43 |..functi|on GetDC|
|00001b90| 74 6c 54 69 74 6c 65 20 | 28 64 70 3a 20 64 69 61 |tlTitle |(dp: dia|
|00001ba0| 6c 6f 67 50 74 72 3b 20 | 69 74 65 6d 3a 20 69 6e |logPtr; |item: in|
|00001bb0| 74 65 67 65 72 29 3a 20 | 73 74 72 32 35 35 3b 0d |teger): |str255;.|
|00001bc0| 09 09 76 61 72 0d 09 09 | 09 73 3a 20 73 74 72 32 |..var...|.s: str2|
|00001bd0| 35 35 3b 0d 09 62 65 67 | 69 6e 0d 09 09 47 65 74 |55;..beg|in...Get|
|00001be0| 43 6f 6e 74 72 6f 6c 54 | 69 74 6c 65 28 47 65 74 |ControlT|itle(Get|
|00001bf0| 44 43 6f 6e 74 72 6f 6c | 48 61 6e 64 6c 65 28 64 |DControl|Handle(d|
|00001c00| 70 2c 20 69 74 65 6d 29 | 2c 20 73 29 3b 0d 09 09 |p, item)|, s);...|
|00001c10| 47 65 74 44 43 74 6c 54 | 69 74 6c 65 20 3a 3d 20 |GetDCtlT|itle := |
|00001c20| 73 3b 0d 09 65 6e 64 3b | 0d 0d 09 70 72 6f 63 65 |s;..end;|...proce|
|00001c30| 64 75 72 65 20 53 65 74 | 44 43 74 6c 54 69 74 6c |dure Set|DCtlTitl|
|00001c40| 65 20 28 64 70 3a 20 64 | 69 61 6c 6f 67 50 74 72 |e (dp: d|ialogPtr|
|00001c50| 3b 20 69 74 65 6d 3a 20 | 69 6e 74 65 67 65 72 3b |; item: |integer;|
|00001c60| 20 73 3a 20 73 74 72 32 | 35 35 29 3b 0d 09 09 76 | s: str2|55);...v|
|00001c70| 61 72 0d 09 09 09 63 68 | 3a 20 43 6f 6e 74 72 6f |ar....ch|: Contro|
|00001c80| 6c 48 61 6e 64 6c 65 3b | 0d 09 09 09 6f 6c 64 3a |lHandle;|....old:|
|00001c90| 20 73 74 72 32 35 35 3b | 0d 09 62 65 67 69 6e 0d | str255;|..begin.|
|00001ca0| 09 09 63 68 20 3a 3d 20 | 47 65 74 44 43 6f 6e 74 |..ch := |GetDCont|
|00001cb0| 72 6f 6c 48 61 6e 64 6c | 65 28 64 70 2c 20 69 74 |rolHandl|e(dp, it|
|00001cc0| 65 6d 29 3b 0d 09 09 47 | 65 74 43 6f 6e 74 72 6f |em);...G|etContro|
|00001cd0| 6c 54 69 74 6c 65 28 63 | 68 2c 20 6f 6c 64 29 3b |lTitle(c|h, old);|
|00001ce0| 0d 09 09 69 66 20 6f 6c | 64 20 3c 3e 20 73 20 74 |...if ol|d <> s t|
|00001cf0| 68 65 6e 20 62 65 67 69 | 6e 0d 09 09 09 53 65 74 |hen begi|n....Set|
|00001d00| 43 6f 6e 74 72 6f 6c 54 | 69 74 6c 65 28 63 68 2c |ControlT|itle(ch,|
|00001d10| 20 73 29 3b 0d 09 09 65 | 6e 64 3b 0d 09 65 6e 64 | s);...e|nd;..end|
|00001d20| 3b 0d 0d 09 66 75 6e 63 | 74 69 6f 6e 20 47 65 74 |;...func|tion Get|
|00001d30| 44 43 74 6c 42 6f 6f 6c | 65 61 6e 20 28 64 70 3a |DCtlBool|ean (dp:|
|00001d40| 20 64 69 61 6c 6f 67 50 | 74 72 3b 20 69 74 65 6d | dialogP|tr; item|
|00001d50| 3a 20 69 6e 74 65 67 65 | 72 29 3a 20 62 6f 6f 6c |: intege|r): bool|
|00001d60| 65 61 6e 3b 0d 09 62 65 | 67 69 6e 0d 09 09 47 65 |ean;..be|gin...Ge|
|00001d70| 74 44 43 74 6c 42 6f 6f | 6c 65 61 6e 20 3a 3d 20 |tDCtlBoo|lean := |
|00001d80| 47 65 74 43 6f 6e 74 72 | 6f 6c 56 61 6c 75 65 28 |GetContr|olValue(|
|00001d90| 47 65 74 44 43 6f 6e 74 | 72 6f 6c 48 61 6e 64 6c |GetDCont|rolHandl|
|00001da0| 65 28 64 70 2c 20 69 74 | 65 6d 29 29 20 3c 3e 20 |e(dp, it|em)) <> |
|00001db0| 30 3b 0d 09 65 6e 64 3b | 0d 0d 09 70 72 6f 63 65 |0;..end;|...proce|
|00001dc0| 64 75 72 65 20 53 65 74 | 44 43 74 6c 42 6f 6f 6c |dure Set|DCtlBool|
|00001dd0| 65 61 6e 20 28 64 70 3a | 20 64 69 61 6c 6f 67 50 |ean (dp:| dialogP|
|00001de0| 74 72 3b 20 69 74 65 6d | 3a 20 69 6e 74 65 67 65 |tr; item|: intege|
|00001df0| 72 3b 20 76 61 6c 75 65 | 3a 20 62 6f 6f 6c 65 61 |r; value|: boolea|
|00001e00| 6e 29 3b 0d 09 62 65 67 | 69 6e 0d 09 09 53 65 74 |n);..beg|in...Set|
|00001e10| 43 6f 6e 74 72 6f 6c 56 | 61 6c 75 65 28 47 65 74 |ControlV|alue(Get|
|00001e20| 44 43 6f 6e 74 72 6f 6c | 48 61 6e 64 6c 65 28 64 |DControl|Handle(d|
|00001e30| 70 2c 20 69 74 65 6d 29 | 2c 20 6f 72 64 28 76 61 |p, item)|, ord(va|
|00001e40| 6c 75 65 29 29 3b 0d 09 | 65 6e 64 3b 0d 0d 09 70 |lue));..|end;...p|
|00001e50| 72 6f 63 65 64 75 72 65 | 20 54 6f 67 67 6c 65 44 |rocedure| ToggleD|
|00001e60| 43 74 6c 42 6f 6f 6c 65 | 61 6e 20 28 64 70 3a 20 |CtlBoole|an (dp: |
|00001e70| 64 69 61 6c 6f 67 50 74 | 72 3b 20 69 74 65 6d 3a |dialogPt|r; item:|
|00001e80| 20 69 6e 74 65 67 65 72 | 29 3b 0d 09 62 65 67 69 | integer|);..begi|
|00001e90| 6e 0d 09 09 53 65 74 44 | 43 74 6c 42 6f 6f 6c 65 |n...SetD|CtlBoole|
|00001ea0| 61 6e 28 64 70 2c 20 69 | 74 65 6d 2c 20 6e 6f 74 |an(dp, i|tem, not|
|00001eb0| 20 47 65 74 44 43 74 6c | 42 6f 6f 6c 65 61 6e 28 | GetDCtl|Boolean(|
|00001ec0| 64 70 2c 20 69 74 65 6d | 29 29 3b 0d 09 65 6e 64 |dp, item|));..end|
|00001ed0| 3b 0d 0d 09 66 75 6e 63 | 74 69 6f 6e 20 47 65 74 |;...func|tion Get|
|00001ee0| 44 43 74 6c 56 61 6c 75 | 65 20 28 64 70 3a 20 64 |DCtlValu|e (dp: d|
|00001ef0| 69 61 6c 6f 67 50 74 72 | 3b 20 69 74 65 6d 3a 20 |ialogPtr|; item: |
|00001f00| 69 6e 74 65 67 65 72 29 | 3a 20 69 6e 74 65 67 65 |integer)|: intege|
|00001f10| 72 3b 0d 09 62 65 67 69 | 6e 0d 09 09 47 65 74 44 |r;..begi|n...GetD|
|00001f20| 43 74 6c 56 61 6c 75 65 | 20 3a 3d 20 47 65 74 43 |CtlValue| := GetC|
|00001f30| 6f 6e 74 72 6f 6c 56 61 | 6c 75 65 28 47 65 74 44 |ontrolVa|lue(GetD|
|00001f40| 43 6f 6e 74 72 6f 6c 48 | 61 6e 64 6c 65 28 64 70 |ControlH|andle(dp|
|00001f50| 2c 20 69 74 65 6d 29 29 | 3b 0d 09 65 6e 64 3b 0d |, item))|;..end;.|
|00001f60| 0d 09 70 72 6f 63 65 64 | 75 72 65 20 53 65 74 44 |..proced|ure SetD|
|00001f70| 43 74 6c 56 61 6c 75 65 | 20 28 64 70 3a 20 64 69 |CtlValue| (dp: di|
|00001f80| 61 6c 6f 67 50 74 72 3b | 20 69 74 65 6d 3a 20 69 |alogPtr;| item: i|
|00001f90| 6e 74 65 67 65 72 3b 20 | 76 61 6c 75 65 3a 20 69 |nteger; |value: i|
|00001fa0| 6e 74 65 67 65 72 29 3b | 0d 09 62 65 67 69 6e 0d |nteger);|..begin.|
|00001fb0| 09 09 53 65 74 43 6f 6e | 74 72 6f 6c 56 61 6c 75 |..SetCon|trolValu|
|00001fc0| 65 28 47 65 74 44 43 6f | 6e 74 72 6f 6c 48 61 6e |e(GetDCo|ntrolHan|
|00001fd0| 64 6c 65 28 64 70 2c 20 | 69 74 65 6d 29 2c 20 76 |dle(dp, |item), v|
|00001fe0| 61 6c 75 65 29 3b 0d 09 | 65 6e 64 3b 0d 0d 09 70 |alue);..|end;...p|
|00001ff0| 72 6f 63 65 64 75 72 65 | 20 44 72 61 77 44 49 74 |rocedure| DrawDIt|
|00002000| 65 6d 20 28 64 70 3a 20 | 64 69 61 6c 6f 67 50 74 |em (dp: |dialogPt|
|00002010| 72 3b 20 69 74 65 6d 3a | 20 69 6e 74 65 67 65 72 |r; item:| integer|
|00002020| 29 3b 0d 09 62 65 67 69 | 6e 0d 09 09 44 72 61 77 |);..begi|n...Draw|
|00002030| 31 43 6f 6e 74 72 6f 6c | 28 47 65 74 44 43 6f 6e |1Control|(GetDCon|
|00002040| 74 72 6f 6c 48 61 6e 64 | 6c 65 28 64 70 2c 20 69 |trolHand|le(dp, i|
|00002050| 74 65 6d 29 29 3b 0d 09 | 65 6e 64 3b 0d 0d 09 66 |tem));..|end;...f|
|00002060| 75 6e 63 74 69 6f 6e 20 | 47 65 74 50 6f 70 75 70 |unction |GetPopup|
|00002070| 4d 48 61 6e 64 6c 65 20 | 28 64 6c 67 3a 20 64 69 |MHandle |(dlg: di|
|00002080| 61 6c 6f 67 50 74 72 3b | 20 69 74 65 6d 3a 20 69 |alogPtr;| item: i|
|00002090| 6e 74 65 67 65 72 29 3a | 20 6d 65 6e 75 48 61 6e |nteger):| menuHan|
|000020a0| 64 6c 65 3b 0d 09 09 74 | 79 70 65 0d 09 09 09 4d |dle;...t|ype....M|
|000020b0| 65 6e 75 48 61 6e 64 6c | 65 50 74 72 20 3d 20 5e |enuHandl|ePtr = ^|
|000020c0| 4d 65 6e 75 48 61 6e 64 | 6c 65 3b 0d 09 09 09 4d |MenuHand|le;....M|
|000020d0| 65 6e 75 48 61 6e 64 6c | 65 48 61 6e 64 6c 65 20 |enuHandl|eHandle |
|000020e0| 3d 20 5e 4d 65 6e 75 48 | 61 6e 64 6c 65 50 74 72 |= ^MenuH|andlePtr|
|000020f0| 3b 0d 09 62 65 67 69 6e | 0d 09 09 47 65 74 50 6f |;..begin|...GetPo|
|00002100| 70 75 70 4d 48 61 6e 64 | 6c 65 20 3a 3d 20 4d 65 |pupMHand|le := Me|
|00002110| 6e 75 48 61 6e 64 6c 65 | 48 61 6e 64 6c 65 28 43 |nuHandle|Handle(C|
|00002120| 6f 6e 74 72 6f 6c 48 61 | 6e 64 6c 65 28 47 65 74 |ontrolHa|ndle(Get|
|00002130| 44 49 74 65 6d 48 61 6e | 64 6c 65 28 64 6c 67 2c |DItemHan|dle(dlg,|
|00002140| 20 69 74 65 6d 29 29 5e | 5e 2e 63 6f 6e 74 72 6c | item))^|^.contrl|
|00002150| 44 61 74 61 29 5e 5e 3b | 0d 09 65 6e 64 3b 0d 0d |Data)^^;|..end;..|
|00002160| 09 70 72 6f 63 65 64 75 | 72 65 20 53 65 74 50 6f |.procedu|re SetPo|
|00002170| 70 55 70 4d 65 6e 75 4f | 6e 4d 6f 75 73 65 44 6f |pUpMenuO|nMouseDo|
|00002180| 77 6e 20 28 64 6c 67 3a | 20 64 69 61 6c 6f 67 50 |wn (dlg:| dialogP|
|00002190| 74 72 3b 20 69 74 65 6d | 3a 20 69 6e 74 65 67 65 |tr; item|: intege|
|000021a0| 72 3b 20 74 65 78 74 3a | 20 73 74 72 32 35 35 29 |r; text:| str255)|
|000021b0| 3b 0d 09 09 76 61 72 0d | 09 09 09 6d 68 3a 20 4d |;...var.|...mh: M|
|000021c0| 65 6e 75 48 61 6e 64 6c | 65 3b 0d 09 09 09 69 2c |enuHandl|e;....i,|
|000021d0| 20 69 6e 64 65 78 3a 20 | 69 6e 74 65 67 65 72 3b | index: |integer;|
|000021e0| 0d 09 09 09 73 3a 20 73 | 74 72 32 35 35 3b 0d 09 |....s: s|tr255;..|
|000021f0| 62 65 67 69 6e 0d 09 09 | 6d 68 20 3a 3d 20 47 65 |begin...|mh := Ge|
|00002200| 74 50 6f 70 75 70 4d 48 | 61 6e 64 6c 65 28 64 6c |tPopupMH|andle(dl|
|00002210| 67 2c 20 69 74 65 6d 29 | 3b 0d 09 09 69 66 20 74 |g, item)|;...if t|
|00002220| 65 78 74 20 3d 20 27 27 | 20 74 68 65 6e 20 62 65 |ext = ''| then be|
|00002230| 67 69 6e 0d 09 09 09 47 | 65 74 4d 65 6e 75 49 74 |gin....G|etMenuIt|
|00002240| 65 6d 54 65 78 74 28 6d | 68 2c 20 31 2c 20 74 65 |emText(m|h, 1, te|
|00002250| 78 74 29 3b 0d 09 09 65 | 6e 64 3b 0d 09 09 47 65 |xt);...e|nd;...Ge|
|00002260| 74 4d 65 6e 75 49 74 65 | 6d 54 65 78 74 28 6d 68 |tMenuIte|mText(mh|
|00002270| 2c 20 32 2c 20 73 29 3b | 0d 09 09 69 66 20 73 20 |, 2, s);|...if s |
|00002280| 3d 20 27 2d 27 20 74 68 | 65 6e 20 62 65 67 69 6e |= '-' th|en begin|
|00002290| 0d 09 09 09 44 65 6c 65 | 74 65 4d 65 6e 75 49 74 |....Dele|teMenuIt|
|000022a0| 65 6d 28 6d 68 2c 20 32 | 29 3b 0d 09 09 09 44 65 |em(mh, 2|);....De|
|000022b0| 6c 65 74 65 4d 65 6e 75 | 49 74 65 6d 28 6d 68 2c |leteMenu|Item(mh,|
|000022c0| 20 31 29 3b 0d 09 09 65 | 6e 64 3b 0d 09 09 69 6e | 1);...e|nd;...in|
|000022d0| 64 65 78 20 3a 3d 20 30 | 3b 0d 09 09 66 6f 72 20 |dex := 0|;...for |
|000022e0| 69 20 3a 3d 20 31 20 74 | 6f 20 43 6f 75 6e 74 4d |i := 1 t|o CountM|
|000022f0| 49 74 65 6d 73 28 6d 68 | 29 20 64 6f 20 62 65 67 |Items(mh|) do beg|
|00002300| 69 6e 0d 09 09 09 47 65 | 74 4d 65 6e 75 49 74 65 |in....Ge|tMenuIte|
|00002310| 6d 54 65 78 74 28 6d 68 | 2c 20 69 2c 20 73 29 3b |mText(mh|, i, s);|
|00002320| 0d 09 09 09 69 66 20 28 | 49 55 45 71 75 61 6c 53 |....if (|IUEqualS|
|00002330| 74 72 69 6e 67 28 73 2c | 20 74 65 78 74 29 20 3d |tring(s,| text) =|
|00002340| 20 30 29 20 74 68 65 6e | 20 62 65 67 69 6e 0d 09 | 0) then| begin..|
|00002350| 09 09 09 69 6e 64 65 78 | 20 3a 3d 20 69 3b 0d 09 |...index| := i;..|
|00002360| 09 09 09 6c 65 61 76 65 | 3b 0d 09 09 09 65 6e 64 |...leave|;....end|
|00002370| 3b 0d 09 09 65 6e 64 3b | 0d 09 09 69 66 20 69 6e |;...end;|...if in|
|00002380| 64 65 78 20 3d 20 30 20 | 74 68 65 6e 20 62 65 67 |dex = 0 |then beg|
|00002390| 69 6e 0d 09 09 09 49 6e | 73 65 72 74 4d 65 6e 75 |in....In|sertMenu|
|000023a0| 49 74 65 6d 28 6d 68 2c | 20 27 28 2d 3b 66 72 65 |Item(mh,| '(-;fre|
|000023b0| 64 27 2c 20 30 29 3b 0d | 09 09 09 53 65 74 4d 65 |d', 0);.|...SetMe|
|000023c0| 6e 75 49 74 65 6d 54 65 | 78 74 28 6d 68 2c 20 31 |nuItemTe|xt(mh, 1|
|000023d0| 2c 20 74 65 78 74 29 3b | 0d 09 09 09 69 6e 64 65 |, text);|....inde|
|000023e0| 78 20 3a 3d 20 31 3b 0d | 09 09 65 6e 64 3b 0d 09 |x := 1;.|..end;..|
|000023f0| 09 53 65 74 44 43 74 6c | 56 61 6c 75 65 28 64 6c |.SetDCtl|Value(dl|
|00002400| 67 2c 20 69 74 65 6d 2c | 20 69 6e 64 65 78 29 3b |g, item,| index);|
|00002410| 0d 09 65 6e 64 3b 0d 0d | 09 70 72 6f 63 65 64 75 |..end;..|.procedu|
|00002420| 72 65 20 47 65 74 50 6f | 70 55 70 49 74 65 6d 54 |re GetPo|pUpItemT|
|00002430| 65 78 74 20 28 64 6c 67 | 3a 20 64 69 61 6c 6f 67 |ext (dlg|: dialog|
|00002440| 50 74 72 3b 20 69 74 65 | 6d 3a 20 69 6e 74 65 67 |Ptr; ite|m: integ|
|00002450| 65 72 3b 20 76 61 72 20 | 74 65 78 74 3a 20 73 74 |er; var |text: st|
|00002460| 72 32 35 35 29 3b 0d 09 | 09 76 61 72 0d 09 09 09 |r255);..|.var....|
|00002470| 6d 68 3a 20 4d 65 6e 75 | 48 61 6e 64 6c 65 3b 0d |mh: Menu|Handle;.|
|00002480| 09 62 65 67 69 6e 0d 09 | 09 6d 68 20 3a 3d 20 47 |.begin..|.mh := G|
|00002490| 65 74 50 6f 70 75 70 4d | 48 61 6e 64 6c 65 28 64 |etPopupM|Handle(d|
|000024a0| 6c 67 2c 20 69 74 65 6d | 29 3b 0d 09 09 47 65 74 |lg, item|);...Get|
|000024b0| 4d 65 6e 75 49 74 65 6d | 54 65 78 74 28 47 65 74 |MenuItem|Text(Get|
|000024c0| 50 6f 70 75 70 4d 48 61 | 6e 64 6c 65 28 64 6c 67 |PopupMHa|ndle(dlg|
|000024d0| 2c 20 69 74 65 6d 29 2c | 20 47 65 74 44 43 74 6c |, item),| GetDCtl|
|000024e0| 56 61 6c 75 65 28 64 6c | 67 2c 20 69 74 65 6d 29 |Value(dl|g, item)|
|000024f0| 2c 20 74 65 78 74 29 3b | 0d 09 65 6e 64 3b 0d 0d |, text);|..end;..|
|00002500| 09 70 72 6f 63 65 64 75 | 72 65 20 47 65 74 44 41 |.procedu|re GetDA|
|00002510| 46 6f 6e 74 20 28 76 61 | 72 20 66 6f 6e 74 3a 20 |Font (va|r font: |
|00002520| 69 6e 74 65 67 65 72 29 | 3b 0d 09 09 74 79 70 65 |integer)|;...type|
|00002530| 0d 09 09 09 69 6e 74 50 | 74 72 20 3d 20 5e 69 6e |....intP|tr = ^in|
|00002540| 74 65 67 65 72 3b 0d 09 | 09 63 6f 6e 73 74 0d 09 |teger;..|.const..|
|00002550| 09 09 44 6c 67 46 6f 6e | 74 20 3d 20 24 41 46 41 |..DlgFon|t = $AFA|
|00002560| 3b 0d 09 62 65 67 69 6e | 0d 09 09 66 6f 6e 74 20 |;..begin|...font |
|00002570| 3a 3d 20 69 6e 74 50 74 | 72 28 44 6c 67 46 6f 6e |:= intPt|r(DlgFon|
|00002580| 74 29 5e 3b 0d 09 65 6e | 64 3b 0d 0d 09 70 72 6f |t)^;..en|d;...pro|
|00002590| 63 65 64 75 72 65 20 53 | 65 74 57 69 6e 64 6f 77 |cedure S|etWindow|
|000025a0| 54 69 74 6c 65 20 28 77 | 69 6e 64 6f 77 3a 20 77 |Title (w|indow: w|
|000025b0| 69 6e 64 6f 77 50 74 72 | 3b 20 74 69 74 6c 65 3a |indowPtr|; title:|
|000025c0| 20 73 74 72 32 35 35 29 | 3b 0d 09 09 76 61 72 0d | str255)|;...var.|
|000025d0| 09 09 09 73 3a 20 73 74 | 72 32 35 35 3b 0d 09 62 |...s: st|r255;..b|
|000025e0| 65 67 69 6e 0d 09 09 47 | 65 74 57 54 69 74 6c 65 |egin...G|etWTitle|
|000025f0| 28 77 69 6e 64 6f 77 2c | 20 73 29 3b 0d 09 09 69 |(window,| s);...i|
|00002600| 66 20 73 20 3c 3e 20 74 | 69 74 6c 65 20 74 68 65 |f s <> t|itle the|
|00002610| 6e 0d 09 09 09 53 65 74 | 57 54 69 74 6c 65 28 77 |n....Set|WTitle(w|
|00002620| 69 6e 64 6f 77 2c 20 74 | 69 74 6c 65 29 3b 0d 09 |indow, t|itle);..|
|00002630| 65 6e 64 3b 0d 0d 09 66 | 75 6e 63 74 69 6f 6e 20 |end;...f|unction |
|00002640| 53 65 6c 65 63 74 65 64 | 54 65 78 74 49 74 65 6d |Selected|TextItem|
|00002650| 20 28 64 6c 67 3a 20 44 | 69 61 6c 6f 67 50 74 72 | (dlg: D|ialogPtr|
|00002660| 29 3a 20 69 6e 74 65 67 | 65 72 3b 0d 09 62 65 67 |): integ|er;..beg|
|00002670| 69 6e 0d 09 09 53 65 6c | 65 63 74 65 64 54 65 78 |in...Sel|ectedTex|
|00002680| 74 49 74 65 6d 20 3a 3d | 20 44 69 61 6c 6f 67 50 |tItem :=| DialogP|
|00002690| 65 65 6b 28 64 6c 67 29 | 5e 2e 65 64 69 74 46 69 |eek(dlg)|^.editFi|
|000026a0| 65 6c 64 20 2b 20 31 3b | 0d 09 65 6e 64 3b 0d 0d |eld + 1;|..end;..|
|000026b0| 09 66 75 6e 63 74 69 6f | 6e 20 43 6f 75 6e 74 44 |.functio|n CountD|
|000026c0| 49 74 65 6d 73 20 28 64 | 6c 67 3a 20 44 69 61 6c |Items (d|lg: Dial|
|000026d0| 6f 67 50 74 72 29 3a 20 | 69 6e 74 65 67 65 72 3b |ogPtr): |integer;|
|000026e0| 0d 09 09 74 79 70 65 0d | 09 09 09 49 6e 74 65 67 |...type.|...Integ|
|000026f0| 65 72 50 74 72 20 3d 20 | 5e 49 6e 74 65 67 65 72 |erPtr = |^Integer|
|00002700| 3b 0d 09 09 09 49 6e 74 | 65 67 65 72 48 61 6e 64 |;....Int|egerHand|
|00002710| 6c 65 20 3d 20 5e 49 6e | 74 65 67 65 72 50 74 72 |le = ^In|tegerPtr|
|00002720| 3b 0d 09 62 65 67 69 6e | 0d 09 09 43 6f 75 6e 74 |;..begin|...Count|
|00002730| 44 49 74 65 6d 73 20 3a | 3d 20 49 6e 74 65 67 65 |DItems :|= Intege|
|00002740| 72 48 61 6e 64 6c 65 28 | 44 69 61 6c 6f 67 50 65 |rHandle(|DialogPe|
|00002750| 65 6b 28 64 6c 67 29 5e | 2e 69 74 65 6d 73 29 5e |ek(dlg)^|.items)^|
|00002760| 5e 20 2b 20 31 3b 0d 09 | 65 6e 64 3b 0d 0d 09 70 |^ + 1;..|end;...p|
|00002770| 72 6f 63 65 64 75 72 65 | 20 53 68 69 66 74 54 61 |rocedure| ShiftTa|
|00002780| 62 20 28 64 6c 67 3a 20 | 44 69 61 6c 6f 67 50 74 |b (dlg: |DialogPt|
|00002790| 72 29 3b 0d 09 09 76 61 | 72 0d 09 09 09 6f 72 67 |r);...va|r....org|
|000027a0| 69 74 65 6d 2c 20 69 2c | 20 63 6f 75 6e 74 3a 20 |item, i,| count: |
|000027b0| 69 6e 74 65 67 65 72 3b | 0d 09 09 09 6b 3a 20 69 |integer;|....k: i|
|000027c0| 6e 74 65 67 65 72 3b 0d | 09 62 65 67 69 6e 0d 09 |nteger;.|.begin..|
|000027d0| 09 6f 72 67 69 74 65 6d | 20 3a 3d 20 53 65 6c 65 |.orgitem| := Sele|
|000027e0| 63 74 65 64 54 65 78 74 | 49 74 65 6d 28 64 6c 67 |ctedText|Item(dlg|
|000027f0| 29 3b 0d 09 09 63 6f 75 | 6e 74 20 3a 3d 20 43 6f |);...cou|nt := Co|
|00002800| 75 6e 74 44 49 74 65 6d | 73 28 64 6c 67 29 3b 0d |untDItem|s(dlg);.|
|00002810| 09 09 69 66 20 28 6f 72 | 67 69 74 65 6d 20 3e 20 |..if (or|gitem > |
|00002820| 30 29 20 26 20 28 63 6f | 75 6e 74 20 3e 20 31 29 |0) & (co|unt > 1)|
|00002830| 20 74 68 65 6e 20 62 65 | 67 69 6e 0d 09 09 09 69 | then be|gin....i|
|00002840| 20 3a 3d 20 6f 72 67 69 | 74 65 6d 3b 0d 09 09 09 | := orgi|tem;....|
|00002850| 72 65 70 65 61 74 0d 09 | 09 09 09 69 20 3a 3d 20 |repeat..|...i := |
|00002860| 69 20 2d 20 31 3b 0d 09 | 09 09 09 69 66 20 69 20 |i - 1;..|...if i |
|00002870| 3d 20 30 20 74 68 65 6e | 20 62 65 67 69 6e 0d 09 |= 0 then| begin..|
|00002880| 09 09 09 09 69 20 3a 3d | 20 63 6f 75 6e 74 3b 0d |....i :=| count;.|
|00002890| 09 09 09 09 65 6e 64 3b | 0d 09 09 09 09 47 65 74 |....end;|.....Get|
|000028a0| 44 49 74 65 6d 4b 69 6e | 64 28 64 6c 67 2c 20 69 |DItemKin|d(dlg, i|
|000028b0| 2c 20 6b 29 3b 0d 09 09 | 09 75 6e 74 69 6c 20 28 |, k);...|.until (|
|000028c0| 69 20 3d 20 6f 72 67 69 | 74 65 6d 29 20 7c 20 28 |i = orgi|tem) | (|
|000028d0| 6b 20 3d 20 65 64 69 74 | 54 65 78 74 29 3b 0d 09 |k = edit|Text);..|
|000028e0| 09 65 6e 64 3b 0d 09 09 | 47 65 74 44 49 74 65 6d |.end;...|GetDItem|
|000028f0| 4b 69 6e 64 28 64 6c 67 | 2c 20 69 2c 20 6b 29 3b |Kind(dlg|, i, k);|
|00002900| 0d 09 09 69 66 20 6b 20 | 3d 20 65 64 69 74 54 65 |...if k |= editTe|
|00002910| 78 74 20 74 68 65 6e 20 | 62 65 67 69 6e 0d 09 09 |xt then |begin...|
|00002920| 09 53 65 6c 65 63 74 44 | 69 61 6c 6f 67 49 74 65 |.SelectD|ialogIte|
|00002930| 6d 54 65 78 74 28 64 6c | 67 2c 20 69 2c 20 30 2c |mText(dl|g, i, 0,|
|00002940| 20 32 35 35 29 3b 0d 09 | 09 65 6e 64 3b 0d 09 65 | 255);..|.end;..e|
|00002950| 6e 64 3b 0d 0d 09 70 72 | 6f 63 65 64 75 72 65 20 |nd;...pr|ocedure |
|00002960| 44 72 61 77 54 68 65 46 | 72 69 67 67 69 6e 67 47 |DrawTheF|riggingG|
|00002970| 72 6f 77 49 63 6f 6e 20 | 28 77 69 6e 64 6f 77 3a |rowIcon |(window:|
|00002980| 20 77 69 6e 64 6f 77 50 | 74 72 3b 20 62 6f 75 6e | windowP|tr; boun|
|00002990| 64 73 3a 20 72 65 63 74 | 29 3b 0d 09 09 76 61 72 |ds: rect|);...var|
|000029a0| 0d 09 09 09 63 6c 69 70 | 3a 20 52 67 6e 48 61 6e |....clip|: RgnHan|
|000029b0| 64 6c 65 3b 0d 09 62 65 | 67 69 6e 0d 09 09 53 65 |dle;..be|gin...Se|
|000029c0| 74 50 6f 72 74 28 77 69 | 6e 64 6f 77 29 3b 0d 09 |tPort(wi|ndow);..|
|000029d0| 09 50 65 6e 4e 6f 72 6d | 61 6c 3b 0d 09 09 63 6c |.PenNorm|al;...cl|
|000029e0| 69 70 20 3a 3d 20 4e 65 | 77 52 67 6e 3b 0d 09 09 |ip := Ne|wRgn;...|
|000029f0| 47 65 74 43 6c 69 70 28 | 63 6c 69 70 29 3b 0d 09 |GetClip(|clip);..|
|00002a00| 09 43 6c 69 70 52 65 63 | 74 28 62 6f 75 6e 64 73 |.ClipRec|t(bounds|
|00002a10| 29 3b 0d 09 09 44 72 61 | 77 47 72 6f 77 49 63 6f |);...Dra|wGrowIco|
|00002a20| 6e 28 77 69 6e 64 6f 77 | 29 3b 0d 09 09 53 65 74 |n(window|);...Set|
|00002a30| 43 6c 69 70 28 63 6c 69 | 70 29 3b 0d 09 09 44 69 |Clip(cli|p);...Di|
|00002a40| 73 70 6f 73 65 52 67 6e | 28 63 6c 69 70 29 3b 0d |sposeRgn|(clip);.|
|00002a50| 09 65 6e 64 3b 0d 0d 09 | 66 75 6e 63 74 69 6f 6e |.end;...|function|
|00002a60| 20 44 6f 42 75 74 74 6f | 6e 4b 65 79 20 28 64 6c | DoButto|nKey (dl|
|00002a70| 67 3a 20 44 69 61 6c 6f | 67 50 74 72 3b 20 69 74 |g: Dialo|gPtr; it|
|00002a80| 65 6d 3a 20 69 6e 74 65 | 67 65 72 3b 20 76 61 72 |em: inte|ger; var|
|00002a90| 20 65 72 3a 20 45 76 65 | 6e 74 52 65 63 6f 72 64 | er: Eve|ntRecord|
|00002aa0| 3b 20 76 61 72 20 72 65 | 73 75 6c 74 5f 69 74 65 |; var re|sult_ite|
|00002ab0| 6d 3a 20 69 6e 74 65 67 | 65 72 29 3a 20 62 6f 6f |m: integ|er): boo|
|00002ac0| 6c 65 61 6e 3b 0d 09 62 | 65 67 69 6e 0d 09 09 69 |lean;..b|egin...i|
|00002ad0| 66 20 47 65 74 44 43 74 | 6c 45 6e 61 62 6c 65 28 |f GetDCt|lEnable(|
|00002ae0| 64 6c 67 2c 20 69 74 65 | 6d 29 20 74 68 65 6e 20 |dlg, ite|m) then |
|00002af0| 62 65 67 69 6e 0d 09 09 | 09 72 65 73 75 6c 74 5f |begin...|.result_|
|00002b00| 69 74 65 6d 20 3a 3d 20 | 69 74 65 6d 3b 0d 09 09 |item := |item;...|
|00002b10| 09 46 6c 61 73 68 49 74 | 65 6d 28 64 6c 67 2c 20 |.FlashIt|em(dlg, |
|00002b20| 69 74 65 6d 29 3b 0d 09 | 09 09 44 6f 42 75 74 74 |item);..|..DoButt|
|00002b30| 6f 6e 4b 65 79 20 3a 3d | 20 74 72 75 65 3b 0d 09 |onKey :=| true;..|
|00002b40| 09 65 6e 64 20 65 6c 73 | 65 20 62 65 67 69 6e 0d |.end els|e begin.|
|00002b50| 09 09 09 53 79 73 42 65 | 65 70 28 31 30 29 3b 0d |...SysBe|ep(10);.|
|00002b60| 09 09 09 65 72 2e 77 68 | 61 74 20 3a 3d 20 6e 75 |...er.wh|at := nu|
|00002b70| 6c 6c 45 76 65 6e 74 3b | 0d 09 09 09 44 6f 42 75 |llEvent;|....DoBu|
|00002b80| 74 74 6f 6e 4b 65 79 20 | 3a 3d 20 66 61 6c 73 65 |ttonKey |:= false|
|00002b90| 3b 0d 09 09 65 6e 64 3b | 0d 09 65 6e 64 3b 0d 0d |;...end;|..end;..|
|00002ba0| 09 66 75 6e 63 74 69 6f | 6e 20 4f 4b 4d 6f 64 61 |.functio|n OKModa|
|00002bb0| 6c 46 69 6c 74 65 72 20 | 28 64 6c 67 3a 20 44 69 |lFilter |(dlg: Di|
|00002bc0| 61 6c 6f 67 50 74 72 3b | 20 76 61 72 20 65 72 3a |alogPtr;| var er:|
|00002bd0| 20 45 76 65 6e 74 52 65 | 63 6f 72 64 3b 20 76 61 | EventRe|cord; va|
|00002be0| 72 20 69 74 65 6d 3a 20 | 69 6e 74 65 67 65 72 29 |r item: |integer)|
|00002bf0| 3a 20 62 6f 6f 6c 65 61 | 6e 3b 0d 09 09 76 61 72 |: boolea|n;...var|
|00002c00| 0d 09 09 09 63 68 3a 20 | 69 6e 74 65 67 65 72 3b |....ch: |integer;|
|00002c10| 0d 09 62 65 67 69 6e 0d | 09 09 4f 4b 4d 6f 64 61 |..begin.|..OKModa|
|00002c20| 6c 46 69 6c 74 65 72 20 | 3a 3d 20 66 61 6c 73 65 |lFilter |:= false|
|00002c30| 3b 0d 09 09 69 66 20 28 | 65 72 2e 77 68 61 74 20 |;...if (|er.what |
|00002c40| 3d 20 6b 65 79 44 6f 77 | 6e 29 20 6f 72 20 28 65 |= keyDow|n) or (e|
|00002c50| 72 2e 77 68 61 74 20 3d | 20 61 75 74 6f 4b 65 79 |r.what =| autoKey|
|00002c60| 29 20 74 68 65 6e 20 62 | 65 67 69 6e 0d 09 09 09 |) then b|egin....|
|00002c70| 63 68 20 3a 3d 20 42 41 | 4e 44 28 65 72 2e 6d 65 |ch := BA|ND(er.me|
|00002c80| 73 73 61 67 65 2c 20 24 | 46 46 29 3b 0d 09 09 09 |ssage, $|FF);....|
|00002c90| 69 66 20 28 63 68 20 3d | 20 31 33 29 20 6f 72 20 |if (ch =| 13) or |
|00002ca0| 28 63 68 20 3d 20 33 29 | 20 74 68 65 6e 20 62 65 |(ch = 3)| then be|
|00002cb0| 67 69 6e 0d 09 09 09 09 | 4f 4b 4d 6f 64 61 6c 46 |gin.....|OKModalF|
|00002cc0| 69 6c 74 65 72 20 3a 3d | 20 44 6f 42 75 74 74 6f |ilter :=| DoButto|
|00002cd0| 6e 4b 65 79 28 64 6c 67 | 2c 20 69 5f 6f 6b 2c 20 |nKey(dlg|, i_ok, |
|00002ce0| 65 72 2c 20 69 74 65 6d | 29 3b 0d 09 09 09 65 6e |er, item|);....en|
|00002cf0| 64 3b 0d 09 09 65 6e 64 | 3b 0d 09 65 6e 64 3b 0d |d;...end|;..end;.|
|00002d00| 0d 09 66 75 6e 63 74 69 | 6f 6e 20 43 61 6e 63 65 |..functi|on Cance|
|00002d10| 6c 4d 6f 64 61 6c 46 69 | 6c 74 65 72 20 28 64 6c |lModalFi|lter (dl|
|00002d20| 67 3a 20 44 69 61 6c 6f | 67 50 74 72 3b 20 76 61 |g: Dialo|gPtr; va|
|00002d30| 72 20 65 72 3a 20 45 76 | 65 6e 74 52 65 63 6f 72 |r er: Ev|entRecor|
|00002d40| 64 3b 20 76 61 72 20 69 | 74 65 6d 3a 20 69 6e 74 |d; var i|tem: int|
|00002d50| 65 67 65 72 29 3a 20 62 | 6f 6f 6c 65 61 6e 3b 0d |eger): b|oolean;.|
|00002d60| 09 09 76 61 72 0d 09 09 | 09 63 68 3a 20 69 6e 74 |..var...|.ch: int|
|00002d70| 65 67 65 72 3b 0d 09 62 | 65 67 69 6e 0d 09 09 43 |eger;..b|egin...C|
|00002d80| 61 6e 63 65 6c 4d 6f 64 | 61 6c 46 69 6c 74 65 72 |ancelMod|alFilter|
|00002d90| 20 3a 3d 20 66 61 6c 73 | 65 3b 0d 09 09 69 66 20 | := fals|e;...if |
|00002da0| 28 65 72 2e 77 68 61 74 | 20 3d 20 6b 65 79 44 6f |(er.what| = keyDo|
|00002db0| 77 6e 29 20 6f 72 20 28 | 65 72 2e 77 68 61 74 20 |wn) or (|er.what |
|00002dc0| 3d 20 61 75 74 6f 4b 65 | 79 29 20 74 68 65 6e 20 |= autoKe|y) then |
|00002dd0| 62 65 67 69 6e 0d 09 09 | 09 63 68 20 3a 3d 20 42 |begin...|.ch := B|
|00002de0| 41 4e 44 28 65 72 2e 6d | 65 73 73 61 67 65 2c 20 |AND(er.m|essage, |
|00002df0| 24 46 46 29 3b 0d 09 09 | 09 69 66 20 28 63 68 20 |$FF);...|.if (ch |
|00002e00| 3d 20 31 33 29 20 6f 72 | 20 28 63 68 20 3d 20 33 |= 13) or| (ch = 3|
|00002e10| 29 20 74 68 65 6e 20 62 | 65 67 69 6e 0d 09 09 09 |) then b|egin....|
|00002e20| 09 43 61 6e 63 65 6c 4d | 6f 64 61 6c 46 69 6c 74 |.CancelM|odalFilt|
|00002e30| 65 72 20 3a 3d 20 44 6f | 42 75 74 74 6f 6e 4b 65 |er := Do|ButtonKe|
|00002e40| 79 28 64 6c 67 2c 20 69 | 5f 6f 6b 2c 20 65 72 2c |y(dlg, i|_ok, er,|
|00002e50| 20 69 74 65 6d 29 3b 0d | 09 09 09 65 6e 64 20 65 | item);.|...end e|
|00002e60| 6c 73 65 20 69 66 20 28 | 28 63 68 20 3d 20 6f 72 |lse if (|(ch = or|
|00002e70| 64 28 27 2e 27 29 29 20 | 61 6e 64 20 28 42 41 4e |d('.')) |and (BAN|
|00002e80| 44 28 65 72 2e 6d 6f 64 | 69 66 69 65 72 73 2c 20 |D(er.mod|ifiers, |
|00002e90| 63 6d 64 4b 65 79 29 20 | 3c 3e 20 30 29 29 20 6f |cmdKey) |<> 0)) o|
|00002ea0| 72 20 28 63 68 20 3d 20 | 32 37 29 20 74 68 65 6e |r (ch = |27) then|
|00002eb0| 20 62 65 67 69 6e 0d 09 | 09 09 09 43 61 6e 63 65 | begin..|...Cance|
|00002ec0| 6c 4d 6f 64 61 6c 46 69 | 6c 74 65 72 20 3a 3d 20 |lModalFi|lter := |
|00002ed0| 44 6f 42 75 74 74 6f 6e | 4b 65 79 28 64 6c 67 2c |DoButton|Key(dlg,|
|00002ee0| 20 69 5f 63 61 6e 63 65 | 6c 2c 20 65 72 2c 20 69 | i_cance|l, er, i|
|00002ef0| 74 65 6d 29 3b 0d 09 09 | 09 65 6e 64 3b 0d 09 09 |tem);...|.end;...|
|00002f00| 65 6e 64 3b 0d 09 65 6e | 64 3b 0d 0d 09 66 75 6e |end;..en|d;...fun|
|00002f10| 63 74 69 6f 6e 20 43 61 | 6e 63 65 6c 44 69 73 63 |ction Ca|ncelDisc|
|00002f20| 61 72 64 4d 6f 64 61 6c | 46 69 6c 74 65 72 20 28 |ardModal|Filter (|
|00002f30| 64 6c 67 3a 20 44 69 61 | 6c 6f 67 50 74 72 3b 20 |dlg: Dia|logPtr; |
|00002f40| 76 61 72 20 65 72 3a 20 | 45 76 65 6e 74 52 65 63 |var er: |EventRec|
|00002f50| 6f 72 64 3b 20 76 61 72 | 20 69 74 65 6d 3a 20 69 |ord; var| item: i|
|00002f60| 6e 74 65 67 65 72 29 3a | 20 62 6f 6f 6c 65 61 6e |nteger):| boolean|
|00002f70| 3b 0d 09 09 76 61 72 0d | 09 09 09 63 68 3a 20 69 |;...var.|...ch: i|
|00002f80| 6e 74 65 67 65 72 3b 0d | 09 62 65 67 69 6e 0d 09 |nteger;.|.begin..|
|00002f90| 09 43 61 6e 63 65 6c 44 | 69 73 63 61 72 64 4d 6f |.CancelD|iscardMo|
|00002fa0| 64 61 6c 46 69 6c 74 65 | 72 20 3a 3d 20 66 61 6c |dalFilte|r := fal|
|00002fb0| 73 65 3b 0d 09 09 69 66 | 20 43 61 6e 63 65 6c 4d |se;...if| CancelM|
|00002fc0| 6f 64 61 6c 46 69 6c 74 | 65 72 28 64 6c 67 2c 20 |odalFilt|er(dlg, |
|00002fd0| 65 72 2c 20 69 74 65 6d | 29 20 74 68 65 6e 20 62 |er, item|) then b|
|00002fe0| 65 67 69 6e 0d 09 09 09 | 43 61 6e 63 65 6c 44 69 |egin....|CancelDi|
|00002ff0| 73 63 61 72 64 4d 6f 64 | 61 6c 46 69 6c 74 65 72 |scardMod|alFilter|
|00003000| 20 3a 3d 20 74 72 75 65 | 3b 0d 09 09 65 6e 64 20 | := true|;...end |
|00003010| 65 6c 73 65 20 69 66 20 | 28 65 72 2e 77 68 61 74 |else if |(er.what|
|00003020| 20 3d 20 6b 65 79 44 6f | 77 6e 29 20 6f 72 20 28 | = keyDo|wn) or (|
|00003030| 65 72 2e 77 68 61 74 20 | 3d 20 61 75 74 6f 4b 65 |er.what |= autoKe|
|00003040| 79 29 20 74 68 65 6e 20 | 62 65 67 69 6e 0d 09 09 |y) then |begin...|
|00003050| 09 63 68 20 3a 3d 20 42 | 41 4e 44 28 65 72 2e 6d |.ch := B|AND(er.m|
|00003060| 65 73 73 61 67 65 2c 20 | 24 46 46 29 3b 0d 09 09 |essage, |$FF);...|
|00003070| 09 69 66 20 28 63 68 20 | 3d 20 6f 72 64 28 27 64 |.if (ch |= ord('d|
|00003080| 27 29 29 20 61 6e 64 20 | 28 42 41 4e 44 28 65 72 |')) and |(BAND(er|
|00003090| 2e 6d 6f 64 69 66 69 65 | 72 73 2c 20 63 6d 64 4b |.modifie|rs, cmdK|
|000030a0| 65 79 29 20 3c 3e 20 30 | 29 20 74 68 65 6e 20 62 |ey) <> 0|) then b|
|000030b0| 65 67 69 6e 0d 09 09 09 | 09 43 61 6e 63 65 6c 44 |egin....|.CancelD|
|000030c0| 69 73 63 61 72 64 4d 6f | 64 61 6c 46 69 6c 74 65 |iscardMo|dalFilte|
|000030d0| 72 20 3a 3d 20 44 6f 42 | 75 74 74 6f 6e 4b 65 79 |r := DoB|uttonKey|
|000030e0| 28 64 6c 67 2c 20 69 5f | 64 69 73 63 61 72 64 2c |(dlg, i_|discard,|
|000030f0| 20 65 72 2c 20 69 74 65 | 6d 29 3b 0d 09 09 09 65 | er, ite|m);....e|
|00003100| 6e 64 3b 0d 09 09 65 6e | 64 3b 0d 09 65 6e 64 3b |nd;...en|d;..end;|
|00003110| 0d 0d 09 70 72 6f 63 65 | 64 75 72 65 20 45 6e 74 |...proce|dure Ent|
|00003120| 65 72 57 69 6e 64 6f 77 | 20 28 77 69 6e 64 6f 77 |erWindow| (window|
|00003130| 3a 20 57 69 6e 64 6f 77 | 50 74 72 3b 20 66 6f 6e |: Window|Ptr; fon|
|00003140| 74 2c 20 73 69 7a 65 3a | 20 69 6e 74 65 67 65 72 |t, size:| integer|
|00003150| 3b 20 66 61 63 65 3a 20 | 53 74 79 6c 65 3b 20 76 |; face: |Style; v|
|00003160| 61 72 20 73 61 76 65 64 | 3a 20 53 61 76 65 64 57 |ar saved|: SavedW|
|00003170| 69 6e 64 6f 77 49 6e 66 | 6f 29 3b 0d 09 62 65 67 |indowInf|o);..beg|
|00003180| 69 6e 0d 09 09 47 65 74 | 50 6f 72 74 28 73 61 76 |in...Get|Port(sav|
|00003190| 65 64 2e 6f 6c 64 70 6f | 72 74 29 3b 0d 09 09 53 |ed.oldpo|rt);...S|
|000031a0| 65 74 50 6f 72 74 28 77 | 69 6e 64 6f 77 29 3b 0d |etPort(w|indow);.|
|000031b0| 09 09 73 61 76 65 64 2e | 74 68 69 73 70 6f 72 74 |..saved.|thisport|
|000031c0| 20 3a 3d 20 77 69 6e 64 | 6f 77 3b 0d 09 09 73 61 | := wind|ow;...sa|
|000031d0| 76 65 64 2e 66 6f 6e 74 | 20 3a 3d 20 77 69 6e 64 |ved.font| := wind|
|000031e0| 6f 77 5e 2e 74 78 46 6f | 6e 74 3b 0d 09 09 73 61 |ow^.txFo|nt;...sa|
|000031f0| 76 65 64 2e 73 69 7a 65 | 20 3a 3d 20 77 69 6e 64 |ved.size| := wind|
|00003200| 6f 77 5e 2e 74 78 53 69 | 7a 65 3b 0d 09 09 73 61 |ow^.txSi|ze;...sa|
|00003210| 76 65 64 2e 66 61 63 65 | 20 3a 3d 20 77 69 6e 64 |ved.face| := wind|
|00003220| 6f 77 5e 2e 74 78 46 61 | 63 65 3b 0d 09 09 54 65 |ow^.txFa|ce;...Te|
|00003230| 78 74 46 6f 6e 74 28 66 | 6f 6e 74 29 3b 0d 09 09 |xtFont(f|ont);...|
|00003240| 54 65 78 74 53 69 7a 65 | 28 73 69 7a 65 29 3b 0d |TextSize|(size);.|
|00003250| 09 09 54 65 78 74 46 61 | 63 65 28 66 61 63 65 29 |..TextFa|ce(face)|
|00003260| 3b 0d 09 65 6e 64 3b 0d | 0d 09 70 72 6f 63 65 64 |;..end;.|..proced|
|00003270| 75 72 65 20 45 78 69 74 | 57 69 6e 64 6f 77 20 28 |ure Exit|Window (|
|00003280| 73 61 76 65 64 3a 20 53 | 61 76 65 64 57 69 6e 64 |saved: S|avedWind|
|00003290| 6f 77 49 6e 66 6f 29 3b | 0d 09 62 65 67 69 6e 0d |owInfo);|..begin.|
|000032a0| 09 09 53 65 74 50 6f 72 | 74 28 73 61 76 65 64 2e |..SetPor|t(saved.|
|000032b0| 74 68 69 73 70 6f 72 74 | 29 3b 0d 09 09 54 65 78 |thisport|);...Tex|
|000032c0| 74 46 6f 6e 74 28 73 61 | 76 65 64 2e 66 6f 6e 74 |tFont(sa|ved.font|
|000032d0| 29 3b 0d 09 09 54 65 78 | 74 53 69 7a 65 28 73 61 |);...Tex|tSize(sa|
|000032e0| 76 65 64 2e 73 69 7a 65 | 29 3b 0d 09 09 54 65 78 |ved.size|);...Tex|
|000032f0| 74 46 61 63 65 28 73 61 | 76 65 64 2e 66 61 63 65 |tFace(sa|ved.face|
|00003300| 29 3b 0d 09 09 53 65 74 | 50 6f 72 74 28 73 61 76 |);...Set|Port(sav|
|00003310| 65 64 2e 6f 6c 64 70 6f | 72 74 29 3b 0d 09 65 6e |ed.oldpo|rt);..en|
|00003320| 64 3b 0d 0d 09 70 72 6f | 63 65 64 75 72 65 20 44 |d;...pro|cedure D|
|00003330| 72 61 77 47 72 61 79 52 | 65 63 74 20 28 64 6c 67 |rawGrayR|ect (dlg|
|00003340| 3a 20 44 69 61 6c 6f 67 | 50 74 72 3b 20 69 74 65 |: Dialog|Ptr; ite|
|00003350| 6d 3a 20 69 6e 74 65 67 | 65 72 3b 20 74 69 74 6c |m: integ|er; titl|
|00003360| 65 3a 20 73 74 72 32 35 | 35 29 3b 0d 09 09 63 6f |e: str25|5);...co|
|00003370| 6e 73 74 0d 09 09 09 6c | 65 66 74 5f 69 6e 64 65 |nst....l|eft_inde|
|00003380| 6e 74 20 3d 20 32 30 3b | 0d 09 09 09 67 61 70 20 |nt = 20;|....gap |
|00003390| 3d 20 32 3b 0d 09 09 76 | 61 72 0d 09 09 09 72 2c |= 2;...v|ar....r,|
|000033a0| 20 65 72 3a 20 72 65 63 | 74 3b 0d 09 09 09 66 69 | er: rec|t;....fi|
|000033b0| 3a 20 46 6f 6e 74 49 6e | 66 6f 3b 0d 09 09 09 73 |: FontIn|fo;....s|
|000033c0| 77 3a 20 69 6e 74 65 67 | 65 72 3b 0d 09 62 65 67 |w: integ|er;..beg|
|000033d0| 69 6e 0d 09 09 47 65 74 | 44 49 74 65 6d 52 65 63 |in...Get|DItemRec|
|000033e0| 74 28 64 6c 67 2c 20 69 | 74 65 6d 2c 20 72 29 3b |t(dlg, i|tem, r);|
|000033f0| 0d 09 09 47 65 74 46 6f | 6e 74 49 6e 66 6f 28 66 |...GetFo|ntInfo(f|
|00003400| 69 29 3b 0d 09 09 4d 6f | 76 65 54 6f 28 72 2e 6c |i);...Mo|veTo(r.l|
|00003410| 65 66 74 20 2b 20 6c 65 | 66 74 5f 69 6e 64 65 6e |eft + le|ft_inden|
|00003420| 74 2c 20 72 2e 74 6f 70 | 20 2b 20 66 69 2e 61 73 |t, r.top| + fi.as|
|00003430| 63 65 6e 74 29 3b 0d 09 | 09 73 77 20 3a 3d 20 53 |cent);..|.sw := S|
|00003440| 74 72 69 6e 67 57 69 64 | 74 68 28 74 69 74 6c 65 |tringWid|th(title|
|00003450| 29 3b 0d 09 09 65 72 2e | 74 6f 70 20 3a 3d 20 72 |);...er.|top := r|
|00003460| 2e 74 6f 70 3b 0d 09 09 | 65 72 2e 62 6f 74 74 6f |.top;...|er.botto|
|00003470| 6d 20 3a 3d 20 65 72 2e | 74 6f 70 20 2b 20 66 69 |m := er.|top + fi|
|00003480| 2e 61 73 63 65 6e 74 20 | 2b 20 66 69 2e 64 65 73 |.ascent |+ fi.des|
|00003490| 63 65 6e 74 3b 0d 09 09 | 65 72 2e 6c 65 66 74 20 |cent;...|er.left |
|000034a0| 3a 3d 20 72 2e 6c 65 66 | 74 20 2b 20 6c 65 66 74 |:= r.lef|t + left|
|000034b0| 5f 69 6e 64 65 6e 74 3b | 0d 09 09 65 72 2e 72 69 |_indent;|...er.ri|
|000034c0| 67 68 74 20 3a 3d 20 65 | 72 2e 6c 65 66 74 20 2b |ght := e|r.left +|
|000034d0| 20 73 77 3b 0d 09 09 45 | 72 61 73 65 52 65 63 74 | sw;...E|raseRect|
|000034e0| 28 65 72 29 3b 0d 09 09 | 44 72 61 77 53 74 72 69 |(er);...|DrawStri|
|000034f0| 6e 67 28 74 69 74 6c 65 | 29 3b 0d 09 09 50 65 6e |ng(title|);...Pen|
|00003500| 50 61 74 28 71 64 2e 67 | 72 61 79 29 3b 0d 09 09 |Pat(qd.g|ray);...|
|00003510| 72 2e 74 6f 70 20 3a 3d | 20 72 2e 74 6f 70 20 2b |r.top :=| r.top +|
|00003520| 20 28 66 69 2e 61 73 63 | 65 6e 74 29 20 64 69 76 | (fi.asc|ent) div|
|00003530| 20 32 3b 0d 09 09 4d 6f | 76 65 54 6f 28 65 72 2e | 2;...Mo|veTo(er.|
|00003540| 6c 65 66 74 20 2d 20 67 | 61 70 2c 20 72 2e 74 6f |left - g|ap, r.to|
|00003550| 70 29 3b 0d 09 09 4c 69 | 6e 65 54 6f 28 72 2e 6c |p);...Li|neTo(r.l|
|00003560| 65 66 74 2c 20 72 2e 74 | 6f 70 29 3b 0d 09 09 4c |eft, r.t|op);...L|
|00003570| 69 6e 65 54 6f 28 72 2e | 6c 65 66 74 2c 20 72 2e |ineTo(r.|left, r.|
|00003580| 62 6f 74 74 6f 6d 29 3b | 0d 09 09 4c 69 6e 65 54 |bottom);|...LineT|
|00003590| 6f 28 72 2e 72 69 67 68 | 74 2c 20 72 2e 62 6f 74 |o(r.righ|t, r.bot|
|000035a0| 74 6f 6d 29 3b 0d 09 09 | 4c 69 6e 65 54 6f 28 72 |tom);...|LineTo(r|
|000035b0| 2e 72 69 67 68 74 2c 20 | 72 2e 74 6f 70 29 3b 0d |.right, |r.top);.|
|000035c0| 09 09 4c 69 6e 65 54 6f | 28 65 72 2e 72 69 67 68 |..LineTo|(er.righ|
|000035d0| 74 20 2b 20 67 61 70 2c | 20 72 2e 74 6f 70 29 3b |t + gap,| r.top);|
|000035e0| 0d 09 09 50 65 6e 4e 6f | 72 6d 61 6c 3b 0d 09 65 |...PenNo|rmal;..e|
|000035f0| 6e 64 3b 0d 0d 09 66 75 | 6e 63 74 69 6f 6e 20 53 |nd;...fu|nction S|
|00003600| 70 6c 69 74 20 28 73 75 | 62 2c 20 73 3a 20 73 74 |plit (su|b, s: st|
|00003610| 72 32 35 35 3b 20 76 61 | 72 20 73 31 2c 20 73 32 |r255; va|r s1, s2|
|00003620| 3a 20 73 74 72 32 35 35 | 29 3a 20 62 6f 6f 6c 65 |: str255|): boole|
|00003630| 61 6e 3b 0d 09 09 76 61 | 72 0d 09 09 09 70 3a 20 |an;...va|r....p: |
|00003640| 69 6e 74 65 67 65 72 3b | 0d 09 62 65 67 69 6e 0d |integer;|..begin.|
|00003650| 09 09 70 20 3a 3d 20 54 | 50 50 6f 73 28 73 75 62 |..p := T|PPos(sub|
|00003660| 2c 20 73 29 3b 0d 09 09 | 69 66 20 70 20 3e 20 30 |, s);...|if p > 0|
|00003670| 20 74 68 65 6e 20 62 65 | 67 69 6e 0d 09 09 09 73 | then be|gin....s|
|00003680| 31 20 3a 3d 20 54 50 43 | 6f 70 79 28 73 2c 20 31 |1 := TPC|opy(s, 1|
|00003690| 2c 20 70 20 2d 20 31 29 | 3b 0d 09 09 09 73 32 20 |, p - 1)|;....s2 |
|000036a0| 3a 3d 20 54 50 43 6f 70 | 79 28 73 2c 20 70 20 2b |:= TPCop|y(s, p +|
|000036b0| 20 6c 65 6e 67 74 68 28 | 73 75 62 29 2c 20 32 35 | length(|sub), 25|
|000036c0| 35 29 3b 0d 09 09 65 6e | 64 3b 0d 09 09 53 70 6c |5);...en|d;...Spl|
|000036d0| 69 74 20 3a 3d 20 70 20 | 3e 20 30 3b 0d 09 65 6e |it := p |> 0;..en|
|000036e0| 64 3b 0d 09 0d 09 70 72 | 6f 63 65 64 75 72 65 20 |d;....pr|ocedure |
|000036f0| 44 69 73 70 6c 61 79 53 | 74 79 6c 65 64 53 74 72 |DisplayS|tyledStr|
|00003700| 69 6e 67 20 28 64 6c 67 | 3a 20 64 69 61 6c 6f 67 |ing (dlg|: dialog|
|00003710| 50 74 72 3b 20 69 74 65 | 6d 3a 20 69 6e 74 65 67 |Ptr; ite|m: integ|
|00003720| 65 72 3b 20 73 3a 20 73 | 74 72 32 35 35 29 3b 0d |er; s: s|tr255);.|
|00003730| 09 09 66 75 6e 63 74 69 | 6f 6e 20 53 74 72 54 6f |..functi|on StrTo|
|00003740| 4e 75 6d 28 76 61 72 20 | 73 3a 53 74 72 32 35 35 |Num(var |s:Str255|
|00003750| 29 3a 69 6e 74 65 67 65 | 72 3b 0d 09 09 09 76 61 |):intege|r;....va|
|00003760| 72 0d 09 09 09 09 6e 20 | 3a 20 6c 6f 6e 67 49 6e |r.....n |: longIn|
|00003770| 74 3b 0d 09 09 62 65 67 | 69 6e 0d 09 09 09 53 74 |t;...beg|in....St|
|00003780| 72 69 6e 67 54 6f 4e 75 | 6d 28 73 2c 6e 29 3b 0d |ringToNu|m(s,n);.|
|00003790| 09 09 09 53 74 72 54 6f | 4e 75 6d 3a 3d 6e 3b 0d |...StrTo|Num:=n;.|
|000037a0| 09 09 65 6e 64 3b 0d 09 | 09 76 61 72 0d 09 09 09 |..end;..|.var....|
|000037b0| 62 6f 78 3a 20 72 65 63 | 74 3b 0d 09 09 09 6a 75 |box: rec|t;....ju|
|000037c0| 73 74 3a 20 69 6e 74 65 | 67 65 72 3b 0d 09 09 09 |st: inte|ger;....|
|000037d0| 74 68 69 73 3a 20 73 74 | 72 32 35 35 3b 0d 09 09 |this: st|r255;...|
|000037e0| 09 66 6f 6e 74 2c 20 73 | 69 7a 65 2c 20 69 2c 20 |.font, s|ize, i, |
|000037f0| 6a 2c 20 64 65 66 5f 66 | 6f 6e 74 2c 20 64 65 66 |j, def_f|ont, def|
|00003800| 5f 73 69 7a 65 3a 20 69 | 6e 74 65 67 65 72 3b 0d |_size: i|nteger;.|
|00003810| 09 09 09 73 74 3a 20 53 | 74 79 6c 65 3b 0d 09 09 |...st: S|tyle;...|
|00003820| 09 66 69 3a 20 46 6f 6e | 74 49 6e 66 6f 3b 0d 09 |.fi: Fon|tInfo;..|
|00003830| 09 09 66 69 78 73 69 7a | 65 3a 20 62 6f 6f 6c 65 |..fixsiz|e: boole|
|00003840| 61 6e 3b 0d 09 09 09 6f | 6c 64 66 6f 6e 74 2c 20 |an;....o|ldfont, |
|00003850| 6f 6c 64 73 69 7a 65 3a | 20 69 6e 74 65 67 65 72 |oldsize:| integer|
|00003860| 3b 0d 09 09 09 6f 6c 64 | 66 61 63 65 3a 20 53 74 |;....old|face: St|
|00003870| 79 6c 65 3b 0d 09 09 09 | 68 6f 74 3a 20 42 6f 6f |yle;....|hot: Boo|
|00003880| 6c 65 61 6e 3b 20 7b 20 | 70 61 72 73 65 20 66 6f |lean; { |parse fo|
|00003890| 72 20 3c 3e 20 61 6e 64 | 20 62 6c 75 65 2d 75 6e |r <> and| blue-un|
|000038a0| 64 65 72 6c 69 6e 65 20 | 74 68 65 6d 20 7d 0d 09 |derline |them }..|
|000038b0| 09 09 74 65 68 3a 54 45 | 48 61 6e 64 6c 65 3b 0d |..teh:TE|Handle;.|
|000038c0| 09 09 09 74 73 72 3a 54 | 65 78 74 53 74 79 6c 65 |...tsr:T|extStyle|
|000038d0| 3b 0d 09 62 65 67 69 6e | 0d 09 09 53 65 74 50 6f |;..begin|...SetPo|
|000038e0| 72 74 28 64 6c 67 29 3b | 0d 09 09 6f 6c 64 66 6f |rt(dlg);|...oldfo|
|000038f0| 6e 74 20 3a 3d 20 64 6c | 67 5e 2e 74 78 46 6f 6e |nt := dl|g^.txFon|
|00003900| 74 3b 0d 09 09 6f 6c 64 | 73 69 7a 65 20 3a 3d 20 |t;...old|size := |
|00003910| 64 6c 67 5e 2e 74 78 53 | 69 7a 65 3b 0d 09 09 6f |dlg^.txS|ize;...o|
|00003920| 6c 64 66 61 63 65 20 3a | 3d 20 64 6c 67 5e 2e 74 |ldface :|= dlg^.t|
|00003930| 78 46 61 63 65 3b 0d 09 | 09 64 65 66 5f 66 6f 6e |xFace;..|.def_fon|
|00003940| 74 20 3a 3d 20 67 65 6e | 65 76 61 3b 0d 09 09 64 |t := gen|eva;...d|
|00003950| 65 66 5f 73 69 7a 65 20 | 3a 3d 20 39 3b 0d 09 09 |ef_size |:= 9;...|
|00003960| 47 65 74 44 49 74 65 6d | 52 65 63 74 28 64 6c 67 |GetDItem|Rect(dlg|
|00003970| 2c 20 69 74 65 6d 2c 20 | 62 6f 78 29 3b 0d 09 09 |, item, |box);...|
|00003980| 69 66 20 53 70 6c 69 74 | 28 27 3a 27 2c 20 73 2c |if Split|(':', s,|
|00003990| 20 74 68 69 73 2c 20 73 | 29 20 74 68 65 6e 20 62 | this, s|) then b|
|000039a0| 65 67 69 6e 0d 09 09 09 | 68 6f 74 20 3a 3d 20 66 |egin....|hot := f|
|000039b0| 61 6c 73 65 3b 0d 09 09 | 09 66 69 78 73 69 7a 65 |alse;...|.fixsize|
|000039c0| 20 3a 3d 20 66 61 6c 73 | 65 3b 0d 09 09 09 69 66 | := fals|e;....if|
|000039d0| 20 74 68 69 73 20 3d 20 | 27 27 20 74 68 65 6e 20 | this = |'' then |
|000039e0| 62 65 67 69 6e 0d 09 09 | 09 09 66 6f 6e 74 20 3a |begin...|..font :|
|000039f0| 3d 20 64 65 66 5f 66 6f | 6e 74 3b 0d 09 09 09 65 |= def_fo|nt;....e|
|00003a00| 6e 64 20 65 6c 73 65 20 | 62 65 67 69 6e 0d 09 09 |nd else |begin...|
|00003a10| 09 09 47 65 74 46 4e 75 | 6d 28 74 68 69 73 2c 20 |..GetFNu|m(this, |
|00003a20| 66 6f 6e 74 29 3b 0d 09 | 09 09 09 69 66 20 66 6f |font);..|...if fo|
|00003a30| 6e 74 20 3d 20 30 20 74 | 68 65 6e 20 62 65 67 69 |nt = 0 t|hen begi|
|00003a40| 6e 0d 09 09 09 09 09 66 | 69 78 73 69 7a 65 20 3a |n......f|ixsize :|
|00003a50| 3d 20 74 72 75 65 3b 0d | 09 09 09 09 09 66 6f 6e |= true;.|.....fon|
|00003a60| 74 20 3a 3d 20 64 65 66 | 5f 66 6f 6e 74 3b 0d 09 |t := def|_font;..|
|00003a70| 09 09 09 65 6e 64 3b 0d | 09 09 09 65 6e 64 3b 0d |...end;.|...end;.|
|00003a80| 09 09 09 69 66 20 53 70 | 6c 69 74 28 27 3a 27 2c |...if Sp|lit(':',|
|00003a90| 20 73 2c 20 74 68 69 73 | 2c 20 73 29 20 74 68 65 | s, this|, s) the|
|00003aa0| 6e 20 62 65 67 69 6e 0d | 09 09 09 09 69 66 20 74 |n begin.|....if t|
|00003ab0| 68 69 73 20 3d 20 27 27 | 20 74 68 65 6e 20 62 65 |his = ''| then be|
|00003ac0| 67 69 6e 0d 09 09 09 09 | 09 73 69 7a 65 20 3a 3d |gin.....|.size :=|
|00003ad0| 20 64 65 66 5f 73 69 7a | 65 3b 0d 09 09 09 09 65 | def_siz|e;.....e|
|00003ae0| 6e 64 20 65 6c 73 65 20 | 62 65 67 69 6e 0d 09 09 |nd else |begin...|
|00003af0| 09 09 09 73 69 7a 65 20 | 3a 3d 20 53 74 72 54 6f |...size |:= StrTo|
|00003b00| 4e 75 6d 28 74 68 69 73 | 29 3b 0d 09 09 09 09 65 |Num(this|);.....e|
|00003b10| 6e 64 3b 0d 09 09 09 09 | 69 66 20 53 70 6c 69 74 |nd;.....|if Split|
|00003b20| 28 27 3a 27 2c 20 73 2c | 20 74 68 69 73 2c 20 73 |(':', s,| this, s|
|00003b30| 29 20 74 68 65 6e 20 62 | 65 67 69 6e 0d 09 09 09 |) then b|egin....|
|00003b40| 09 09 73 74 20 3a 3d 20 | 5b 5d 3b 0d 09 09 09 09 |..st := |[];.....|
|00003b50| 09 66 6f 72 20 69 20 3a | 3d 20 31 20 74 6f 20 6c |.for i :|= 1 to l|
|00003b60| 65 6e 67 74 68 28 74 68 | 69 73 29 20 64 6f 20 62 |ength(th|is) do b|
|00003b70| 65 67 69 6e 0d 09 09 09 | 09 09 09 63 61 73 65 20 |egin....|...case |
|00003b80| 74 68 69 73 5b 69 5d 20 | 6f 66 0d 09 09 09 09 09 |this[i] |of......|
|00003b90| 09 09 27 30 27 2e 2e 27 | 37 27 3a 62 65 67 69 6e |..'0'..'|7':begin|
|00003ba0| 0d 09 09 09 09 09 09 09 | 09 73 74 20 3a 3d 20 73 |........|.st := s|
|00003bb0| 74 20 2b 20 5b 53 74 79 | 6c 65 49 74 65 6d 28 6f |t + [Sty|leItem(o|
|00003bc0| 72 64 28 74 68 69 73 5b | 69 5d 29 20 2d 20 34 38 |rd(this[|i]) - 48|
|00003bd0| 29 5d 3b 0d 09 09 09 09 | 09 09 09 65 6e 64 3b 0d |)];.....|...end;.|
|00003be0| 09 09 09 09 09 09 09 27 | 48 27 2c 27 68 27 3a 20 |.......'|H','h': |
|00003bf0| 62 65 67 69 6e 0d 09 09 | 09 09 09 09 09 09 68 6f |begin...|......ho|
|00003c00| 74 20 3a 3d 20 74 72 75 | 65 3b 0d 09 09 09 09 09 |t := tru|e;......|
|00003c10| 09 09 65 6e 64 3b 0d 09 | 09 09 09 09 09 09 6f 74 |..end;..|......ot|
|00003c20| 68 65 72 77 69 73 65 20 | 62 65 67 69 6e 0d 09 09 |herwise |begin...|
|00003c30| 09 09 09 09 09 65 6e 64 | 3b 0d 09 09 09 09 09 09 |.....end|;.......|
|00003c40| 65 6e 64 3b 0d 09 09 09 | 09 09 65 6e 64 3b 0d 09 |end;....|..end;..|
|00003c50| 09 09 09 09 69 66 20 53 | 70 6c 69 74 28 27 3a 27 |....if S|plit(':'|
|00003c60| 2c 20 73 2c 20 74 68 69 | 73 2c 20 73 29 20 74 68 |, s, thi|s, s) th|
|00003c70| 65 6e 20 62 65 67 69 6e | 0d 09 09 09 09 09 09 69 |en begin|.......i|
|00003c80| 66 20 74 68 69 73 20 3d | 20 27 27 20 74 68 65 6e |f this =| '' then|
|00003c90| 20 62 65 67 69 6e 0d 09 | 09 09 09 09 09 09 6a 75 | begin..|......ju|
|00003ca0| 73 74 20 3a 3d 20 74 65 | 4a 75 73 74 4c 65 66 74 |st := te|JustLeft|
|00003cb0| 3b 0d 09 09 09 09 09 09 | 65 6e 64 20 65 6c 73 65 |;.......|end else|
|00003cc0| 20 62 65 67 69 6e 0d 09 | 09 09 09 09 09 09 6a 75 | begin..|......ju|
|00003cd0| 73 74 20 3a 3d 20 53 74 | 72 54 6f 4e 75 6d 28 74 |st := St|rToNum(t|
|00003ce0| 68 69 73 29 3b 0d 09 09 | 09 09 09 09 65 6e 64 3b |his);...|....end;|
|00003cf0| 0d 09 09 09 09 09 09 54 | 65 78 74 46 6f 6e 74 28 |.......T|extFont(|
|00003d00| 66 6f 6e 74 29 3b 0d 09 | 09 09 09 09 09 54 65 78 |font);..|.....Tex|
|00003d10| 74 53 69 7a 65 28 73 69 | 7a 65 29 3b 0d 09 09 09 |tSize(si|ze);....|
|00003d20| 09 09 09 54 65 78 74 46 | 61 63 65 28 73 74 29 3b |...TextF|ace(st);|
|00003d30| 0d 09 09 09 09 09 09 69 | 66 20 66 69 78 73 69 7a |.......i|f fixsiz|
|00003d40| 65 20 74 68 65 6e 20 62 | 65 67 69 6e 0d 09 09 09 |e then b|egin....|
|00003d50| 09 09 09 09 47 65 74 46 | 6f 6e 74 49 6e 66 6f 28 |....GetF|ontInfo(|
|00003d60| 66 69 29 3b 0d 09 09 09 | 09 09 09 09 77 68 69 6c |fi);....|....whil|
|00003d70| 65 20 28 66 69 2e 61 73 | 63 65 6e 74 20 2b 20 66 |e (fi.as|cent + f|
|00003d80| 69 2e 64 65 73 63 65 6e | 74 20 3e 20 62 6f 78 2e |i.descen|t > box.|
|00003d90| 62 6f 74 74 6f 6d 20 2d | 20 62 6f 78 2e 74 6f 70 |bottom -| box.top|
|00003da0| 29 20 64 6f 20 62 65 67 | 69 6e 0d 09 09 09 09 09 |) do beg|in......|
|00003db0| 09 09 09 69 66 20 73 69 | 7a 65 20 3e 20 34 38 20 |...if si|ze > 48 |
|00003dc0| 74 68 65 6e 20 62 65 67 | 69 6e 0d 09 09 09 09 09 |then beg|in......|
|00003dd0| 09 09 09 09 73 69 7a 65 | 20 3a 3d 20 34 38 3b 0d |....size| := 48;.|
|00003de0| 09 09 09 09 09 09 09 09 | 65 6e 64 20 65 6c 73 65 |........|end else|
|00003df0| 20 69 66 20 73 69 7a 65 | 20 3e 20 33 36 20 74 68 | if size| > 36 th|
|00003e00| 65 6e 20 62 65 67 69 6e | 0d 09 09 09 09 09 09 09 |en begin|........|
|00003e10| 09 09 73 69 7a 65 20 3a | 3d 20 33 36 3b 0d 09 09 |..size :|= 36;...|
|00003e20| 09 09 09 09 09 09 65 6e | 64 20 65 6c 73 65 20 69 |......en|d else i|
|00003e30| 66 20 73 69 7a 65 20 3e | 20 32 37 20 74 68 65 6e |f size >| 27 then|
|00003e40| 20 62 65 67 69 6e 0d 09 | 09 09 09 09 09 09 09 09 | begin..|........|
|00003e50| 73 69 7a 65 20 3a 3d 20 | 32 37 3b 0d 09 09 09 09 |size := |27;.....|
|00003e60| 09 09 09 09 65 6e 64 20 | 65 6c 73 65 20 69 66 20 |....end |else if |
|00003e70| 73 69 7a 65 20 3e 20 32 | 34 20 74 68 65 6e 20 62 |size > 2|4 then b|
|00003e80| 65 67 69 6e 0d 09 09 09 | 09 09 09 09 09 09 73 69 |egin....|......si|
|00003e90| 7a 65 20 3a 3d 20 32 34 | 3b 0d 09 09 09 09 09 09 |ze := 24|;.......|
|00003ea0| 09 09 65 6e 64 20 65 6c | 73 65 20 69 66 20 73 69 |..end el|se if si|
|00003eb0| 7a 65 20 3e 20 31 38 20 | 74 68 65 6e 20 62 65 67 |ze > 18 |then beg|
|00003ec0| 69 6e 0d 09 09 09 09 09 | 09 09 09 09 73 69 7a 65 |in......|....size|
|00003ed0| 20 3a 3d 20 31 38 3b 0d | 09 09 09 09 09 09 09 09 | := 18;.|........|
|00003ee0| 65 6e 64 20 65 6c 73 65 | 20 69 66 20 73 69 7a 65 |end else| if size|
|00003ef0| 20 3e 20 31 34 20 74 68 | 65 6e 20 62 65 67 69 6e | > 14 th|en begin|
|00003f00| 0d 09 09 09 09 09 09 09 | 09 09 73 69 7a 65 20 3a |........|..size :|
|00003f10| 3d 20 31 34 3b 0d 09 09 | 09 09 09 09 09 09 65 6e |= 14;...|......en|
|00003f20| 64 20 65 6c 73 65 20 69 | 66 20 73 69 7a 65 20 3e |d else i|f size >|
|00003f30| 20 31 32 20 74 68 65 6e | 20 62 65 67 69 6e 0d 09 | 12 then| begin..|
|00003f40| 09 09 09 09 09 09 09 09 | 73 69 7a 65 20 3a 3d 20 |........|size := |
|00003f50| 31 32 3b 0d 09 09 09 09 | 09 09 09 09 65 6e 64 20 |12;.....|....end |
|00003f60| 65 6c 73 65 20 62 65 67 | 69 6e 0d 09 09 09 09 09 |else beg|in......|
|00003f70| 09 09 09 09 73 69 7a 65 | 20 3a 3d 20 39 3b 0d 09 |....size| := 9;..|
|00003f80| 09 09 09 09 09 09 09 09 | 54 65 78 74 53 69 7a 65 |........|TextSize|
|00003f90| 28 73 69 7a 65 29 3b 0d | 09 09 09 09 09 09 09 09 |(size);.|........|
|00003fa0| 09 6c 65 61 76 65 3b 0d | 09 09 09 09 09 09 09 09 |.leave;.|........|
|00003fb0| 65 6e 64 3b 0d 09 09 09 | 09 09 09 09 09 54 65 78 |end;....|.....Tex|
|00003fc0| 74 53 69 7a 65 28 73 69 | 7a 65 29 3b 0d 09 09 09 |tSize(si|ze);....|
|00003fd0| 09 09 09 09 09 47 65 74 | 46 6f 6e 74 49 6e 66 6f |.....Get|FontInfo|
|00003fe0| 28 66 69 29 3b 0d 09 09 | 09 09 09 09 09 65 6e 64 |(fi);...|.....end|
|00003ff0| 3b 0d 09 09 09 09 09 09 | 65 6e 64 3b 0d 09 09 09 |;.......|end;....|
|00004000| 09 09 09 69 66 20 66 61 | 6c 73 65 20 74 68 65 6e |...if fa|lse then|
|00004010| 20 62 65 67 69 6e 0d 09 | 09 09 09 09 09 09 54 45 | begin..|......TE|
|00004020| 54 65 78 74 42 6f 78 28 | 40 73 5b 31 5d 2c 20 6c |TextBox(|@s[1], l|
|00004030| 65 6e 67 74 68 28 73 29 | 2c 20 62 6f 78 2c 20 6a |ength(s)|, box, j|
|00004040| 75 73 74 29 3b 0d 09 09 | 09 09 09 09 65 6e 64 20 |ust);...|....end |
|00004050| 65 6c 73 65 20 62 65 67 | 69 6e 0d 09 09 09 09 09 |else beg|in......|
|00004060| 09 09 74 65 68 20 3a 3d | 20 54 45 53 74 79 6c 65 |..teh :=| TEStyle|
|00004070| 4e 65 77 28 62 6f 78 2c | 62 6f 78 29 3b 0d 09 09 |New(box,|box);...|
|00004080| 09 09 09 09 09 69 66 20 | 74 65 68 3c 3e 6e 69 6c |.....if |teh<>nil|
|00004090| 20 74 68 65 6e 20 62 65 | 67 69 6e 0d 09 09 09 09 | then be|gin.....|
|000040a0| 09 09 09 09 54 45 53 65 | 74 54 65 78 74 28 40 73 |....TESe|tText(@s|
|000040b0| 5b 31 5d 2c 6c 65 6e 67 | 74 68 28 73 29 2c 74 65 |[1],leng|th(s),te|
|000040c0| 68 29 3b 0d 09 09 09 09 | 09 09 09 09 54 45 53 65 |h);.....|....TESe|
|000040d0| 74 41 6c 69 67 6e 6d 65 | 6e 74 28 6a 75 73 74 2c |tAlignme|nt(just,|
|000040e0| 74 65 68 29 3b 0d 09 09 | 09 09 09 09 09 09 69 66 |teh);...|......if|
|000040f0| 20 68 6f 74 20 74 68 65 | 6e 20 62 65 67 69 6e 0d | hot the|n begin.|
|00004100| 09 09 09 09 09 09 09 09 | 09 66 6f 72 20 69 20 3a |........|.for i :|
|00004110| 3d 20 31 20 74 6f 20 6c | 65 6e 67 74 68 28 73 29 |= 1 to l|ength(s)|
|00004120| 20 64 6f 20 62 65 67 69 | 6e 0d 09 09 09 09 09 09 | do begi|n.......|
|00004130| 09 09 09 09 69 66 20 73 | 5b 69 5d 20 3d 20 27 3c |....if s|[i] = '<|
|00004140| 27 20 74 68 65 6e 20 62 | 65 67 69 6e 0d 09 09 09 |' then b|egin....|
|00004150| 09 09 09 09 09 09 09 09 | 6a 20 3a 3d 20 69 20 2b |........|j := i +|
|00004160| 20 31 3b 0d 09 09 09 09 | 09 09 09 09 09 09 09 77 | 1;.....|.......w|
|00004170| 68 69 6c 65 20 28 6a 20 | 3c 3d 20 6c 65 6e 67 74 |hile (j |<= lengt|
|00004180| 68 28 73 29 29 20 26 20 | 28 73 5b 6a 5d 20 3c 3e |h(s)) & |(s[j] <>|
|00004190| 20 27 3e 27 29 20 64 6f | 20 62 65 67 69 6e 0d 09 | '>') do| begin..|
|000041a0| 09 09 09 09 09 09 09 09 | 09 09 09 6a 20 3a 3d 20 |........|...j := |
|000041b0| 6a 20 2b 20 31 3b 0d 09 | 09 09 09 09 09 09 09 09 |j + 1;..|........|
|000041c0| 09 09 65 6e 64 3b 0d 09 | 09 09 09 09 09 09 09 09 |..end;..|........|
|000041d0| 09 09 54 45 53 65 74 53 | 65 6c 65 63 74 28 69 2c |..TESetS|elect(i,|
|000041e0| 6a 2d 31 2c 74 65 68 29 | 3b 0d 09 09 09 09 09 09 |j-1,teh)|;.......|
|000041f0| 09 09 09 09 09 74 73 72 | 2e 74 73 46 61 63 65 20 |.....tsr|.tsFace |
|00004200| 3a 3d 20 73 74 20 2b 20 | 5b 75 6e 64 65 72 6c 69 |:= st + |[underli|
|00004210| 6e 65 5d 3b 0d 09 09 09 | 09 09 09 09 09 09 09 09 |ne];....|........|
|00004220| 74 73 72 2e 74 73 43 6f | 6c 6f 72 2e 72 65 64 20 |tsr.tsCo|lor.red |
|00004230| 3a 3d 20 30 3b 0d 09 09 | 09 09 09 09 09 09 09 09 |:= 0;...|........|
|00004240| 09 74 73 72 2e 74 73 43 | 6f 6c 6f 72 2e 67 72 65 |.tsr.tsC|olor.gre|
|00004250| 65 6e 20 3a 3d 20 30 3b | 0d 09 09 09 09 09 09 09 |en := 0;|........|
|00004260| 09 09 09 09 74 73 72 2e | 74 73 43 6f 6c 6f 72 2e |....tsr.|tsColor.|
|00004270| 62 6c 75 65 20 3a 3d 20 | 24 46 46 46 46 3b 0d 09 |blue := |$FFFF;..|
|00004280| 09 09 09 09 09 09 09 09 | 09 09 54 45 53 65 74 53 |........|..TESetS|
|00004290| 74 79 6c 65 28 64 6f 46 | 61 63 65 20 2b 20 64 6f |tyle(doF|ace + do|
|000042a0| 43 6f 6c 6f 72 2c 74 73 | 72 2c 66 61 6c 73 65 2c |Color,ts|r,false,|
|000042b0| 74 65 68 29 3b 0d 09 09 | 09 09 09 09 09 09 09 09 |teh);...|........|
|000042c0| 65 6e 64 3b 0d 09 09 09 | 09 09 09 09 09 09 65 6e |end;....|......en|
|000042d0| 64 3b 0d 09 09 09 09 09 | 09 09 09 65 6e 64 3b 0d |d;......|...end;.|
|000042e0| 09 09 09 09 09 09 09 09 | 54 45 55 70 64 61 74 65 |........|TEUpdate|
|000042f0| 28 62 6f 78 2c 74 65 68 | 29 3b 0d 09 09 09 09 09 |(box,teh|);......|
|00004300| 09 09 09 54 45 44 69 73 | 70 6f 73 65 28 74 65 68 |...TEDis|pose(teh|
|00004310| 29 3b 0d 09 09 09 09 09 | 09 09 65 6e 64 3b 0d 09 |);......|..end;..|
|00004320| 09 09 09 09 09 65 6e 64 | 3b 0d 09 09 09 09 09 65 |.....end|;......e|
|00004330| 6e 64 3b 0d 09 09 09 09 | 65 6e 64 3b 0d 09 09 09 |nd;.....|end;....|
|00004340| 65 6e 64 3b 0d 09 09 65 | 6e 64 3b 0d 09 09 54 65 |end;...e|nd;...Te|
|00004350| 78 74 46 6f 6e 74 28 6f | 6c 64 66 6f 6e 74 29 3b |xtFont(o|ldfont);|
|00004360| 0d 09 09 54 65 78 74 53 | 69 7a 65 28 6f 6c 64 73 |...TextS|ize(olds|
|00004370| 69 7a 65 29 3b 0d 09 09 | 54 65 78 74 46 61 63 65 |ize);...|TextFace|
|00004380| 28 6f 6c 64 66 61 63 65 | 29 3b 0d 09 65 6e 64 3b |(oldface|);..end;|
|00004390| 0d 0d 09 66 75 6e 63 74 | 69 6f 6e 20 54 72 61 63 |...funct|ion Trac|
|000043a0| 6b 49 74 65 6d 73 28 77 | 69 6e 64 6f 77 3a 57 69 |kItems(w|indow:Wi|
|000043b0| 6e 64 6f 77 50 74 72 3b | 20 69 31 2c 69 32 2c 69 |ndowPtr;| i1,i2,i|
|000043c0| 33 3a 69 6e 74 65 67 65 | 72 29 3a 62 6f 6f 6c 65 |3:intege|r):boole|
|000043d0| 61 6e 3b 0d 09 09 76 61 | 72 0d 09 09 09 72 67 6e |an;...va|r....rgn|
|000043e0| 3a 52 67 6e 48 61 6e 64 | 6c 65 3b 0d 09 09 70 72 |:RgnHand|le;...pr|
|000043f0| 6f 63 65 64 75 72 65 20 | 41 64 64 49 74 65 6d 28 |ocedure |AddItem(|
|00004400| 69 3a 69 6e 74 65 67 65 | 72 29 3b 0d 09 09 09 76 |i:intege|r);....v|
|00004410| 61 72 0d 09 09 09 09 69 | 74 65 6d 72 65 63 74 3a |ar.....i|temrect:|
|00004420| 52 65 63 74 3b 0d 09 09 | 09 09 74 6d 70 3a 52 67 |Rect;...|..tmp:Rg|
|00004430| 6e 48 61 6e 64 6c 65 3b | 0d 09 09 62 65 67 69 6e |nHandle;|...begin|
|00004440| 0d 09 09 09 69 66 20 69 | 20 3c 3e 20 30 20 74 68 |....if i| <> 0 th|
|00004450| 65 6e 20 62 65 67 69 6e | 0d 09 09 09 09 47 65 74 |en begin|.....Get|
|00004460| 44 69 74 65 6d 52 65 63 | 74 28 77 69 6e 64 6f 77 |DitemRec|t(window|
|00004470| 2c 69 2c 69 74 65 6d 72 | 65 63 74 29 3b 0d 09 09 |,i,itemr|ect);...|
|00004480| 09 09 74 6d 70 20 3a 3d | 20 4e 65 77 52 67 6e 3b |..tmp :=| NewRgn;|
|00004490| 0d 09 09 09 09 52 65 63 | 74 52 67 6e 28 74 6d 70 |.....Rec|tRgn(tmp|
|000044a0| 2c 20 69 74 65 6d 72 65 | 63 74 29 3b 0d 09 09 09 |, itemre|ct);....|
|000044b0| 09 55 6e 69 6f 6e 52 67 | 6e 28 72 67 6e 2c 20 74 |.UnionRg|n(rgn, t|
|000044c0| 6d 70 2c 20 72 67 6e 29 | 3b 0d 09 09 09 09 44 69 |mp, rgn)|;.....Di|
|000044d0| 73 70 6f 73 65 52 67 6e | 28 74 6d 70 29 3b 0d 09 |sposeRgn|(tmp);..|
|000044e0| 09 09 65 6e 64 3b 0d 09 | 09 65 6e 64 3b 0d 09 09 |..end;..|.end;...|
|000044f0| 76 61 72 0d 09 09 09 69 | 6e 73 69 64 65 2c 6e 65 |var....i|nside,ne|
|00004500| 77 69 6e 73 69 64 65 3a | 62 6f 6f 6c 65 61 6e 3b |winside:|boolean;|
|00004510| 0d 09 09 09 6d 6f 75 73 | 65 3a 50 6f 69 6e 74 3b |....mous|e:Point;|
|00004520| 0d 09 62 65 67 69 6e 0d | 09 09 53 65 74 50 6f 72 |..begin.|..SetPor|
|00004530| 74 28 77 69 6e 64 6f 77 | 29 3b 0d 09 09 72 67 6e |t(window|);...rgn|
|00004540| 20 3a 3d 20 4e 65 77 52 | 67 6e 3b 0d 09 09 41 64 | := NewR|gn;...Ad|
|00004550| 64 49 74 65 6d 28 69 31 | 29 3b 0d 09 09 41 64 64 |dItem(i1|);...Add|
|00004560| 49 74 65 6d 28 69 32 29 | 3b 0d 09 09 41 64 64 49 |Item(i2)|;...AddI|
|00004570| 74 65 6d 28 69 33 29 3b | 0d 09 09 49 6e 76 65 72 |tem(i3);|...Inver|
|00004580| 74 52 67 6e 28 72 67 6e | 29 3b 0d 09 09 69 6e 73 |tRgn(rgn|);...ins|
|00004590| 69 64 65 3a 3d 74 72 75 | 65 3b 0d 09 09 77 68 69 |ide:=tru|e;...whi|
|000045a0| 6c 65 20 53 74 69 6c 6c | 44 6f 77 6e 20 64 6f 20 |le Still|Down do |
|000045b0| 62 65 67 69 6e 0d 09 09 | 09 47 65 74 4d 6f 75 73 |begin...|.GetMous|
|000045c0| 65 28 6d 6f 75 73 65 29 | 3b 0d 09 09 09 6e 65 77 |e(mouse)|;....new|
|000045d0| 69 6e 73 69 64 65 20 3a | 3d 20 50 74 49 6e 52 67 |inside :|= PtInRg|
|000045e0| 6e 28 6d 6f 75 73 65 2c | 72 67 6e 29 3b 0d 09 09 |n(mouse,|rgn);...|
|000045f0| 09 69 66 20 6e 65 77 69 | 6e 73 69 64 65 20 3c 3e |.if newi|nside <>|
|00004600| 20 69 6e 73 69 64 65 20 | 74 68 65 6e 20 62 65 67 | inside |then beg|
|00004610| 69 6e 0d 09 09 09 09 49 | 6e 76 65 72 74 52 67 6e |in.....I|nvertRgn|
|00004620| 28 72 67 6e 29 3b 0d 09 | 09 09 09 69 6e 73 69 64 |(rgn);..|...insid|
|00004630| 65 20 3a 3d 20 6e 65 77 | 69 6e 73 69 64 65 3b 0d |e := new|inside;.|
|00004640| 09 09 09 65 6e 64 3b 0d | 09 09 65 6e 64 3b 0d 09 |...end;.|..end;..|
|00004650| 09 69 66 20 69 6e 73 69 | 64 65 20 74 68 65 6e 20 |.if insi|de then |
|00004660| 62 65 67 69 6e 0d 09 09 | 09 49 6e 76 65 72 74 52 |begin...|.InvertR|
|00004670| 67 6e 28 72 67 6e 29 3b | 0d 09 09 65 6e 64 3b 0d |gn(rgn);|...end;.|
|00004680| 09 09 54 72 61 63 6b 49 | 74 65 6d 73 20 3a 3d 20 |..TrackI|tems := |
|00004690| 69 6e 73 69 64 65 3b 0d | 09 65 6e 64 3b 0d 0d 65 |inside;.|.end;..e|
|000046a0| 6e 64 2e 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |nd......|........|
|000046b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000046c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000046d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000046e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000046f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004700| 00 00 01 00 00 00 01 54 | 00 00 00 54 00 00 00 46 |.......T|...T...F|
|00004710| 64 61 72 64 46 69 6c 65 | 52 65 70 6c 79 50 74 72 |dardFile|ReplyPtr|
|00004720| 20 3d 20 5e 53 74 61 6e | 64 61 72 64 46 69 6c 65 | = ^Stan|dardFile|
|00004730| 0b 49 43 44 69 61 6c 6f | 67 73 2e 70 02 00 00 00 |.ICDialo|gs.p....|
|00004740| 54 45 58 54 43 57 49 45 | 00 00 00 00 00 c0 00 00 |TEXTCWIE|........|
|00004750| 00 00 54 45 58 54 43 57 | 49 45 00 00 00 00 00 c0 |..TEXTCW|IE......|
|00004760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004770| 00 00 aa 84 14 e7 00 00 | 46 23 00 00 01 9a 63 74 |........|F#....ct|
|00004780| 3a 20 52 65 63 74 3b 0d | 09 09 09 69 74 65 6d 48 |: Rect;.|...itemH|
|00004790| 61 6e 64 6c 65 3a 20 48 | 61 6e 64 6c 65 3b 0d 09 |andle: H|andle;..|
|000047a0| 09 09 6d 79 53 46 52 50 | 74 72 3a 20 53 74 61 6e |..mySFRP|tr: Stan|
|000047b0| 64 61 72 64 46 69 6c 65 | 52 65 70 6c 79 50 74 72 |dardFile|ReplyPtr|
|000047c0| 3b 0d 09 62 65 67 69 6e | 0d 0d 20 20 20 20 7b 2a |;..begin|.. {*|
|000047d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000047e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000047f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004800| 00 00 00 48 00 09 47 65 | 6e 65 76 61 00 00 00 00 |...H..Ge|neva....|
|00004810| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004820| 00 00 00 00 00 00 00 03 | 00 02 00 52 00 09 01 d0 |........|...R....|
|00004830| 02 68 00 52 00 09 01 d0 | 02 68 ae 0e f1 72 00 00 |.h.R....|.h...r..|
|00004840| 1d 9d 00 00 1d ae 00 00 | 1b a3 01 00 00 00 00 04 |........|........|
|00004850| 00 01 00 01 00 00 01 00 | 00 00 01 54 00 00 00 54 |........|...T...T|
|00004860| 00 00 00 46 00 65 4b 04 | 10 88 00 00 00 1c 00 46 |...F.eK.|.......F|
|00004870| 00 01 4d 50 53 52 00 00 | 00 12 4d 57 42 42 00 00 |..MPSR..|..MWBB..|
|00004880| 00 1e 03 ed ff ff 00 00 | 00 00 00 00 00 00 03 f0 |........|........|
|00004890| ff ff 00 00 00 4c 00 00 | 00 00 00 00 00 00 00 00 |.....L..|........|
|000048a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000048b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000048c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000048d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000048e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000048f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+