home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / printer / btchprns.sit / BatchPrint.Pas.bin next >
MacBinary  |  1989-09-14  |  67.0 KB  |  [TEXT/TPAS]

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: BatchPrint.Pas.bin

ConfidenceProgramDetectionMatch TypeSupport
1% dexvert Debian floppy split (archive/debianFloppySplit) ext Unsupported
1% dexvert Sound Images sound sample (audio/soundImagesSoundSample) ext Unsupported
1% dexvert DESI-III drawing (image/desiIIIDrawing) ext Unsupported
1% dexvert MS-DOS PMODE extender executable (executable/msdosPMODEExtenderExecutable) ext Unsupported
1% dexvert Alien Trilogytextures (other/alienTrilogyTextures) ext Unsupported
1% dexvert APT cache data (other/aptCacheData) ext Unsupported
1% dexvert CorelTRACE configuration (other/corelTRACEConfiguration) ext Unsupported
1% dexvert Dreamcast Disc (other/dreamcastDisc) ext Unsupported
1% dexvert EST flat binary (other/estFlatBinary) ext Unsupported
1% dexvert Finale Enigma Binary Format (other/finaleEnigmaBinaryFormat) ext Unsupported
1% dexvert Sega Genesis/Megadrive/32x ROM (other/genesisROM) ext Unsupported
1% dexvert Myth: The Fallen Lords game archive (other/mythTheFallenLordsGameArchive) ext Unsupported
1% dexvert Sound Images Sound Driver (other/soundImagesSoundDriver) ext Unsupported
1% dexvert Symantec/Norton Config (other/symantecNortonConfig) ext Unsupported
1% dexvert Vectrex ROM (other/vectrexROM) ext Unsupported
1% dexvert BIS raP encoded format (other/bisraPEncoded) ext Unsupported
1% dexvert Pascal Script binary (other/pascalScriptBinary) ext Unsupported
1% dexvert 7th Level game data archive (other/seventhLevelGameDataArchive) ext Unsupported
1% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Binary Text (image/binaryText) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary, Wed Nov 16 23:21:53 1988, modified Fri Apr 21 06:56:48 1989, creator 'TPAS', type ASCII, 68358 bytes "BatchPrint.Pas" default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 1 default (weak)
100% lsar MacBinary default
100% gt2 MAC Bilddatei default (weak)


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[TPAS]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0e 42 61 74 63 68 50 | 72 69 6e 74 2e 50 61 73 |..BatchP|rint.Pas|
|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 54 50 41 | 53 00 00 00 00 00 00 00 |.TEXTTPA|S.......|
|00000050| 00 00 00 00 01 0b 06 00 | 00 00 00 9f a8 04 61 a0 |........|......a.|
|00000060| 74 b9 70 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |t.p.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000080| 7b 20 32 31 2e 30 34 2e | 31 39 38 39 20 20 61 6d |{ 21.04.|1989 am|
|00000090| 6e 20 20 28 6c 61 74 65 | 73 74 20 65 64 69 74 29 |n (late|st edit)|
|000000a0| 20 7d 0d 0d 7b 24 55 2d | 7d 20 20 7b 64 6f 6e 27 | }..{$U-|} {don'|
|000000b0| 74 20 61 75 74 6f 6d 61 | 74 69 63 61 6c 6c 79 20 |t automa|tically |
|000000c0| 69 6e 63 6c 75 64 65 20 | 22 50 61 73 63 61 6c 20 |include |"Pascal |
|000000d0| 54 65 78 74 62 6f 6f 6b | 22 20 75 6e 69 74 73 7d |Textbook|" units}|
|000000e0| 0d 7b 24 44 2b 7d 20 20 | 7b 4d 61 63 73 42 75 67 |.{$D+} |{MacsBug|
|000000f0| 20 73 79 6d 62 6f 6c 73 | 7d 0d 0d 50 52 4f 47 52 | symbols|}..PROGR|
|00000100| 41 4d 20 42 61 74 63 68 | 50 72 69 6e 74 3b 0d 0d |AM Batch|Print;..|
|00000110| 7b 20 41 20 70 72 6f 67 | 72 61 6d 20 74 6f 20 70 |{ A prog|ram to p|
|00000120| 72 69 6e 74 20 6f 6e 65 | 20 6f 72 20 6d 6f 72 65 |rint one| or more|
|00000130| 20 73 70 6f 6f 6c 20 66 | 69 6c 65 73 20 7d 0d 7b | spool f|iles }.{|
|00000140| 20 70 72 6f 64 75 63 65 | 64 20 62 79 20 74 68 65 | produce|d by the|
|00000150| 20 48 50 44 4a 20 70 72 | 69 6e 74 65 72 20 64 72 | HPDJ pr|inter dr|
|00000160| 69 76 65 72 2e 20 7d 0d | 0d 7b 20 41 75 74 68 6f |iver. }.|.{ Autho|
|00000170| 72 73 3a 20 20 41 72 69 | 20 4d 75 6a 75 6e 65 6e |rs: Ari| Mujunen|
|00000180| 20 28 61 6d 6e 40 68 75 | 74 63 73 2e 68 75 74 2e | (amn@hu|tcs.hut.|
|00000190| 66 69 29 2c 20 7d 0d 7b | 20 4a 6f 68 61 6e 20 4d |fi), }.{| Johan M|
|000001a0| 79 72 8e 65 6e 20 28 6a | 65 6d 40 68 75 74 63 73 |yr.en (j|em@hutcs|
|000001b0| 2e 68 75 74 2e 66 69 20 | 7d 0d 7b 20 61 6e 64 20 |.hut.fi |}.{ and |
|000001c0| 4f 6c 6c 69 20 41 72 6e | 62 65 72 67 20 28 6f 61 |Olli Arn|berg (oa|
|000001d0| 72 40 68 75 74 63 73 2e | 68 75 74 2e 66 69 29 2e |r@hutcs.|hut.fi).|
|000001e0| 20 7d 0d 0d 7b 20 43 6f | 70 79 72 69 67 68 74 20 | }..{ Co|pyright |
|000001f0| 41 72 69 20 4d 75 6a 75 | 6e 65 6e 2c 20 4a 6f 68 |Ari Muju|nen, Joh|
|00000200| 61 6e 20 4d 79 72 8e 65 | 6e 2c 20 4f 6c 6c 69 20 |an Myr.e|n, Olli |
|00000210| 41 72 6e 62 65 72 67 20 | 31 39 38 39 2e 20 7d 0d |Arnberg |1989. }.|
|00000220| 0d 7b 20 59 6f 75 20 6d | 61 79 20 72 65 64 69 73 |.{ You m|ay redis|
|00000230| 74 72 69 62 75 74 65 20 | 74 68 69 73 20 61 70 70 |tribute |this app|
|00000240| 6c 69 63 61 74 69 6f 6e | 20 28 3d 61 70 70 6c 69 |lication| (=appli|
|00000250| 63 61 74 69 6f 6e 20 66 | 69 6c 65 2c 20 73 6f 75 |cation f|ile, sou|
|00000260| 72 63 65 20 66 69 6c 65 | 73 2c 20 7d 0d 7b 20 64 |rce file|s, }.{ d|
|00000270| 6f 63 75 6d 65 6e 74 61 | 74 69 6f 6e 20 66 69 6c |ocumenta|tion fil|
|00000280| 65 28 73 29 2c 20 61 6e | 64 20 74 68 65 20 66 69 |e(s), an|d the fi|
|00000290| 6c 65 20 27 43 6f 70 79 | 72 69 67 68 74 20 61 6e |le 'Copy|right an|
|000002a0| 64 20 53 6f 75 72 63 65 | 20 4f 66 66 65 72 27 29 |d Source| Offer')|
|000002b0| 20 7d 0d 7b 20 6f 6e 6c | 79 20 5f 6e 6f 6e 2d 63 | }.{ onl|y _non-c|
|000002c0| 6f 6d 6d 65 72 63 69 61 | 6c 6c 79 5f 20 61 6e 64 |ommercia|lly_ and|
|000002d0| 20 5f 69 6e 20 69 74 73 | 20 65 6e 74 69 72 65 74 | _in its| entiret|
|000002e0| 79 5f 2e 20 7d 0d 7b 20 | 53 65 65 20 74 68 65 20 |y_. }.{ |See the |
|000002f0| 66 69 6c 65 20 27 42 61 | 74 63 68 50 72 69 6e 74 |file 'Ba|tchPrint|
|00000300| 20 43 6f 70 79 72 69 67 | 68 74 27 20 61 6e 64 2f | Copyrig|ht' and/|
|00000310| 6f 72 20 64 6f 63 75 6d | 65 6e 74 61 74 69 6f 6e |or docum|entation|
|00000320| 20 66 6f 72 20 64 65 74 | 61 69 6c 73 2e 20 7d 0d | for det|ails. }.|
|00000330| 7b 20 41 63 6b 6e 6f 77 | 6c 65 64 67 65 6d 65 6e |{ Acknow|ledgemen|
|00000340| 74 73 3a 20 20 53 70 65 | 63 69 61 6c 20 74 68 61 |ts: Spe|cial tha|
|00000350| 6e 6b 73 20 74 6f 20 4d | 72 2e 20 50 61 75 6c 20 |nks to M|r. Paul |
|00000360| 44 75 42 6f 69 73 20 61 | 6e 64 20 4d 72 2e 20 4f |DuBois a|nd Mr. O|
|00000370| 77 65 6e 20 48 61 72 74 | 6e 65 74 74 20 7d 0d 7b |wen Hart|nett }.{|
|00000380| 20 66 6f 72 20 74 68 65 | 20 54 72 61 6e 73 53 6b | for the| TransSk|
|00000390| 65 6c 20 32 2e 30 20 61 | 70 70 6c 69 63 61 74 69 |el 2.0 a|pplicati|
|000003a0| 6f 6e 20 73 6b 65 6c 65 | 74 6f 6e 2e 20 7d 0d 0d |on skele|ton. }..|
|000003b0| 7b 20 43 68 61 6e 67 65 | 20 68 69 73 74 6f 72 79 |{ Change| history|
|000003c0| 3a 20 7d 0d 7b 20 56 65 | 72 73 69 6f 6e 20 20 44 |: }.{ Ve|rsion D|
|000003d0| 61 74 65 20 20 20 20 20 | 20 20 20 57 68 6f 20 20 |ate | Who |
|000003e0| 57 68 79 20 7d 0d 7b 20 | 30 2e 30 20 20 20 20 20 |Why }.{ |0.0 |
|000003f0| 20 33 31 2e 30 33 2e 31 | 39 38 39 20 20 61 6d 6e | 31.03.1|989 amn|
|00000400| 20 20 20 20 20 20 4f 72 | 69 67 69 6e 61 6c 20 76 | Or|iginal v|
|00000410| 65 72 73 69 6f 6e 2e 20 | 7d 0d 7b 20 20 20 20 20 |ersion. |}.{ |
|00000420| 20 20 20 20 20 30 32 2e | 30 34 2e 31 39 38 39 20 | 02.|04.1989 |
|00000430| 20 61 6d 6e 20 20 20 20 | 20 20 57 69 6e 64 6f 77 | amn | Window|
|00000440| 73 2c 20 6d 65 6e 75 73 | 2e 20 7d 0d 7b 20 20 20 |s, menus|. }.{ |
|00000450| 20 20 20 20 20 20 20 30 | 35 2e 30 34 2e 31 39 38 | 0|5.04.198|
|00000460| 39 20 20 61 6d 6e 2c 6f | 61 72 20 20 4d 6f 72 65 |9 amn,o|ar More|
|00000470| 20 77 69 6e 64 6f 77 73 | 2c 20 6d 65 6e 75 73 2e | windows|, menus.|
|00000480| 20 7d 0d 7b 20 20 20 20 | 20 20 20 20 20 20 31 31 | }.{ | 11|
|00000490| 2e 30 34 2e 31 39 38 39 | 20 20 61 6d 6e 20 20 20 |.04.1989| amn |
|000004a0| 20 20 20 50 72 69 6e 74 | 69 6e 67 2e 20 7d 0d 7b | Print|ing. }.{|
|000004b0| 20 20 20 20 20 20 20 20 | 20 20 31 32 2e 30 34 2e | | 12.04.|
|000004c0| 31 39 38 39 20 20 61 6d | 6e 20 20 20 20 20 20 43 |1989 am|n C|
|000004d0| 6c 65 61 6e 69 6e 67 20 | 75 70 2e 20 7d 0d 7b 20 |leaning |up. }.{ |
|000004e0| 20 20 20 20 20 20 20 20 | 20 31 33 2e 30 34 2e 31 | | 13.04.1|
|000004f0| 39 38 39 20 20 61 6d 6e | 20 20 20 20 20 20 53 65 |989 amn| Se|
|00000500| 74 74 69 6e 67 73 20 61 | 6e 64 20 50 61 67 65 20 |ttings a|nd Page |
|00000510| 6d 65 6e 75 73 2e 20 7d | 0d 7b 20 20 20 20 20 20 |menus. }|.{ |
|00000520| 20 20 20 20 31 34 2e 30 | 34 2e 31 39 38 39 20 20 | 14.0|4.1989 |
|00000530| 6a 65 6d 20 20 20 20 20 | 20 53 63 72 6f 6c 6c 20 |jem | Scroll |
|00000540| 62 61 72 73 2e 20 7d 0d | 7b 20 20 20 20 20 20 20 |bars. }.|{ |
|00000550| 20 20 20 31 35 2e 30 34 | 2e 31 39 38 39 20 20 61 | 15.04|.1989 a|
|00000560| 6d 6e 2c 6a 65 6d 20 20 | 4d 6f 72 65 20 73 63 72 |mn,jem |More scr|
|00000570| 6f 6c 6c 20 62 61 72 73 | 2e 20 7d 0d 7b 20 20 20 |oll bars|. }.{ |
|00000580| 20 20 20 20 20 20 20 31 | 36 2e 30 34 2e 31 39 38 | 1|6.04.198|
|00000590| 39 20 20 61 6d 6e 2c 6a | 65 6d 20 20 47 6f 74 6f |9 amn,j|em Goto|
|000005a0| 20 50 61 67 65 2c 20 53 | 63 61 6c 65 20 50 72 65 | Page, S|cale Pre|
|000005b0| 76 69 65 77 20 61 6e 64 | 20 67 65 6e 65 72 61 6c |view and| general|
|000005c0| 20 74 69 64 79 69 6e 67 | 2e 20 7d 0d 7b 20 20 20 | tidying|. }.{ |
|000005d0| 20 20 20 20 20 20 20 31 | 37 2e 30 34 2e 31 39 38 | 1|7.04.198|
|000005e0| 39 20 20 61 6d 6e 20 20 | 20 20 20 20 22 4e 6f 20 |9 amn | "No |
|000005f0| 77 69 6e 64 6f 77 73 22 | 20 6d 65 6e 75 20 73 74 |windows"| menu st|
|00000600| 61 74 65 2e 20 7d 0d 7b | 20 20 20 20 20 20 20 20 |ate. }.{| |
|00000610| 20 20 32 30 2e 30 34 2e | 31 39 38 39 20 20 61 6d | 20.04.|1989 am|
|00000620| 6e 20 20 20 20 20 20 50 | 72 69 6e 74 20 6f 6e 6c |n P|rint onl|
|00000630| 79 20 70 61 67 65 73 20 | 6e 65 65 64 65 64 2e 20 |y pages |needed. |
|00000640| 7d 0d 7b 20 20 20 20 20 | 20 20 20 20 20 32 31 2e |}.{ | 21.|
|00000650| 30 34 2e 31 39 38 39 20 | 20 61 6d 6e 2c 6a 65 6d |04.1989 | amn,jem|
|00000660| 20 20 50 72 69 6e 74 20 | 41 6c 6c 20 64 69 64 6e | Print |All didn|
|00000670| 27 74 20 77 6f 72 6b 2e | 20 7d 0d 0d 0d 7b 24 42 |'t work.| }...{$B|
|00000680| 2b 7d 20 20 7b 42 75 6e | 64 6c 65 20 62 69 74 20 |+} {Bun|dle bit |
|00000690| 6f 6e 2c 20 77 65 20 68 | 61 76 65 20 69 63 6f 6e |on, we h|ave icon|
|000006a0| 73 20 65 74 63 2e 20 7d | 0d 7b 24 54 20 41 50 50 |s etc. }|.{$T APP|
|000006b0| 4c 5e 38 39 73 7d 20 20 | 7b 46 69 6c 65 20 74 79 |L^89s} |{File ty|
|000006c0| 70 65 20 27 41 50 50 4c | 27 2c 20 63 72 65 61 74 |pe 'APPL|', creat|
|000006d0| 6f 72 20 27 5e 38 39 73 | 27 2e 7d 0d 7b 24 52 20 |or '^89s|'.}.{$R |
|000006e0| 42 61 74 63 68 50 72 69 | 6e 74 2e 52 73 72 63 7d |BatchPri|nt.Rsrc}|
|000006f0| 20 20 7b 49 64 65 6e 74 | 69 66 79 20 72 65 73 6f | {Ident|ify reso|
|00000700| 75 72 63 65 20 66 69 6c | 65 2e 7d 0d 0d 7b 24 55 |urce fil|e.}..{$U|
|00000710| 20 54 72 61 6e 73 53 6b | 65 6c 7d 20 20 7b 55 6e | TransSk|el} {Un|
|00000720| 69 74 20 27 54 72 61 6e | 73 53 6b 65 6c 27 20 69 |it 'Tran|sSkel' i|
|00000730| 73 20 66 6f 75 6e 64 20 | 69 6e 20 74 68 65 20 66 |s found |in the f|
|00000740| 69 6c 65 20 27 54 72 61 | 6e 73 53 6b 65 6c 27 2e |ile 'Tra|nsSkel'.|
|00000750| 7d 0d 55 53 45 53 0d 20 | 20 4d 65 6d 54 79 70 65 |}.USES. | MemType|
|00000760| 73 2c 0d 20 20 51 75 69 | 63 6b 44 72 61 77 2c 0d |s,. Qui|ckDraw,.|
|00000770| 20 20 4f 53 49 6e 74 66 | 2c 0d 20 20 54 6f 6f 6c | OSIntf|,. Tool|
|00000780| 49 6e 74 66 2c 0d 20 20 | 50 61 63 6b 49 6e 74 66 |Intf,. |PackIntf|
|00000790| 2c 0d 20 20 4d 61 63 50 | 72 69 6e 74 2c 0d 20 20 |,. MacP|rint,. |
|000007a0| 54 72 61 6e 73 53 6b 65 | 6c 3b 0d 20 20 0d 20 20 |TransSke|l;. . |
|000007b0| 0d 20 20 43 4f 4e 53 54 | 0d 20 20 20 20 63 4d 61 |. CONST|. cMa|
|000007c0| 67 69 63 61 6c 57 69 64 | 74 68 4f 66 53 63 72 6f |gicalWid|thOfScro|
|000007d0| 6c 6c 42 61 72 73 20 3d | 20 31 36 3b 20 20 7b 70 |llBars =| 16; {p|
|000007e0| 69 78 65 6c 73 20 61 73 | 20 72 65 71 75 69 72 65 |ixels as| require|
|000007f0| 64 20 62 79 20 57 44 45 | 46 20 30 7d 0d 20 20 20 |d by WDE|F 0}. |
|00000800| 20 63 56 69 65 77 53 63 | 61 6c 65 50 65 72 63 65 | cViewSc|alePerce|
|00000810| 6e 74 61 67 65 44 65 66 | 61 75 6c 74 20 3d 20 31 |ntageDef|ault = 1|
|00000820| 30 30 3b 0d 20 20 20 20 | 63 4e 75 6d 62 65 72 4f |00;. |cNumberO|
|00000830| 66 50 69 78 65 6c 73 41 | 72 6f 75 6e 64 50 61 67 |fPixelsA|roundPag|
|00000840| 65 3d 20 31 36 3b 0d 20 | 20 20 20 0d 20 20 20 20 |e= 16;. | . |
|00000850| 7b 20 52 65 73 6f 75 72 | 63 65 20 69 64 27 73 3a |{ Resour|ce id's:|
|00000860| 20 7d 0d 20 20 20 20 7b | 20 27 53 54 52 20 27 3a | }. {| 'STR ':|
|00000870| 20 7d 0d 20 20 20 20 63 | 53 74 72 69 6e 67 41 62 | }. c|StringAb|
|00000880| 6f 75 74 42 61 74 63 68 | 50 72 69 6e 74 20 3d 20 |outBatch|Print = |
|00000890| 31 32 38 3b 0d 20 20 20 | 20 63 53 74 72 69 6e 67 |128;. | cString|
|000008a0| 4e 75 6d 62 65 72 4f 66 | 50 61 67 65 73 20 3d 20 |NumberOf|Pages = |
|000008b0| 31 32 39 3b 0d 20 20 20 | 20 63 53 74 72 69 6e 67 |129;. | cString|
|000008c0| 50 61 67 65 20 3d 20 31 | 33 30 3b 0d 20 20 20 20 |Page = 1|30;. |
|000008d0| 63 53 74 72 69 6e 67 57 | 69 6e 64 6f 77 54 69 74 |cStringW|indowTit|
|000008e0| 6c 65 41 74 31 30 30 50 | 65 72 63 65 6e 74 20 3d |leAt100P|ercent =|
|000008f0| 20 31 33 31 3b 0d 20 20 | 20 20 63 53 74 72 69 6e | 131;. | cStrin|
|00000900| 67 57 69 6e 64 6f 77 54 | 69 74 6c 65 41 74 4f 74 |gWindowT|itleAtOt|
|00000910| 68 65 72 50 65 72 63 65 | 6e 74 61 67 65 73 20 3d |herPerce|ntages =|
|00000920| 20 31 33 32 3b 0d 20 20 | 20 20 63 53 74 72 69 6e | 132;. | cStrin|
|00000930| 67 55 6e 64 65 72 4d 69 | 6e 69 6d 75 6d 20 3d 20 |gUnderMi|nimum = |
|00000940| 31 33 33 3b 0d 20 20 20 | 20 63 53 74 72 69 6e 67 |133;. | cString|
|00000950| 4f 76 65 72 4d 61 78 69 | 6d 75 6d 20 3d 20 31 33 |OverMaxi|mum = 13|
|00000960| 34 3b 0d 20 20 20 20 0d | 20 20 20 20 7b 20 27 4d |4;. .| { 'M|
|00000970| 45 4e 55 27 3a 20 7d 0d | 20 20 20 20 63 4d 65 6e |ENU': }.| cMen|
|00000980| 75 46 69 72 73 74 49 64 | 20 3d 20 31 32 38 3b 0d |uFirstId| = 128;.|
|00000990| 20 20 20 20 0d 20 20 20 | 20 7b 20 27 41 4c 52 54 | . | { 'ALRT|
|000009a0| 27 3a 20 7d 0d 20 20 20 | 20 63 41 6c 65 72 74 41 |': }. | cAlertA|
|000009b0| 62 6f 75 74 42 61 74 63 | 68 50 72 69 6e 74 20 3d |boutBatc|hPrint =|
|000009c0| 20 31 32 38 3b 0d 20 20 | 20 20 63 41 6c 65 72 74 | 128;. | cAlert|
|000009d0| 4e 6f 4d 65 6d 6f 72 79 | 46 6f 72 57 69 6e 64 6f |NoMemory|ForWindo|
|000009e0| 77 73 20 3d 20 31 32 39 | 3b 0d 20 20 20 20 63 41 |ws = 129|;. cA|
|000009f0| 6c 65 72 74 46 69 6c 65 | 45 72 72 6f 72 20 3d 20 |lertFile|Error = |
|00000a00| 31 33 30 3b 0d 20 20 20 | 20 63 41 6c 65 72 74 50 |130;. | cAlertP|
|00000a10| 72 69 6e 74 45 72 72 6f | 72 20 3d 20 31 33 31 3b |rintErro|r = 131;|
|00000a20| 0d 20 20 20 20 63 41 6c | 65 72 74 53 63 61 6c 69 |. cAl|ertScali|
|00000a30| 6e 67 50 65 72 63 65 6e | 74 61 67 65 4f 75 74 4f |ngPercen|tageOutO|
|00000a40| 66 42 6f 75 6e 64 73 20 | 3d 20 31 33 34 3b 0d 20 |fBounds |= 134;. |
|00000a50| 20 20 20 0d 20 20 20 20 | 7b 20 27 57 49 4e 44 27 | . |{ 'WIND'|
|00000a60| 3a 20 7d 0d 20 20 20 20 | 63 57 69 6e 64 6f 77 4f |: }. |cWindowO|
|00000a70| 72 64 69 6e 61 72 79 20 | 3d 20 31 32 38 3b 0d 20 |rdinary |= 128;. |
|00000a80| 20 20 20 63 57 69 6e 64 | 6f 77 5a 6f 6f 6d 61 62 | cWind|owZoomab|
|00000a90| 6c 65 20 3d 20 31 32 39 | 3b 0d 20 20 20 20 0d 20 |le = 129|;. . |
|00000aa0| 20 20 20 7b 20 27 44 4c | 4f 47 27 3a 20 7d 0d 20 | { 'DL|OG': }. |
|00000ab0| 20 20 20 63 44 69 61 6c | 6f 67 53 63 61 6c 65 50 | cDial|ogScaleP|
|00000ac0| 72 65 76 69 65 77 20 3d | 20 31 33 32 3b 0d 20 20 |review =| 132;. |
|00000ad0| 20 20 63 44 69 61 6c 6f | 67 47 6f 74 6f 50 61 67 | cDialo|gGotoPag|
|00000ae0| 65 20 3d 20 31 33 33 3b | 0d 20 20 20 20 0d 20 20 |e = 133;|. . |
|00000af0| 20 20 7b 20 4d 65 6e 75 | 20 69 74 65 6d 20 6e 75 | { Menu| item nu|
|00000b00| 6d 62 65 72 73 3a 20 7d | 0d 20 20 20 20 63 46 69 |mbers: }|. cFi|
|00000b10| 6c 65 4f 70 65 6e 20 3d | 20 31 3b 0d 20 20 20 20 |leOpen =| 1;. |
|00000b20| 63 46 69 6c 65 43 6c 6f | 73 65 20 3d 20 33 3b 0d |cFileClo|se = 3;.|
|00000b30| 20 20 20 20 63 46 69 6c | 65 43 6c 6f 73 65 41 6c | cFil|eCloseAl|
|00000b40| 6c 20 3d 20 34 3b 0d 20 | 20 20 20 63 46 69 6c 65 |l = 4;. | cFile|
|00000b50| 50 61 67 65 53 65 74 75 | 70 20 3d 20 36 3b 0d 20 |PageSetu|p = 6;. |
|00000b60| 20 20 20 63 46 69 6c 65 | 50 61 67 65 53 65 74 75 | cFile|PageSetu|
|00000b70| 70 41 6c 6c 20 3d 20 37 | 3b 0d 20 20 20 20 63 46 |pAll = 7|;. cF|
|00000b80| 69 6c 65 50 72 69 6e 74 | 20 3d 20 38 3b 0d 20 20 |ilePrint| = 8;. |
|00000b90| 20 20 63 46 69 6c 65 50 | 72 69 6e 74 41 6c 6c 20 | cFileP|rintAll |
|00000ba0| 3d 20 39 3b 0d 20 20 20 | 20 63 46 69 6c 65 51 75 |= 9;. | cFileQu|
|00000bb0| 69 74 20 3d 20 31 31 3b | 0d 20 20 20 20 0d 20 20 |it = 11;|. . |
|00000bc0| 20 20 63 45 64 69 74 55 | 6e 64 6f 20 3d 20 31 3b | cEditU|ndo = 1;|
|00000bd0| 0d 20 20 20 20 63 45 64 | 69 74 43 75 74 20 20 3d |. cEd|itCut =|
|00000be0| 20 33 3b 0d 20 20 20 20 | 63 45 64 69 74 43 6f 70 | 3;. |cEditCop|
|00000bf0| 79 20 3d 20 34 3b 0d 20 | 20 20 20 63 45 64 69 74 |y = 4;. | cEdit|
|00000c00| 50 61 73 74 65 20 3d 20 | 35 3b 0d 20 20 20 20 63 |Paste = |5;. c|
|00000c10| 45 64 69 74 43 6c 65 61 | 72 20 3d 20 36 3b 0d 20 |EditClea|r = 6;. |
|00000c20| 20 20 20 0d 20 20 20 20 | 63 56 69 65 77 49 6e 66 | . |cViewInf|
|00000c30| 6f 72 6d 61 74 69 6f 6e | 20 3d 20 31 3b 0d 20 20 |ormation| = 1;. |
|00000c40| 20 20 63 56 69 65 77 43 | 6f 6e 74 65 6e 74 73 20 | cViewC|ontents |
|00000c50| 3d 20 32 3b 0d 20 20 20 | 20 63 56 69 65 77 53 63 |= 2;. | cViewSc|
|00000c60| 61 6c 65 50 72 65 76 69 | 65 77 20 3d 20 34 3b 0d |alePrevi|ew = 4;.|
|00000c70| 20 20 20 20 0d 20 20 20 | 20 63 53 65 74 74 69 6e | . | cSettin|
|00000c80| 67 73 55 73 65 50 72 69 | 6e 74 65 72 53 70 61 63 |gsUsePri|nterSpac|
|00000c90| 69 6e 67 20 3d 20 31 3b | 0d 20 20 20 20 63 53 65 |ing = 1;|. cSe|
|00000ca0| 74 74 69 6e 67 73 44 69 | 73 61 62 6c 65 46 6f 6e |ttingsDi|sableFon|
|00000cb0| 74 53 63 61 6c 69 6e 67 | 20 3d 20 32 3b 0d 20 20 |tScaling| = 2;. |
|00000cc0| 20 20 0d 20 20 20 20 63 | 50 61 67 65 50 72 65 76 | . c|PagePrev|
|00000cd0| 69 6f 75 73 20 3d 20 31 | 3b 0d 20 20 20 20 63 50 |ious = 1|;. cP|
|00000ce0| 61 67 65 4e 65 78 74 20 | 3d 20 32 3b 0d 20 20 20 |ageNext |= 2;. |
|00000cf0| 20 63 50 61 67 65 46 69 | 72 73 74 20 3d 20 34 3b | cPageFi|rst = 4;|
|00000d00| 0d 20 20 20 20 63 50 61 | 67 65 4c 61 73 74 20 3d |. cPa|geLast =|
|00000d10| 20 35 3b 0d 20 20 20 20 | 63 50 61 67 65 47 6f 74 | 5;. |cPageGot|
|00000d20| 6f 50 61 67 65 20 3d 20 | 37 3b 0d 20 20 20 20 63 |oPage = |7;. c|
|00000d30| 50 61 67 65 50 61 67 65 | 4e 75 6d 62 65 72 49 74 |PagePage|NumberIt|
|00000d40| 65 6d 20 3d 20 38 3b 0d | 20 20 20 20 0d 20 20 20 |em = 8;.| . |
|00000d50| 20 7b 20 47 65 6e 65 72 | 61 6c 20 64 69 61 6c 6f | { Gener|al dialo|
|00000d60| 67 20 62 75 74 74 6f 6e | 20 69 74 65 6d 20 6e 75 |g button| item nu|
|00000d70| 6d 62 65 72 73 3a 20 7d | 0d 20 20 20 20 63 4f 6b |mbers: }|. cOk|
|00000d80| 42 75 74 74 6f 6e 20 3d | 20 31 3b 0d 20 20 20 20 |Button =| 1;. |
|00000d90| 63 43 61 6e 63 65 6c 42 | 75 74 74 6f 6e 20 3d 20 |cCancelB|utton = |
|00000da0| 32 3b 0d 20 20 20 20 0d | 20 20 20 20 7b 20 53 63 |2;. .| { Sc|
|00000db0| 61 6c 65 20 50 72 65 76 | 69 65 77 20 44 69 61 6c |ale Prev|iew Dial|
|00000dc0| 6f 67 20 69 74 65 6d 73 | 3a 20 7d 0d 20 20 20 20 |og items|: }. |
|00000dd0| 63 44 49 54 53 63 61 6c | 65 50 65 72 63 65 6e 74 |cDITScal|ePercent|
|00000de0| 61 67 65 20 3d 20 34 3b | 0d 20 20 20 20 0d 20 20 |age = 4;|. . |
|00000df0| 20 20 7b 20 47 6f 74 6f | 20 50 61 67 65 20 44 69 | { Goto| Page Di|
|00000e00| 61 6c 6f 67 20 69 74 65 | 6d 73 3a 20 7d 0d 20 20 |alog ite|ms: }. |
|00000e10| 20 20 63 44 49 54 50 61 | 67 65 4e 75 6d 62 65 72 | cDITPa|geNumber|
|00000e20| 20 3d 20 34 3b 0d 20 20 | 20 20 0d 20 20 20 20 0d | = 4;. | . .|
|00000e30| 20 20 0d 20 20 54 59 50 | 45 0d 20 20 20 20 74 57 | . TYP|E. tW|
|00000e40| 69 6e 64 6f 77 52 65 6c | 61 74 65 64 49 6e 66 6f |indowRel|atedInfo|
|00000e50| 3d 0d 20 20 20 20 20 20 | 52 45 43 4f 52 44 0d 20 |=. |RECORD. |
|00000e60| 20 20 20 20 20 20 20 72 | 53 70 6f 6f 6c 46 69 6c | r|SpoolFil|
|00000e70| 65 48 65 61 64 65 72 3a | 20 54 50 66 48 65 61 64 |eHeader:| TPfHead|
|00000e80| 65 72 3b 20 20 7b 6d 75 | 73 74 20 62 65 20 66 69 |er; {mu|st be fi|
|00000e90| 72 73 74 3b 20 72 65 61 | 64 20 64 69 72 65 63 74 |rst; rea|d direct|
|00000ea0| 6c 79 20 66 72 6f 6d 20 | 66 69 6c 65 7d 0d 20 20 |ly from |file}. |
|00000eb0| 20 20 20 20 20 20 72 4f | 72 69 67 69 6e 61 6c 50 | rO|riginalP|
|00000ec0| 61 67 65 52 65 63 74 3a | 20 52 65 63 74 3b 0d 20 |ageRect:| Rect;. |
|00000ed0| 20 20 20 20 20 20 20 72 | 53 46 52 65 70 6c 79 3a | r|SFReply:|
|00000ee0| 20 53 46 52 65 70 6c 79 | 3b 0d 20 20 20 20 20 20 | SFReply|;. |
|00000ef0| 20 20 72 56 69 65 77 4d | 65 6e 75 53 65 6c 65 63 | rViewM|enuSelec|
|00000f00| 74 69 6f 6e 46 6f 72 54 | 68 69 73 57 69 6e 64 6f |tionForT|hisWindo|
|00000f10| 77 3a 20 49 6e 74 65 67 | 65 72 3b 0d 20 20 20 20 |w: Integ|er;. |
|00000f20| 20 20 20 20 72 56 69 65 | 77 53 69 7a 65 3a 20 41 | rVie|wSize: A|
|00000f30| 52 52 41 59 20 5b 63 56 | 69 65 77 49 6e 66 6f 72 |RRAY [cV|iewInfor|
|00000f40| 6d 61 74 69 6f 6e 2e 2e | 63 56 69 65 77 43 6f 6e |mation..|cViewCon|
|00000f50| 74 65 6e 74 73 5d 20 4f | 46 20 52 65 63 74 3b 0d |tents] O|F Rect;.|
|00000f60| 20 20 20 20 20 20 20 20 | 72 56 69 65 77 53 63 61 | |rViewSca|
|00000f70| 6c 65 50 72 65 76 69 65 | 77 50 65 72 63 65 6e 74 |lePrevie|wPercent|
|00000f80| 61 67 65 3a 20 49 6e 74 | 65 67 65 72 3b 0d 20 20 |age: Int|eger;. |
|00000f90| 20 20 20 20 20 20 72 55 | 73 65 50 72 69 6e 74 65 | rU|sePrinte|
|00000fa0| 72 53 70 61 63 69 6e 67 | 3a 20 42 6f 6f 6c 65 61 |rSpacing|: Boolea|
|00000fb0| 6e 3b 0d 20 20 20 20 20 | 20 20 20 72 44 69 73 61 |n;. | rDisa|
|00000fc0| 62 6c 65 46 6f 6e 74 53 | 63 61 6c 69 6e 67 3a 20 |bleFontS|caling: |
|00000fd0| 42 6f 6f 6c 65 61 6e 3b | 0d 20 20 20 20 20 20 20 |Boolean;|. |
|00000fe0| 20 72 50 61 67 65 4e 75 | 6d 62 65 72 3a 20 49 6e | rPageNu|mber: In|
|00000ff0| 74 65 67 65 72 3b 0d 20 | 20 20 20 20 20 20 20 72 |teger;. | r|
|00001000| 56 65 72 74 69 63 61 6c | 53 63 72 6f 6c 6c 43 6f |Vertical|ScrollCo|
|00001010| 6e 74 72 6f 6c 2c 0d 20 | 20 20 20 20 20 20 20 72 |ntrol,. | r|
|00001020| 48 6f 72 69 7a 6f 6e 74 | 61 6c 53 63 72 6f 6c 6c |Horizont|alScroll|
|00001030| 43 6f 6e 74 72 6f 6c 3a | 20 43 6f 6e 74 72 6f 6c |Control:| Control|
|00001040| 48 61 6e 64 6c 65 3b 0d | 20 20 20 20 20 20 45 4e |Handle;.| EN|
|00001050| 44 3b 0d 20 20 20 20 74 | 70 57 69 6e 64 6f 77 52 |D;. t|pWindowR|
|00001060| 65 6c 61 74 65 64 49 6e | 66 6f 3d 20 5e 74 57 69 |elatedIn|fo= ^tWi|
|00001070| 6e 64 6f 77 52 65 6c 61 | 74 65 64 49 6e 66 6f 3b |ndowRela|tedInfo;|
|00001080| 0d 20 20 20 20 74 68 57 | 69 6e 64 6f 77 52 65 6c |. thW|indowRel|
|00001090| 61 74 65 64 49 6e 66 6f | 3d 20 5e 74 70 57 69 6e |atedInfo|= ^tpWin|
|000010a0| 64 6f 77 52 65 6c 61 74 | 65 64 49 6e 66 6f 3b 0d |dowRelat|edInfo;.|
|000010b0| 20 20 20 20 0d 20 20 20 | 20 74 4d 65 6e 75 45 6e | . | tMenuEn|
|000010c0| 75 6d 65 72 61 74 69 6f | 6e 3d 28 0d 20 20 20 20 |umeratio|n=(. |
|000010d0| 20 20 65 46 69 6c 65 2c | 0d 20 20 20 20 20 20 65 | eFile,|. e|
|000010e0| 45 64 69 74 2c 0d 20 20 | 20 20 20 20 65 56 69 65 |Edit,. | eVie|
|000010f0| 77 2c 0d 20 20 20 20 20 | 20 65 53 65 74 74 69 6e |w,. | eSettin|
|00001100| 67 73 2c 0d 20 20 20 20 | 20 20 65 50 61 67 65 0d |gs,. | ePage.|
|00001110| 20 20 20 20 29 3b 0d 20 | 20 20 20 0d 0d 20 20 56 | );. | .. V|
|00001120| 41 52 0d 20 20 20 20 7b | 20 47 6c 6f 62 61 6c 20 |AR. {| Global |
|00001130| 76 61 72 69 61 62 6c 65 | 73 2e 20 7d 0d 20 20 20 |variable|s. }. |
|00001140| 20 76 4d 65 6e 75 3a 20 | 41 52 52 41 59 20 5b 74 | vMenu: |ARRAY [t|
|00001150| 4d 65 6e 75 45 6e 75 6d | 65 72 61 74 69 6f 6e 5d |MenuEnum|eration]|
|00001160| 20 4f 46 20 4d 65 6e 75 | 48 61 6e 64 6c 65 3b 0d | OF Menu|Handle;.|
|00001170| 20 20 20 20 76 48 61 73 | 31 32 38 4b 52 4f 4d 73 | vHas|128KROMs|
|00001180| 3a 20 42 6f 6f 6c 65 61 | 6e 3b 0d 20 20 20 20 76 |: Boolea|n;. v|
|00001190| 4e 75 6d 62 65 72 4f 66 | 4f 75 72 4f 70 65 6e 57 |NumberOf|OurOpenW|
|000011a0| 69 6e 64 6f 77 73 3a 20 | 49 6e 74 65 67 65 72 3b |indows: |Integer;|
|000011b0| 0d 20 20 20 20 7b 20 47 | 6c 6f 62 61 6c 20 73 65 |. { G|lobal se|
|000011c0| 74 74 69 6e 67 73 2e 20 | 7d 0d 20 20 20 20 76 56 |ttings. |}. vV|
|000011d0| 69 65 77 4d 65 6e 75 53 | 65 6c 65 63 74 69 6f 6e |iewMenuS|election|
|000011e0| 44 65 66 61 75 6c 74 3a | 20 49 6e 74 65 67 65 72 |Default:| Integer|
|000011f0| 3b 0d 20 20 20 20 76 56 | 69 65 77 53 63 61 6c 65 |;. vV|iewScale|
|00001200| 50 65 72 63 65 6e 74 61 | 67 65 44 65 66 61 75 6c |Percenta|geDefaul|
|00001210| 74 3a 20 49 6e 74 65 67 | 65 72 3b 0d 20 20 20 20 |t: Integ|er;. |
|00001220| 76 53 65 74 74 69 6e 67 | 73 55 73 65 50 72 69 6e |vSetting|sUsePrin|
|00001230| 74 65 72 53 70 61 63 69 | 6e 67 3a 20 42 6f 6f 6c |terSpaci|ng: Bool|
|00001240| 65 61 6e 3b 0d 20 20 20 | 20 76 53 65 74 74 69 6e |ean;. | vSettin|
|00001250| 67 73 44 69 73 61 62 6c | 65 46 6f 6e 74 53 63 61 |gsDisabl|eFontSca|
|00001260| 6c 69 6e 67 3a 20 42 6f | 6f 6c 65 61 6e 3b 0d 20 |ling: Bo|olean;. |
|00001270| 20 20 20 7b 20 46 6f 72 | 20 70 4f 75 72 47 65 74 | { For| pOurGet|
|00001280| 50 69 63 50 72 6f 63 2e | 20 7d 0d 20 20 20 20 76 |PicProc.| }. v|
|00001290| 47 6c 6f 62 61 6c 53 70 | 6f 6f 6c 46 69 6c 65 52 |GlobalSp|oolFileR|
|000012a0| 65 66 4e 75 6d 44 75 72 | 69 6e 67 4f 6e 65 50 61 |efNumDur|ingOnePa|
|000012b0| 67 65 55 70 64 61 74 65 | 3a 20 49 6e 74 65 67 65 |geUpdate|: Intege|
|000012c0| 72 3b 0d 20 20 20 20 0d | 20 20 20 20 7b 20 49 6e |r;. .| { In|
|000012d0| 73 74 72 75 63 74 69 6f | 6e 73 20 66 72 6f 6d 20 |structio|ns from |
|000012e0| 74 68 65 20 46 69 6e 64 | 65 72 2e 20 7d 0d 20 20 |the Find|er. }. |
|000012f0| 20 20 76 57 68 61 74 46 | 69 6e 64 65 72 54 6f 6c | vWhatF|inderTol|
|00001300| 64 55 73 54 6f 44 6f 3a | 20 49 6e 74 65 67 65 72 |dUsToDo:| Integer|
|00001310| 3b 0d 20 20 20 20 76 4e | 75 6d 62 65 72 4f 66 41 |;. vN|umberOfA|
|00001320| 70 70 46 69 6c 65 73 3a | 20 49 6e 74 65 67 65 72 |ppFiles:| Integer|
|00001330| 3b 0d 20 20 20 20 0d 20 | 20 20 20 7b 20 41 75 78 |;. . | { Aux|
|00001340| 69 6c 69 61 72 79 20 76 | 61 72 69 61 62 6c 65 73 |iliary v|ariables|
|00001350| 20 66 6f 72 20 74 68 65 | 20 6d 61 69 6e 20 70 72 | for the| main pr|
|00001360| 6f 67 72 61 6d 2e 20 7d | 0d 20 20 20 20 76 4d 65 |ogram. }|. vMe|
|00001370| 6e 75 45 6e 75 6d 65 72 | 61 74 69 6f 6e 3a 20 74 |nuEnumer|ation: t|
|00001380| 4d 65 6e 75 45 6e 75 6d | 65 72 61 74 69 6f 6e 3b |MenuEnum|eration;|
|00001390| 0d 20 20 20 20 68 53 74 | 72 69 6e 67 3a 20 53 74 |. hSt|ring: St|
|000013a0| 72 69 6e 67 48 61 6e 64 | 6c 65 3b 0d 20 20 20 20 |ringHand|le;. |
|000013b0| 73 75 63 63 65 73 73 66 | 75 6c 3a 20 42 6f 6f 6c |successf|ul: Bool|
|000013c0| 65 61 6e 3b 0d 20 20 20 | 20 69 3a 20 49 6e 74 65 |ean;. | i: Inte|
|000013d0| 67 65 72 3b 0d 20 20 20 | 20 74 68 65 41 70 70 46 |ger;. | theAppF|
|000013e0| 69 6c 65 3a 20 41 70 70 | 46 69 6c 65 3b 0d 20 20 |ile: App|File;. |
|000013f0| 20 20 72 6f 6d 56 65 72 | 73 69 6f 6e 3a 20 49 6e | romVer|sion: In|
|00001400| 74 65 67 65 72 3b 0d 20 | 20 20 20 6d 61 63 68 69 |teger;. | machi|
|00001410| 6e 65 54 79 70 65 3a 20 | 49 6e 74 65 67 65 72 3b |neType: |Integer;|
|00001420| 0d 20 20 0d 20 20 0d 20 | 20 50 52 4f 43 45 44 55 |. . . | PROCEDU|
|00001430| 52 45 20 70 45 72 72 6f | 72 41 6c 65 72 74 28 74 |RE pErro|rAlert(t|
|00001440| 68 65 41 6c 65 72 74 3a | 20 49 6e 74 65 67 65 72 |heAlert:| Integer|
|00001450| 29 3b 0d 20 20 20 20 56 | 41 52 0d 20 20 20 20 20 |);. V|AR. |
|00001460| 20 62 75 74 74 6f 6e 43 | 6c 69 63 6b 65 64 3a 20 | buttonC|licked: |
|00001470| 49 6e 74 65 67 65 72 3b | 0d 20 20 42 45 47 49 4e |Integer;|. BEGIN|
|00001480| 0d 20 20 20 20 62 75 74 | 74 6f 6e 43 6c 69 63 6b |. but|tonClick|
|00001490| 65 64 20 3a 3d 20 53 74 | 6f 70 41 6c 65 72 74 28 |ed := St|opAlert(|
|000014a0| 74 68 65 41 6c 65 72 74 | 2c 20 4e 49 4c 29 3b 0d |theAlert|, NIL);.|
|000014b0| 20 20 45 4e 44 3b 20 20 | 7b 70 45 72 72 6f 72 41 | END; |{pErrorA|
|000014c0| 6c 65 72 74 7d 0d 20 20 | 0d 20 20 0d 20 20 50 52 |lert}. |. . PR|
|000014d0| 4f 43 45 44 55 52 45 20 | 70 46 69 6c 65 45 72 72 |OCEDURE |pFileErr|
|000014e0| 6f 72 41 6c 65 72 74 28 | 0d 20 20 20 20 74 68 65 |orAlert(|. the|
|000014f0| 41 6c 65 72 74 3a 20 49 | 6e 74 65 67 65 72 3b 0d |Alert: I|nteger;.|
|00001500| 20 20 20 20 72 65 74 43 | 6f 64 65 3a 20 4f 53 45 | retC|ode: OSE|
|00001510| 72 72 3b 0d 20 20 20 20 | 66 69 6c 65 4e 61 6d 65 |rr;. |fileName|
|00001520| 3a 20 53 74 72 32 35 35 | 0d 20 20 29 3b 0d 20 20 |: Str255|. );. |
|00001530| 20 20 56 41 52 0d 20 20 | 20 20 20 20 65 72 72 6f | VAR. | erro|
|00001540| 72 4e 75 6d 62 65 72 41 | 73 53 74 72 69 6e 67 3a |rNumberA|sString:|
|00001550| 20 53 74 72 32 35 35 3b | 0d 20 20 42 45 47 49 4e | Str255;|. BEGIN|
|00001560| 0d 20 20 20 20 4e 75 6d | 54 6f 53 74 72 69 6e 67 |. Num|ToString|
|00001570| 28 4c 6f 6e 67 69 6e 74 | 28 72 65 74 43 6f 64 65 |(Longint|(retCode|
|00001580| 29 2c 20 65 72 72 6f 72 | 4e 75 6d 62 65 72 41 73 |), error|NumberAs|
|00001590| 53 74 72 69 6e 67 29 3b | 0d 20 20 20 20 50 61 72 |String);|. Par|
|000015a0| 61 6d 54 65 78 74 28 65 | 72 72 6f 72 4e 75 6d 62 |amText(e|rrorNumb|
|000015b0| 65 72 41 73 53 74 72 69 | 6e 67 2c 20 66 69 6c 65 |erAsStri|ng, file|
|000015c0| 4e 61 6d 65 2c 20 27 27 | 2c 20 27 27 29 3b 0d 20 |Name, ''|, '');. |
|000015d0| 20 20 20 70 45 72 72 6f | 72 41 6c 65 72 74 28 74 | pErro|rAlert(t|
|000015e0| 68 65 41 6c 65 72 74 29 | 3b 0d 20 20 45 4e 44 3b |heAlert)|;. END;|
|000015f0| 20 20 7b 70 46 69 6c 65 | 45 72 72 6f 72 41 6c 65 | {pFile|ErrorAle|
|00001600| 72 74 7d 0d 20 20 0d 20 | 20 0d 20 20 50 52 4f 43 |rt}. . | . PROC|
|00001610| 45 44 55 52 45 20 70 50 | 72 69 6e 74 45 72 72 6f |EDURE pP|rintErro|
|00001620| 72 41 6c 65 72 74 28 0d | 20 20 20 20 74 68 65 41 |rAlert(.| theA|
|00001630| 6c 65 72 74 3a 20 49 6e | 74 65 67 65 72 3b 0d 20 |lert: In|teger;. |
|00001640| 20 20 20 72 65 74 43 6f | 64 65 3a 20 4f 53 45 72 | retCo|de: OSEr|
|00001650| 72 0d 20 20 29 3b 0d 20 | 20 20 20 56 41 52 0d 20 |r. );. | VAR. |
|00001660| 20 20 20 20 20 65 72 72 | 6f 72 4e 75 6d 62 65 72 | err|orNumber|
|00001670| 41 73 53 74 72 69 6e 67 | 3a 20 53 74 72 32 35 35 |AsString|: Str255|
|00001680| 3b 0d 20 20 42 45 47 49 | 4e 0d 20 20 20 20 4e 75 |;. BEGI|N. Nu|
|00001690| 6d 54 6f 53 74 72 69 6e | 67 28 4c 6f 6e 67 69 6e |mToStrin|g(Longin|
|000016a0| 74 28 72 65 74 43 6f 64 | 65 29 2c 20 65 72 72 6f |t(retCod|e), erro|
|000016b0| 72 4e 75 6d 62 65 72 41 | 73 53 74 72 69 6e 67 29 |rNumberA|sString)|
|000016c0| 3b 0d 20 20 20 20 50 61 | 72 61 6d 54 65 78 74 28 |;. Pa|ramText(|
|000016d0| 65 72 72 6f 72 4e 75 6d | 62 65 72 41 73 53 74 72 |errorNum|berAsStr|
|000016e0| 69 6e 67 2c 20 27 27 2c | 20 27 27 2c 20 27 27 29 |ing, '',| '', '')|
|000016f0| 3b 0d 20 20 20 20 70 45 | 72 72 6f 72 41 6c 65 72 |;. pE|rrorAler|
|00001700| 74 28 74 68 65 41 6c 65 | 72 74 29 3b 0d 20 20 45 |t(theAle|rt);. E|
|00001710| 4e 44 3b 20 20 7b 70 50 | 72 69 6e 74 45 72 72 6f |ND; {pP|rintErro|
|00001720| 72 41 6c 65 72 74 7d 0d | 20 20 0d 20 20 0d 20 20 |rAlert}.| . . |
|00001730| 46 55 4e 43 54 49 4f 4e | 20 66 50 61 72 61 6d 65 |FUNCTION| fParame|
|00001740| 74 72 69 7a 65 53 54 52 | 28 0d 20 20 20 20 73 74 |trizeSTR|(. st|
|00001750| 72 49 64 3a 20 49 6e 74 | 65 67 65 72 3b 0d 20 20 |rId: Int|eger;. |
|00001760| 20 20 73 74 72 69 6e 67 | 55 73 65 64 49 66 52 65 | string|UsedIfRe|
|00001770| 73 4e 6f 74 46 6f 75 6e | 64 3a 20 53 74 72 32 35 |sNotFoun|d: Str25|
|00001780| 35 3b 0d 20 20 20 20 70 | 30 2c 0d 20 20 20 20 70 |5;. p|0,. p|
|00001790| 31 3a 20 53 74 72 32 35 | 35 0d 20 20 29 20 3a 20 |1: Str25|5. ) : |
|000017a0| 53 74 72 32 35 35 3b 0d | 20 20 20 20 56 41 52 0d |Str255;.| VAR.|
|000017b0| 20 20 20 20 20 20 68 53 | 74 72 69 6e 67 3a 20 53 | hS|tring: S|
|000017c0| 74 72 69 6e 67 48 61 6e | 64 6c 65 3b 0d 20 20 20 |tringHan|dle;. |
|000017d0| 20 20 20 72 65 73 75 6c | 74 3a 20 53 74 72 32 35 | resul|t: Str25|
|000017e0| 35 3b 0d 20 20 20 20 20 | 20 69 3a 20 49 6e 74 65 |5;. | i: Inte|
|000017f0| 67 65 72 3b 0d 20 20 42 | 45 47 49 4e 0d 20 20 20 |ger;. B|EGIN. |
|00001800| 20 68 53 74 72 69 6e 67 | 20 3a 3d 20 47 65 74 53 | hString| := GetS|
|00001810| 74 72 69 6e 67 28 73 74 | 72 49 64 29 3b 0d 20 20 |tring(st|rId);. |
|00001820| 20 20 49 46 20 68 53 74 | 72 69 6e 67 20 3d 20 4e | IF hSt|ring = N|
|00001830| 49 4c 20 54 48 45 4e 0d | 20 20 20 20 20 20 72 65 |IL THEN.| re|
|00001840| 73 75 6c 74 20 3a 3d 20 | 73 74 72 69 6e 67 55 73 |sult := |stringUs|
|00001850| 65 64 49 66 52 65 73 4e | 6f 74 46 6f 75 6e 64 0d |edIfResN|otFound.|
|00001860| 20 20 20 20 45 4c 53 45 | 0d 20 20 20 20 20 20 72 | ELSE|. r|
|00001870| 65 73 75 6c 74 20 3a 3d | 20 68 53 74 72 69 6e 67 |esult :=| hString|
|00001880| 5e 5e 3b 0d 20 20 20 20 | 0d 20 20 20 20 69 20 3a |^^;. |. i :|
|00001890| 3d 20 50 6f 73 28 27 5e | 30 27 2c 20 72 65 73 75 |= Pos('^|0', resu|
|000018a0| 6c 74 29 3b 0d 20 20 20 | 20 49 46 20 69 20 3e 20 |lt);. | IF i > |
|000018b0| 30 20 54 48 45 4e 0d 20 | 20 20 20 20 20 42 45 47 |0 THEN. | BEG|
|000018c0| 49 4e 0d 20 20 20 20 20 | 20 20 20 44 65 6c 65 74 |IN. | Delet|
|000018d0| 65 28 72 65 73 75 6c 74 | 2c 20 69 2c 20 32 29 3b |e(result|, i, 2);|
|000018e0| 0d 20 20 20 20 20 20 20 | 20 49 6e 73 65 72 74 28 |. | Insert(|
|000018f0| 70 30 2c 20 72 65 73 75 | 6c 74 2c 20 69 29 3b 0d |p0, resu|lt, i);.|
|00001900| 20 20 20 20 20 20 45 4e | 44 3b 0d 20 20 20 20 0d | EN|D;. .|
|00001910| 20 20 20 20 69 20 3a 3d | 20 50 6f 73 28 27 5e 31 | i :=| Pos('^1|
|00001920| 27 2c 20 72 65 73 75 6c | 74 29 3b 0d 20 20 20 20 |', resul|t);. |
|00001930| 49 46 20 69 20 3e 20 30 | 20 54 48 45 4e 0d 20 20 |IF i > 0| THEN. |
|00001940| 20 20 20 20 42 45 47 49 | 4e 0d 20 20 20 20 20 20 | BEGI|N. |
|00001950| 20 20 44 65 6c 65 74 65 | 28 72 65 73 75 6c 74 2c | Delete|(result,|
|00001960| 20 69 2c 20 32 29 3b 0d | 20 20 20 20 20 20 20 20 | i, 2);.| |
|00001970| 49 6e 73 65 72 74 28 70 | 31 2c 20 72 65 73 75 6c |Insert(p|1, resul|
|00001980| 74 2c 20 69 29 3b 0d 20 | 20 20 20 20 20 45 4e 44 |t, i);. | END|
|00001990| 3b 0d 20 20 20 20 66 50 | 61 72 61 6d 65 74 72 69 |;. fP|arametri|
|000019a0| 7a 65 53 54 52 20 3a 3d | 20 72 65 73 75 6c 74 3b |zeSTR :=| result;|
|000019b0| 0d 20 20 45 4e 44 3b 20 | 20 7b 66 50 61 72 61 6d |. END; | {fParam|
|000019c0| 65 74 72 69 7a 65 53 54 | 52 7d 0d 20 20 20 20 0d |etrizeST|R}. .|
|000019d0| 20 20 0d 20 20 50 52 4f | 43 45 44 55 52 45 20 70 | . PRO|CEDURE p|
|000019e0| 44 6f 41 62 6f 75 74 42 | 61 74 63 68 50 72 69 6e |DoAboutB|atchPrin|
|000019f0| 74 3b 0d 20 20 20 20 56 | 41 52 0d 20 20 20 20 20 |t;. V|AR. |
|00001a00| 20 62 75 74 74 6f 6e 43 | 6c 69 63 6b 65 64 3a 20 | buttonC|licked: |
|00001a10| 49 6e 74 65 67 65 72 3b | 0d 20 20 42 45 47 49 4e |Integer;|. BEGIN|
|00001a20| 0d 20 20 20 20 62 75 74 | 74 6f 6e 43 6c 69 63 6b |. but|tonClick|
|00001a30| 65 64 20 3a 3d 20 41 6c | 65 72 74 28 63 41 6c 65 |ed := Al|ert(cAle|
|00001a40| 72 74 41 62 6f 75 74 42 | 61 74 63 68 50 72 69 6e |rtAboutB|atchPrin|
|00001a50| 74 2c 20 4e 49 4c 29 3b | 0d 20 20 45 4e 44 3b 20 |t, NIL);|. END; |
|00001a60| 20 7b 70 44 6f 41 62 6f | 75 74 42 61 74 63 68 50 | {pDoAbo|utBatchP|
|00001a70| 72 69 6e 74 7d 0d 20 20 | 0d 20 20 0d 20 20 43 4f |rint}. |. . CO|
|00001a80| 4e 53 54 0d 20 20 20 20 | 63 50 61 67 65 4e 75 6d |NST. |cPageNum|
|00001a90| 62 65 72 42 6f 78 50 61 | 72 74 20 3d 20 35 3b 20 |berBoxPa|rt = 5; |
|00001aa0| 20 7b 31 2f 35 20 74 68 | 20 70 61 72 74 20 6f 66 | {1/5 th| part of|
|00001ab0| 20 68 6f 72 69 7a 6f 6e | 74 61 6c 20 73 63 72 6f | horizon|tal scro|
|00001ac0| 6c 6c 65 72 20 66 6f 72 | 20 70 61 67 65 20 6e 75 |ller for| page nu|
|00001ad0| 6d 62 65 72 7d 0d 20 20 | 0d 20 20 50 52 4f 43 45 |mber}. |. PROCE|
|00001ae0| 44 55 52 45 20 70 43 61 | 6c 63 48 6f 72 69 7a 6f |DURE pCa|lcHorizo|
|00001af0| 6e 74 61 6c 53 63 72 6f | 6c 6c 52 65 63 74 28 74 |ntalScro|llRect(t|
|00001b00| 68 65 57 69 6e 64 6f 77 | 3a 20 57 69 6e 64 6f 77 |heWindow|: Window|
|00001b10| 50 74 72 3b 20 56 41 52 | 20 72 3a 20 52 65 63 74 |Ptr; VAR| r: Rect|
|00001b20| 29 3b 0d 20 20 20 20 56 | 41 52 0d 20 20 20 20 20 |);. V|AR. |
|00001b30| 20 77 69 64 74 68 3a 20 | 49 6e 74 65 67 65 72 3b | width: |Integer;|
|00001b40| 0d 20 20 42 45 47 49 4e | 0d 20 20 20 20 72 20 3a |. BEGIN|. r :|
|00001b50| 3d 20 74 68 65 57 69 6e | 64 6f 77 5e 2e 70 6f 72 |= theWin|dow^.por|
|00001b60| 74 52 65 63 74 3b 0d 20 | 20 20 20 72 2e 72 69 67 |tRect;. | r.rig|
|00001b70| 68 74 20 3a 3d 20 72 2e | 72 69 67 68 74 20 2d 20 |ht := r.|right - |
|00001b80| 63 4d 61 67 69 63 61 6c | 57 69 64 74 68 4f 66 53 |cMagical|WidthOfS|
|00001b90| 63 72 6f 6c 6c 42 61 72 | 73 20 2b 20 32 3b 0d 20 |crollBar|s + 2;. |
|00001ba0| 20 20 20 72 2e 6c 65 66 | 74 20 3a 3d 20 72 2e 6c | r.lef|t := r.l|
|00001bb0| 65 66 74 20 2d 20 31 3b | 0d 20 20 20 20 72 2e 62 |eft - 1;|. r.b|
|00001bc0| 6f 74 74 6f 6d 20 3a 3d | 20 72 2e 62 6f 74 74 6f |ottom :=| r.botto|
|00001bd0| 6d 20 2b 20 31 3b 0d 20 | 20 20 20 72 2e 74 6f 70 |m + 1;. | r.top|
|00001be0| 20 3a 3d 20 72 2e 62 6f | 74 74 6f 6d 20 2d 20 63 | := r.bo|ttom - c|
|00001bf0| 4d 61 67 69 63 61 6c 57 | 69 64 74 68 4f 66 53 63 |MagicalW|idthOfSc|
|00001c00| 72 6f 6c 6c 42 61 72 73 | 3b 0d 20 20 20 20 77 69 |rollBars|;. wi|
|00001c10| 64 74 68 20 3a 3d 20 28 | 72 2e 72 69 67 68 74 20 |dth := (|r.right |
|00001c20| 2d 20 72 2e 6c 65 66 74 | 29 20 44 49 56 20 63 50 |- r.left|) DIV cP|
|00001c30| 61 67 65 4e 75 6d 62 65 | 72 42 6f 78 50 61 72 74 |ageNumbe|rBoxPart|
|00001c40| 3b 0d 20 20 20 20 72 2e | 72 69 67 68 74 20 3a 3d |;. r.|right :=|
|00001c50| 20 72 2e 72 69 67 68 74 | 20 2d 20 77 69 64 74 68 | r.right| - width|
|00001c60| 3b 0d 20 20 45 4e 44 3b | 20 20 7b 70 43 61 6c 63 |;. END;| {pCalc|
|00001c70| 48 6f 72 69 7a 6f 6e 74 | 61 6c 53 63 72 6f 6c 6c |Horizont|alScroll|
|00001c80| 52 65 63 74 7d 0d 20 20 | 0d 20 20 0d 20 20 50 52 |Rect}. |. . PR|
|00001c90| 4f 43 45 44 55 52 45 20 | 70 43 61 6c 63 50 61 67 |OCEDURE |pCalcPag|
|00001ca0| 65 4e 75 6d 62 65 72 52 | 65 63 74 28 74 68 65 57 |eNumberR|ect(theW|
|00001cb0| 69 6e 64 6f 77 3a 20 57 | 69 6e 64 6f 77 50 74 72 |indow: W|indowPtr|
|00001cc0| 3b 20 56 41 52 20 72 3a | 20 52 65 63 74 29 3b 0d |; VAR r:| Rect);.|
|00001cd0| 20 20 20 20 56 41 52 0d | 20 20 20 20 20 20 77 69 | VAR.| wi|
|00001ce0| 64 74 68 3a 20 49 6e 74 | 65 67 65 72 3b 0d 20 20 |dth: Int|eger;. |
|00001cf0| 42 45 47 49 4e 0d 20 20 | 20 20 72 20 3a 3d 20 74 |BEGIN. | r := t|
|00001d00| 68 65 57 69 6e 64 6f 77 | 5e 2e 70 6f 72 74 52 65 |heWindow|^.portRe|
|00001d10| 63 74 3b 0d 20 20 20 20 | 72 2e 72 69 67 68 74 20 |ct;. |r.right |
|00001d20| 3a 3d 20 72 2e 72 69 67 | 68 74 20 2d 20 63 4d 61 |:= r.rig|ht - cMa|
|00001d30| 67 69 63 61 6c 57 69 64 | 74 68 4f 66 53 63 72 6f |gicalWid|thOfScro|
|00001d40| 6c 6c 42 61 72 73 20 2b | 20 32 3b 0d 20 20 20 20 |llBars +| 2;. |
|00001d50| 72 2e 6c 65 66 74 20 3a | 3d 20 72 2e 6c 65 66 74 |r.left :|= r.left|
|00001d60| 20 2d 20 31 3b 0d 20 20 | 20 20 72 2e 62 6f 74 74 | - 1;. | r.bott|
|00001d70| 6f 6d 20 3a 3d 20 72 2e | 62 6f 74 74 6f 6d 20 2b |om := r.|bottom +|
|00001d80| 20 31 3b 0d 20 20 20 20 | 72 2e 74 6f 70 20 3a 3d | 1;. |r.top :=|
|00001d90| 20 72 2e 62 6f 74 74 6f | 6d 20 2d 20 63 4d 61 67 | r.botto|m - cMag|
|00001da0| 69 63 61 6c 57 69 64 74 | 68 4f 66 53 63 72 6f 6c |icalWidt|hOfScrol|
|00001db0| 6c 42 61 72 73 3b 0d 20 | 20 20 20 77 69 64 74 68 |lBars;. | width|
|00001dc0| 20 3a 3d 20 28 72 2e 72 | 69 67 68 74 20 2d 20 72 | := (r.r|ight - r|
|00001dd0| 2e 6c 65 66 74 29 20 44 | 49 56 20 63 50 61 67 65 |.left) D|IV cPage|
|00001de0| 4e 75 6d 62 65 72 42 6f | 78 50 61 72 74 3b 0d 20 |NumberBo|xPart;. |
|00001df0| 20 20 20 72 2e 6c 65 66 | 74 20 3a 3d 20 72 2e 72 | r.lef|t := r.r|
|00001e00| 69 67 68 74 20 2d 20 77 | 69 64 74 68 3b 0d 20 20 |ight - w|idth;. |
|00001e10| 45 4e 44 3b 20 20 7b 70 | 43 61 6c 63 48 6f 72 69 |END; {p|CalcHori|
|00001e20| 7a 6f 6e 74 61 6c 53 63 | 72 6f 6c 6c 52 65 63 74 |zontalSc|rollRect|
|00001e30| 7d 0d 20 20 0d 20 20 0d | 20 20 50 52 4f 43 45 44 |}. . .| PROCED|
|00001e40| 55 52 45 20 70 43 61 6c | 63 56 65 72 74 69 63 61 |URE pCal|cVertica|
|00001e50| 6c 53 63 72 6f 6c 6c 52 | 65 63 74 28 74 68 65 57 |lScrollR|ect(theW|
|00001e60| 69 6e 64 6f 77 3a 20 57 | 69 6e 64 6f 77 50 74 72 |indow: W|indowPtr|
|00001e70| 3b 20 56 41 52 20 72 3a | 20 52 65 63 74 29 3b 0d |; VAR r:| Rect);.|
|00001e80| 20 20 42 45 47 49 4e 0d | 20 20 20 20 72 20 3a 3d | BEGIN.| r :=|
|00001e90| 20 74 68 65 57 69 6e 64 | 6f 77 5e 2e 70 6f 72 74 | theWind|ow^.port|
|00001ea0| 52 65 63 74 3b 0d 20 20 | 20 20 72 2e 72 69 67 68 |Rect;. | r.righ|
|00001eb0| 74 20 3a 3d 20 72 2e 72 | 69 67 68 74 20 2b 20 31 |t := r.r|ight + 1|
|00001ec0| 3b 0d 20 20 20 20 72 2e | 6c 65 66 74 20 3a 3d 20 |;. r.|left := |
|00001ed0| 72 2e 72 69 67 68 74 20 | 2d 20 63 4d 61 67 69 63 |r.right |- cMagic|
|00001ee0| 61 6c 57 69 64 74 68 4f | 66 53 63 72 6f 6c 6c 42 |alWidthO|fScrollB|
|00001ef0| 61 72 73 3b 0d 20 20 20 | 20 72 2e 62 6f 74 74 6f |ars;. | r.botto|
|00001f00| 6d 20 3a 3d 20 72 2e 62 | 6f 74 74 6f 6d 20 2d 20 |m := r.b|ottom - |
|00001f10| 63 4d 61 67 69 63 61 6c | 57 69 64 74 68 4f 66 53 |cMagical|WidthOfS|
|00001f20| 63 72 6f 6c 6c 42 61 72 | 73 20 2b 20 32 3b 0d 20 |crollBar|s + 2;. |
|00001f30| 20 20 20 72 2e 74 6f 70 | 20 3a 3d 20 72 2e 74 6f | r.top| := r.to|
|00001f40| 70 20 2d 20 31 3b 0d 20 | 20 45 4e 44 3b 20 20 7b |p - 1;. | END; {|
|00001f50| 70 43 61 6c 63 56 65 72 | 74 69 63 61 6c 53 63 72 |pCalcVer|ticalScr|
|00001f60| 6f 6c 6c 52 65 63 74 7d | 0d 20 20 0d 20 20 0d 20 |ollRect}|. . . |
|00001f70| 20 50 52 4f 43 45 44 55 | 52 45 20 70 43 61 6c 63 | PROCEDU|RE pCalc|
|00001f80| 44 6f 63 75 6d 65 6e 74 | 52 65 63 74 28 74 68 65 |Document|Rect(the|
|00001f90| 57 69 6e 64 6f 77 3a 20 | 57 69 6e 64 6f 77 50 74 |Window: |WindowPt|
|00001fa0| 72 3b 20 56 41 52 20 64 | 6f 63 52 65 63 74 3a 20 |r; VAR d|ocRect: |
|00001fb0| 52 65 63 74 29 3b 0d 20 | 20 20 20 7b 56 41 52 7d |Rect);. | {VAR}|
|00001fc0| 0d 20 20 20 20 20 20 7b | 73 61 76 65 50 6f 72 74 |. {|savePort|
|00001fd0| 3a 20 47 72 61 66 50 74 | 72 3b 7d 0d 20 20 42 45 |: GrafPt|r;}. BE|
|00001fe0| 47 49 4e 0d 20 20 20 20 | 7b 54 68 69 73 20 64 6f |GIN. |{This do|
|00001ff0| 65 73 20 6e 6f 74 20 77 | 6f 72 6b 20 66 6f 72 20 |es not w|ork for |
|00002000| 68 69 64 64 65 6e 20 77 | 69 6e 64 6f 77 73 3a 7d |hidden w|indows:}|
|00002010| 0d 20 20 20 20 7b 47 65 | 74 50 6f 72 74 28 73 61 |. {Ge|tPort(sa|
|00002020| 76 65 50 6f 72 74 29 3b | 7d 0d 20 20 20 20 7b 53 |vePort);|}. {S|
|00002030| 65 74 50 6f 72 74 28 74 | 68 65 57 69 6e 64 6f 77 |etPort(t|heWindow|
|00002040| 29 3b 7d 0d 20 20 20 20 | 7b 64 6f 63 52 65 63 74 |);}. |{docRect|
|00002050| 20 3a 3d 20 57 69 6e 64 | 6f 77 50 65 65 6b 28 74 | := Wind|owPeek(t|
|00002060| 68 65 57 69 6e 64 6f 77 | 29 5e 2e 63 6f 6e 74 52 |heWindow|)^.contR|
|00002070| 67 6e 5e 5e 2e 72 67 6e | 42 42 6f 78 3b 7d 0d 20 |gn^^.rgn|BBox;}. |
|00002080| 20 20 20 7b 47 6c 6f 62 | 61 6c 54 6f 4c 6f 63 61 | {Glob|alToLoca|
|00002090| 6c 28 64 6f 63 52 65 63 | 74 2e 74 6f 70 4c 65 66 |l(docRec|t.topLef|
|000020a0| 74 29 3b 7d 0d 20 20 20 | 20 7b 47 6c 6f 62 61 6c |t);}. | {Global|
|000020b0| 54 6f 4c 6f 63 61 6c 28 | 64 6f 63 52 65 63 74 2e |ToLocal(|docRect.|
|000020c0| 62 6f 74 52 69 67 68 74 | 29 3b 7d 0d 20 20 20 20 |botRight|);}. |
|000020d0| 0d 20 20 20 20 64 6f 63 | 52 65 63 74 20 3a 3d 20 |. doc|Rect := |
|000020e0| 74 68 65 57 69 6e 64 6f | 77 5e 2e 70 6f 72 74 52 |theWindo|w^.portR|
|000020f0| 65 63 74 3b 0d 20 20 20 | 20 64 6f 63 52 65 63 74 |ect;. | docRect|
|00002100| 2e 72 69 67 68 74 20 3a | 3d 0d 20 20 20 20 20 20 |.right :|=. |
|00002110| 64 6f 63 52 65 63 74 2e | 72 69 67 68 74 20 2d 20 |docRect.|right - |
|00002120| 63 4d 61 67 69 63 61 6c | 57 69 64 74 68 4f 66 53 |cMagical|WidthOfS|
|00002130| 63 72 6f 6c 6c 42 61 72 | 73 20 2b 20 31 3b 0d 20 |crollBar|s + 1;. |
|00002140| 20 20 20 64 6f 63 52 65 | 63 74 2e 62 6f 74 74 6f | docRe|ct.botto|
|00002150| 6d 20 3a 3d 0d 20 20 20 | 20 20 20 64 6f 63 52 65 |m :=. | docRe|
|00002160| 63 74 2e 62 6f 74 74 6f | 6d 20 2d 20 63 4d 61 67 |ct.botto|m - cMag|
|00002170| 69 63 61 6c 57 69 64 74 | 68 4f 66 53 63 72 6f 6c |icalWidt|hOfScrol|
|00002180| 6c 42 61 72 73 20 2b 20 | 31 3b 0d 20 20 20 20 7b |lBars + |1;. {|
|00002190| 53 65 74 50 6f 72 74 28 | 73 61 76 65 50 6f 72 74 |SetPort(|savePort|
|000021a0| 29 3b 7d 0d 20 20 45 4e | 44 3b 20 20 7b 70 43 61 |);}. EN|D; {pCa|
|000021b0| 6c 63 44 6f 63 75 6d 65 | 6e 74 52 65 63 74 7d 0d |lcDocume|ntRect}.|
|000021c0| 20 20 0d 20 20 0d 20 20 | 50 52 4f 43 45 44 55 52 | . . |PROCEDUR|
|000021d0| 45 20 70 43 61 6c 63 53 | 63 61 6c 65 64 50 61 67 |E pCalcS|caledPag|
|000021e0| 65 44 72 61 77 69 6e 67 | 52 65 63 74 28 0d 20 20 |eDrawing|Rect(. |
|000021f0| 20 20 76 68 57 69 6e 64 | 6f 77 52 65 6c 61 74 65 | vhWind|owRelate|
|00002200| 64 49 6e 66 6f 3a 20 74 | 68 57 69 6e 64 6f 77 52 |dInfo: t|hWindowR|
|00002210| 65 6c 61 74 65 64 49 6e | 66 6f 0d 20 20 29 3b 0d |elatedIn|fo. );.|
|00002220| 20 20 20 20 56 41 52 0d | 20 20 20 20 20 20 64 73 | VAR.| ds|
|00002230| 74 52 65 63 74 3a 20 52 | 65 63 74 3b 0d 20 20 20 |tRect: R|ect;. |
|00002240| 20 20 20 72 31 2c 20 72 | 32 3a 20 52 65 63 74 3b | r1, r|2: Rect;|
|00002250| 0d 20 20 42 45 47 49 4e | 0d 20 20 20 20 64 73 74 |. BEGIN|. dst|
|00002260| 52 65 63 74 20 3a 3d 20 | 76 68 57 69 6e 64 6f 77 |Rect := |vhWindow|
|00002270| 52 65 6c 61 74 65 64 49 | 6e 66 6f 5e 5e 2e 72 4f |RelatedI|nfo^^.rO|
|00002280| 72 69 67 69 6e 61 6c 50 | 61 67 65 52 65 63 74 3b |riginalP|ageRect;|
|00002290| 0d 20 20 20 20 53 65 74 | 52 65 63 74 28 72 31 2c |. Set|Rect(r1,|
|000022a0| 20 30 2c 20 30 2c 20 31 | 30 30 2c 20 31 30 30 29 | 0, 0, 1|00, 100)|
|000022b0| 3b 0d 20 20 20 20 53 65 | 74 52 65 63 74 28 72 32 |;. Se|tRect(r2|
|000022c0| 2c 20 30 2c 20 30 2c 20 | 76 68 57 69 6e 64 6f 77 |, 0, 0, |vhWindow|
|000022d0| 52 65 6c 61 74 65 64 49 | 6e 66 6f 5e 5e 2e 72 56 |RelatedI|nfo^^.rV|
|000022e0| 69 65 77 53 63 61 6c 65 | 50 72 65 76 69 65 77 50 |iewScale|PreviewP|
|000022f0| 65 72 63 65 6e 74 61 67 | 65 2c 20 30 29 3b 0d 20 |ercentag|e, 0);. |
|00002300| 20 20 20 72 32 2e 62 6f | 74 74 6f 6d 20 3a 3d 20 | r2.bo|ttom := |
|00002310| 72 32 2e 72 69 67 68 74 | 3b 0d 20 20 20 20 4d 61 |r2.right|;. Ma|
|00002320| 70 52 65 63 74 28 64 73 | 74 52 65 63 74 2c 20 72 |pRect(ds|tRect, r|
|00002330| 31 2c 20 72 32 29 3b 0d | 20 20 20 20 76 68 57 69 |1, r2);.| vhWi|
|00002340| 6e 64 6f 77 52 65 6c 61 | 74 65 64 49 6e 66 6f 5e |ndowRela|tedInfo^|
|00002350| 5e 2e 72 56 69 65 77 53 | 69 7a 65 5b 63 56 69 65 |^.rViewS|ize[cVie|
|00002360| 77 43 6f 6e 74 65 6e 74 | 73 5d 20 3a 3d 20 64 73 |wContent|s] := ds|
|00002370| 74 52 65 63 74 3b 0d 20 | 20 45 4e 44 3b 20 20 7b |tRect;. | END; {|
|00002380| 70 43 61 6c 63 53 63 61 | 6c 65 64 50 61 67 65 44 |pCalcSca|ledPageD|
|00002390| 72 61 77 69 6e 67 52 65 | 63 74 7d 0d 20 20 0d 20 |rawingRe|ct}. . |
|000023a0| 20 0d 20 20 50 52 4f 43 | 45 44 55 52 45 20 70 55 | . PROC|EDURE pU|
|000023b0| 70 64 61 74 65 57 69 6e | 64 6f 77 28 72 65 73 69 |pdateWin|dow(resi|
|000023c0| 7a 65 64 3a 20 42 6f 6f | 6c 65 61 6e 29 3b 20 20 |zed: Boo|lean); |
|000023d0| 46 4f 52 57 41 52 44 3b | 0d 20 20 0d 20 20 0d 20 |FORWARD;|. . . |
|000023e0| 20 50 52 4f 43 45 44 55 | 52 45 20 70 53 63 72 6f | PROCEDU|RE pScro|
|000023f0| 6c 6c 57 69 6e 64 6f 77 | 28 64 68 2c 20 64 76 3a |llWindow|(dh, dv:|
|00002400| 20 49 6e 74 65 67 65 72 | 3b 20 74 68 65 53 63 72 | Integer|; theScr|
|00002410| 6f 6c 6c 3a 20 43 6f 6e | 74 72 6f 6c 48 61 6e 64 |oll: Con|trolHand|
|00002420| 6c 65 29 3b 0d 20 20 20 | 20 56 41 52 0d 20 20 20 |le);. | VAR. |
|00002430| 20 20 20 76 53 63 72 6f | 6c 6c 69 6e 67 52 65 63 | vScro|llingRec|
|00002440| 74 3a 20 52 65 63 74 3b | 0d 20 20 20 20 20 20 68 |t: Rect;|. h|
|00002450| 55 70 64 61 74 65 52 67 | 6e 3a 20 52 67 6e 48 61 |UpdateRg|n: RgnHa|
|00002460| 6e 64 6c 65 3b 0d 20 20 | 20 20 20 20 73 61 76 65 |ndle;. | save|
|00002470| 56 69 73 52 67 6e 3a 20 | 52 67 6e 48 61 6e 64 6c |VisRgn: |RgnHandl|
|00002480| 65 3b 0d 20 20 20 20 20 | 20 74 68 65 57 69 6e 64 |e;. | theWind|
|00002490| 6f 77 3a 20 57 69 6e 64 | 6f 77 50 74 72 3b 0d 20 |ow: Wind|owPtr;. |
|000024a0| 20 42 45 47 49 4e 0d 20 | 20 20 20 49 46 20 28 64 | BEGIN. | IF (d|
|000024b0| 68 3d 30 29 20 41 4e 44 | 20 28 64 76 3d 30 29 20 |h=0) AND| (dv=0) |
|000024c0| 54 48 45 4e 0d 20 20 20 | 20 20 20 45 78 69 74 3b |THEN. | Exit;|
|000024d0| 0d 20 20 20 20 0d 20 20 | 20 20 68 55 70 64 61 74 |. . | hUpdat|
|000024e0| 65 52 67 6e 20 3a 3d 20 | 4e 65 77 52 67 6e 3b 0d |eRgn := |NewRgn;.|
|000024f0| 20 20 20 20 49 46 20 68 | 55 70 64 61 74 65 52 67 | IF h|UpdateRg|
|00002500| 6e 20 3d 20 4e 49 4c 20 | 54 48 45 4e 0d 20 20 20 |n = NIL |THEN. |
|00002510| 20 20 20 42 45 47 49 4e | 0d 20 20 20 20 20 20 20 | BEGIN|. |
|00002520| 20 70 45 72 72 6f 72 41 | 6c 65 72 74 28 63 41 6c | pErrorA|lert(cAl|
|00002530| 65 72 74 4e 6f 4d 65 6d | 6f 72 79 46 6f 72 57 69 |ertNoMem|oryForWi|
|00002540| 6e 64 6f 77 73 29 3b 20 | 20 7b 3f 3f 3f 20 6e 6f |ndows); | {??? no|
|00002550| 20 6d 65 6d 6f 72 79 20 | 66 6f 72 20 75 70 64 61 | memory |for upda|
|00002560| 74 65 2e 2e 2e 7d 0d 20 | 20 20 20 20 20 20 20 45 |te...}. | E|
|00002570| 78 69 74 3b 0d 20 20 20 | 20 20 20 45 4e 44 3b 0d |xit;. | END;.|
|00002580| 0d 20 20 20 20 70 43 61 | 6c 63 44 6f 63 75 6d 65 |. pCa|lcDocume|
|00002590| 6e 74 52 65 63 74 28 74 | 68 65 53 63 72 6f 6c 6c |ntRect(t|heScroll|
|000025a0| 5e 5e 2e 63 6f 6e 74 72 | 6c 4f 77 6e 65 72 2c 20 |^^.contr|lOwner, |
|000025b0| 76 53 63 72 6f 6c 6c 69 | 6e 67 52 65 63 74 29 3b |vScrolli|ngRect);|
|000025c0| 0d 0d 20 20 20 20 53 63 | 72 6f 6c 6c 52 65 63 74 |.. Sc|rollRect|
|000025d0| 28 76 53 63 72 6f 6c 6c | 69 6e 67 52 65 63 74 2c |(vScroll|ingRect,|
|000025e0| 20 2d 64 68 2c 20 2d 64 | 76 2c 20 68 55 70 64 61 | -dh, -d|v, hUpda|
|000025f0| 74 65 52 67 6e 29 3b 0d | 20 20 20 20 0d 20 20 20 |teRgn);.| . |
|00002600| 20 7b 20 4d 69 6e 6f 72 | 20 6d 6f 64 69 66 69 63 | { Minor| modific|
|00002610| 61 74 69 6f 6e 73 20 74 | 6f 20 76 69 73 52 67 6e |ations t|o visRgn|
|00002620| 20 62 65 66 6f 72 65 20 | 6d 69 73 75 73 69 6e 67 | before |misusing|
|00002630| 20 6f 75 72 20 75 70 64 | 61 74 65 20 70 72 6f 63 | our upd|ate proc|
|00002640| 2e 20 7d 0d 20 20 20 20 | 47 65 74 50 6f 72 74 28 |. }. |GetPort(|
|00002650| 74 68 65 57 69 6e 64 6f | 77 29 3b 0d 20 20 20 20 |theWindo|w);. |
|00002660| 73 61 76 65 56 69 73 52 | 67 6e 20 3a 3d 20 74 68 |saveVisR|gn := th|
|00002670| 65 57 69 6e 64 6f 77 5e | 2e 76 69 73 52 67 6e 3b |eWindow^|.visRgn;|
|00002680| 0d 20 20 20 20 74 68 65 | 57 69 6e 64 6f 77 5e 2e |. the|Window^.|
|00002690| 76 69 73 52 67 6e 20 3a | 3d 20 68 55 70 64 61 74 |visRgn :|= hUpdat|
|000026a0| 65 52 67 6e 3b 0d 20 20 | 20 20 70 55 70 64 61 74 |eRgn;. | pUpdat|
|000026b0| 65 57 69 6e 64 6f 77 28 | 20 7b 72 65 73 69 7a 65 |eWindow(| {resize|
|000026c0| 64 3d 3e 7d 20 46 61 6c | 73 65 29 3b 0d 20 20 20 |d=>} Fal|se);. |
|000026d0| 20 74 68 65 57 69 6e 64 | 6f 77 5e 2e 76 69 73 52 | theWind|ow^.visR|
|000026e0| 67 6e 20 3a 3d 20 73 61 | 76 65 56 69 73 52 67 6e |gn := sa|veVisRgn|
|000026f0| 3b 0d 0d 20 20 20 20 44 | 69 73 70 6f 73 65 52 67 |;.. D|isposeRg|
|00002700| 6e 28 68 55 70 64 61 74 | 65 52 67 6e 29 3b 0d 20 |n(hUpdat|eRgn);. |
|00002710| 20 45 4e 44 3b 20 7b 70 | 53 63 72 6f 6c 6c 57 69 | END; {p|ScrollWi|
|00002720| 6e 64 6f 77 7d 0d 0d 0d | 20 20 50 52 4f 43 45 44 |ndow}...| PROCED|
|00002730| 55 52 45 20 70 48 6f 72 | 69 7a 6f 6e 74 61 6c 53 |URE pHor|izontalS|
|00002740| 63 72 6f 6c 6c 41 63 74 | 69 6f 6e 28 0d 20 20 20 |crollAct|ion(. |
|00002750| 20 74 68 65 53 63 72 6f | 6c 6c 3a 20 43 6f 6e 74 | theScro|ll: Cont|
|00002760| 72 6f 6c 48 61 6e 64 6c | 65 3b 0d 20 20 20 20 70 |rolHandl|e;. p|
|00002770| 61 72 74 43 6f 64 65 3a | 20 49 6e 74 65 67 65 72 |artCode:| Integer|
|00002780| 0d 20 20 29 3b 0d 20 20 | 20 20 56 41 52 0d 20 20 |. );. | VAR. |
|00002790| 20 20 20 20 64 6f 63 52 | 65 63 74 3a 20 52 65 63 | docR|ect: Rec|
|000027a0| 74 3b 0d 20 20 20 20 20 | 20 76 44 65 6c 74 61 3a |t;. | vDelta:|
|000027b0| 20 49 6e 74 65 67 65 72 | 3b 0d 20 20 20 20 20 20 | Integer|;. |
|000027c0| 73 61 76 65 64 56 61 6c | 75 65 3a 20 49 6e 74 65 |savedVal|ue: Inte|
|000027d0| 67 65 72 3b 0d 20 20 42 | 45 47 49 4e 0d 20 20 20 |ger;. B|EGIN. |
|000027e0| 20 70 43 61 6c 63 44 6f | 63 75 6d 65 6e 74 52 65 | pCalcDo|cumentRe|
|000027f0| 63 74 28 74 68 65 53 63 | 72 6f 6c 6c 5e 5e 2e 63 |ct(theSc|roll^^.c|
|00002800| 6f 6e 74 72 6c 4f 77 6e | 65 72 2c 20 64 6f 63 52 |ontrlOwn|er, docR|
|00002810| 65 63 74 29 3b 0d 20 20 | 20 20 76 44 65 6c 74 61 |ect);. | vDelta|
|00002820| 20 3a 3d 20 28 64 6f 63 | 52 65 63 74 2e 72 69 67 | := (doc|Rect.rig|
|00002830| 68 74 20 2d 20 64 6f 63 | 52 65 63 74 2e 6c 65 66 |ht - doc|Rect.lef|
|00002840| 74 29 20 44 49 56 20 31 | 30 3b 20 7b 6f 6e 65 20 |t) DIV 1|0; {one |
|00002850| 74 65 6e 74 68 20 6f 66 | 20 77 69 64 74 68 7d 20 |tenth of| width} |
|00002860| 0d 20 20 20 20 43 41 53 | 45 20 70 61 72 74 43 6f |. CAS|E partCo|
|00002870| 64 65 20 4f 46 0d 20 20 | 20 20 20 20 69 6e 55 70 |de OF. | inUp|
|00002880| 42 75 74 74 6f 6e 3a 20 | 76 44 65 6c 74 61 20 3a |Button: |vDelta :|
|00002890| 3d 20 2d 76 44 65 6c 74 | 61 3b 0d 20 20 20 20 20 |= -vDelt|a;. |
|000028a0| 20 69 6e 44 6f 77 6e 42 | 75 74 74 6f 6e 3a 20 76 | inDownB|utton: v|
|000028b0| 44 65 6c 74 61 20 3a 3d | 20 76 44 65 6c 74 61 3b |Delta :=| vDelta;|
|000028c0| 0d 20 20 20 20 20 20 69 | 6e 50 61 67 65 55 70 3a |. i|nPageUp:|
|000028d0| 20 76 44 65 6c 74 61 20 | 3a 3d 20 2d 39 2a 76 44 | vDelta |:= -9*vD|
|000028e0| 65 6c 74 61 3b 0d 20 20 | 20 20 20 20 69 6e 50 61 |elta;. | inPa|
|000028f0| 67 65 44 6f 77 6e 3a 20 | 76 44 65 6c 74 61 20 3a |geDown: |vDelta :|
|00002900| 3d 20 39 2a 76 44 65 6c | 74 61 3b 0d 20 20 20 20 |= 9*vDel|ta;. |
|00002910| 20 20 4f 54 48 45 52 57 | 49 53 45 20 76 44 65 6c | OTHERW|ISE vDel|
|00002920| 74 61 20 3a 3d 20 30 3b | 0d 20 20 20 20 45 4e 44 |ta := 0;|. END|
|00002930| 3b 0d 20 20 20 20 0d 20 | 20 20 20 7b 20 4c 65 74 |;. . | { Let|
|00002940| 20 43 6f 6e 74 72 6f 6c | 20 4d 61 6e 61 67 65 72 | Control| Manager|
|00002950| 20 64 6f 20 22 65 6e 64 | 70 6f 69 6e 74 20 62 75 | do "end|point bu|
|00002960| 6d 70 69 6e 67 22 2e 20 | 7d 0d 20 20 20 20 73 61 |mping". |}. sa|
|00002970| 76 65 64 56 61 6c 75 65 | 20 3a 3d 20 47 65 74 43 |vedValue| := GetC|
|00002980| 74 6c 56 61 6c 75 65 28 | 74 68 65 53 63 72 6f 6c |tlValue(|theScrol|
|00002990| 6c 29 3b 0d 20 20 20 20 | 53 65 74 43 74 6c 56 61 |l);. |SetCtlVa|
|000029a0| 6c 75 65 28 74 68 65 53 | 63 72 6f 6c 6c 2c 20 73 |lue(theS|croll, s|
|000029b0| 61 76 65 64 56 61 6c 75 | 65 20 2b 20 76 44 65 6c |avedValu|e + vDel|
|000029c0| 74 61 29 3b 0d 20 20 20 | 20 76 44 65 6c 74 61 20 |ta);. | vDelta |
|000029d0| 3a 3d 20 47 65 74 43 74 | 6c 56 61 6c 75 65 28 74 |:= GetCt|lValue(t|
|000029e0| 68 65 53 63 72 6f 6c 6c | 29 20 2d 20 73 61 76 65 |heScroll|) - save|
|000029f0| 64 56 61 6c 75 65 3b 0d | 20 20 20 20 0d 20 20 20 |dValue;.| . |
|00002a00| 20 70 53 63 72 6f 6c 6c | 57 69 6e 64 6f 77 28 76 | pScroll|Window(v|
|00002a10| 44 65 6c 74 61 2c 20 30 | 2c 20 74 68 65 53 63 72 |Delta, 0|, theScr|
|00002a20| 6f 6c 6c 29 3b 0d 20 20 | 45 4e 44 3b 20 7b 70 48 |oll);. |END; {pH|
|00002a30| 6f 72 69 7a 6f 6e 74 61 | 6c 53 63 72 6f 6c 6c 41 |orizonta|lScrollA|
|00002a40| 63 74 69 6f 6e 7d 0d 0d | 0d 20 20 50 52 4f 43 45 |ction}..|. PROCE|
|00002a50| 44 55 52 45 20 70 56 65 | 72 74 69 63 61 6c 53 63 |DURE pVe|rticalSc|
|00002a60| 72 6f 6c 6c 41 63 74 69 | 6f 6e 28 0d 20 20 20 20 |rollActi|on(. |
|00002a70| 74 68 65 53 63 72 6f 6c | 6c 3a 20 43 6f 6e 74 72 |theScrol|l: Contr|
|00002a80| 6f 6c 48 61 6e 64 6c 65 | 3b 0d 20 20 20 20 70 61 |olHandle|;. pa|
|00002a90| 72 74 43 6f 64 65 3a 20 | 49 6e 74 65 67 65 72 0d |rtCode: |Integer.|
|00002aa0| 20 20 29 3b 0d 20 20 20 | 20 56 41 52 0d 20 20 20 | );. | VAR. |
|00002ab0| 20 20 20 64 6f 63 52 65 | 63 74 3a 20 52 65 63 74 | docRe|ct: Rect|
|00002ac0| 3b 0d 20 20 20 20 20 20 | 76 44 65 6c 74 61 3a 20 |;. |vDelta: |
|00002ad0| 49 6e 74 65 67 65 72 3b | 0d 20 20 20 20 20 20 73 |Integer;|. s|
|00002ae0| 61 76 65 64 56 61 6c 75 | 65 3a 20 49 6e 74 65 67 |avedValu|e: Integ|
|00002af0| 65 72 3b 0d 20 20 42 45 | 47 49 4e 0d 20 20 20 20 |er;. BE|GIN. |
|00002b00| 70 43 61 6c 63 44 6f 63 | 75 6d 65 6e 74 52 65 63 |pCalcDoc|umentRec|
|00002b10| 74 28 74 68 65 53 63 72 | 6f 6c 6c 5e 5e 2e 63 6f |t(theScr|oll^^.co|
|00002b20| 6e 74 72 6c 4f 77 6e 65 | 72 2c 20 64 6f 63 52 65 |ntrlOwne|r, docRe|
|00002b30| 63 74 29 3b 0d 20 20 20 | 20 76 44 65 6c 74 61 20 |ct);. | vDelta |
|00002b40| 3a 3d 20 28 64 6f 63 52 | 65 63 74 2e 62 6f 74 74 |:= (docR|ect.bott|
|00002b50| 6f 6d 20 2d 20 64 6f 63 | 52 65 63 74 2e 74 6f 70 |om - doc|Rect.top|
|00002b60| 29 20 44 49 56 20 31 30 | 3b 20 7b 6f 6e 65 20 74 |) DIV 10|; {one t|
|00002b70| 65 6e 74 68 20 6f 66 20 | 68 65 69 67 68 74 7d 20 |enth of |height} |
|00002b80| 0d 20 20 20 20 43 41 53 | 45 20 70 61 72 74 43 6f |. CAS|E partCo|
|00002b90| 64 65 20 4f 46 0d 20 20 | 20 20 20 20 69 6e 55 70 |de OF. | inUp|
|00002ba0| 42 75 74 74 6f 6e 3a 20 | 76 44 65 6c 74 61 20 3a |Button: |vDelta :|
|00002bb0| 3d 20 2d 76 44 65 6c 74 | 61 3b 0d 20 20 20 20 20 |= -vDelt|a;. |
|00002bc0| 20 69 6e 44 6f 77 6e 42 | 75 74 74 6f 6e 3a 20 76 | inDownB|utton: v|
|00002bd0| 44 65 6c 74 61 20 3a 3d | 20 76 44 65 6c 74 61 3b |Delta :=| vDelta;|
|00002be0| 0d 20 20 20 20 20 20 69 | 6e 50 61 67 65 55 70 3a |. i|nPageUp:|
|00002bf0| 20 76 44 65 6c 74 61 20 | 3a 3d 20 2d 39 2a 76 44 | vDelta |:= -9*vD|
|00002c00| 65 6c 74 61 3b 0d 20 20 | 20 20 20 20 69 6e 50 61 |elta;. | inPa|
|00002c10| 67 65 44 6f 77 6e 3a 20 | 76 44 65 6c 74 61 20 3a |geDown: |vDelta :|
|00002c20| 3d 20 39 2a 76 44 65 6c | 74 61 3b 0d 20 20 20 20 |= 9*vDel|ta;. |
|00002c30| 20 20 4f 54 48 45 52 57 | 49 53 45 20 76 44 65 6c | OTHERW|ISE vDel|
|00002c40| 74 61 20 3a 3d 20 30 3b | 0d 20 20 20 20 45 4e 44 |ta := 0;|. END|
|00002c50| 3b 0d 20 20 20 20 0d 20 | 20 20 20 7b 20 4c 65 74 |;. . | { Let|
|00002c60| 20 43 6f 6e 74 72 6f 6c | 20 4d 61 6e 61 67 65 72 | Control| Manager|
|00002c70| 20 64 6f 20 22 65 6e 64 | 70 6f 69 6e 74 20 62 75 | do "end|point bu|
|00002c80| 6d 70 69 6e 67 22 2e 20 | 7d 0d 20 20 20 20 73 61 |mping". |}. sa|
|00002c90| 76 65 64 56 61 6c 75 65 | 20 3a 3d 20 47 65 74 43 |vedValue| := GetC|
|00002ca0| 74 6c 56 61 6c 75 65 28 | 74 68 65 53 63 72 6f 6c |tlValue(|theScrol|
|00002cb0| 6c 29 3b 0d 20 20 20 20 | 53 65 74 43 74 6c 56 61 |l);. |SetCtlVa|
|00002cc0| 6c 75 65 28 74 68 65 53 | 63 72 6f 6c 6c 2c 20 73 |lue(theS|croll, s|
|00002cd0| 61 76 65 64 56 61 6c 75 | 65 20 2b 20 76 44 65 6c |avedValu|e + vDel|
|00002ce0| 74 61 29 3b 0d 20 20 20 | 20 76 44 65 6c 74 61 20 |ta);. | vDelta |
|00002cf0| 3a 3d 20 47 65 74 43 74 | 6c 56 61 6c 75 65 28 74 |:= GetCt|lValue(t|
|00002d00| 68 65 53 63 72 6f 6c 6c | 29 20 2d 20 73 61 76 65 |heScroll|) - save|
|00002d10| 64 56 61 6c 75 65 3b 0d | 20 20 20 20 0d 20 20 20 |dValue;.| . |
|00002d20| 20 70 53 63 72 6f 6c 6c | 57 69 6e 64 6f 77 28 30 | pScroll|Window(0|
|00002d30| 2c 20 76 44 65 6c 74 61 | 2c 20 74 68 65 53 63 72 |, vDelta|, theScr|
|00002d40| 6f 6c 6c 29 3b 0d 20 20 | 45 4e 44 3b 20 7b 70 56 |oll);. |END; {pV|
|00002d50| 65 72 74 69 63 61 6c 53 | 63 72 6f 6c 6c 41 63 74 |erticalS|crollAct|
|00002d60| 69 6f 6e 7d 0d 20 20 0d | 20 20 0d 20 20 50 52 4f |ion}. .| . PRO|
|00002d70| 43 45 44 55 52 45 20 70 | 53 65 74 53 63 72 6f 6c |CEDURE p|SetScrol|
|00002d80| 6c 42 61 72 4c 69 6d 69 | 74 73 28 74 68 65 57 69 |lBarLimi|ts(theWi|
|00002d90| 6e 64 6f 77 3a 20 57 69 | 6e 64 6f 77 50 74 72 29 |ndow: Wi|ndowPtr)|
|00002da0| 3b 0d 20 20 20 20 56 41 | 52 0d 20 20 20 20 20 20 |;. VA|R. |
|00002db0| 76 68 57 69 6e 64 6f 77 | 52 65 6c 61 74 65 64 49 |vhWindow|RelatedI|
|00002dc0| 6e 66 6f 3a 20 74 68 57 | 69 6e 64 6f 77 52 65 6c |nfo: thW|indowRel|
|00002dd0| 61 74 65 64 49 6e 66 6f | 3b 0d 20 20 20 20 20 20 |atedInfo|;. |
|00002de0| 73 61 76 65 64 53 74 61 | 74 65 3a 20 53 69 67 6e |savedSta|te: Sign|
|00002df0| 65 64 42 79 74 65 3b 0d | 20 20 20 20 20 20 70 61 |edByte;.| pa|
|00002e00| 67 65 52 65 63 74 3a 20 | 52 65 63 74 3b 0d 20 20 |geRect: |Rect;. |
|00002e10| 20 20 20 20 64 6f 63 52 | 65 63 74 3a 20 52 65 63 | docR|ect: Rec|
|00002e20| 74 3b 0d 20 20 20 20 20 | 20 6d 61 78 69 6d 75 6d |t;. | maximum|
|00002e30| 4f 72 69 67 69 6e 3a 20 | 50 6f 69 6e 74 3b 0d 20 |Origin: |Point;. |
|00002e40| 20 42 45 47 49 4e 0d 20 | 20 20 20 76 68 57 69 6e | BEGIN. | vhWin|
|00002e50| 64 6f 77 52 65 6c 61 74 | 65 64 49 6e 66 6f 20 3a |dowRelat|edInfo :|
|00002e60| 3d 20 74 68 57 69 6e 64 | 6f 77 52 65 6c 61 74 65 |= thWind|owRelate|
|00002e70| 64 49 6e 66 6f 28 47 65 | 74 57 52 65 66 43 6f 6e |dInfo(Ge|tWRefCon|
|00002e80| 28 74 68 65 57 69 6e 64 | 6f 77 29 29 3b 0d 20 20 |(theWind|ow));. |
|00002e90| 20 20 0d 20 20 20 20 49 | 46 20 76 48 61 73 31 32 | . I|F vHas12|
|00002ea0| 38 4b 52 6f 6d 73 20 54 | 48 45 4e 0d 20 20 20 20 |8KRoms T|HEN. |
|00002eb0| 20 20 73 61 76 65 64 53 | 74 61 74 65 20 3a 3d 20 | savedS|tate := |
|00002ec0| 48 47 65 74 53 74 61 74 | 65 28 48 61 6e 64 6c 65 |HGetStat|e(Handle|
|00002ed0| 28 76 68 57 69 6e 64 6f | 77 52 65 6c 61 74 65 64 |(vhWindo|wRelated|
|00002ee0| 49 6e 66 6f 29 29 0d 20 | 20 20 20 45 4c 53 45 0d |Info)). | ELSE.|
|00002ef0| 20 20 20 20 20 20 73 61 | 76 65 64 53 74 61 74 65 | sa|vedState|
|00002f00| 20 3a 3d 20 50 74 72 28 | 48 61 6e 64 6c 65 28 76 | := Ptr(|Handle(v|
|00002f10| 68 57 69 6e 64 6f 77 52 | 65 6c 61 74 65 64 49 6e |hWindowR|elatedIn|
|00002f20| 66 6f 29 5e 29 5e 3b 0d | 20 20 20 20 48 4c 6f 63 |fo)^)^;.| HLoc|
|00002f30| 6b 28 48 61 6e 64 6c 65 | 28 76 68 57 69 6e 64 6f |k(Handle|(vhWindo|
|00002f40| 77 52 65 6c 61 74 65 64 | 49 6e 66 6f 29 29 3b 0d |wRelated|Info));.|
|00002f50| 20 20 20 20 57 49 54 48 | 20 76 68 57 69 6e 64 6f | WITH| vhWindo|
|00002f60| 77 52 65 6c 61 74 65 64 | 49 6e 66 6f 5e 5e 20 44 |wRelated|Info^^ D|
|00002f70| 4f 0d 20 20 20 20 20 20 | 42 45 47 49 4e 0d 20 20 |O. |BEGIN. |
|00002f80| 20 20 20 20 20 20 70 61 | 67 65 52 65 63 74 20 3a | pa|geRect :|
|00002f90| 3d 20 72 56 69 65 77 53 | 69 7a 65 5b 72 56 69 65 |= rViewS|ize[rVie|
|00002fa0| 77 4d 65 6e 75 53 65 6c | 65 63 74 69 6f 6e 46 6f |wMenuSel|ectionFo|
|00002fb0| 72 54 68 69 73 57 69 6e | 64 6f 77 5d 3b 0d 20 20 |rThisWin|dow];. |
|00002fc0| 20 20 20 20 20 20 0d 20 | 20 20 20 20 20 20 20 7b | . | {|
|00002fd0| 20 52 65 76 65 61 6c 20 | 61 20 70 61 72 74 20 6f | Reveal |a part o|
|00002fe0| 66 20 67 72 65 79 20 62 | 61 63 6b 67 72 6f 75 6e |f grey b|ackgroun|
|00002ff0| 64 2e 20 7d 0d 20 20 20 | 20 20 20 20 20 49 6e 73 |d. }. | Ins|
|00003000| 65 74 52 65 63 74 28 70 | 61 67 65 52 65 63 74 2c |etRect(p|ageRect,|
|00003010| 0d 20 20 20 20 20 20 20 | 20 20 20 2d 63 4e 75 6d |. | -cNum|
|00003020| 62 65 72 4f 66 50 69 78 | 65 6c 73 41 72 6f 75 6e |berOfPix|elsAroun|
|00003030| 64 50 61 67 65 2c 0d 20 | 20 20 20 20 20 20 20 20 |dPage,. | |
|00003040| 20 2d 63 4e 75 6d 62 65 | 72 4f 66 50 69 78 65 6c | -cNumbe|rOfPixel|
|00003050| 73 41 72 6f 75 6e 64 50 | 61 67 65 0d 20 20 20 20 |sAroundP|age. |
|00003060| 20 20 20 20 29 3b 0d 20 | 20 20 20 20 20 20 20 20 | );. | |
|00003070| 20 0d 20 20 20 20 20 20 | 20 20 70 43 61 6c 63 44 | . | pCalcD|
|00003080| 6f 63 75 6d 65 6e 74 52 | 65 63 74 28 74 68 65 57 |ocumentR|ect(theW|
|00003090| 69 6e 64 6f 77 2c 20 64 | 6f 63 52 65 63 74 29 3b |indow, d|ocRect);|
|000030a0| 0d 20 20 20 20 20 20 20 | 20 6d 61 78 69 6d 75 6d |. | maximum|
|000030b0| 4f 72 69 67 69 6e 2e 76 | 20 3a 3d 20 70 61 67 65 |Origin.v| := page|
|000030c0| 52 65 63 74 2e 62 6f 74 | 74 6f 6d 20 2d 20 28 64 |Rect.bot|tom - (d|
|000030d0| 6f 63 52 65 63 74 2e 62 | 6f 74 74 6f 6d 20 2d 20 |ocRect.b|ottom - |
|000030e0| 64 6f 63 52 65 63 74 2e | 74 6f 70 29 3b 0d 20 20 |docRect.|top);. |
|000030f0| 20 20 20 20 20 20 49 46 | 20 6d 61 78 69 6d 75 6d | IF| maximum|
|00003100| 4f 72 69 67 69 6e 2e 76 | 20 3c 20 70 61 67 65 52 |Origin.v| < pageR|
|00003110| 65 63 74 2e 74 6f 70 20 | 54 48 45 4e 0d 20 20 20 |ect.top |THEN. |
|00003120| 20 20 20 20 20 20 20 6d | 61 78 69 6d 75 6d 4f 72 | m|aximumOr|
|00003130| 69 67 69 6e 2e 76 20 3a | 3d 20 70 61 67 65 52 65 |igin.v :|= pageRe|
|00003140| 63 74 2e 74 6f 70 3b 0d | 20 20 20 20 20 20 20 20 |ct.top;.| |
|00003150| 6d 61 78 69 6d 75 6d 4f | 72 69 67 69 6e 2e 68 20 |maximumO|rigin.h |
|00003160| 3a 3d 20 70 61 67 65 52 | 65 63 74 2e 72 69 67 68 |:= pageR|ect.righ|
|00003170| 74 20 2d 20 28 64 6f 63 | 52 65 63 74 2e 72 69 67 |t - (doc|Rect.rig|
|00003180| 68 74 20 2d 20 64 6f 63 | 52 65 63 74 2e 6c 65 66 |ht - doc|Rect.lef|
|00003190| 74 29 3b 0d 20 20 20 20 | 20 20 20 20 49 46 20 6d |t);. | IF m|
|000031a0| 61 78 69 6d 75 6d 4f 72 | 69 67 69 6e 2e 68 20 3c |aximumOr|igin.h <|
|000031b0| 20 70 61 67 65 52 65 63 | 74 2e 6c 65 66 74 20 54 | pageRec|t.left T|
|000031c0| 48 45 4e 0d 20 20 20 20 | 20 20 20 20 20 20 6d 61 |HEN. | ma|
|000031d0| 78 69 6d 75 6d 4f 72 69 | 67 69 6e 2e 68 20 3a 3d |ximumOri|gin.h :=|
|000031e0| 20 70 61 67 65 52 65 63 | 74 2e 6c 65 66 74 3b 0d | pageRec|t.left;.|
|000031f0| 20 20 20 20 20 20 20 20 | 0d 20 20 20 20 20 20 20 | |. |
|00003200| 20 53 65 74 43 74 6c 4d | 69 6e 28 72 56 65 72 74 | SetCtlM|in(rVert|
|00003210| 69 63 61 6c 53 63 72 6f | 6c 6c 43 6f 6e 74 72 6f |icalScro|llContro|
|00003220| 6c 2c 20 70 61 67 65 52 | 65 63 74 2e 74 6f 70 29 |l, pageR|ect.top)|
|00003230| 3b 0d 20 20 20 20 20 20 | 20 20 53 65 74 43 74 6c |;. | SetCtl|
|00003240| 4d 61 78 28 72 56 65 72 | 74 69 63 61 6c 53 63 72 |Max(rVer|ticalScr|
|00003250| 6f 6c 6c 43 6f 6e 74 72 | 6f 6c 2c 20 6d 61 78 69 |ollContr|ol, maxi|
|00003260| 6d 75 6d 4f 72 69 67 69 | 6e 2e 76 29 3b 0d 20 20 |mumOrigi|n.v);. |
|00003270| 20 20 20 20 20 20 53 65 | 74 43 74 6c 4d 69 6e 28 | Se|tCtlMin(|
|00003280| 72 48 6f 72 69 7a 6f 6e | 74 61 6c 53 63 72 6f 6c |rHorizon|talScrol|
|00003290| 6c 43 6f 6e 74 72 6f 6c | 2c 20 70 61 67 65 52 65 |lControl|, pageRe|
|000032a0| 63 74 2e 6c 65 66 74 29 | 3b 0d 20 20 20 20 20 20 |ct.left)|;. |
|000032b0| 20 20 53 65 74 43 74 6c | 4d 61 78 28 72 48 6f 72 | SetCtl|Max(rHor|
|000032c0| 69 7a 6f 6e 74 61 6c 53 | 63 72 6f 6c 6c 43 6f 6e |izontalS|crollCon|
|000032d0| 74 72 6f 6c 2c 20 6d 61 | 78 69 6d 75 6d 4f 72 69 |trol, ma|ximumOri|
|000032e0| 67 69 6e 2e 68 29 3b 0d | 20 20 20 20 20 20 45 4e |gin.h);.| EN|
|000032f0| 44 3b 20 20 7b 57 49 54 | 48 7d 0d 20 20 20 20 49 |D; {WIT|H}. I|
|00003300| 46 20 76 48 61 73 31 32 | 38 4b 52 6f 6d 73 20 54 |F vHas12|8KRoms T|
|00003310| 48 45 4e 0d 20 20 20 20 | 20 20 48 53 65 74 53 74 |HEN. | HSetSt|
|00003320| 61 74 65 28 48 61 6e 64 | 6c 65 28 76 68 57 69 6e |ate(Hand|le(vhWin|
|00003330| 64 6f 77 52 65 6c 61 74 | 65 64 49 6e 66 6f 29 2c |dowRelat|edInfo),|
|00003340| 20 73 61 76 65 64 53 74 | 61 74 65 29 0d 20 20 20 | savedSt|ate). |
|00003350| 20 45 4c 53 45 0d 20 20 | 20 20 20 20 50 74 72 28 | ELSE. | Ptr(|
|00003360| 48 61 6e 64 6c 65 28 76 | 68 57 69 6e 64 6f 77 52 |Handle(v|hWindowR|
|00003370| 65 6c 61 74 65 64 49 6e | 66 6f 29 5e 29 5e 20 3a |elatedIn|fo)^)^ :|
|00003380| 3d 20 73 61 76 65 64 53 | 74 61 74 65 3b 0d 20 20 |= savedS|tate;. |
|00003390| 45 4e 44 3b 20 20 7b 70 | 53 65 74 53 63 72 6f 6c |END; {p|SetScrol|
|000033a0| 6c 42 61 72 4c 69 6d 69 | 74 73 7d 0d 20 20 0d 20 |lBarLimi|ts}. . |
|000033b0| 20 0d 20 20 54 59 50 45 | 0d 20 20 20 20 74 50 72 | . TYPE|. tPr|
|000033c0| 6f 67 72 61 6d 53 74 61 | 74 65 3d 28 0d 20 20 20 |ogramSta|te=(. |
|000033d0| 20 20 20 65 4e 6f 4f 75 | 72 57 69 6e 64 6f 77 73 | eNoOu|rWindows|
|000033e0| 4f 70 65 6e 2c 0d 20 20 | 20 20 20 20 65 41 74 4c |Open,. | eAtL|
|000033f0| 65 61 73 74 4f 6e 65 4f | 75 72 57 69 6e 64 6f 77 |eastOneO|urWindow|
|00003400| 4f 70 65 6e 0d 20 20 20 | 20 29 3b 0d 20 20 0d 20 |Open. | );. . |
|00003410| 20 50 52 4f 43 45 44 55 | 52 45 20 70 43 68 61 6e | PROCEDU|RE pChan|
|00003420| 67 65 56 69 65 77 4d 65 | 6e 75 41 63 63 6f 72 64 |geViewMe|nuAccord|
|00003430| 69 6e 67 54 6f 57 69 6e | 64 6f 77 28 74 68 65 57 |ingToWin|dow(theW|
|00003440| 69 6e 64 6f 77 3a 20 57 | 69 6e 64 6f 77 50 74 72 |indow: W|indowPtr|
|00003450| 29 3b 20 20 46 4f 52 57 | 41 52 44 3b 0d 20 20 50 |); FORW|ARD;. P|
|00003460| 52 4f 43 45 44 55 52 45 | 20 70 43 68 61 6e 67 65 |ROCEDURE| pChange|
|00003470| 53 65 74 74 69 6e 67 73 | 4d 65 6e 75 41 63 63 6f |Settings|MenuAcco|
|00003480| 72 64 69 6e 67 54 6f 57 | 69 6e 64 6f 77 28 74 68 |rdingToW|indow(th|
|00003490| 65 57 69 6e 64 6f 77 3a | 20 57 69 6e 64 6f 77 50 |eWindow:| WindowP|
|000034a0| 74 72 29 3b 20 20 46 4f | 52 57 41 52 44 3b 0d 20 |tr); FO|RWARD;. |
|000034b0| 20 0d 20 20 50 52 4f 43 | 45 44 55 52 45 20 70 4d | . PROC|EDURE pM|
|000034c0| 65 6e 75 73 54 6f 53 74 | 61 74 65 28 76 50 72 6f |enusToSt|ate(vPro|
|000034d0| 67 72 61 6d 53 74 61 74 | 65 3a 20 74 50 72 6f 67 |gramStat|e: tProg|
|000034e0| 72 61 6d 53 74 61 74 65 | 29 3b 0d 20 20 42 45 47 |ramState|);. BEG|
|000034f0| 49 4e 0d 20 20 20 20 43 | 41 53 45 20 76 50 72 6f |IN. C|ASE vPro|
|00003500| 67 72 61 6d 53 74 61 74 | 65 20 4f 46 0d 20 20 20 |gramStat|e OF. |
|00003510| 20 20 20 65 4e 6f 4f 75 | 72 57 69 6e 64 6f 77 73 | eNoOu|rWindows|
|00003520| 4f 70 65 6e 3a 0d 20 20 | 20 20 20 20 20 20 42 45 |Open:. | BE|
|00003530| 47 49 4e 0d 20 20 20 20 | 20 20 20 20 20 20 44 69 |GIN. | Di|
|00003540| 73 61 62 6c 65 49 74 65 | 6d 28 76 4d 65 6e 75 5b |sableIte|m(vMenu[|
|00003550| 65 46 69 6c 65 5d 2c 20 | 63 46 69 6c 65 43 6c 6f |eFile], |cFileClo|
|00003560| 73 65 29 3b 0d 20 20 20 | 20 20 20 20 20 20 20 44 |se);. | D|
|00003570| 69 73 61 62 6c 65 49 74 | 65 6d 28 76 4d 65 6e 75 |isableIt|em(vMenu|
|00003580| 5b 65 46 69 6c 65 5d 2c | 20 63 46 69 6c 65 43 6c |[eFile],| cFileCl|
|00003590| 6f 73 65 41 6c 6c 29 3b | 0d 20 20 20 20 20 20 20 |oseAll);|. |
|000035a0| 20 20 20 44 69 73 61 62 | 6c 65 49 74 65 6d 28 76 | Disab|leItem(v|
|000035b0| 4d 65 6e 75 5b 65 46 69 | 6c 65 5d 2c 20 63 46 69 |Menu[eFi|le], cFi|
|000035c0| 6c 65 50 61 67 65 53 65 | 74 75 70 29 3b 0d 20 20 |lePageSe|tup);. |
|000035d0| 20 20 20 20 20 20 20 20 | 44 69 73 61 62 6c 65 49 | |DisableI|
|000035e0| 74 65 6d 28 76 4d 65 6e | 75 5b 65 46 69 6c 65 5d |tem(vMen|u[eFile]|
|000035f0| 2c 20 63 46 69 6c 65 50 | 61 67 65 53 65 74 75 70 |, cFileP|ageSetup|
|00003600| 41 6c 6c 29 3b 0d 20 20 | 20 20 20 20 20 20 20 20 |All);. | |
|00003610| 44 69 73 61 62 6c 65 49 | 74 65 6d 28 76 4d 65 6e |DisableI|tem(vMen|
|00003620| 75 5b 65 46 69 6c 65 5d | 2c 20 63 46 69 6c 65 50 |u[eFile]|, cFileP|
|00003630| 72 69 6e 74 29 3b 0d 20 | 20 20 20 20 20 20 20 20 |rint);. | |
|00003640| 20 44 69 73 61 62 6c 65 | 49 74 65 6d 28 76 4d 65 | Disable|Item(vMe|
|00003650| 6e 75 5b 65 46 69 6c 65 | 5d 2c 20 63 46 69 6c 65 |nu[eFile|], cFile|
|00003660| 50 72 69 6e 74 41 6c 6c | 29 3b 0d 20 20 20 20 20 |PrintAll|);. |
|00003670| 20 20 20 20 20 0d 20 20 | 20 20 20 20 20 20 20 20 | . | |
|00003680| 45 6e 61 62 6c 65 49 74 | 65 6d 28 76 4d 65 6e 75 |EnableIt|em(vMenu|
|00003690| 5b 65 45 64 69 74 5d 2c | 20 63 45 64 69 74 55 6e |[eEdit],| cEditUn|
|000036a0| 64 6f 29 3b 0d 20 20 20 | 20 20 20 20 20 20 20 45 |do);. | E|
|000036b0| 6e 61 62 6c 65 49 74 65 | 6d 28 76 4d 65 6e 75 5b |nableIte|m(vMenu[|
|000036c0| 65 45 64 69 74 5d 2c 20 | 63 45 64 69 74 43 75 74 |eEdit], |cEditCut|
|000036d0| 29 3b 0d 20 20 20 20 20 | 20 20 20 20 20 45 6e 61 |);. | Ena|
|000036e0| 62 6c 65 49 74 65 6d 28 | 76 4d 65 6e 75 5b 65 45 |bleItem(|vMenu[eE|
|000036f0| 64 69 74 5d 2c 20 63 45 | 64 69 74 43 6f 70 79 29 |dit], cE|ditCopy)|
|00003700| 3b 0d 20 20 20 20 20 20 | 20 20 20 20 45 6e 61 62 |;. | Enab|
|00003710| 6c 65 49 74 65 6d 28 76 | 4d 65 6e 75 5b 65 45 64 |leItem(v|Menu[eEd|
|00003720| 69 74 5d 2c 20 63 45 64 | 69 74 50 61 73 74 65 29 |it], cEd|itPaste)|
|00003730| 3b 0d 20 20 20 20 20 20 | 20 20 20 20 45 6e 61 62 |;. | Enab|
|00003740| 6c 65 49 74 65 6d 28 76 | 4d 65 6e 75 5b 65 45 64 |leItem(v|Menu[eEd|
|00003750| 69 74 5d 2c 20 63 45 64 | 69 74 43 6c 65 61 72 29 |it], cEd|itClear)|
|00003760| 3b 0d 20 20 20 20 20 20 | 20 20 20 20 0d 20 20 20 |;. | . |
|00003770| 20 20 20 20 20 20 20 70 | 43 68 61 6e 67 65 56 69 | p|ChangeVi|
|00003780| 65 77 4d 65 6e 75 41 63 | 63 6f 72 64 69 6e 67 54 |ewMenuAc|cordingT|
|00003790| 6f 57 69 6e 64 6f 77 28 | 4e 49 4c 29 3b 0d 20 20 |oWindow(|NIL);. |
|000037a0| 20 20 20 20 20 20 20 20 | 70 43 68 61 6e 67 65 53 | |pChangeS|
|000037b0| 65 74 74 69 6e 67 73 4d | 65 6e 75 41 63 63 6f 72 |ettingsM|enuAccor|
|000037c0| 64 69 6e 67 54 6f 57 69 | 6e 64 6f 77 28 4e 49 4c |dingToWi|ndow(NIL|
|000037d0| 29 3b 0d 20 20 20 20 20 | 20 20 20 20 20 0d 20 20 |);. | . |
|000037e0| 20 20 20 20 20 20 20 20 | 44 69 73 61 62 6c 65 49 | |DisableI|
|000037f0| 74 65 6d 28 76 4d 65 6e | 75 5b 65 50 61 67 65 5d |tem(vMen|u[ePage]|
|00003800| 2c 20 63 50 61 67 65 50 | 72 65 76 69 6f 75 73 29 |, cPageP|revious)|
|00003810| 3b 0d 20 20 20 20 20 20 | 20 20 20 20 44 69 73 61 |;. | Disa|
|00003820| 62 6c 65 49 74 65 6d 28 | 76 4d 65 6e 75 5b 65 50 |bleItem(|vMenu[eP|
|00003830| 61 67 65 5d 2c 20 63 50 | 61 67 65 4e 65 78 74 29 |age], cP|ageNext)|
|00003840| 3b 0d 20 20 20 20 20 20 | 20 20 20 20 44 69 73 61 |;. | Disa|
|00003850| 62 6c 65 49 74 65 6d 28 | 76 4d 65 6e 75 5b 65 50 |bleItem(|vMenu[eP|
|00003860| 61 67 65 5d 2c 20 63 50 | 61 67 65 46 69 72 73 74 |age], cP|ageFirst|
|00003870| 29 3b 0d 20 20 20 20 20 | 20 20 20 20 20 44 69 73 |);. | Dis|
|00003880| 61 62 6c 65 49 74 65 6d | 28 76 4d 65 6e 75 5b 65 |ableItem|(vMenu[e|
|00003890| 50 61 67 65 5d 2c 20 63 | 50 61 67 65 4c 61 73 74 |Page], c|PageLast|
|000038a0| 29 3b 0d 20 20 20 20 20 | 20 20 20 20 20 44 69 73 |);. | Dis|
|000038b0| 61 62 6c 65 49 74 65 6d | 28 76 4d 65 6e 75 5b 65 |ableItem|(vMenu[e|
|000038c0| 50 61 67 65 5d 2c 20 63 | 50 61 67 65 47 6f 74 6f |Page], c|PageGoto|
|000038d0| 50 61 67 65 29 3b 0d 20 | 20 20 20 20 20 20 20 45 |Page);. | E|
|000038e0| 4e 44 3b 0d 20 20 20 20 | 20 20 65 41 74 4c 65 61 |ND;. | eAtLea|
|000038f0| 73 74 4f 6e 65 4f 75 72 | 57 69 6e 64 6f 77 4f 70 |stOneOur|WindowOp|
|00003900| 65 6e 3a 0d 20 20 20 20 | 20 20 20 20 42 45 47 49 |en:. | BEGI|
|00003910| 4e 0d 20 20 20 20 20 20 | 20 20 20 20 45 6e 61 62 |N. | Enab|
|00003920| 6c 65 49 74 65 6d 28 76 | 4d 65 6e 75 5b 65 46 69 |leItem(v|Menu[eFi|
|00003930| 6c 65 5d 2c 20 63 46 69 | 6c 65 43 6c 6f 73 65 29 |le], cFi|leClose)|
|00003940| 3b 0d 20 20 20 20 20 20 | 20 20 20 20 45 6e 61 62 |;. | Enab|
|00003950| 6c 65 49 74 65 6d 28 76 | 4d 65 6e 75 5b 65 46 69 |leItem(v|Menu[eFi|
|00003960| 6c 65 5d 2c 20 63 46 69 | 6c 65 43 6c 6f 73 65 41 |le], cFi|leCloseA|
|00003970| 6c 6c 29 3b 0d 20 20 20 | 20 20 20 20 20 20 20 45 |ll);. | E|
|00003980| 6e 61 62 6c 65 49 74 65 | 6d 28 76 4d 65 6e 75 5b |nableIte|m(vMenu[|
|00003990| 65 46 69 6c 65 5d 2c 20 | 63 46 69 6c 65 50 61 67 |eFile], |cFilePag|
|000039a0| 65 53 65 74 75 70 29 3b | 0d 20 20 20 20 20 20 20 |eSetup);|. |
|000039b0| 20 20 20 45 6e 61 62 6c | 65 49 74 65 6d 28 76 4d | Enabl|eItem(vM|
|000039c0| 65 6e 75 5b 65 46 69 6c | 65 5d 2c 20 63 46 69 6c |enu[eFil|e], cFil|
|000039d0| 65 50 61 67 65 53 65 74 | 75 70 41 6c 6c 29 3b 0d |ePageSet|upAll);.|
|000039e0| 20 20 20 20 20 20 20 20 | 20 20 45 6e 61 62 6c 65 | | Enable|
|000039f0| 49 74 65 6d 28 76 4d 65 | 6e 75 5b 65 46 69 6c 65 |Item(vMe|nu[eFile|
|00003a00| 5d 2c 20 63 46 69 6c 65 | 50 72 69 6e 74 29 3b 0d |], cFile|Print);.|
|00003a10| 20 20 20 20 20 20 20 20 | 20 20 45 6e 61 62 6c 65 | | Enable|
|00003a20| 49 74 65 6d 28 76 4d 65 | 6e 75 5b 65 46 69 6c 65 |Item(vMe|nu[eFile|
|00003a30| 5d 2c 20 63 46 69 6c 65 | 50 72 69 6e 74 41 6c 6c |], cFile|PrintAll|
|00003a40| 29 3b 0d 20 20 20 20 20 | 20 20 20 20 20 0d 20 20 |);. | . |
|00003a50| 20 20 20 20 20 20 20 20 | 44 69 73 61 62 6c 65 49 | |DisableI|
|00003a60| 74 65 6d 28 76 4d 65 6e | 75 5b 65 45 64 69 74 5d |tem(vMen|u[eEdit]|
|00003a70| 2c 20 63 45 64 69 74 55 | 6e 64 6f 29 3b 0d 20 20 |, cEditU|ndo);. |
|00003a80| 20 20 20 20 20 20 20 20 | 44 69 73 61 62 6c 65 49 | |DisableI|
|00003a90| 74 65 6d 28 76 4d 65 6e | 75 5b 65 45 64 69 74 5d |tem(vMen|u[eEdit]|
|00003aa0| 2c 20 63 45 64 69 74 43 | 75 74 29 3b 0d 20 20 20 |, cEditC|ut);. |
|00003ab0| 20 20 20 20 20 20 20 44 | 69 73 61 62 6c 65 49 74 | D|isableIt|
|00003ac0| 65 6d 28 76 4d 65 6e 75 | 5b 65 45 64 69 74 5d 2c |em(vMenu|[eEdit],|
|00003ad0| 20 63 45 64 69 74 43 6f | 70 79 29 3b 0d 20 20 20 | cEditCo|py);. |
|00003ae0| 20 20 20 20 20 20 20 44 | 69 73 61 62 6c 65 49 74 | D|isableIt|
|00003af0| 65 6d 28 76 4d 65 6e 75 | 5b 65 45 64 69 74 5d 2c |em(vMenu|[eEdit],|
|00003b00| 20 63 45 64 69 74 50 61 | 73 74 65 29 3b 0d 20 20 | cEditPa|ste);. |
|00003b10| 20 20 20 20 20 20 20 20 | 44 69 73 61 62 6c 65 49 | |DisableI|
|00003b20| 74 65 6d 28 76 4d 65 6e | 75 5b 65 45 64 69 74 5d |tem(vMen|u[eEdit]|
|00003b30| 2c 20 63 45 64 69 74 43 | 6c 65 61 72 29 3b 0d 20 |, cEditC|lear);. |
|00003b40| 20 20 20 20 20 20 20 20 | 20 0d 20 20 20 20 20 20 | | . |
|00003b50| 20 20 20 20 45 6e 61 62 | 6c 65 49 74 65 6d 28 76 | Enab|leItem(v|
|00003b60| 4d 65 6e 75 5b 65 50 61 | 67 65 5d 2c 20 63 50 61 |Menu[ePa|ge], cPa|
|00003b70| 67 65 50 72 65 76 69 6f | 75 73 29 3b 0d 20 20 20 |gePrevio|us);. |
|00003b80| 20 20 20 20 20 20 20 45 | 6e 61 62 6c 65 49 74 65 | E|nableIte|
|00003b90| 6d 28 76 4d 65 6e 75 5b | 65 50 61 67 65 5d 2c 20 |m(vMenu[|ePage], |
|00003ba0| 63 50 61 67 65 4e 65 78 | 74 29 3b 0d 20 20 20 20 |cPageNex|t);. |
|00003bb0| 20 20 20 20 20 20 45 6e | 61 62 6c 65 49 74 65 6d | En|ableItem|
|00003bc0| 28 76 4d 65 6e 75 5b 65 | 50 61 67 65 5d 2c 20 63 |(vMenu[e|Page], c|
|00003bd0| 50 61 67 65 46 69 72 73 | 74 29 3b 0d 20 20 20 20 |PageFirs|t);. |
|00003be0| 20 20 20 20 20 20 45 6e | 61 62 6c 65 49 74 65 6d | En|ableItem|
|00003bf0| 28 76 4d 65 6e 75 5b 65 | 50 61 67 65 5d 2c 20 63 |(vMenu[e|Page], c|
|00003c00| 50 61 67 65 4c 61 73 74 | 29 3b 0d 20 20 20 20 20 |PageLast|);. |
|00003c10| 20 20 20 20 20 45 6e 61 | 62 6c 65 49 74 65 6d 28 | Ena|bleItem(|
|00003c20| 76 4d 65 6e 75 5b 65 50 | 61 67 65 5d 2c 20 63 50 |vMenu[eP|age], cP|
|00003c30| 61 67 65 47 6f 74 6f 50 | 61 67 65 29 3b 0d 20 20 |ageGotoP|age);. |
|00003c40| 20 20 20 20 20 20 45 4e | 44 3b 0d 20 20 20 20 45 | EN|D;. E|
|00003c50| 4e 44 3b 0d 20 20 45 4e | 44 3b 20 20 7b 70 4d 65 |ND;. EN|D; {pMe|
|00003c60| 6e 75 73 54 6f 53 74 61 | 74 65 7d 0d 20 20 0d 20 |nusToSta|te}. . |
|00003c70| 20 0d 20 20 50 52 4f 43 | 45 44 55 52 45 20 70 52 | . PROC|EDURE pR|
|00003c80| 65 74 69 74 6c 65 57 69 | 6e 64 6f 77 28 74 68 65 |etitleWi|ndow(the|
|00003c90| 57 49 6e 64 6f 77 3a 20 | 57 69 6e 64 6f 77 50 74 |WIndow: |WindowPt|
|00003ca0| 72 29 3b 0d 20 20 20 20 | 56 41 52 0d 20 20 20 20 |r);. |VAR. |
|00003cb0| 20 20 76 68 57 69 6e 64 | 6f 77 52 65 6c 61 74 65 | vhWind|owRelate|
|00003cc0| 64 49 6e 66 6f 3a 20 74 | 68 57 69 6e 64 6f 77 52 |dInfo: t|hWindowR|
|00003cd0| 65 6c 61 74 65 64 49 6e | 66 6f 3b 0d 20 20 20 20 |elatedIn|fo;. |
|00003ce0| 20 20 6e 61 6d 65 3a 20 | 53 74 72 32 35 35 3b 0d | name: |Str255;.|
|00003cf0| 20 20 20 20 20 20 73 63 | 61 6c 65 50 65 72 63 65 | sc|alePerce|
|00003d00| 6e 74 61 67 65 3a 20 49 | 6e 74 65 67 65 72 3b 0d |ntage: I|nteger;.|
|00003d10| 20 20 20 20 20 20 73 63 | 61 6c 65 50 65 72 63 65 | sc|alePerce|
|00003d20| 6e 74 61 67 65 41 73 53 | 74 72 69 6e 67 3a 20 53 |ntageAsS|tring: S|
|00003d30| 74 72 32 35 35 3b 0d 20 | 20 20 20 20 20 74 69 74 |tr255;. | tit|
|00003d40| 6c 65 53 74 72 69 6e 67 | 3a 20 53 74 72 32 35 35 |leString|: Str255|
|00003d50| 3b 0d 20 20 42 45 47 49 | 4e 0d 20 20 20 20 76 68 |;. BEGI|N. vh|
|00003d60| 57 69 6e 64 6f 77 52 65 | 6c 61 74 65 64 49 6e 66 |WindowRe|latedInf|
|00003d70| 6f 20 3a 3d 20 74 68 57 | 69 6e 64 6f 77 52 65 6c |o := thW|indowRel|
|00003d80| 61 74 65 64 49 6e 66 6f | 28 47 65 74 57 52 65 66 |atedInfo|(GetWRef|
|00003d90| 43 6f 6e 28 74 68 65 57 | 69 6e 64 6f 77 29 29 3b |Con(theW|indow));|
|00003da0| 0d 20 20 20 20 6e 61 6d | 65 20 3a 3d 20 76 68 57 |. nam|e := vhW|
|00003db0| 69 6e 64 6f 77 52 65 6c | 61 74 65 64 49 6e 66 6f |indowRel|atedInfo|
|00003dc0| 5e 5e 2e 72 53 46 52 65 | 70 6c 79 2e 66 4e 61 6d |^^.rSFRe|ply.fNam|
|00003dd0| 65 3b 0d 20 20 20 20 73 | 63 61 6c 65 50 65 72 63 |e;. s|calePerc|
|00003de0| 65 6e 74 61 67 65 20 3a | 3d 20 76 68 57 69 6e 64 |entage :|= vhWind|
|00003df0| 6f 77 52 65 6c 61 74 65 | 64 49 6e 66 6f 5e 5e 2e |owRelate|dInfo^^.|
|00003e00| 72 56 69 65 77 53 63 61 | 6c 65 50 72 65 76 69 65 |rViewSca|lePrevie|
|00003e10| 77 50 65 72 63 65 6e 74 | 61 67 65 3b 0d 20 20 20 |wPercent|age;. |
|00003e20| 20 4e 75 6d 54 6f 53 74 | 72 69 6e 67 28 4c 6f 6e | NumToSt|ring(Lon|
|00003e30| 67 69 6e 74 28 73 63 61 | 6c 65 50 65 72 63 65 6e |gint(sca|lePercen|
|00003e40| 74 61 67 65 29 2c 20 73 | 63 61 6c 65 50 65 72 63 |tage), s|calePerc|
|00003e50| 65 6e 74 61 67 65 41 73 | 53 74 72 69 6e 67 29 3b |entageAs|String);|
|00003e60| 0d 20 20 20 20 0d 20 20 | 20 20 49 46 20 73 63 61 |. . | IF sca|
|00003e70| 6c 65 50 65 72 63 65 6e | 74 61 67 65 20 3d 20 31 |lePercen|tage = 1|
|00003e80| 30 30 20 54 48 45 4e 0d | 20 20 20 20 20 20 74 69 |00 THEN.| ti|
|00003e90| 74 6c 65 53 74 72 69 6e | 67 20 3a 3d 20 66 50 61 |tleStrin|g := fPa|
|00003ea0| 72 61 6d 65 74 72 69 7a | 65 53 54 52 28 0d 20 20 |rametriz|eSTR(. |
|00003eb0| 20 20 20 20 20 20 63 53 | 74 72 69 6e 67 57 69 6e | cS|tringWin|
|00003ec0| 64 6f 77 54 69 74 6c 65 | 41 74 31 30 30 50 65 72 |dowTitle|At100Per|
|00003ed0| 63 65 6e 74 2c 0d 20 20 | 20 20 20 20 20 20 27 5e |cent,. | '^|
|00003ee0| 30 27 2c 0d 20 20 20 20 | 20 20 20 20 6e 61 6d 65 |0',. | name|
|00003ef0| 2c 0d 20 20 20 20 20 20 | 20 20 73 63 61 6c 65 50 |,. | scaleP|
|00003f00| 65 72 63 65 6e 74 61 67 | 65 41 73 53 74 72 69 6e |ercentag|eAsStrin|
|00003f10| 67 0d 20 20 20 20 20 20 | 29 0d 20 20 20 20 45 4c |g. |). EL|
|00003f20| 53 45 0d 20 20 20 20 20 | 20 74 69 74 6c 65 53 74 |SE. | titleSt|
|00003f30| 72 69 6e 67 20 3a 3d 20 | 66 50 61 72 61 6d 65 74 |ring := |fParamet|
|00003f40| 72 69 7a 65 53 54 52 28 | 0d 20 20 20 20 20 20 20 |rizeSTR(|. |
|00003f50| 20 63 53 74 72 69 6e 67 | 57 69 6e 64 6f 77 54 69 | cString|WindowTi|
|00003f60| 74 6c 65 41 74 4f 74 68 | 65 72 50 65 72 63 65 6e |tleAtOth|erPercen|
|00003f70| 74 61 67 65 73 2c 0d 20 | 20 20 20 20 20 20 20 27 |tages,. | '|
|00003f80| 5e 30 20 61 74 20 5e 31 | 25 27 2c 0d 20 20 20 20 |^0 at ^1|%',. |
|00003f90| 20 20 20 20 6e 61 6d 65 | 2c 0d 20 20 20 20 20 20 | name|,. |
|00003fa0| 20 20 73 63 61 6c 65 50 | 65 72 63 65 6e 74 61 67 | scaleP|ercentag|
|00003fb0| 65 41 73 53 74 72 69 6e | 67 0d 20 20 20 20 20 20 |eAsStrin|g. |
|00003fc0| 29 3b 0d 20 20 20 20 0d | 20 20 20 20 53 65 74 57 |);. .| SetW|
|00003fd0| 54 69 74 6c 65 28 74 68 | 65 57 69 6e 64 6f 77 2c |Title(th|eWindow,|
|00003fe0| 20 74 69 74 6c 65 53 74 | 72 69 6e 67 29 3b 0d 20 | titleSt|ring);. |
|00003ff0| 20 45 4e 44 3b 20 20 7b | 70 52 65 74 69 74 6c 65 | END; {|pRetitle|
|00004000| 57 69 6e 64 6f 77 7d 0d | 20 20 0d 20 20 0d 20 20 |Window}.| . . |
|00004010| 46 55 4e 43 54 49 4f 4e | 20 66 43 72 65 61 74 65 |FUNCTION| fCreate|
|00004020| 57 69 6e 64 6f 77 28 0d | 20 20 20 20 56 41 52 20 |Window(.| VAR |
|00004030| 74 68 65 57 69 6e 64 6f | 77 3a 20 57 69 6e 64 6f |theWindo|w: Windo|
|00004040| 77 50 74 72 3b 0d 20 20 | 20 20 76 53 46 52 65 70 |wPtr;. | vSFRep|
|00004050| 6c 79 3a 20 53 46 52 65 | 70 6c 79 0d 20 20 29 20 |ly: SFRe|ply. ) |
|00004060| 3a 20 42 6f 6f 6c 65 61 | 6e 3b 0d 20 20 0d 20 20 |: Boolea|n;. . |
|00004070| 20 20 4c 41 42 45 4c 0d | 20 20 20 20 20 20 63 6c | LABEL.| cl|
|00004080| 6f 73 65 46 69 6c 65 3b | 0d 20 20 20 20 43 4f 4e |oseFile;|. CON|
|00004090| 53 54 0d 20 20 20 20 20 | 20 63 44 72 6f 70 44 6f |ST. | cDropDo|
|000040a0| 77 6e 3d 20 33 30 3b 0d | 20 20 20 20 20 20 63 44 |wn= 30;.| cD|
|000040b0| 72 6f 70 52 69 67 68 74 | 3d 20 32 30 3b 0d 20 20 |ropRight|= 20;. |
|000040c0| 20 20 56 41 52 0d 20 20 | 20 20 20 20 70 72 65 76 | VAR. | prev|
|000040d0| 69 6f 75 73 46 72 6f 6e | 74 57 69 6e 64 6f 77 3a |iousFron|tWindow:|
|000040e0| 20 57 69 6e 64 6f 77 50 | 74 72 3b 0d 20 20 20 20 | WindowP|tr;. |
|000040f0| 20 20 6e 65 77 54 6f 70 | 4c 65 66 74 3a 20 50 6f | newTop|Left: Po|
|00004100| 69 6e 74 3b 0d 20 20 20 | 20 20 20 76 68 57 69 6e |int;. | vhWin|
|00004110| 64 6f 77 52 65 6c 61 74 | 65 64 49 6e 66 6f 3a 20 |dowRelat|edInfo: |
|00004120| 74 68 57 69 6e 64 6f 77 | 52 65 6c 61 74 65 64 49 |thWindow|RelatedI|
|00004130| 6e 66 6f 3b 0d 20 20 20 | 20 20 20 68 53 63 72 6f |nfo;. | hScro|
|00004140| 6c 6c 42 61 72 3a 20 43 | 6f 6e 74 72 6f 6c 48 61 |llBar: C|ontrolHa|
|00004150| 6e 64 6c 65 3b 0d 20 20 | 20 20 20 20 76 53 63 72 |ndle;. | vScr|
|00004160| 6f 6c 6c 42 61 72 52 65 | 63 74 3a 20 52 65 63 74 |ollBarRe|ct: Rect|
|00004170| 3b 0d 20 20 20 20 20 20 | 77 69 6e 64 6f 77 52 65 |;. |windowRe|
|00004180| 6c 61 74 65 64 49 6e 66 | 6f 53 75 63 63 65 73 73 |latedInf|oSuccess|
|00004190| 66 75 6c 6c 79 52 65 61 | 64 3a 20 42 6f 6f 6c 65 |fullyRea|d: Boole|
|000041a0| 61 6e 3b 0d 20 20 20 20 | 20 20 66 69 6c 65 52 65 |an;. | fileRe|
|000041b0| 66 4e 75 6d 3a 20 49 6e | 74 65 67 65 72 3b 0d 20 |fNum: In|teger;. |
|000041c0| 20 20 20 20 20 6e 75 6d | 62 65 72 4f 66 42 79 74 | num|berOfByt|
|000041d0| 65 73 3a 20 4c 6f 6e 67 | 49 6e 74 3b 0d 20 20 20 |es: Long|Int;. |
|000041e0| 20 20 20 72 65 74 43 6f | 64 65 3a 20 4f 53 45 72 | retCo|de: OSEr|
|000041f0| 72 3b 0d 20 20 20 20 20 | 20 0d 20 20 42 45 47 49 |r;. | . BEGI|
|00004200| 4e 0d 20 20 20 20 70 72 | 65 76 69 6f 75 73 46 72 |N. pr|eviousFr|
|00004210| 6f 6e 74 57 69 6e 64 6f | 77 20 3a 3d 20 46 72 6f |ontWindo|w := Fro|
|00004220| 6e 74 57 69 6e 64 6f 77 | 3b 0d 20 20 20 20 0d 20 |ntWindow|;. . |
|00004230| 20 20 20 7b 20 43 72 65 | 61 74 65 20 28 61 6e 20 | { Cre|ate (an |
|00004240| 69 6e 76 69 73 69 62 6c | 65 29 20 77 69 6e 64 6f |invisibl|e) windo|
|00004250| 77 20 66 72 6f 6d 20 61 | 70 70 72 6f 70 72 69 61 |w from a|ppropria|
|00004260| 74 65 20 74 65 6d 70 6c | 61 74 65 20 7d 0d 20 20 |te templ|ate }. |
|00004270| 20 20 7b 20 61 6e 64 20 | 6c 65 74 20 69 74 20 62 | { and |let it b|
|00004280| 65 20 62 61 63 6b 6d 6f | 73 74 20 28 74 6f 20 70 |e backmo|st (to p|
|00004290| 72 65 76 65 6e 74 20 67 | 65 6e 65 72 61 74 69 6e |revent g|eneratin|
|000042a0| 67 20 61 63 74 69 76 61 | 74 65 20 65 76 65 6e 74 |g activa|te event|
|000042b0| 73 20 6e 6f 77 29 2e 20 | 7d 0d 20 20 20 20 49 46 |s now). |}. IF|
|000042c0| 20 76 48 61 73 31 32 38 | 4b 52 4f 4d 73 20 54 48 | vHas128|KROMs TH|
|000042d0| 45 4e 0d 20 20 20 20 20 | 20 74 68 65 57 69 6e 64 |EN. | theWind|
|000042e0| 6f 77 20 3a 3d 20 47 65 | 74 4e 65 77 57 69 6e 64 |ow := Ge|tNewWind|
|000042f0| 6f 77 28 63 57 69 6e 64 | 6f 77 5a 6f 6f 6d 61 62 |ow(cWind|owZoomab|
|00004300| 6c 65 2c 20 4e 49 4c 2c | 20 7b 62 65 68 69 6e 64 |le, NIL,| {behind|
|00004310| 3d 3e 7d 20 4e 49 4c 29 | 0d 20 20 20 20 45 4c 53 |=>} NIL)|. ELS|
|00004320| 45 0d 20 20 20 20 20 20 | 74 68 65 57 69 6e 64 6f |E. |theWindo|
|00004330| 77 20 3a 3d 20 47 65 74 | 4e 65 77 57 69 6e 64 6f |w := Get|NewWindo|
|00004340| 77 28 63 57 69 6e 64 6f | 77 4f 72 64 69 6e 61 72 |w(cWindo|wOrdinar|
|00004350| 79 2c 20 4e 49 4c 2c 20 | 7b 62 65 68 69 6e 64 3d |y, NIL, |{behind=|
|00004360| 3e 7d 20 4e 49 4c 29 3b | 0d 20 20 20 20 49 46 20 |>} NIL);|. IF |
|00004370| 74 68 65 57 69 6e 64 6f | 77 20 3d 20 4e 49 4c 20 |theWindo|w = NIL |
|00004380| 54 48 45 4e 0d 20 20 20 | 20 20 20 42 45 47 49 4e |THEN. | BEGIN|
|00004390| 0d 20 20 20 20 20 20 20 | 20 70 45 72 72 6f 72 41 |. | pErrorA|
|000043a0| 6c 65 72 74 28 63 41 6c | 65 72 74 4e 6f 4d 65 6d |lert(cAl|ertNoMem|
|000043b0| 6f 72 79 46 6f 72 57 69 | 6e 64 6f 77 73 29 3b 0d |oryForWi|ndows);.|
|000043c0| 20 20 20 20 20 20 20 20 | 66 43 72 65 61 74 65 57 | |fCreateW|
|000043d0| 69 6e 64 6f 77 20 3a 3d | 20 46 61 6c 73 65 3b 0d |indow :=| False;.|
|000043e0| 20 20 20 20 20 20 20 20 | 45 78 69 74 3b 0d 20 20 | |Exit;. |
|000043f0| 20 20 20 20 45 4e 44 3b | 0d 20 20 20 20 0d 20 20 | END;|. . |
|00004400| 20 20 7b 20 44 72 6f 70 | 20 77 69 6e 64 6f 77 20 | { Drop| window |
|00004410| 6e 69 63 65 6c 79 20 62 | 65 6c 6f 77 20 74 68 65 |nicely b|elow the|
|00004420| 20 63 75 72 72 65 6e 74 | 20 74 6f 70 6d 6f 73 74 | current| topmost|
|00004430| 20 77 69 6e 64 6f 77 2e | 20 7d 0d 20 20 20 20 57 | window.| }. W|
|00004440| 49 54 48 20 6e 65 77 54 | 6f 70 4c 65 66 74 20 44 |ITH newT|opLeft D|
|00004450| 4f 0d 20 20 20 20 20 20 | 49 46 20 70 72 65 76 69 |O. |IF previ|
|00004460| 6f 75 73 46 72 6f 6e 74 | 57 69 6e 64 6f 77 20 3d |ousFront|Window =|
|00004470| 20 4e 49 4c 20 54 48 45 | 4e 0d 20 20 20 20 20 20 | NIL THE|N. |
|00004480| 20 20 42 45 47 49 4e 0d | 20 20 20 20 20 20 20 20 | BEGIN.| |
|00004490| 20 20 76 20 3a 3d 20 2d | 74 68 65 57 69 6e 64 6f | v := -|theWindo|
|000044a0| 77 5e 2e 70 6f 72 74 42 | 69 74 73 2e 62 6f 75 6e |w^.portB|its.boun|
|000044b0| 64 73 2e 74 6f 70 3b 0d | 20 20 20 20 20 20 20 20 |ds.top;.| |
|000044c0| 20 20 68 20 3a 3d 20 2d | 74 68 65 57 69 6e 64 6f | h := -|theWindo|
|000044d0| 77 5e 2e 70 6f 72 74 42 | 69 74 73 2e 62 6f 75 6e |w^.portB|its.boun|
|000044e0| 64 73 2e 6c 65 66 74 3b | 0d 20 20 20 20 20 20 20 |ds.left;|. |
|000044f0| 20 45 4e 44 0d 20 20 20 | 20 20 20 45 4c 53 45 0d | END. | ELSE.|
|00004500| 20 20 20 20 20 20 20 20 | 42 45 47 49 4e 0d 20 20 | |BEGIN. |
|00004510| 20 20 20 20 20 20 20 20 | 76 20 3a 3d 20 2d 70 72 | |v := -pr|
|00004520| 65 76 69 6f 75 73 46 72 | 6f 6e 74 57 69 6e 64 6f |eviousFr|ontWindo|
|00004530| 77 5e 2e 70 6f 72 74 42 | 69 74 73 2e 62 6f 75 6e |w^.portB|its.boun|
|00004540| 64 73 2e 74 6f 70 20 2b | 20 63 44 72 6f 70 44 6f |ds.top +| cDropDo|
|00004550| 77 6e 3b 0d 20 20 20 20 | 20 20 20 20 20 20 68 20 |wn;. | h |
|00004560| 3a 3d 20 2d 70 72 65 76 | 69 6f 75 73 46 72 6f 6e |:= -prev|iousFron|
|00004570| 74 57 69 6e 64 6f 77 5e | 2e 70 6f 72 74 42 69 74 |tWindow^|.portBit|
|00004580| 73 2e 62 6f 75 6e 64 73 | 2e 6c 65 66 74 20 2b 20 |s.bounds|.left + |
|00004590| 63 44 72 6f 70 52 69 67 | 68 74 3b 0d 20 20 20 20 |cDropRig|ht;. |
|000045a0| 20 20 20 20 45 4e 44 3b | 0d 20 20 20 20 7b 20 4d | END;|. { M|
|000045b0| 6f 76 65 20 6f 6e 6c 79 | 20 69 66 20 74 6f 70 20 |ove only| if top |
|000045c0| 6c 65 66 74 20 69 73 20 | 76 69 73 69 62 6c 65 20 |left is |visible |
|000045d0| 6f 6e 20 73 63 72 65 65 | 6e 2e 20 7d 0d 20 20 20 |on scree|n. }. |
|000045e0| 20 49 46 20 50 74 49 6e | 52 65 63 74 28 6e 65 77 | IF PtIn|Rect(new|
|000045f0| 54 6f 70 4c 65 66 74 2c | 20 73 63 72 65 65 6e 42 |TopLeft,| screenB|
|00004600| 69 74 73 2e 62 6f 75 6e | 64 73 29 20 54 48 45 4e |its.boun|ds) THEN|
|00004610| 0d 20 20 20 20 20 20 4d | 6f 76 65 57 69 6e 64 6f |. M|oveWindo|
|00004620| 77 28 74 68 65 57 69 6e | 64 6f 77 2c 20 6e 65 77 |w(theWin|dow, new|
|00004630| 54 6f 70 4c 65 66 74 2e | 68 2c 20 6e 65 77 54 6f |TopLeft.|h, newTo|
|00004640| 70 4c 65 66 74 2e 76 2c | 20 7b 66 72 6f 6e 74 3d |pLeft.v,| {front=|
|00004650| 3e 7d 20 54 72 75 65 29 | 0d 20 20 20 20 45 4c 53 |>} True)|. ELS|
|00004660| 45 0d 20 20 20 20 20 20 | 3b 20 20 7b 6c 65 61 76 |E. |; {leav|
|00004670| 65 73 20 74 68 65 20 77 | 69 6e 64 6f 77 20 69 6e |es the w|indow in|
|00004680| 20 74 68 65 20 70 6f 73 | 69 74 69 6f 6e 20 64 65 | the pos|ition de|
|00004690| 66 69 6e 65 64 20 69 6e | 20 74 68 65 20 57 49 4e |fined in| the WIN|
|000046a0| 44 20 72 65 73 6f 75 72 | 63 65 7d 0d 20 20 20 20 |D resour|ce}. |
|000046b0| 0d 20 20 20 20 7b 20 43 | 72 65 61 74 65 20 6f 75 |. { C|reate ou|
|000046c0| 72 20 61 64 64 69 74 69 | 6f 6e 61 6c 20 73 74 6f |r additi|onal sto|
|000046d0| 72 61 67 65 20 66 6f 72 | 20 74 68 69 73 20 77 69 |rage for| this wi|
|000046e0| 6e 64 6f 77 2e 20 7d 0d | 20 20 20 20 76 68 57 69 |ndow. }.| vhWi|
|000046f0| 6e 64 6f 77 52 65 6c 61 | 74 65 64 49 6e 66 6f 20 |ndowRela|tedInfo |
|00004700| 3a 3d 20 74 68 57 69 6e | 64 6f 77 52 65 6c 61 74 |:= thWin|dowRelat|
|00004710| 65 64 49 6e 66 6f 28 4e | 65 77 48 61 6e 64 6c 65 |edInfo(N|ewHandle|
|00004720| 28 53 69 7a 65 6f 66 28 | 74 57 69 6e 64 6f 77 52 |(Sizeof(|tWindowR|
|00004730| 65 6c 61 74 65 64 49 6e | 66 6f 29 29 29 3b 0d 20 |elatedIn|fo)));. |
|00004740| 20 20 20 49 46 20 76 68 | 57 69 6e 64 6f 77 52 65 | IF vh|WindowRe|
|00004750| 6c 61 74 65 64 49 6e 66 | 6f 20 3d 20 4e 49 4c 20 |latedInf|o = NIL |
|00004760| 54 48 45 4e 0d 20 20 20 | 20 20 20 42 45 47 49 4e |THEN. | BEGIN|
|00004770| 0d 20 20 20 20 20 20 20 | 20 70 45 72 72 6f 72 41 |. | pErrorA|
|00004780| 6c 65 72 74 28 63 41 6c | 65 72 74 4e 6f 4d 65 6d |lert(cAl|ertNoMem|
|00004790| 6f 72 79 46 6f 72 57 69 | 6e 64 6f 77 73 29 3b 0d |oryForWi|ndows);.|
|000047a0| 20 20 20 20 20 20 20 20 | 44 69 73 70 6f 73 65 57 | |DisposeW|
|000047b0| 69 6e 64 6f 77 28 74 68 | 65 57 69 6e 64 6f 77 29 |indow(th|eWindow)|
|000047c0| 3b 0d 20 20 20 20 20 20 | 20 20 66 43 72 65 61 74 |;. | fCreat|
|000047d0| 65 57 69 6e 64 6f 77 20 | 3a 3d 20 46 61 6c 73 65 |eWindow |:= False|
|000047e0| 3b 0d 20 20 20 20 20 20 | 20 20 45 78 69 74 3b 0d |;. | Exit;.|
|000047f0| 20 20 20 20 20 20 45 4e | 44 3b 0d 20 20 20 20 53 | EN|D;. S|
|00004800| 65 74 57 52 65 66 43 6f | 6e 28 74 68 65 57 69 6e |etWRefCo|n(theWin|
|00004810| 64 6f 77 2c 20 4c 6f 6e | 67 69 6e 74 28 76 68 57 |dow, Lon|gint(vhW|
|00004820| 69 6e 64 6f 77 52 65 6c | 61 74 65 64 49 6e 66 6f |indowRel|atedInfo|
|00004830| 29 29 3b 0d 20 20 20 20 | 0d 20 20 20 20 7b 20 43 |));. |. { C|
|00004840| 72 65 61 74 65 20 73 63 | 72 6f 6c 6c 20 62 61 72 |reate sc|roll bar|
|00004850| 73 2e 20 7d 0d 20 20 20 | 20 70 43 61 6c 63 48 6f |s. }. | pCalcHo|
|00004860| 72 69 7a 6f 6e 74 61 6c | 53 63 72 6f 6c 6c 52 65 |rizontal|ScrollRe|
|00004870| 63 74 28 74 68 65 57 69 | 6e 64 6f 77 2c 20 76 53 |ct(theWi|ndow, vS|
|00004880| 63 72 6f 6c 6c 42 61 72 | 52 65 63 74 29 3b 0d 20 |crollBar|Rect);. |
|00004890| 20 20 20 68 53 63 72 6f | 6c 6c 42 61 72 20 3a 3d | hScro|llBar :=|
|000048a0| 20 4e 65 77 43 6f 6e 74 | 72 6f 6c 28 0d 20 20 20 | NewCont|rol(. |
|000048b0| 20 20 20 74 68 65 57 69 | 6e 64 6f 77 2c 0d 20 20 | theWi|ndow,. |
|000048c0| 20 20 20 20 76 53 63 72 | 6f 6c 6c 42 61 72 52 65 | vScr|ollBarRe|
|000048d0| 63 74 2c 0d 20 20 20 20 | 20 20 27 27 2c 0d 20 20 |ct,. | '',. |
|000048e0| 20 20 20 20 7b 76 69 73 | 69 62 6c 65 3d 3e 7d 20 | {vis|ible=>} |
|000048f0| 46 61 6c 73 65 2c 0d 20 | 20 20 20 20 20 30 2c 30 |False,. | 0,0|
|00004900| 2c 30 2c 0d 20 20 20 20 | 20 20 73 63 72 6f 6c 6c |,0,. | scroll|
|00004910| 42 61 72 50 72 6f 63 2c | 0d 20 20 20 20 20 20 7b |BarProc,|. {|
|00004920| 72 65 66 43 6f 6e 3d 3e | 7d 20 30 0d 20 20 20 20 |refCon=>|} 0. |
|00004930| 29 3b 0d 20 20 20 20 49 | 46 20 68 53 63 72 6f 6c |);. I|F hScrol|
|00004940| 6c 42 61 72 20 3d 20 4e | 49 4c 20 54 48 45 4e 0d |lBar = N|IL THEN.|
|00004950| 20 20 20 20 20 20 42 45 | 47 49 4e 0d 20 20 20 20 | BE|GIN. |
|00004960| 20 20 20 20 70 45 72 72 | 6f 72 41 6c 65 72 74 28 | pErr|orAlert(|
|00004970| 63 41 6c 65 72 74 4e 6f | 4d 65 6d 6f 72 79 46 6f |cAlertNo|MemoryFo|
|00004980| 72 57 69 6e 64 6f 77 73 | 29 3b 0d 20 20 20 20 20 |rWindows|);. |
|00004990| 20 20 20 44 69 73 70 6f | 73 48 61 6e 64 6c 65 28 | Dispo|sHandle(|
|000049a0| 48 61 6e 64 6c 65 28 76 | 68 57 69 6e 64 6f 77 52 |Handle(v|hWindowR|
|000049b0| 65 6c 61 74 65 64 49 6e | 66 6f 29 29 3b 0d 20 20 |elatedIn|fo));. |
|000049c0| 20 20 20 20 20 20 44 69 | 73 70 6f 73 65 57 69 6e | Di|sposeWin|
|000049d0| 64 6f 77 28 74 68 65 57 | 69 6e 64 6f 77 29 3b 0d |dow(theW|indow);.|
|000049e0| 20 20 20 20 20 20 20 20 | 66 43 72 65 61 74 65 57 | |fCreateW|
|000049f0| 69 6e 64 6f 77 20 3a 3d | 20 46 61 6c 73 65 3b 0d |indow :=| False;.|
|00004a00| 20 20 20 20 20 20 20 20 | 45 78 69 74 3b 0d 20 20 | |Exit;. |
|00004a10| 20 20 20 20 45 4e 44 3b | 0d 20 20 20 20 53 65 74 | END;|. Set|
|00004a20| 43 74 6c 41 63 74 69 6f | 6e 28 68 53 63 72 6f 6c |CtlActio|n(hScrol|
|00004a30| 6c 42 61 72 2c 20 40 70 | 48 6f 72 69 7a 6f 6e 74 |lBar, @p|Horizont|
|00004a40| 61 6c 53 63 72 6f 6c 6c | 41 63 74 69 6f 6e 29 3b |alScroll|Action);|
|00004a50| 0d 20 20 20 20 76 68 57 | 69 6e 64 6f 77 52 65 6c |. vhW|indowRel|
|00004a60| 61 74 65 64 49 6e 66 6f | 5e 5e 2e 72 48 6f 72 69 |atedInfo|^^.rHori|
|00004a70| 7a 6f 6e 74 61 6c 53 63 | 72 6f 6c 6c 43 6f 6e 74 |zontalSc|rollCont|
|00004a80| 72 6f 6c 20 3a 3d 20 68 | 53 63 72 6f 6c 6c 42 61 |rol := h|ScrollBa|
|00004a90| 72 3b 0d 20 20 20 20 0d | 20 20 20 20 70 43 61 6c |r;. .| pCal|
|00004aa0| 63 56 65 72 74 69 63 61 | 6c 53 63 72 6f 6c 6c 52 |cVertica|lScrollR|
|00004ab0| 65 63 74 28 74 68 65 57 | 69 6e 64 6f 77 2c 20 76 |ect(theW|indow, v|
|00004ac0| 53 63 72 6f 6c 6c 42 61 | 72 52 65 63 74 29 3b 0d |ScrollBa|rRect);.|
|00004ad0| 20 20 20 20 68 53 63 72 | 6f 6c 6c 42 61 72 20 3a | hScr|ollBar :|
|00004ae0| 3d 20 4e 65 77 43 6f 6e | 74 72 6f 6c 28 0d 20 20 |= NewCon|trol(. |
|00004af0| 20 20 20 20 74 68 65 57 | 69 6e 64 6f 77 2c 0d 20 | theW|indow,. |
|00004b00| 20 20 20 20 20 76 53 63 | 72 6f 6c 6c 42 61 72 52 | vSc|rollBarR|
|00004b10| 65 63 74 2c 0d 20 20 20 | 20 20 20 27 27 2c 0d 20 |ect,. | '',. |
|00004b20| 20 20 20 20 20 7b 76 69 | 73 69 62 6c 65 3d 3e 7d | {vi|sible=>}|
|00004b30| 20 46 61 6c 73 65 2c 0d | 20 20 20 20 20 20 30 2c | False,.| 0,|
|00004b40| 30 2c 30 2c 0d 20 20 20 | 20 20 20 73 63 72 6f 6c |0,0,. | scrol|
|00004b50| 6c 42 61 72 50 72 6f 63 | 2c 0d 20 20 20 20 20 20 |lBarProc|,. |
|00004b60| 7b 72 65 66 43 6f 6e 3d | 3e 7d 20 30 0d 20 20 20 |{refCon=|>} 0. |
|00004b70| 20 29 3b 0d 20 20 20 20 | 49 46 20 68 53 63 72 6f | );. |IF hScro|
|00004b80| 6c 6c 42 61 72 20 3d 20 | 4e 49 4c 20 54 48 45 4e |llBar = |NIL THEN|
|00004b90| 0d 20 20 20 20 20 20 42 | 45 47 49 4e 0d 20 20 20 |. B|EGIN. |
|00004ba0| 20 20 20 20 20 70 45 72 | 72 6f 72 41 6c 65 72 74 | pEr|rorAlert|
|00004bb0| 28 63 41 6c 65 72 74 4e | 6f 4d 65 6d 6f 72 79 46 |(cAlertN|oMemoryF|
|00004bc0| 6f 72 57 69 6e 64 6f 77 | 73 29 3b 0d 20 20 20 20 |orWindow|s);. |
|00004bd0| 20 20 20 20 7b 20 4e 6f | 20 6e 65 65 64 20 74 6f | { No| need to|
|00004be0| 20 64 69 73 70 6f 73 65 | 20 63 6f 6e 74 72 6f 6c | dispose| control|
|00004bf0| 73 20 63 72 65 61 74 65 | 64 20 74 68 69 73 20 66 |s create|d this f|
|00004c00| 61 72 20 28 49 4d 20 49 | 2d 33 32 31 29 2e 20 7d |ar (IM I|-321). }|
|00004c10| 0d 20 20 20 20 20 20 20 | 20 44 69 73 70 6f 73 48 |. | DisposH|
|00004c20| 61 6e 64 6c 65 28 48 61 | 6e 64 6c 65 28 76 68 57 |andle(Ha|ndle(vhW|
|00004c30| 69 6e 64 6f 77 52 65 6c | 61 74 65 64 49 6e 66 6f |indowRel|atedInfo|
|00004c40| 29 29 3b 0d 20 20 20 20 | 20 20 20 20 44 69 73 70 |));. | Disp|
|00004c50| 6f 73 65 57 69 6e 64 6f | 77 28 74 68 65 57 69 6e |oseWindo|w(theWin|
|00004c60| 64 6f 77 29 3b 0d 20 20 | 20 20 20 20 20 20 66 43 |dow);. | fC|
|00004c70| 72 65 61 74 65 57 69 6e | 64 6f 77 20 3a 3d 20 46 |reateWin|dow := F|
|00004c80| 61 6c 73 65 3b 0d 20 20 | 20 20 20 20 20 20 45 78 |alse;. | Ex|
|00004c90| 69 74 3b 0d 20 20 20 20 | 20 20 45 4e 44 3b 0d 20 |it;. | END;. |
|00004ca0| 20 20 20 53 65 74 43 74 | 6c 41 63 74 69 6f 6e 28 | SetCt|lAction(|
|00004cb0| 68 53 63 72 6f 6c 6c 42 | 61 72 2c 20 40 70 56 65 |hScrollB|ar, @pVe|
|00004cc0| 72 74 69 63 61 6c 53 63 | 72 6f 6c 6c 41 63 74 69 |rticalSc|rollActi|
|00004cd0| 6f 6e 29 3b 0d 20 20 20 | 20 76 68 57 69 6e 64 6f |on);. | vhWindo|
|00004ce0| 77 52 65 6c 61 74 65 64 | 49 6e 66 6f 5e 5e 2e 72 |wRelated|Info^^.r|
|00004cf0| 56 65 72 74 69 63 61 6c | 53 63 72 6f 6c 6c 43 6f |Vertical|ScrollCo|
|00004d00| 6e 74 72 6f 6c 20 3a 3d | 20 68 53 63 72 6f 6c 6c |ntrol :=| hScroll|
|00004d10| 42 61 72 3b 0d 20 20 20 | 20 0d 20 20 20 20 7b 20 |Bar;. | . { |
|00004d20| 53 65 74 20 76 69 65 77 | 69 6e 67 20 77 61 79 20 |Set view|ing way |
|00004d30| 66 72 6f 6d 20 67 6c 6f | 62 61 6c 20 64 65 66 61 |from glo|bal defa|
|00004d40| 75 6c 74 73 2e 20 7d 0d | 20 20 20 20 76 68 57 69 |ults. }.| vhWi|
|00004d50| 6e 64 6f 77 52 65 6c 61 | 74 65 64 49 6e 66 6f 5e |ndowRela|tedInfo^|
|00004d60| 5e 2e 72 56 69 65 77 4d | 65 6e 75 53 65 6c 65 63 |^.rViewM|enuSelec|
|00004d70| 74 69 6f 6e 46 6f 72 54 | 68 69 73 57 69 6e 64 6f |tionForT|hisWindo|
|00004d80| 77 20 3a 3d 20 0d 20 20 | 20 20 20 20 76 56 69 65 |w := . | vVie|
|00004d90| 77 4d 65 6e 75 53 65 6c | 65 63 74 69 6f 6e 44 65 |wMenuSel|ectionDe|
|00004da0| 66 61 75 6c 74 3b 0d 20 | 20 20 20 76 68 57 69 6e |fault;. | vhWin|
|00004db0| 64 6f 77 52 65 6c 61 74 | 65 64 49 6e 66 6f 5e 5e |dowRelat|edInfo^^|
|00004dc0| 2e 72 56 69 65 77 53 63 | 61 6c 65 50 72 65 76 69 |.rViewSc|alePrevi|
|00004dd0| 65 77 50 65 72 63 65 6e | 74 61 67 65 20 3a 3d 0d |ewPercen|tage :=.|
|00004de0| 20 20 20 20 20 20 76 56 | 69 65 77 53 63 61 6c 65 | vV|iewScale|
|00004df0| 50 65 72 63 65 6e 74 61 | 67 65 44 65 66 61 75 6c |Percenta|geDefaul|
|00004e00| 74 3b 0d 20 20 20 20 76 | 68 57 69 6e 64 6f 77 52 |t;. v|hWindowR|
|00004e10| 65 6c 61 74 65 64 49 6e | 66 6f 5e 5e 2e 72 55 73 |elatedIn|fo^^.rUs|
|00004e20| 65 50 72 69 6e 74 65 72 | 53 70 61 63 69 6e 67 20 |ePrinter|Spacing |
|00004e30| 3a 3d 20 76 53 65 74 74 | 69 6e 67 73 55 73 65 50 |:= vSett|ingsUseP|
|00004e40| 72 69 6e 74 65 72 53 70 | 61 63 69 6e 67 3b 0d 20 |rinterSp|acing;. |
|00004e50| 20 20 20 76 68 57 69 6e | 64 6f 77 52 65 6c 61 74 | vhWin|dowRelat|
|00004e60| 65 64 49 6e 66 6f 5e 5e | 2e 72 44 69 73 61 62 6c |edInfo^^|.rDisabl|
|00004e70| 65 46 6f 6e 74 53 63 61 | 6c 69 6e 67 20 3a 3d 20 |eFontSca|ling := |
|00004e80| 76 53 65 74 74 69 6e 67 | 73 44 69 73 61 62 6c 65 |vSetting|sDisable|
|00004e90| 46 6f 6e 74 53 63 61 6c | 69 6e 67 3b 0d 20 20 20 |FontScal|ing;. |
|00004ea0| 20 76 68 57 69 6e 64 6f | 77 52 65 6c 61 74 65 64 | vhWindo|wRelated|
|00004eb0| 49 6e 66 6f 5e 5e 2e 72 | 50 61 67 65 4e 75 6d 62 |Info^^.r|PageNumb|
|00004ec0| 65 72 20 3a 3d 20 31 3b | 0d 20 20 20 20 0d 20 20 |er := 1;|. . |
|00004ed0| 20 20 7b 20 53 65 74 20 | 66 69 6c 65 20 6e 61 6d | { Set |file nam|
|00004ee0| 65 20 65 74 63 2e 2c 20 | 72 65 61 64 20 73 70 6f |e etc., |read spo|
|00004ef0| 6f 6c 20 66 69 6c 65 20 | 68 65 61 64 65 72 2e 20 |ol file |header. |
|00004f00| 7d 0d 20 20 20 20 76 68 | 57 69 6e 64 6f 77 52 65 |}. vh|WindowRe|
|00004f10| 6c 61 74 65 64 49 6e 66 | 6f 5e 5e 2e 72 53 46 52 |latedInf|o^^.rSFR|
|00004f20| 65 70 6c 79 20 3a 3d 20 | 76 53 46 52 65 70 6c 79 |eply := |vSFReply|
|00004f30| 3b 0d 20 20 20 20 77 69 | 6e 64 6f 77 52 65 6c 61 |;. wi|ndowRela|
|00004f40| 74 65 64 49 6e 66 6f 53 | 75 63 63 65 73 73 66 75 |tedInfoS|uccessfu|
|00004f50| 6c 6c 79 52 65 61 64 20 | 3a 3d 20 46 61 6c 73 65 |llyRead |:= False|
|00004f60| 3b 0d 20 20 20 20 48 4c | 6f 63 6b 28 48 61 6e 64 |;. HL|ock(Hand|
|00004f70| 6c 65 28 76 68 57 69 6e | 64 6f 77 52 65 6c 61 74 |le(vhWin|dowRelat|
|00004f80| 65 64 49 6e 66 6f 29 29 | 3b 0d 20 20 20 20 57 49 |edInfo))|;. WI|
|00004f90| 54 48 20 76 68 57 69 6e | 64 6f 77 52 65 6c 61 74 |TH vhWin|dowRelat|
|00004fa0| 65 64 49 6e 66 6f 5e 5e | 2e 72 53 46 52 65 70 6c |edInfo^^|.rSFRepl|
|00004fb0| 79 20 44 4f 0d 20 20 20 | 20 20 20 42 45 47 49 4e |y DO. | BEGIN|
|00004fc0| 0d 20 20 20 20 20 20 20 | 20 72 65 74 43 6f 64 65 |. | retCode|
|00004fd0| 20 3a 3d 20 46 53 4f 70 | 65 6e 28 66 4e 61 6d 65 | := FSOp|en(fName|
|00004fe0| 2c 20 76 52 65 66 4e 75 | 6d 2c 20 66 69 6c 65 52 |, vRefNu|m, fileR|
|00004ff0| 65 66 4e 75 6d 29 3b 0d | 20 20 20 20 20 20 20 20 |efNum);.| |
|00005000| 49 46 20 72 65 74 43 6f | 64 65 20 3d 20 6e 6f 45 |IF retCo|de = noE|
|00005010| 72 72 20 54 48 45 4e 0d | 20 20 20 20 20 20 20 20 |rr THEN.| |
|00005020| 20 20 42 45 47 49 4e 0d | 20 20 20 20 20 20 20 20 | BEGIN.| |
|00005030| 20 20 20 20 7b 20 52 65 | 61 64 20 70 72 69 6e 74 | { Re|ad print|
|00005040| 20 66 69 6c 65 20 68 65 | 61 64 65 72 20 66 72 6f | file he|ader fro|
|00005050| 6d 20 73 74 61 72 74 20 | 6f 66 20 74 68 65 20 66 |m start |of the f|
|00005060| 69 6c 65 2e 20 7d 0d 20 | 20 20 20 20 20 20 20 20 |ile. }. | |
|00005070| 20 20 20 72 65 74 43 6f | 64 65 20 3a 3d 20 53 65 | retCo|de := Se|
|00005080| 74 46 50 6f 73 28 0d 20 | 20 20 20 20 20 20 20 20 |tFPos(. | |
|00005090| 20 20 20 20 20 66 69 6c | 65 52 65 66 4e 75 6d 2c | fil|eRefNum,|
|000050a0| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 66 |. | f|
|000050b0| 73 46 72 6f 6d 53 74 61 | 72 74 2c 0d 20 20 20 20 |sFromSta|rt,. |
|000050c0| 20 20 20 20 20 20 20 20 | 20 20 30 0d 20 20 20 20 | | 0. |
|000050d0| 20 20 20 20 20 20 20 20 | 29 3b 0d 20 20 20 20 20 | |);. |
|000050e0| 20 20 20 20 20 20 20 49 | 46 20 72 65 74 43 6f 64 | I|F retCod|
|000050f0| 65 20 3c 3e 20 6e 6f 45 | 72 72 20 54 48 45 4e 0d |e <> noE|rr THEN.|
|00005100| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 42 45 | | BE|
|00005110| 47 49 4e 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |GIN. | |
|00005120| 20 20 20 20 70 46 69 6c | 65 45 72 72 6f 72 41 6c | pFil|eErrorAl|
|00005130| 65 72 74 28 63 41 6c 65 | 72 74 46 69 6c 65 45 72 |ert(cAle|rtFileEr|
|00005140| 72 6f 72 2c 20 72 65 74 | 43 6f 64 65 2c 20 66 4e |ror, ret|Code, fN|
|00005150| 61 6d 65 29 3b 0d 20 20 | 20 20 20 20 20 20 20 20 |ame);. | |
|00005160| 20 20 20 20 20 20 47 4f | 54 4f 20 63 6c 6f 73 65 | GO|TO close|
|00005170| 46 69 6c 65 3b 0d 20 20 | 20 20 20 20 20 20 20 20 |File;. | |
|00005180| 20 20 20 20 45 4e 44 3b | 0d 20 20 20 20 20 20 20 | END;|. |
|00005190| 20 20 20 20 20 20 20 0d | 20 20 20 20 20 20 20 20 | .| |
|000051a0| 20 20 20 20 6e 75 6d 62 | 65 72 4f 66 42 79 74 65 | numb|erOfByte|
|000051b0| 73 20 3a 3d 20 53 69 7a | 65 6f 66 28 54 50 66 48 |s := Siz|eof(TPfH|
|000051c0| 65 61 64 65 72 29 3b 0d | 20 20 20 20 20 20 20 20 |eader);.| |
|000051d0| 20 20 20 20 72 65 74 43 | 6f 64 65 20 3a 3d 20 46 | retC|ode := F|
|000051e0| 53 52 65 61 64 28 0d 20 | 20 20 20 20 20 20 20 20 |SRead(. | |
|000051f0| 20 20 20 20 20 66 69 6c | 65 52 65 66 4e 75 6d 2c | fil|eRefNum,|
|00005200| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 6e |. | n|
|00005210| 75 6d 62 65 72 4f 66 42 | 79 74 65 73 2c 0d 20 20 |umberOfB|ytes,. |
|00005220| 20 20 20 20 20 20 20 20 | 20 20 20 20 50 74 72 28 | | Ptr(|
|00005230| 76 68 57 69 6e 64 6f 77 | 52 65 6c 61 74 65 64 49 |vhWindow|RelatedI|
|00005240| 6e 66 6f 5e 29 0d 20 20 | 20 20 20 20 20 20 20 20 |nfo^). | |
|00005250| 20 20 29 3b 0d 20 20 20 | 20 20 20 20 20 20 20 20 | );. | |
|00005260| 20 49 46 20 72 65 74 43 | 6f 64 65 20 3c 3e 20 6e | IF retC|ode <> n|
|00005270| 6f 45 72 72 20 54 48 45 | 4e 0d 20 20 20 20 20 20 |oErr THE|N. |
|00005280| 20 20 20 20 20 20 20 20 | 42 45 47 49 4e 0d 20 20 | |BEGIN. |
|00005290| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 70 46 | | pF|
|000052a0| 69 6c 65 45 72 72 6f 72 | 41 6c 65 72 74 28 63 41 |ileError|Alert(cA|
|000052b0| 6c 65 72 74 46 69 6c 65 | 45 72 72 6f 72 2c 20 72 |lertFile|Error, r|
|000052c0| 65 74 43 6f 64 65 2c 20 | 66 4e 61 6d 65 29 3b 0d |etCode, |fName);.|
|000052d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000052e0| 47 4f 54 4f 20 63 6c 6f | 73 65 46 69 6c 65 3b 0d |GOTO clo|seFile;.|
|000052f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 45 4e | | EN|
|00005300| 44 3b 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 77 |D;. | w|
|00005310| 69 6e 64 6f 77 52 65 6c | 61 74 65 64 49 6e 66 6f |indowRel|atedInfo|
|00005320| 53 75 63 63 65 73 73 66 | 75 6c 6c 79 52 65 61 64 |Successf|ullyRead|
|00005330| 20 3a 3d 20 54 72 75 65 | 3b 0d 20 20 20 20 20 20 | := True|;. |
|00005340| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005350| 20 20 20 20 0d 20 20 20 | 20 20 20 20 20 20 20 63 | . | c|
|00005360| 6c 6f 73 65 46 69 6c 65 | 3a 0d 20 20 20 20 20 20 |loseFile|:. |
|00005370| 20 20 20 20 20 20 72 65 | 74 43 6f 64 65 20 3a 3d | re|tCode :=|
|00005380| 20 46 53 43 6c 6f 73 65 | 28 66 69 6c 65 52 65 66 | FSClose|(fileRef|
|00005390| 4e 75 6d 29 3b 0d 20 20 | 20 20 20 20 20 20 20 20 |Num);. | |
|000053a0| 45 4e 44 0d 20 20 20 20 | 20 20 20 20 45 4c 53 45 |END. | ELSE|
|000053b0| 0d 20 20 20 20 20 20 20 | 20 20 20 42 45 47 49 4e |. | BEGIN|
|000053c0| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 70 46 69 |. | pFi|
|000053d0| 6c 65 45 72 72 6f 72 41 | 6c 65 72 74 28 63 41 6c |leErrorA|lert(cAl|
|000053e0| 65 72 74 46 69 6c 65 45 | 72 72 6f 72 2c 20 72 65 |ertFileE|rror, re|
|000053f0| 74 43 6f 64 65 2c 20 66 | 4e 61 6d 65 29 3b 0d 20 |tCode, f|Name);. |
|00005400| 20 20 20 20 20 20 20 20 | 20 45 4e 44 3b 0d 20 20 | | END;. |
|00005410| 20 20 20 20 45 4e 44 3b | 20 20 7b 57 49 54 48 7d | END;| {WITH}|
|00005420| 0d 20 20 20 20 0d 20 20 | 20 20 49 46 20 4e 4f 54 |. . | IF NOT|
|00005430| 20 77 69 6e 64 6f 77 52 | 65 6c 61 74 65 64 49 6e | windowR|elatedIn|
|00005440| 66 6f 53 75 63 63 65 73 | 73 66 75 6c 6c 79 52 65 |foSucces|sfullyRe|
|00005450| 61 64 20 54 48 45 4e 0d | 20 20 20 20 20 20 42 45 |ad THEN.| BE|
|00005460| 47 49 4e 0d 20 20 20 20 | 20 20 20 20 7b 20 4e 6f |GIN. | { No|
|00005470| 20 6e 65 65 64 20 74 6f | 20 64 69 73 70 6f 73 65 | need to| dispose|
|00005480| 20 63 6f 6e 74 72 6f 6c | 73 20 63 72 65 61 74 65 | control|s create|
|00005490| 64 20 74 68 69 73 20 66 | 61 72 20 28 49 4d 20 49 |d this f|ar (IM I|
|000054a0| 2d 33 32 31 29 2e 20 7d | 0d 20 20 20 20 20 20 20 |-321). }|. |
|000054b0| 20 44 69 73 70 6f 73 48 | 61 6e 64 6c 65 28 48 61 | DisposH|andle(Ha|
|000054c0| 6e 64 6c 65 28 76 68 57 | 69 6e 64 6f 77 52 65 6c |ndle(vhW|indowRel|
|000054d0| 61 74 65 64 49 6e 66 6f | 29 29 3b 0d 20 20 20 20 |atedInfo|));. |
|000054e0| 20 20 20 20 44 69 73 70 | 6f 73 65 57 69 6e 64 6f | Disp|oseWindo|
|000054f0| 77 28 74 68 65 57 69 6e | 64 6f 77 29 3b 0d 20 20 |w(theWin|dow);. |
|00005500| 20 20 20 20 20 20 66 43 | 72 65 61 74 65 57 69 6e | fC|reateWin|
|00005510| 64 6f 77 20 3a 3d 20 46 | 61 6c 73 65 3b 0d 20 20 |dow := F|alse;. |
|00005520| 20 20 20 20 20 20 45 78 | 69 74 3b 0d 20 20 20 20 | Ex|it;. |
|00005530| 20 20 45 4e 44 3b 0d 0d | 20 20 20 20 7b 20 51 75 | END;..| { Qu|
|00005540| 69 74 65 20 61 20 73 75 | 72 70 72 69 73 69 6e 67 |ite a su|rprising|
|00005550| 20 70 6c 61 63 65 20 74 | 6f 20 73 65 74 20 64 6f | place t|o set do|
|00005560| 63 75 6d 65 6e 74 20 73 | 69 7a 65 73 20 66 6f 72 |cument s|izes for|
|00005570| 20 61 6c 6c 20 64 69 66 | 66 65 72 65 6e 74 20 7d | all dif|ferent }|
|00005580| 0d 20 20 20 20 7b 20 76 | 69 65 77 69 6e 67 20 61 |. { v|iewing a|
|00005590| 6c 74 65 72 6e 61 74 69 | 76 65 73 20 28 63 75 72 |lternati|ves (cur|
|000055a0| 72 65 6e 74 6c 79 20 63 | 56 69 65 77 49 6e 66 6f |rently c|ViewInfo|
|000055b0| 72 6d 61 74 69 6f 6e 2f | 63 56 69 65 77 43 6f 6e |rmation/|cViewCon|
|000055c0| 74 65 6e 74 73 29 2e 20 | 7d 0d 20 20 20 20 57 49 |tents). |}. WI|
|000055d0| 54 48 20 76 68 57 69 6e | 64 6f 77 52 65 6c 61 74 |TH vhWin|dowRelat|
|000055e0| 65 64 49 6e 66 6f 5e 5e | 20 44 4f 0d 20 20 20 20 |edInfo^^| DO. |
|000055f0| 20 20 42 45 47 49 4e 0d | 20 20 20 20 20 20 20 20 | BEGIN.| |
|00005600| 7b 20 49 6e 66 6f 20 77 | 69 6c 6c 20 72 65 71 75 |{ Info w|ill requ|
|00005610| 69 72 65 20 61 73 20 6d | 75 63 68 20 73 70 61 63 |ire as m|uch spac|
|00005620| 65 20 61 73 20 74 68 65 | 20 69 6e 69 74 69 61 6c |e as the| initial|
|00005630| 20 77 69 6e 64 6f 77 20 | 69 73 2e 20 7d 0d 20 20 | window |is. }. |
|00005640| 20 20 20 20 20 20 70 43 | 61 6c 63 44 6f 63 75 6d | pC|alcDocum|
|00005650| 65 6e 74 52 65 63 74 28 | 74 68 65 57 69 6e 64 6f |entRect(|theWindo|
|00005660| 77 2c 20 72 56 69 65 77 | 53 69 7a 65 5b 63 56 69 |w, rView|Size[cVi|
|00005670| 65 77 49 6e 66 6f 72 6d | 61 74 69 6f 6e 5d 29 3b |ewInform|ation]);|
|00005680| 0d 20 20 20 20 20 20 20 | 20 72 56 69 65 77 53 69 |. | rViewSi|
|00005690| 7a 65 5b 63 56 69 65 77 | 49 6e 66 6f 72 6d 61 74 |ze[cView|Informat|
|000056a0| 69 6f 6e 5d 2e 62 6f 74 | 74 6f 6d 20 3a 3d 0d 20 |ion].bot|tom :=. |
|000056b0| 20 20 20 20 20 20 20 20 | 20 72 56 69 65 77 53 69 | | rViewSi|
|000056c0| 7a 65 5b 63 56 69 65 77 | 49 6e 66 6f 72 6d 61 74 |ze[cView|Informat|
|000056d0| 69 6f 6e 5d 2e 62 6f 74 | 74 6f 6d 20 2d 20 32 2a |ion].bot|tom - 2*|
|000056e0| 63 4e 75 6d 62 65 72 4f | 66 50 69 78 65 6c 73 41 |cNumberO|fPixelsA|
|000056f0| 72 6f 75 6e 64 50 61 67 | 65 3b 0d 20 20 20 20 20 |roundPag|e;. |
|00005700| 20 20 20 72 56 69 65 77 | 53 69 7a 65 5b 63 56 69 | rView|Size[cVi|
|00005710| 65 77 49 6e 66 6f 72 6d | 61 74 69 6f 6e 5d 2e 72 |ewInform|ation].r|
|00005720| 69 67 68 74 20 3a 3d 0d | 20 20 20 20 20 20 20 20 |ight :=.| |
|00005730| 20 20 72 56 69 65 77 53 | 69 7a 65 5b 63 56 69 65 | rViewS|ize[cVie|
|00005740| 77 49 6e 66 6f 72 6d 61 | 74 69 6f 6e 5d 2e 72 69 |wInforma|tion].ri|
|00005750| 67 68 74 20 2d 20 32 2a | 63 4e 75 6d 62 65 72 4f |ght - 2*|cNumberO|
|00005760| 66 50 69 78 65 6c 73 41 | 72 6f 75 6e 64 50 61 67 |fPixelsA|roundPag|
|00005770| 65 3b 0d 20 20 20 20 20 | 20 20 20 0d 20 20 20 20 |e;. | . |
|00005780| 20 20 20 20 7b 20 43 6f | 6e 74 65 6e 74 73 20 61 | { Co|ntents a|
|00005790| 63 63 6f 72 64 69 6e 67 | 20 74 6f 20 70 61 67 65 |ccording| to page|
|000057a0| 20 72 65 63 74 20 77 68 | 65 6e 20 73 70 6f 6f 6c | rect wh|en spool|
|000057b0| 20 66 69 6c 65 20 63 72 | 65 61 74 65 64 2e 20 7d | file cr|eated. }|
|000057c0| 0d 20 20 20 20 20 20 20 | 20 72 4f 72 69 67 69 6e |. | rOrigin|
|000057d0| 61 6c 50 61 67 65 52 65 | 63 74 20 3a 3d 20 72 53 |alPageRe|ct := rS|
|000057e0| 70 6f 6f 6c 46 69 6c 65 | 48 65 61 64 65 72 2e 50 |poolFile|Header.P|
|000057f0| 72 69 6e 74 2e 50 72 49 | 6e 66 6f 2e 72 50 61 67 |rint.PrI|nfo.rPag|
|00005800| 65 3b 0d 20 20 20 20 20 | 20 20 20 70 43 61 6c 63 |e;. | pCalc|
|00005810| 53 63 61 6c 65 64 50 61 | 67 65 44 72 61 77 69 6e |ScaledPa|geDrawin|
|00005820| 67 52 65 63 74 28 76 68 | 57 69 6e 64 6f 77 52 65 |gRect(vh|WindowRe|
|00005830| 6c 61 74 65 64 49 6e 66 | 6f 29 3b 20 20 7b 63 68 |latedInf|o); {ch|
|00005840| 61 6e 67 65 73 20 72 56 | 69 65 77 53 69 7a 65 5b |anges rV|iewSize[|
|00005850| 63 56 69 65 77 43 6f 6e | 74 65 6e 74 73 5d 7d 0d |cViewCon|tents]}.|
|00005860| 20 20 20 20 20 20 20 20 | 70 53 65 74 53 63 72 6f | |pSetScro|
|00005870| 6c 6c 42 61 72 4c 69 6d | 69 74 73 28 74 68 65 57 |llBarLim|its(theW|
|00005880| 69 6e 64 6f 77 29 3b 0d | 20 20 20 20 20 20 20 20 |indow);.| |
|00005890| 53 65 74 43 74 6c 56 61 | 6c 75 65 28 72 56 65 72 |SetCtlVa|lue(rVer|
|000058a0| 74 69 63 61 6c 53 63 72 | 6f 6c 6c 43 6f 6e 74 72 |ticalScr|ollContr|
|000058b0| 6f 6c 2c 20 2d 63 4e 75 | 6d 62 65 72 4f 66 50 69 |ol, -cNu|mberOfPi|
|000058c0| 78 65 6c 73 41 72 6f 75 | 6e 64 50 61 67 65 29 3b |xelsArou|ndPage);|
|000058d0| 20 20 7b 74 6f 70 7d 0d | 20 20 20 20 20 20 20 20 | {top}.| |
|000058e0| 53 65 74 43 74 6c 56 61 | 6c 75 65 28 72 48 6f 72 |SetCtlVa|lue(rHor|
|000058f0| 69 7a 6f 6e 74 61 6c 53 | 63 72 6f 6c 6c 43 6f 6e |izontalS|crollCon|
|00005900| 74 72 6f 6c 2c 20 2d 63 | 4e 75 6d 62 65 72 4f 66 |trol, -c|NumberOf|
|00005910| 50 69 78 65 6c 73 41 72 | 6f 75 6e 64 50 61 67 65 |PixelsAr|oundPage|
|00005920| 29 3b 20 20 7b 6c 65 66 | 74 7d 0d 20 20 20 20 20 |); {lef|t}. |
|00005930| 20 45 4e 44 3b 20 20 7b | 57 49 54 48 7d 0d 20 20 | END; {|WITH}. |
|00005940| 20 20 0d 20 20 20 20 48 | 55 6e 6c 6f 63 6b 28 48 | . H|Unlock(H|
|00005950| 61 6e 64 6c 65 28 76 68 | 57 69 6e 64 6f 77 52 65 |andle(vh|WindowRe|
|00005960| 6c 61 74 65 64 49 6e 66 | 6f 29 29 3b 0d 20 20 20 |latedInf|o));. |
|00005970| 20 0d 20 20 20 20 70 52 | 65 74 69 74 6c 65 57 69 | . pR|etitleWi|
|00005980| 6e 64 6f 77 28 74 68 65 | 57 69 6e 64 6f 77 29 3b |ndow(the|Window);|
|00005990| 0d 20 20 20 20 20 20 20 | 20 0d 20 20 20 20 53 65 |. | . Se|
|000059a0| 6c 65 63 74 57 69 6e 64 | 6f 77 28 74 68 65 57 69 |lectWind|ow(theWi|
|000059b0| 6e 64 6f 77 29 3b 0d 20 | 20 20 20 53 68 6f 77 57 |ndow);. | ShowW|
|000059c0| 69 6e 64 6f 77 28 74 68 | 65 57 69 6e 64 6f 77 29 |indow(th|eWindow)|
|000059d0| 3b 0d 20 20 20 20 0d 20 | 20 20 20 49 46 20 76 4e |;. . | IF vN|
|000059e0| 75 6d 62 65 72 4f 66 4f | 75 72 4f 70 65 6e 57 69 |umberOfO|urOpenWi|
|000059f0| 6e 64 6f 77 73 20 3c 3d | 20 30 20 54 48 45 4e 0d |ndows <=| 0 THEN.|
|00005a00| 20 20 20 20 20 20 70 4d | 65 6e 75 73 54 6f 53 74 | pM|enusToSt|
|00005a10| 61 74 65 28 65 41 74 4c | 65 61 73 74 4f 6e 65 4f |ate(eAtL|eastOneO|
|00005a20| 75 72 57 69 6e 64 6f 77 | 4f 70 65 6e 29 3b 0d 20 |urWindow|Open);. |
|00005a30| 20 20 20 76 4e 75 6d 62 | 65 72 4f 66 4f 75 72 4f | vNumb|erOfOurO|
|00005a40| 70 65 6e 57 69 6e 64 6f | 77 73 20 3a 3d 20 76 4e |penWindo|ws := vN|
|00005a50| 75 6d 62 65 72 4f 66 4f | 75 72 4f 70 65 6e 57 69 |umberOfO|urOpenWi|
|00005a60| 6e 64 6f 77 73 20 2b 20 | 31 3b 0d 20 20 20 20 66 |ndows + |1;. f|
|00005a70| 43 72 65 61 74 65 57 69 | 6e 64 6f 77 20 3a 3d 20 |CreateWi|ndow := |
|00005a80| 77 69 6e 64 6f 77 52 65 | 6c 61 74 65 64 49 6e 66 |windowRe|latedInf|
|00005a90| 6f 53 75 63 63 65 73 73 | 66 75 6c 6c 79 52 65 61 |oSuccess|fullyRea|
|00005aa0| 64 3b 0d 20 20 45 4e 44 | 3b 20 20 7b 66 43 72 65 |d;. END|; {fCre|
|00005ab0| 61 74 65 57 69 6e 64 6f | 77 7d 0d 20 20 0d 20 20 |ateWindo|w}. . |
|00005ac0| 0d 20 20 50 52 4f 43 45 | 44 55 52 45 20 70 44 69 |. PROCE|DURE pDi|
|00005ad0| 73 70 6f 73 65 41 6c 6c | 53 74 72 75 63 74 75 72 |sposeAll|Structur|
|00005ae0| 65 73 52 65 6c 61 74 65 | 64 54 6f 54 68 69 73 57 |esRelate|dToThisW|
|00005af0| 69 6e 64 6f 77 28 74 68 | 65 57 69 6e 64 6f 77 3a |indow(th|eWindow:|
|00005b00| 20 57 69 6e 64 6f 77 50 | 74 72 29 3b 0d 20 20 20 | WindowP|tr);. |
|00005b10| 20 56 41 52 0d 20 20 20 | 20 20 20 76 68 57 69 6e | VAR. | vhWin|
|00005b20| 64 6f 77 52 65 6c 61 74 | 65 64 49 6e 66 6f 3a 20 |dowRelat|edInfo: |
|00005b30| 74 68 57 69 6e 64 6f 77 | 52 65 6c 61 74 65 64 49 |thWindow|RelatedI|
|00005b40| 6e 66 6f 3b 0d 20 20 42 | 45 47 49 4e 0d 20 20 20 |nfo;. B|EGIN. |
|00005b50| 20 76 68 57 69 6e 64 6f | 77 52 65 6c 61 74 65 64 | vhWindo|wRelated|
|00005b60| 49 6e 66 6f 20 3a 3d 20 | 74 68 57 69 6e 64 6f 77 |Info := |thWindow|
|00005b70| 52 65 6c 61 74 65 64 49 | 6e 66 6f 28 47 65 74 57 |RelatedI|nfo(GetW|
|00005b80| 52 65 66 43 6f 6e 28 74 | 68 65 57 69 6e 64 6f 77 |RefCon(t|heWindow|
|00005b90| 29 29 3b 0d 20 20 20 20 | 49 46 20 76 68 57 69 6e |));. |IF vhWin|
|00005ba0| 64 6f 77 52 65 6c 61 74 | 65 64 49 6e 66 6f 20 3c |dowRelat|edInfo <|
|00005bb0| 3e 20 4e 49 4c 20 54 48 | 45 4e 0d 20 20 20 20 20 |> NIL TH|EN. |
|00005bc0| 20 49 46 20 47 65 74 48 | 61 6e 64 6c 65 53 69 7a | IF GetH|andleSiz|
|00005bd0| 65 28 48 61 6e 64 6c 65 | 28 76 68 57 69 6e 64 6f |e(Handle|(vhWindo|
|00005be0| 77 52 65 6c 61 74 65 64 | 49 6e 66 6f 29 29 20 3d |wRelated|Info)) =|
|00005bf0| 20 53 69 7a 65 6f 66 28 | 74 57 69 6e 64 6f 77 52 | Sizeof(|tWindowR|
|00005c00| 65 6c 61 74 65 64 49 6e | 66 6f 29 20 54 48 45 4e |elatedIn|fo) THEN|
|00005c10| 0d 20 20 20 20 20 20 20 | 20 42 45 47 49 4e 0d 20 |. | BEGIN. |
|00005c20| 20 20 20 20 20 20 20 20 | 20 44 69 73 70 6f 73 48 | | DisposH|
|00005c30| 61 6e 64 6c 65 28 48 61 | 6e 64 6c 65 28 76 68 57 |andle(Ha|ndle(vhW|
|00005c40| 69 6e 64 6f 77 52 65 6c | 61 74 65 64 49 6e 66 6f |indowRel|atedInfo|
|00005c50| 29 29 3b 0d 20 20 20 20 | 20 20 20 20 20 20 44 69 |));. | Di|
|00005c60| 73 70 6f 73 65 57 69 6e | 64 6f 77 28 74 68 65 57 |sposeWin|dow(theW|
|00005c70| 69 6e 64 6f 77 29 3b 0d | 20 20 20 20 20 20 20 20 |indow);.| |
|00005c80| 20 20 7b 20 44 69 73 70 | 6f 73 65 57 69 6e 64 6f | { Disp|oseWindo|
|00005c90| 77 20 77 69 6c 6c 20 4b | 69 6c 6c 43 6f 6e 74 72 |w will K|illContr|
|00005ca0| 6f 6c 73 20 28 49 4d 20 | 49 2d 33 32 31 29 2e 7d |ols (IM |I-321).}|
|00005cb0| 0d 20 20 20 20 20 20 20 | 20 45 4e 44 3b 0d 20 20 |. | END;. |
|00005cc0| 45 4e 44 3b 20 20 7b 70 | 44 69 73 70 6f 73 65 41 |END; {p|DisposeA|
|00005cd0| 6c 6c 53 74 72 75 63 74 | 75 72 65 73 52 65 6c 61 |llStruct|uresRela|
|00005ce0| 74 65 64 54 6f 54 68 69 | 73 57 69 6e 64 6f 77 7d |tedToThi|sWindow}|
|00005cf0| 0d 0d 0d 20 20 50 52 4f | 43 45 44 55 52 45 20 70 |... PRO|CEDURE p|
|00005d00| 44 69 73 70 6f 73 65 41 | 6c 6c 53 74 72 75 63 74 |DisposeA|llStruct|
|00005d10| 75 72 65 73 52 65 6c 61 | 74 65 64 54 6f 43 75 72 |uresRela|tedToCur|
|00005d20| 72 65 6e 74 57 69 6e 64 | 6f 77 3b 0d 20 20 20 20 |rentWind|ow;. |
|00005d30| 56 41 52 0d 20 20 20 20 | 20 20 74 68 65 57 69 6e |VAR. | theWin|
|00005d40| 64 6f 77 3a 20 57 69 6e | 64 6f 77 50 74 72 3b 0d |dow: Win|dowPtr;.|
|00005d50| 20 20 42 45 47 49 4e 0d | 20 20 20 20 47 65 74 50 | BEGIN.| GetP|
|00005d60| 6f 72 74 28 74 68 65 57 | 69 6e 64 6f 77 29 3b 20 |ort(theW|indow); |
|00005d70| 20 7b 54 72 61 6e 73 53 | 6b 65 6c 20 6d 61 6b 65 | {TransS|kel make|
|00005d80| 73 20 74 68 65 20 77 69 | 6e 64 6f 77 20 74 6f 20 |s the wi|ndow to |
|00005d90| 62 65 20 64 65 6c 65 74 | 65 64 20 63 75 72 72 65 |be delet|ed curre|
|00005da0| 6e 74 2e 7d 0d 20 20 20 | 20 70 44 69 73 70 6f 73 |nt.}. | pDispos|
|00005db0| 65 41 6c 6c 53 74 72 75 | 63 74 75 72 65 73 52 65 |eAllStru|cturesRe|
|00005dc0| 6c 61 74 65 64 54 6f 54 | 68 69 73 57 69 6e 64 6f |latedToT|hisWindo|
|00005dd0| 77 28 74 68 65 57 69 6e | 64 6f 77 29 3b 0d 20 20 |w(theWin|dow);. |
|00005de0| 45 4e 44 3b 20 20 7b 70 | 44 69 73 70 6f 73 65 41 |END; {p|DisposeA|
|00005df0| 6c 6c 53 74 72 75 63 74 | 75 72 65 73 52 65 6c 61 |llStruct|uresRela|
|00005e00| 74 65 64 54 6f 43 75 72 | 72 65 6e 74 57 69 6e 64 |tedToCur|rentWind|
|00005e10| 6f 77 7d 0d 0d 0d 20 20 | 50 52 4f 43 45 44 55 52 |ow}... |PROCEDUR|
|00005e20| 45 20 70 49 6e 76 61 6c | 69 64 61 74 65 41 6c 6c |E pInval|idateAll|
|00005e30| 4f 66 57 69 6e 64 6f 77 | 28 74 68 65 57 69 6e 64 |OfWindow|(theWind|
|00005e40| 6f 77 3a 20 57 69 6e 64 | 6f 77 50 74 72 29 3b 0d |ow: Wind|owPtr);.|
|00005e50| 20 20 20 20 56 41 52 0d | 20 20 20 20 20 20 73 61 | VAR.| sa|
|00005e60| 76 65 50 6f 72 74 3a 20 | 47 72 61 66 50 74 72 3b |vePort: |GrafPtr;|
|00005e70| 0d 20 20 20 20 20 20 63 | 6f 6e 74 65 6e 74 52 65 |. c|ontentRe|
|00005e80| 67 69 6f 6e 49 6e 4c 6f | 63 61 6c 43 6f 6f 72 64 |gionInLo|calCoord|
|00005e90| 69 6e 61 74 65 73 3a 20 | 52 67 6e 48 61 6e 64 6c |inates: |RgnHandl|
|00005ea0| 65 3b 0d 20 20 42 45 47 | 49 4e 0d 20 20 20 20 47 |e;. BEG|IN. G|
|00005eb0| 65 74 50 6f 72 74 28 73 | 61 76 65 50 6f 72 74 29 |etPort(s|avePort)|
|00005ec0| 3b 0d 20 20 20 20 53 65 | 74 50 6f 72 74 28 74 68 |;. Se|tPort(th|
|00005ed0| 65 57 69 6e 64 6f 77 29 | 3b 0d 20 20 20 20 63 6f |eWindow)|;. co|
|00005ee0| 6e 74 65 6e 74 52 65 67 | 69 6f 6e 49 6e 4c 6f 63 |ntentReg|ionInLoc|
|00005ef0| 61 6c 43 6f 6f 72 64 69 | 6e 61 74 65 73 20 3a 3d |alCoordi|nates :=|
|00005f00| 20 4e 65 77 52 67 6e 3b | 0d 20 20 20 20 43 6f 70 | NewRgn;|. Cop|
|00005f10| 79 52 67 6e 28 57 69 6e | 64 6f 77 50 65 65 6b 28 |yRgn(Win|dowPeek(|
|00005f20| 74 68 65 57 69 6e 64 6f | 77 29 5e 2e 63 6f 6e 74 |theWindo|w)^.cont|
|00005f30| 52 67 6e 2c 20 63 6f 6e | 74 65 6e 74 52 65 67 69 |Rgn, con|tentRegi|
|00005f40| 6f 6e 49 6e 4c 6f 63 61 | 6c 43 6f 6f 72 64 69 6e |onInLoca|lCoordin|
|00005f50| 61 74 65 73 29 3b 0d 20 | 20 20 20 4f 66 66 73 65 |ates);. | Offse|
|00005f60| 74 52 67 6e 28 63 6f 6e | 74 65 6e 74 52 65 67 69 |tRgn(con|tentRegi|
|00005f70| 6f 6e 49 6e 4c 6f 63 61 | 6c 43 6f 6f 72 64 69 6e |onInLoca|lCoordin|
|00005f80| 61 74 65 73 2c 0d 20 20 | 20 20 20 20 74 68 65 57 |ates,. | theW|
|00005f90| 69 6e 64 6f 77 5e 2e 70 | 6f 72 74 42 69 74 73 2e |indow^.p|ortBits.|
|00005fa0| 62 6f 75 6e 64 73 2e 6c | 65 66 74 2c 0d 20 20 20 |bounds.l|eft,. |
|00005fb0| 20 20 20 74 68 65 57 69 | 6e 64 6f 77 5e 2e 70 6f | theWi|ndow^.po|
|00005fc0| 72 74 42 69 74 73 2e 62 | 6f 75 6e 64 73 2e 74 6f |rtBits.b|ounds.to|
|00005fd0| 70 0d 20 20 20 20 29 3b | 0d 20 20 20 20 49 6e 76 |p. );|. Inv|
|00005fe0| 61 6c 52 67 6e 28 63 6f | 6e 74 65 6e 74 52 65 67 |alRgn(co|ntentReg|
|00005ff0| 69 6f 6e 49 6e 4c 6f 63 | 61 6c 43 6f 6f 72 64 69 |ionInLoc|alCoordi|
|00006000| 6e 61 74 65 73 29 3b 20 | 20 7b 6d 75 73 74 20 62 |nates); | {must b|
|00006010| 65 20 72 65 64 72 61 77 | 6e 7d 0d 20 20 20 20 44 |e redraw|n}. D|
|00006020| 69 73 70 6f 73 65 52 67 | 6e 28 63 6f 6e 74 65 6e |isposeRg|n(conten|
|00006030| 74 52 65 67 69 6f 6e 49 | 6e 4c 6f 63 61 6c 43 6f |tRegionI|nLocalCo|
|00006040| 6f 72 64 69 6e 61 74 65 | 73 29 3b 0d 20 20 20 20 |ordinate|s);. |
|00006050| 53 65 74 50 6f 72 74 28 | 73 61 76 65 50 6f 72 74 |SetPort(|savePort|
|00006060| 29 3b 0d 20 20 45 4e 44 | 3b 20 20 7b 70 49 6e 76 |);. END|; {pInv|
|00006070| 61 6c 69 64 61 74 65 41 | 6c 6c 4f 66 57 69 6e 64 |alidateA|llOfWind|
|00006080| 6f 77 7d 0d 20 20 0d 20 | 20 0d 20 20 50 52 4f 43 |ow}. . | . PROC|
|00006090| 45 44 55 52 45 20 70 4d | 6f 75 73 65 49 6e 57 69 |EDURE pM|ouseInWi|
|000060a0| 6e 64 6f 77 28 0d 20 20 | 20 20 74 68 65 50 6f 69 |ndow(. | thePoi|
|000060b0| 6e 74 3a 20 50 6f 69 6e | 74 3b 0d 20 20 20 20 74 |nt: Poin|t;. t|
|000060c0| 68 65 54 69 6d 65 3a 20 | 4c 6f 6e 67 69 6e 74 3b |heTime: |Longint;|
|000060d0| 0d 20 20 20 20 74 68 65 | 4d 6f 64 73 3a 20 49 6e |. the|Mods: In|
|000060e0| 74 65 67 65 72 0d 20 20 | 29 3b 0d 20 20 20 20 56 |teger. |);. V|
|000060f0| 41 52 0d 20 20 20 20 20 | 20 74 68 65 57 69 6e 64 |AR. | theWind|
|00006100| 6f 77 3a 20 57 69 6e 64 | 6f 77 50 74 72 3b 0d 20 |ow: Wind|owPtr;. |
|00006110| 20 20 20 20 20 74 68 65 | 43 6f 6e 74 72 6f 6c 3a | the|Control:|
|00006120| 20 43 6f 6e 74 72 6f 6c | 48 61 6e 64 6c 65 3b 0d | Control|Handle;.|
|00006130| 20 20 20 20 20 20 76 43 | 6f 6e 74 72 6f 6c 50 61 | vC|ontrolPa|
|00006140| 72 74 43 6f 64 65 3a 20 | 49 6e 74 65 67 65 72 3b |rtCode: |Integer;|
|00006150| 0d 20 20 20 20 20 20 76 | 4e 65 77 43 74 6c 56 61 |. v|NewCtlVa|
|00006160| 6c 75 65 2c 20 76 4f 6c | 64 43 74 6c 56 61 6c 75 |lue, vOl|dCtlValu|
|00006170| 65 3a 20 49 6e 74 65 67 | 65 72 3b 0d 20 20 20 20 |e: Integ|er;. |
|00006180| 20 20 76 68 57 69 6e 64 | 6f 77 52 65 6c 61 74 65 | vhWind|owRelate|
|00006190| 64 49 6e 66 6f 3a 20 74 | 68 57 69 6e 64 6f 77 52 |dInfo: t|hWindowR|
|000061a0| 65 6c 61 74 65 64 49 6e | 66 6f 3b 0d 20 20 42 45 |elatedIn|fo;. BE|
|000061b0| 47 49 4e 0d 20 20 20 20 | 47 65 74 50 6f 72 74 28 |GIN. |GetPort(|
|000061c0| 74 68 65 57 69 6e 64 6f | 77 29 3b 0d 20 20 20 20 |theWindo|w);. |
|000061d0| 76 43 6f 6e 74 72 6f 6c | 50 61 72 74 43 6f 64 65 |vControl|PartCode|
|000061e0| 20 3a 3d 20 46 69 6e 64 | 43 6f 6e 74 72 6f 6c 28 | := Find|Control(|
|000061f0| 74 68 65 50 6f 69 6e 74 | 2c 20 74 68 65 57 69 6e |thePoint|, theWin|
|00006200| 64 6f 77 2c 20 74 68 65 | 43 6f 6e 74 72 6f 6c 29 |dow, the|Control)|
|00006210| 3b 0d 20 20 20 20 49 46 | 20 76 43 6f 6e 74 72 6f |;. IF| vContro|
|00006220| 6c 50 61 72 74 43 6f 64 | 65 20 3d 20 30 20 54 48 |lPartCod|e = 0 TH|
|00006230| 45 4e 0d 20 20 20 20 20 | 20 45 78 69 74 3b 0d 20 |EN. | Exit;. |
|00006240| 20 20 20 0d 20 20 20 20 | 76 68 57 69 6e 64 6f 77 | . |vhWindow|
|00006250| 52 65 6c 61 74 65 64 49 | 6e 66 6f 20 3a 3d 20 74 |RelatedI|nfo := t|
|00006260| 68 57 69 6e 64 6f 77 52 | 65 6c 61 74 65 64 49 6e |hWindowR|elatedIn|
|00006270| 66 6f 28 47 65 74 57 52 | 65 66 43 6f 6e 28 74 68 |fo(GetWR|efCon(th|
|00006280| 65 57 69 6e 64 6f 77 29 | 29 3b 0d 20 20 20 20 49 |eWindow)|);. I|
|00006290| 46 20 76 43 6f 6e 74 72 | 6f 6c 50 61 72 74 43 6f |F vContr|olPartCo|
|000062a0| 64 65 20 3d 20 69 6e 54 | 68 75 6d 62 20 54 48 45 |de = inT|humb THE|
|000062b0| 4e 0d 20 20 20 20 20 20 | 42 45 47 49 4e 0d 20 20 |N. |BEGIN. |
|000062c0| 20 20 20 20 20 20 76 4f | 6c 64 43 74 6c 56 61 6c | vO|ldCtlVal|
|000062d0| 75 65 20 3a 3d 20 47 65 | 74 43 74 6c 56 61 6c 75 |ue := Ge|tCtlValu|
|000062e0| 65 28 74 68 65 43 6f 6e | 74 72 6f 6c 29 3b 0d 20 |e(theCon|trol);. |
|000062f0| 20 20 20 20 20 20 20 76 | 43 6f 6e 74 72 6f 6c 50 | v|ControlP|
|00006300| 61 72 74 43 6f 64 65 20 | 3a 3d 20 54 72 61 63 6b |artCode |:= Track|
|00006310| 43 6f 6e 74 72 6f 6c 28 | 74 68 65 43 6f 6e 74 72 |Control(|theContr|
|00006320| 6f 6c 2c 20 74 68 65 50 | 6f 69 6e 74 2c 20 4e 49 |ol, theP|oint, NI|
|00006330| 4c 29 3b 0d 20 20 20 20 | 20 20 20 20 49 46 20 74 |L);. | IF t|
|00006340| 68 65 43 6f 6e 74 72 6f | 6c 20 3d 20 76 68 57 69 |heContro|l = vhWi|
|00006350| 6e 64 6f 77 52 65 6c 61 | 74 65 64 49 6e 66 6f 5e |ndowRela|tedInfo^|
|00006360| 5e 2e 72 48 6f 72 69 7a | 6f 6e 74 61 6c 53 63 72 |^.rHoriz|ontalScr|
|00006370| 6f 6c 6c 43 6f 6e 74 72 | 6f 6c 20 54 48 45 4e 0d |ollContr|ol THEN.|
|00006380| 20 20 20 20 20 20 20 20 | 20 20 70 53 63 72 6f 6c | | pScrol|
|00006390| 6c 57 69 6e 64 6f 77 28 | 0d 20 20 20 20 20 20 20 |lWindow(|. |
|000063a0| 20 20 20 20 20 47 65 74 | 43 74 6c 56 61 6c 75 65 | Get|CtlValue|
|000063b0| 28 74 68 65 43 6f 6e 74 | 72 6f 6c 29 20 2d 20 76 |(theCont|rol) - v|
|000063c0| 4f 6c 64 43 74 6c 56 61 | 6c 75 65 2c 0d 20 20 20 |OldCtlVa|lue,. |
|000063d0| 20 20 20 20 20 20 20 20 | 20 30 2c 0d 20 20 20 20 | | 0,. |
|000063e0| 20 20 20 20 20 20 20 20 | 74 68 65 43 6f 6e 74 72 | |theContr|
|000063f0| 6f 6c 0d 20 20 20 20 20 | 20 20 20 20 20 29 0d 20 |ol. | ). |
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.