home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1998-12-01 | 16.0 KB | [TEXT/MSET] |
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: Scroller
Confidence | Program | Detection | Match Type | Support
|
---|
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Tue Dec 1 09:46:49 1998, modified Tue Dec 1 09:46:49 1998, creator 'MSET', type ASCII, 15812 bytes "Scroller" , at 0x3e44 381 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [MSET] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 08 53 63 72 6f 6c 6c | 65 72 00 00 00 00 00 00 |..Scroll|er......|
|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 4d 53 45 | 54 01 00 00 00 00 00 00 |.TEXTMSE|T.......|
|00000050| 00 00 00 00 00 3d c4 00 | 00 01 7d b2 89 b1 d9 b2 |.....=..|..}.....|
|00000060| 89 b1 d9 00 00 08 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 50 a6 00 00 |........|....P...|
|00000080| 5c 20 53 63 72 6f 6c 6c | 65 72 20 2d 20 76 69 65 |\ Scroll|er - vie|
|00000090| 77 20 77 68 69 63 68 20 | 73 75 70 70 6f 72 74 73 |w which |supports|
|000000a0| 20 73 63 72 6f 6c 6c 20 | 62 61 72 73 2e 0d 0d 5c | scroll |bars...\|
|000000b0| 20 4d 61 79 20 39 31 09 | 6d 72 68 09 41 64 64 65 | May 91.|mrh.Adde|
|000000c0| 64 20 68 6f 72 69 7a 6f | 6e 74 61 6c 20 73 63 72 |d horizo|ntal scr|
|000000d0| 6f 6c 6c 20 62 61 72 20 | 73 75 70 70 6f 72 74 2e |oll bar |support.|
|000000e0| 0d 5c 20 4f 63 74 20 39 | 31 09 6d 72 68 09 43 68 |.\ Oct 9|1.mrh.Ch|
|000000f0| 61 6e 67 65 64 20 6f 77 | 6e 65 72 20 66 72 6f 6d |anged ow|ner from|
|00000100| 20 57 69 6e 64 6f 77 20 | 74 6f 20 56 69 65 77 2e | Window |to View.|
|00000110| 20 20 52 65 70 6c 61 63 | 65 73 20 76 73 63 72 6f | Replac|es vscro|
|00000120| 6c 6c 20 0d 5c 20 4d 61 | 79 20 39 32 09 6d 72 68 |ll .\ Ma|y 92.mrh|
|00000130| 09 43 68 61 6e 67 65 64 | 20 74 6f 20 22 6e 65 77 |.Changed| to "new|
|00000140| 2d 73 74 79 6c 65 22 20 | 63 6f 6e 74 72 6f 6c 2e |-style" |control.|
|00000150| 0d 5c 20 4a 75 6e 65 20 | 39 32 09 6d 72 68 09 46 |.\ June |92.mrh.F|
|00000160| 69 78 65 64 20 47 65 74 | 52 65 63 74 3a 20 69 6e |ixed Get|Rect: in|
|00000170| 20 53 63 72 6f 6c 6c 65 | 72 2e 0d 5c 20 46 65 62 | Scrolle|r..\ Feb|
|00000180| 20 39 33 09 6d 72 68 20 | 49 6e 74 72 6f 64 75 63 | 93.mrh |Introduc|
|00000190| 65 64 20 63 6c 61 73 73 | 20 42 69 67 52 65 63 74 |ed class| BigRect|
|000001a0| 20 66 6f 72 20 50 61 6e | 52 65 63 74 73 2c 20 74 | for Pan|Rects, t|
|000001b0| 6f 20 61 6c 6c 6f 77 20 | 68 75 6d 75 6e 67 6f 75 |o allow |humungou|
|000001c0| 73 20 72 65 63 74 73 2e | 0d 5c 20 53 65 70 74 20 |s rects.|.\ Sept |
|000001d0| 39 33 09 6d 72 68 09 52 | 65 76 69 73 65 64 20 66 |93.mrh.R|evised f|
|000001e0| 6f 72 20 6e 65 77 20 63 | 6f 6e 74 72 6f 6c 20 73 |or new c|ontrol s|
|000001f0| 63 68 65 6d 65 20 2d 20 | 63 6f 6e 74 72 6f 6c 73 |cheme - |controls|
|00000200| 20 6e 6f 77 20 61 20 76 | 69 65 77 20 73 75 62 63 | now a v|iew subc|
|00000210| 6c 61 73 73 2e 0d 5c 20 | 4e 6f 76 39 35 09 09 4a |lass..\ |Nov95..J|
|00000220| 52 46 09 6e 6f 77 20 70 | 72 6f 70 65 72 6c 79 20 |RF.now p|roperly |
|00000230| 68 69 64 69 6e 67 20 61 | 6e 64 20 73 68 6f 77 69 |hiding a|nd showi|
|00000240| 6e 67 20 73 63 72 6f 6c | 6c 62 61 72 73 0d 5c 20 |ng scrol|lbars.\ |
|00000250| 4f 63 74 39 36 09 09 6d | 72 68 20 66 69 78 65 64 |Oct96..m|rh fixed|
|00000260| 20 53 65 74 50 61 6e 52 | 61 6e 67 65 73 3a 20 69 | SetPanR|anges: i|
|00000270| 6e 20 6c 69 6e 65 20 77 | 69 74 68 20 74 68 65 20 |n line w|ith the |
|00000280| 61 62 6f 76 65 0d 0d 6e | 65 65 64 09 76 69 65 77 |above..n|eed.view|
|00000290| 0d 6e 65 65 64 09 63 74 | 6c 0d 0d 28 2a 0d 53 43 |.need.ct|l..(*.SC|
|000002a0| 52 4f 4c 4c 45 52 20 69 | 73 20 61 20 76 69 65 77 |ROLLER i|s a view|
|000002b0| 20 77 68 69 63 68 20 68 | 61 73 20 73 75 70 70 6f | which h|as suppo|
|000002c0| 72 74 20 66 6f 72 20 61 | 20 76 65 72 74 69 63 61 |rt for a| vertica|
|000002d0| 6c 20 61 6e 64 20 68 6f | 72 69 7a 6f 6e 74 61 6c |l and ho|rizontal|
|000002e0| 0d 73 63 72 6f 6c 6c 20 | 62 61 72 20 61 6c 6f 6e |.scroll |bar alon|
|000002f0| 67 20 74 68 65 20 72 69 | 67 68 74 20 68 61 6e 64 |g the ri|ght hand|
|00000300| 20 61 6e 64 20 62 6f 74 | 74 6f 6d 20 65 64 67 65 | and bot|tom edge|
|00000310| 20 72 65 73 70 65 63 74 | 69 76 65 6c 79 2e 20 20 | respect|ively. |
|00000320| 57 65 20 69 6d 70 6c 65 | 6d 65 6e 74 0d 69 74 20 |We imple|ment.it |
|00000330| 77 69 74 68 20 74 68 72 | 65 65 20 63 68 69 6c 64 |with thr|ee child|
|00000340| 20 76 69 65 77 73 3a 20 | 6d 61 69 6e 56 69 65 77 | views: |mainView|
|00000350| 2c 20 77 68 69 63 68 20 | 69 73 20 74 68 65 20 64 |, which |is the d|
|00000360| 69 73 70 6c 61 79 20 61 | 72 65 61 2c 20 61 6e 64 |isplay a|rea, and|
|00000370| 20 74 68 65 0d 74 77 6f | 20 73 63 72 6f 6c 6c 20 | the.two| scroll |
|00000380| 62 61 72 73 20 74 68 65 | 6d 73 65 6c 76 65 73 2e |bars the|mselves.|
|00000390| 0d 0d 4d 61 69 6e 56 69 | 65 77 20 69 73 20 61 6e |..MainVi|ew is an|
|000003a0| 20 69 6e 73 74 61 6e 63 | 65 20 6f 66 20 61 20 6f | instanc|e of a o|
|000003b0| 6e 65 2d 6f 66 66 20 63 | 6c 61 73 73 2c 20 4d 76 |ne-off c|lass, Mv|
|000003c0| 69 65 77 2e 20 20 54 68 | 69 73 20 63 6c 61 73 73 |iew. Th|is class|
|000003d0| 20 68 61 73 20 61 0d 72 | 65 63 74 61 6e 67 6c 65 | has a.r|ectangle|
|000003e0| 2c 20 50 61 6e 52 65 63 | 74 2c 20 77 68 69 63 68 |, PanRec|t, which|
|000003f0| 20 6e 6f 72 6d 61 6c 6c | 79 20 6f 75 67 68 74 20 | normall|y ought |
|00000400| 74 6f 20 65 6e 63 6c 6f | 73 65 20 61 6c 6c 20 74 |to enclo|se all t|
|00000410| 68 65 20 63 68 69 6c 64 | 20 76 69 65 77 73 0d 6f |he child| views.o|
|00000420| 66 20 74 68 65 20 4d 76 | 69 65 77 2e 20 20 54 68 |f the Mv|iew. Th|
|00000430| 65 20 75 73 75 61 6c 20 | 73 63 65 6e 61 72 69 6f |e usual |scenario|
|00000440| 20 69 73 20 74 68 61 74 | 20 50 61 6e 52 65 63 74 | is that| PanRect|
|00000450| 20 69 73 20 6c 61 72 67 | 65 72 20 74 68 61 6e 20 | is larg|er than |
|00000460| 74 68 65 20 76 69 65 77 | 52 65 63 74 2c 0d 61 6e |the view|Rect,.an|
|00000470| 64 20 73 63 72 6f 6c 6c | 69 6e 67 20 61 6d 6f 75 |d scroll|ing amou|
|00000480| 6e 74 73 20 74 6f 20 73 | 68 69 66 74 69 6e 67 20 |nts to s|hifting |
|00000490| 74 68 65 20 63 68 69 6c | 64 20 76 69 65 77 73 20 |the chil|d views |
|000004a0| 28 61 6e 64 20 50 61 6e | 52 65 63 74 29 20 61 72 |(and Pan|Rect) ar|
|000004b0| 6f 75 6e 64 20 77 69 74 | 68 69 6e 0d 74 68 65 20 |ound wit|hin.the |
|000004c0| 76 69 65 77 52 65 63 74 | 20 2d 20 77 68 69 63 68 |viewRect| - which|
|000004d0| 2c 20 66 72 6f 6d 20 61 | 6e 6f 74 68 65 72 20 70 |, from a|nother p|
|000004e0| 6f 69 6e 74 20 6f 66 20 | 76 69 65 77 2c 20 63 61 |oint of |view, ca|
|000004f0| 6e 20 62 65 20 74 68 6f | 75 67 68 74 20 6f 66 20 |n be tho|ught of |
|00000500| 61 73 0d 22 70 61 6e 6e | 69 6e 67 22 20 74 68 65 |as."pann|ing" the|
|00000510| 20 76 69 65 77 52 65 63 | 74 20 6f 76 65 72 20 74 | viewRec|t over t|
|00000520| 68 65 20 50 61 6e 52 65 | 63 74 20 61 72 65 61 2e |he PanRe|ct area.|
|00000530| 0d 0d 4d 76 69 65 77 20 | 68 61 73 20 61 70 70 72 |..Mview |has appr|
|00000540| 6f 70 72 69 61 74 65 20 | 6d 65 74 68 6f 64 73 20 |opriate |methods |
|00000550| 66 6f 72 20 72 65 74 75 | 72 6e 69 6e 67 20 74 68 |for retu|rning th|
|00000560| 65 20 64 69 73 74 61 6e | 63 65 73 20 62 79 20 77 |e distan|ces by w|
|00000570| 68 69 63 68 20 50 61 6e | 52 65 63 74 0d 66 61 6c |hich Pan|Rect.fal|
|00000580| 6c 73 20 6f 75 74 73 69 | 64 65 20 74 68 65 20 76 |ls outsi|de the v|
|00000590| 69 65 77 52 65 63 74 20 | 61 72 65 61 2c 20 73 6f |iewRect |area, so|
|000005a0| 20 74 68 61 74 20 74 68 | 65 20 70 61 72 65 6e 74 | that th|e parent|
|000005b0| 20 53 63 72 6f 6c 6c 65 | 72 20 63 61 6e 20 73 65 | Scrolle|r can se|
|000005c0| 74 20 74 68 65 0d 73 63 | 72 6f 6c 6c 20 62 61 72 |t the.sc|roll bar|
|000005d0| 20 76 61 6c 75 65 73 20 | 61 70 70 72 6f 70 72 69 | values |appropri|
|000005e0| 61 74 65 6c 79 2e 0d 0d | 4f 6e 65 20 75 6e 75 73 |ately...|One unus|
|000005f0| 75 61 6c 20 74 68 69 6e | 67 20 77 65 20 64 6f 20 |ual thin|g we do |
|00000600| 68 65 72 65 20 69 73 20 | 74 6f 20 6f 76 65 72 72 |here is |to overr|
|00000610| 69 64 65 20 61 64 64 56 | 69 65 77 3a 20 6f 6e 20 |ide addV|iew: on |
|00000620| 53 63 72 6f 6c 6c 65 72 | 20 73 6f 20 74 68 61 74 |Scroller| so that|
|00000630| 20 69 74 0d 62 65 63 6f | 6d 65 73 20 61 6e 20 41 | it.beco|mes an A|
|00000640| 44 44 56 49 45 57 3a 20 | 6f 6e 20 4d 61 69 6e 56 |DDVIEW: |on MainV|
|00000650| 69 65 77 2c 20 73 69 6e | 63 65 20 74 68 69 73 20 |iew, sin|ce this |
|00000660| 69 73 20 75 73 75 61 6c | 6c 79 20 77 68 61 74 20 |is usual|ly what |
|00000670| 77 65 20 72 65 61 6c 6c | 79 20 6d 65 61 6e 2e 0d |we reall|y mean..|
|00000680| 49 6e 20 74 68 65 20 63 | 61 73 65 20 77 68 65 72 |In the c|ase wher|
|00000690| 65 20 79 6f 75 20 77 61 | 6e 74 20 74 6f 20 72 65 |e you wa|nt to re|
|000006a0| 61 6c 6c 79 20 61 64 64 | 56 69 65 77 3a 20 6f 6e |ally add|View: on|
|000006b0| 20 74 68 65 20 53 63 72 | 6f 6c 6c 65 72 2c 20 73 | the Scr|oller, s|
|000006c0| 75 63 68 20 61 73 20 74 | 6f 20 61 64 64 0d 61 6e |uch as t|o add.an|
|000006d0| 6f 74 68 65 72 20 63 68 | 69 6c 64 20 76 69 65 77 |other ch|ild view|
|000006e0| 20 61 6c 6f 6e 67 73 69 | 64 65 20 6f 6e 65 20 6f | alongsi|de one o|
|000006f0| 66 20 74 68 65 20 73 63 | 72 6f 6c 6c 20 62 61 72 |f the sc|roll bar|
|00000700| 73 2c 20 79 6f 75 20 73 | 68 6f 75 6c 64 20 73 75 |s, you s|hould su|
|00000710| 62 63 6c 61 73 73 0d 53 | 63 72 6f 6c 6c 65 72 20 |bclass.S|croller |
|00000720| 77 69 74 68 20 74 68 65 | 20 65 78 74 72 61 20 76 |with the| extra v|
|00000730| 69 65 77 73 20 61 73 20 | 69 76 61 72 73 2c 20 61 |iews as |ivars, a|
|00000740| 6e 64 20 61 74 20 72 75 | 6e 20 74 69 6d 65 20 64 |nd at ru|n time d|
|00000750| 6f 20 61 64 64 56 69 65 | 77 3a 20 73 75 70 65 72 |o addVie|w: super|
|00000760| 0d 61 73 20 77 65 20 64 | 6f 20 66 6f 72 20 74 68 |.as we d|o for th|
|00000770| 65 20 73 63 72 6f 6c 6c | 20 62 61 72 73 20 28 73 |e scroll| bars (s|
|00000780| 65 65 20 74 68 65 20 4e | 45 57 3a 20 6d 65 74 68 |ee the N|EW: meth|
|00000790| 6f 64 29 2e 0d 0d 41 6e | 6f 74 68 65 72 20 61 70 |od)...An|other ap|
|000007a0| 70 72 6f 61 63 68 20 77 | 65 20 63 6f 75 6c 64 20 |proach w|e could |
|000007b0| 68 61 76 65 20 74 61 6b | 65 6e 20 74 6f 20 69 6d |have tak|en to im|
|000007c0| 70 6c 65 6d 65 6e 74 69 | 6e 67 20 4d 61 69 6e 56 |plementi|ng MainV|
|000007d0| 69 65 77 20 77 6f 75 6c | 64 20 68 61 76 65 20 62 |iew woul|d have b|
|000007e0| 65 65 6e 0d 61 73 20 61 | 20 70 6f 69 6e 74 65 72 |een.as a| pointer|
|000007f0| 2c 20 77 69 74 68 20 6c | 61 74 65 20 62 69 6e 64 |, with l|ate bind|
|00000800| 69 6e 67 2e 20 20 54 68 | 61 74 20 77 61 79 20 4d |ing. Th|at way M|
|00000810| 61 69 6e 56 69 65 77 20 | 63 6f 75 6c 64 20 68 61 |ainView |could ha|
|00000820| 76 65 20 62 65 65 6e 20 | 61 6e 79 0d 76 69 65 77 |ve been |any.view|
|00000830| 20 73 75 62 63 6c 61 73 | 73 2e 20 20 54 68 61 74 | subclas|s. That|
|00000840| 20 77 6f 75 6c 64 20 68 | 61 76 65 20 62 65 65 6e | would h|ave been|
|00000850| 20 6d 6f 72 65 20 66 6c | 65 78 69 62 6c 65 2c 20 | more fl|exible, |
|00000860| 62 75 74 20 70 6f 73 73 | 69 62 6c 79 20 6f 76 65 |but poss|ibly ove|
|00000870| 72 6b 69 6c 6c 0d 66 6f | 72 20 77 68 61 74 20 77 |rkill.fo|r what w|
|00000880| 65 20 75 73 75 61 6c 6c | 79 20 77 61 6e 74 20 74 |e usuall|y want t|
|00000890| 6f 20 64 6f 20 2d 20 69 | 74 20 77 6f 75 6c 64 20 |o do - i|t would |
|000008a0| 68 61 76 65 20 72 65 71 | 75 69 72 65 64 20 61 20 |have req|uired a |
|000008b0| 6d 6f 72 65 20 63 6f 6d | 70 6c 65 78 0d 73 65 74 |more com|plex.set|
|000008c0| 74 69 6e 67 2d 75 70 20 | 70 72 6f 63 65 73 73 2c |ting-up |process,|
|000008d0| 20 77 69 74 68 20 74 68 | 65 20 4d 61 69 6e 56 69 | with th|e MainVi|
|000008e0| 65 77 20 61 64 64 72 65 | 73 73 20 68 61 76 69 6e |ew addre|ss havin|
|000008f0| 67 20 74 6f 20 62 65 20 | 70 61 73 73 65 64 20 69 |g to be |passed i|
|00000900| 6e 20 61 66 74 65 72 0d | 4e 45 57 3a 20 68 61 73 |n after.|NEW: has|
|00000910| 20 62 65 65 6e 20 64 6f | 6e 65 2e 20 20 42 75 74 | been do|ne. But|
|00000920| 20 69 66 20 79 6f 75 20 | 6e 65 65 64 20 74 68 65 | if you |need the|
|00000930| 20 65 78 74 72 61 20 66 | 6c 65 78 69 62 69 6c 69 | extra f|lexibili|
|00000940| 74 79 2c 20 66 65 65 6c | 20 66 72 65 65 20 74 6f |ty, feel| free to|
|00000950| 20 63 6c 6f 6e 65 0d 53 | 63 72 6f 6c 6c 65 72 20 | clone.S|croller |
|00000960| 61 6e 64 20 6d 61 6b 65 | 20 74 68 65 20 63 68 61 |and make| the cha|
|00000970| 6e 67 65 73 21 0d 0d 50 | 61 6e 52 65 63 74 20 63 |nges!..P|anRect c|
|00000980| 61 6e 20 6f 62 76 69 6f | 75 73 6c 79 20 62 65 20 |an obvio|usly be |
|00000990| 76 65 72 79 20 62 69 67 | 2c 20 73 6f 20 77 65 20 |very big|, so we |
|000009a0| 64 6f 6e 27 74 20 69 6d | 70 6c 65 6d 65 6e 74 20 |don't im|plement |
|000009b0| 69 74 20 61 73 20 61 20 | 72 65 67 75 6c 61 72 20 |it as a |regular |
|000009c0| 72 65 63 74 2c 0d 62 75 | 74 20 64 65 66 69 6e 65 |rect,.bu|t define|
|000009d0| 20 61 20 6e 65 77 20 63 | 6c 61 73 73 2c 20 42 69 | a new c|lass, Bi|
|000009e0| 67 52 65 63 74 2c 20 77 | 68 69 63 68 20 75 73 65 |gRect, w|hich use|
|000009f0| 73 20 76 61 72 73 20 72 | 61 74 68 65 72 20 74 68 |s vars r|ather th|
|00000a00| 61 6e 20 69 6e 74 73 20 | 66 6f 72 20 74 68 65 0d |an ints |for the.|
|00000a10| 63 6f 6f 72 64 69 6e 61 | 74 65 73 2e 0d 2a 29 0d |coordina|tes..*).|
|00000a20| 0d 50 50 43 3f 20 6e 6f | 74 0d 5b 49 46 5d 0d 6e |.PPC? no|t.[IF].n|
|00000a30| 69 6c 50 09 76 61 6c 75 | 65 09 43 6c 69 63 6b 65 |ilP.valu|e.Clicke|
|00000a40| 64 53 63 72 6f 6c 6c 65 | 72 0d 5b 54 48 45 4e 5d |dScrolle|r.[THEN]|
|00000a50| 0d 09 09 09 09 5c 20 43 | 4c 49 43 4b 3a 20 6f 6e |.....\ C|LICK: on|
|00000a60| 20 61 20 53 63 72 6f 6c | 6c 65 72 20 70 75 74 73 | a Scrol|ler puts|
|00000a70| 20 74 68 65 20 53 63 72 | 6f 6c 6c 65 72 27 73 20 | the Scr|oller's |
|00000a80| 61 64 64 72 20 68 65 72 | 65 2c 20 73 6f 0d 09 09 |addr her|e, so...|
|00000a90| 09 09 5c 20 63 68 69 6c | 64 20 76 69 65 77 73 20 |..\ chil|d views |
|00000aa0| 63 61 6e 20 65 61 73 69 | 6c 79 20 73 65 6e 64 20 |can easi|ly send |
|00000ab0| 6d 65 73 73 61 67 65 73 | 20 62 61 63 6b 20 74 6f |messages| back to|
|00000ac0| 20 74 68 65 20 63 6c 69 | 63 6b 65 64 0d 09 09 09 | the cli|cked....|
|00000ad0| 09 5c 20 53 63 72 6f 6c | 6c 65 72 2e 20 20 53 63 |.\ Scrol|ler. Sc|
|00000ae0| 72 6f 6c 6c 20 62 61 72 | 73 20 75 73 65 20 74 68 |roll bar|s use th|
|00000af0| 69 73 2c 20 61 6c 73 6f | 20 54 65 78 74 45 64 69 |is, also| TextEdi|
|00000b00| 74 20 76 69 65 77 73 2e | 0d 09 09 09 09 5c 20 49 |t views.|.....\ I|
|00000b10| 20 63 6f 75 6c 64 20 68 | 61 76 65 20 6a 75 73 74 | could h|ave just|
|00000b20| 20 75 73 65 64 20 54 68 | 69 73 43 74 6c 2c 20 62 | used Th|isCtl, b|
|00000b30| 75 74 20 69 66 20 61 6e | 6f 74 68 65 72 20 63 6f |ut if an|other co|
|00000b40| 6e 74 72 6f 6c 0d 09 09 | 09 09 5c 20 69 73 20 69 |ntrol...|..\ is i|
|00000b50| 6e 76 6f 6c 76 65 64 20 | 73 6f 6d 65 77 68 65 72 |nvolved |somewher|
|00000b60| 65 20 69 74 20 6d 69 67 | 68 74 20 67 65 74 20 63 |e it mig|ht get c|
|00000b70| 6c 6f 62 62 65 72 65 64 | 2e 20 20 55 6e 6c 69 6b |lobbered|. Unlik|
|00000b80| 65 6c 79 2c 0d 09 09 09 | 09 5c 20 62 75 74 20 49 |ely,....|.\ but I|
|00000b90| 27 6d 20 61 20 63 61 75 | 74 69 6f 75 73 20 69 6e |'m a cau|tious in|
|00000ba0| 64 69 76 69 64 75 61 6c | 2e 0d 09 09 09 09 0d 09 |dividual|........|
|00000bb0| 09 09 09 5c 20 4f 6e 20 | 74 68 65 20 50 50 43 2c |...\ On |the PPC,|
|00000bc0| 20 74 68 69 73 20 69 73 | 20 69 6e 20 7a 4f 62 6a | this is| in zObj|
|00000bd0| 49 6e 69 74 20 73 69 6e | 63 65 20 77 65 20 63 61 |Init sin|ce we ca|
|00000be0| 6e 27 74 20 68 61 76 65 | 0d 09 09 09 09 5c 20 3a |n't have|.....\ :|
|00000bf0| 70 70 63 5f 70 72 6f 63 | 20 20 69 6e 20 6d 6f 64 |ppc_proc| in mod|
|00000c00| 75 6c 65 73 2e 0d 0d 0d | 3a 20 31 52 09 31 52 69 |ules....|: 1R.1Ri|
|00000c10| 67 68 74 3a 09 09 5b 20 | 63 6c 69 63 6b 65 64 53 |ght:..[ |clickedS|
|00000c20| 63 72 6f 6c 6c 65 72 20 | 5d 20 20 3b 0d 3a 20 31 |croller |] ;.: 1|
|00000c30| 4c 09 31 4c 65 66 74 3a | 09 09 5b 20 63 6c 69 63 |L.1Left:|..[ clic|
|00000c40| 6b 65 64 53 63 72 6f 6c | 6c 65 72 20 5d 20 20 3b |kedScrol|ler ] ;|
|00000c50| 0d 3a 20 31 55 09 31 55 | 70 3a 09 09 5b 20 63 6c |.: 1U.1U|p:..[ cl|
|00000c60| 69 63 6b 65 64 53 63 72 | 6f 6c 6c 65 72 20 5d 20 |ickedScr|oller ] |
|00000c70| 20 3b 0d 3a 20 31 44 09 | 31 44 6f 77 6e 3a 09 09 | ;.: 1D.|1Down:..|
|00000c80| 5b 20 63 6c 69 63 6b 65 | 64 53 63 72 6f 6c 6c 65 |[ clicke|dScrolle|
|00000c90| 72 20 5d 20 20 3b 0d 0d | 3a 20 50 47 52 09 70 67 |r ] ;..|: PGR.pg|
|00000ca0| 52 69 67 68 74 3a 09 5b | 20 63 6c 69 63 6b 65 64 |Right:.[| clicked|
|00000cb0| 53 63 72 6f 6c 6c 65 72 | 20 5d 20 20 3b 0d 3a 20 |Scroller| ] ;.: |
|00000cc0| 50 47 4c 09 70 67 4c 65 | 66 74 3a 09 09 5b 20 63 |PGL.pgLe|ft:..[ c|
|00000cd0| 6c 69 63 6b 65 64 53 63 | 72 6f 6c 6c 65 72 20 5d |lickedSc|roller ]|
|00000ce0| 20 20 3b 0d 3a 20 50 47 | 55 09 70 67 55 70 3a 09 | ;.: PG|U.pgUp:.|
|00000cf0| 09 5b 20 63 6c 69 63 6b | 65 64 53 63 72 6f 6c 6c |.[ click|edScroll|
|00000d00| 65 72 20 5d 20 20 3b 0d | 3a 20 50 47 44 09 70 67 |er ] ;.|: PGD.pg|
|00000d10| 44 6f 77 6e 3a 09 09 5b | 20 63 6c 69 63 6b 65 64 |Down:..[| clicked|
|00000d20| 53 63 72 6f 6c 6c 65 72 | 20 5d 20 20 3b 0d 0d 3a |Scroller| ] ;..:|
|00000d30| 20 56 44 09 56 64 72 61 | 67 3a 09 09 5b 20 63 6c | VD.Vdra|g:..[ cl|
|00000d40| 69 63 6b 65 64 53 63 72 | 6f 6c 6c 65 72 20 5d 20 |ickedScr|oller ] |
|00000d50| 20 3b 0d 3a 20 48 44 09 | 48 64 72 61 67 3a 09 09 | ;.: HD.|Hdrag:..|
|00000d60| 5b 20 63 6c 69 63 6b 65 | 64 53 63 72 6f 6c 6c 65 |[ clicke|dScrolle|
|00000d70| 72 20 5d 20 20 3b 0d 0d | 0d 0d 0d 5c 09 09 09 3d |r ] ;..|...\...=|
|00000d80| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000d90| 20 42 69 67 52 65 63 74 | 20 3d 3d 3d 3d 3d 3d 3d | BigRect| =======|
|00000da0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 0d 0d 5c 20 |========|====..\ |
|00000db0| 42 49 47 52 45 43 54 20 | 69 73 20 65 78 61 63 74 |BIGRECT |is exact|
|00000dc0| 6c 79 20 74 68 61 74 20 | 2d 2d 20 75 73 69 6e 67 |ly that |-- using|
|00000dd0| 20 76 61 72 73 20 72 61 | 74 68 65 72 20 74 68 61 | vars ra|ther tha|
|00000de0| 6e 20 69 6e 74 73 20 66 | 6f 72 20 74 68 65 0d 5c |n ints f|or the.\|
|00000df0| 20 63 6f 6f 72 64 69 6e | 61 74 65 73 2e 20 20 54 | coordin|ates. T|
|00000e00| 68 65 20 74 6f 6f 6c 62 | 6f 78 20 64 6f 65 73 6e |he toolb|ox doesn|
|00000e10| 27 74 20 73 75 70 70 6f | 72 74 20 74 68 69 73 2c |'t suppo|rt this,|
|00000e20| 20 73 6f 20 77 65 20 6a | 75 73 74 20 75 73 65 0d | so we j|ust use.|
|00000e30| 5c 20 69 74 20 69 6e 20 | 70 6c 61 63 65 73 20 77 |\ it in |places w|
|00000e40| 68 65 72 65 20 77 65 20 | 6e 65 65 64 20 76 65 72 |here we |need ver|
|00000e50| 79 20 62 69 67 20 72 65 | 63 74 61 6e 67 6c 65 73 |y big re|ctangles|
|00000e60| 20 61 6e 64 20 63 6f 6e | 74 72 6f 6c 0d 5c 20 65 | and con|trol.\ e|
|00000e70| 76 65 72 79 74 68 69 6e | 67 20 6f 75 72 73 65 6c |verythin|g oursel|
|00000e80| 76 65 73 2e 20 20 53 6f | 20 66 61 72 20 77 65 20 |ves. So| far we |
|00000e90| 6f 6e 6c 79 20 6e 65 65 | 64 20 74 6f 20 73 75 70 |only nee|d to sup|
|00000ea0| 70 6f 72 74 20 47 45 54 | 3a 2c 20 50 55 54 3a 0d |port GET|:, PUT:.|
|00000eb0| 5c 20 61 6e 64 20 53 48 | 49 46 54 3a 20 6d 65 74 |\ and SH|IFT: met|
|00000ec0| 68 6f 64 73 2e 0d 0d 3a | 63 6c 61 73 73 20 20 42 |hods...:|class B|
|00000ed0| 49 47 52 45 43 54 20 20 | 73 75 70 65 72 7b 20 6f |IGRECT |super{ o|
|00000ee0| 62 6a 65 63 74 20 7d 0d | 72 65 63 6f 72 64 0d 7b |bject }.|record.{|
|00000ef0| 09 76 61 72 09 09 54 4f | 50 0d 09 76 61 72 09 09 |.var..TO|P..var..|
|00000f00| 4c 45 46 54 0d 09 76 61 | 72 09 09 42 4f 54 54 4f |LEFT..va|r..BOTTO|
|00000f10| 4d 0d 09 76 61 72 09 09 | 52 49 47 48 54 0d 7d 0d |M..var..|RIGHT.}.|
|00000f20| 0d 3a 6d 20 47 45 54 3a | 09 09 67 65 74 3a 20 6c |.:m GET:|..get: l|
|00000f30| 65 66 74 20 20 67 65 74 | 3a 20 74 6f 70 20 20 67 |eft get|: top g|
|00000f40| 65 74 3a 20 72 69 67 68 | 74 20 20 67 65 74 3a 20 |et: righ|t get: |
|00000f50| 62 6f 74 74 6f 6d 20 20 | 3b 6d 0d 3a 6d 20 50 55 |bottom |;m.:m PU|
|00000f60| 54 3a 09 09 70 75 74 3a | 20 62 6f 74 74 6f 6d 20 |T:..put:| bottom |
|00000f70| 20 70 75 74 3a 20 72 69 | 67 68 74 20 20 70 75 74 | put: ri|ght put|
|00000f80| 3a 20 74 6f 70 20 20 70 | 75 74 3a 20 6c 65 66 74 |: top p|ut: left|
|00000f90| 20 20 3b 6d 0d 0d 3a 6d | 20 53 48 49 46 54 3a 20 | ;m..:m| SHIFT: |
|00000fa0| 20 7b 20 64 78 20 64 79 | 20 2d 2d 20 7d 0d 09 64 | { dx dy| -- }..d|
|00000fb0| 78 20 64 79 20 6f 72 20 | 20 30 45 58 49 54 0d 09 |x dy or | 0EXIT..|
|00000fc0| 64 78 20 2b 3a 20 6c 65 | 66 74 20 20 64 78 20 2b |dx +: le|ft dx +|
|00000fd0| 3a 20 72 69 67 68 74 0d | 09 64 79 20 2b 3a 20 74 |: right.|.dy +: t|
|00000fe0| 6f 70 20 20 20 64 79 20 | 2b 3a 20 62 6f 74 74 6f |op dy |+: botto|
|00000ff0| 6d 20 20 3b 6d 0d 09 0d | 3a 6d 20 49 4e 53 45 54 |m ;m...|:m INSET|
|00001000| 3a 20 20 7b 20 64 78 20 | 64 79 20 2d 2d 20 7d 0d |: { dx |dy -- }.|
|00001010| 09 64 78 20 2b 3a 20 6c | 65 66 74 20 20 64 78 20 |.dx +: l|eft dx |
|00001020| 2d 3a 20 72 69 67 68 74 | 0d 09 64 79 20 2b 3a 20 |-: right|..dy +: |
|00001030| 74 6f 70 20 20 20 64 79 | 20 2d 3a 20 62 6f 74 74 |top dy| -: bott|
|00001040| 6f 6d 20 20 3b 6d 0d 0d | 3b 63 6c 61 73 73 0d 0d |om ;m..|;class..|
|00001050| 0d 5c 09 09 09 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |.\...===|========|
|00001060| 3d 3d 3d 3d 3d 3d 20 4d | 76 69 65 77 20 3d 3d 3d |====== M|view ===|
|00001070| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00001080| 0d 0d 5c 20 4d 56 49 45 | 57 20 69 73 20 61 20 76 |..\ MVIE|W is a v|
|00001090| 69 65 77 20 77 68 69 63 | 68 20 77 65 20 75 73 65 |iew whic|h we use|
|000010a0| 20 66 6f 72 20 74 68 65 | 20 6d 61 69 6e 20 76 69 | for the| main vi|
|000010b0| 65 77 20 6f 66 20 61 20 | 53 63 72 6f 6c 6c 65 72 |ew of a |Scroller|
|000010c0| 20 28 74 68 65 20 76 69 | 65 77 0d 5c 20 77 69 74 | (the vi|ew.\ wit|
|000010d0| 68 20 74 68 65 20 61 63 | 74 75 61 6c 20 63 6f 6e |h the ac|tual con|
|000010e0| 74 65 6e 74 73 20 2d 20 | 74 68 65 20 6f 74 68 65 |tents - |the othe|
|000010f0| 72 20 74 77 6f 20 76 69 | 65 77 73 20 61 72 65 20 |r two vi|ews are |
|00001100| 74 68 65 20 74 77 6f 20 | 73 63 72 6f 6c 6c 0d 5c |the two |scroll.\|
|00001110| 20 62 61 72 73 29 2e 20 | 20 49 74 20 68 61 73 20 | bars). | It has |
|00001120| 6d 65 74 68 6f 64 73 20 | 74 6f 20 73 68 69 66 74 |methods |to shift|
|00001130| 20 69 74 73 20 63 68 69 | 6c 64 72 65 6e 2c 20 6f | its chi|ldren, o|
|00001140| 72 2c 20 64 65 70 65 6e | 64 69 6e 67 20 6f 6e 0d |r, depen|ding on.|
|00001150| 5c 20 74 68 65 20 70 6f | 69 6e 74 20 6f 66 20 76 |\ the po|int of v|
|00001160| 69 65 77 2c 20 22 70 61 | 6e 6e 69 6e 67 22 20 6f |iew, "pa|nning" o|
|00001170| 76 65 72 20 74 68 65 20 | 63 68 69 6c 64 72 65 6e |ver the |children|
|00001180| 2e 0d 0d 0d 3a 63 6c 61 | 73 73 20 20 4d 56 49 45 |....:cla|ss MVIE|
|00001190| 57 20 20 73 75 70 65 72 | 7b 20 76 69 65 77 20 7d |W super|{ view }|
|000011a0| 0d 72 65 63 6f 72 64 0d | 7b 09 62 69 67 72 65 63 |.record.|{.bigrec|
|000011b0| 74 09 09 50 41 4e 52 45 | 43 54 09 09 5c 20 52 65 |t..PANRE|CT..\ Re|
|000011c0| 63 74 20 66 6f 72 20 22 | 70 61 6e 6e 69 6e 67 22 |ct for "|panning"|
|000011d0| 20 63 68 69 6c 64 72 65 | 6e 2e 20 20 4f 75 67 68 | childre|n. Ough|
|000011e0| 74 20 74 6f 0d 09 09 09 | 09 09 09 09 5c 20 20 63 |t to....|....\ c|
|000011f0| 6f 6e 74 61 69 6e 20 61 | 6c 6c 20 6f 66 20 74 68 |ontain a|ll of th|
|00001200| 65 6d 2e 20 20 43 61 6e | 20 62 65 20 65 6e 6f 72 |em. Can| be enor|
|00001210| 6d 6f 75 73 2e 0d 7d 0d | 0d 3a 6d 20 5e 70 61 6e |mous..}.|.:m ^pan|
|00001220| 52 65 63 74 3a 09 61 64 | 64 72 3a 20 70 61 6e 52 |Rect:.ad|dr: panR|
|00001230| 65 63 74 20 20 3b 6d 0d | 0d 3a 6d 20 47 45 54 50 |ect ;m.|.:m GETP|
|00001240| 41 4e 52 45 43 54 3a 0d | 09 67 65 74 3a 20 70 61 |ANRECT:.|.get: pa|
|00001250| 6e 52 65 63 74 20 20 3b | 6d 0d 09 0d 3a 6d 20 50 |nRect ;|m...:m P|
|00001260| 55 54 50 41 4e 52 45 43 | 54 3a 0d 09 70 75 74 3a |UTPANREC|T:..put:|
|00001270| 20 70 61 6e 52 65 63 74 | 20 20 3b 6d 0d 0d 0d 5c | panRect| ;m...\|
|00001280| 20 53 48 49 46 54 43 48 | 49 4c 44 52 45 4e 20 28 | SHIFTCH|ILDREN (|
|00001290| 20 64 78 20 64 79 20 2d | 2d 20 29 20 20 6d 6f 76 | dx dy -|- ) mov|
|000012a0| 65 73 20 61 6c 6c 20 74 | 68 65 20 63 68 69 6c 64 |es all t|he child|
|000012b0| 20 76 69 65 77 73 20 62 | 79 0d 5c 20 74 68 65 20 | views b|y.\ the |
|000012c0| 67 69 76 65 6e 20 64 69 | 73 74 61 6e 63 65 2e 20 |given di|stance. |
|000012d0| 20 57 65 20 64 6f 20 74 | 68 69 73 20 62 79 20 63 | We do t|his by c|
|000012e0| 68 61 6e 67 69 6e 67 20 | 74 68 65 69 72 20 62 6f |hanging |their bo|
|000012f0| 75 6e 64 73 20 61 70 70 | 72 6f 70 72 69 61 74 65 |unds app|ropriate|
|00001300| 6c 79 0d 5c 20 74 68 65 | 6e 20 63 61 6c 6c 69 6e |ly.\ the|n callin|
|00001310| 67 20 4d 4f 56 45 44 3a | 2e 0d 0d 3a 6d 20 53 48 |g MOVED:|...:m SH|
|00001320| 49 46 54 43 48 49 4c 44 | 52 45 4e 3a 20 20 7b 20 |IFTCHILD|REN: { |
|00001330| 64 78 20 64 79 20 5c 20 | 74 68 65 43 68 69 6c 64 |dx dy \ |theChild|
|00001340| 20 6c 20 74 20 72 20 62 | 20 2d 2d 20 7d 0d 09 42 | l t r b| -- }..B|
|00001350| 45 47 49 4e 20 20 65 61 | 63 68 3a 20 63 68 69 6c |EGIN ea|ch: chil|
|00001360| 64 72 65 6e 0d 09 57 48 | 49 4c 45 0d 09 09 2d 3e |dren..WH|ILE...->|
|00001370| 20 74 68 65 43 68 69 6c | 64 0d 09 09 74 68 65 43 | theChil|d...theC|
|00001380| 68 69 6c 64 20 67 65 74 | 42 6f 75 6e 64 73 3a 20 |hild get|Bounds: |
|00001390| 76 69 65 77 20 20 2d 3e | 20 62 20 20 2d 3e 20 72 |view ->| b -> r|
|000013a0| 20 20 2d 3e 20 74 20 20 | 2d 3e 20 6c 0d 09 09 64 | -> t |-> l...d|
|000013b0| 78 20 2b 2b 3e 20 6c 20 | 20 64 78 20 2b 2b 3e 20 |x ++> l | dx ++> |
|000013c0| 72 0d 09 09 64 79 20 2b | 2b 3e 20 74 20 20 64 79 |r...dy +|+> t dy|
|000013d0| 20 2b 2b 3e 20 62 0d 09 | 09 6c 20 74 20 72 20 62 | ++> b..|.l t r b|
|000013e0| 20 20 74 68 65 43 68 69 | 6c 64 20 20 73 65 74 42 | theChi|ld setB|
|000013f0| 6f 75 6e 64 73 3a 20 63 | 6c 61 73 73 5f 61 73 3e |ounds: c|lass_as>|
|00001400| 20 76 69 65 77 0d 09 09 | 6d 6f 76 65 64 3a 20 5b | view...|moved: [|
|00001410| 20 74 68 65 43 68 69 6c | 64 20 5d 09 09 5c 20 6c | theChil|d ]..\ l|
|00001420| 61 74 65 20 62 69 6e 64 | 20 68 65 72 65 20 61 73 |ate bind| here as|
|00001430| 20 64 69 66 66 65 72 65 | 6e 74 20 74 68 69 6e 67 | differe|nt thing|
|00001440| 73 20 6d 61 79 20 68 61 | 70 70 65 6e 0d 09 52 45 |s may ha|ppen..RE|
|00001450| 50 45 41 54 20 20 3b 6d | 0d 0d 0d 5c 20 43 6f 65 |PEAT ;m|...\ Coe|
|00001460| 72 63 65 50 61 6e 52 65 | 63 74 3a 20 73 68 69 66 |rcePanRe|ct: shif|
|00001470| 74 73 20 74 68 65 20 63 | 68 69 6c 64 72 65 6e 20 |ts the c|hildren |
|00001480| 73 6f 20 74 68 61 74 20 | 70 61 6e 52 65 63 74 20 |so that |panRect |
|00001490| 66 61 6c 6c 73 20 61 73 | 20 66 61 72 0d 5c 20 77 |falls as| far.\ w|
|000014a0| 69 74 68 69 6e 20 74 68 | 65 20 76 69 65 77 52 65 |ithin th|e viewRe|
|000014b0| 63 74 20 61 73 20 70 6f | 73 73 69 62 6c 65 2e 20 |ct as po|ssible. |
|000014c0| 20 57 65 20 66 61 63 74 | 6f 72 20 6f 75 74 20 28 | We fact|or out (|
|000014d0| 43 6f 65 72 63 65 50 61 | 6e 52 65 63 74 29 3a 0d |CoercePa|nRect):.|
|000014e0| 5c 20 77 68 69 63 68 20 | 64 6f 65 73 20 74 68 65 |\ which |does the|
|000014f0| 20 62 61 73 69 63 20 73 | 74 75 66 66 20 74 68 61 | basic s|tuff tha|
|00001500| 74 20 53 63 72 6f 6c 6c | 65 72 20 73 75 62 63 6c |t Scroll|er subcl|
|00001510| 61 73 73 65 73 20 63 61 | 6e 20 75 73 65 2e 0d 0d |asses ca|n use...|
|00001520| 70 72 69 76 61 74 65 0d | 3a 6d 20 48 6f 77 46 61 |private.|:m HowFa|
|00001530| 72 3a 20 20 7b 20 6f 66 | 66 73 31 20 6f 66 66 73 |r: { of|fs1 offs|
|00001540| 32 20 2d 2d 20 6f 66 66 | 73 27 20 7d 0d 09 6f 66 |2 -- off|s' }..of|
|00001550| 66 73 31 20 6f 66 66 73 | 32 20 78 6f 72 20 30 3e |fs1 offs|2 xor 0>|
|00001560| 09 09 09 09 09 5c 20 53 | 61 6d 65 20 73 69 67 6e |.....\ S|ame sign|
|00001570| 3f 0d 09 49 46 09 09 6f | 66 66 73 31 20 20 6f 66 |?..IF..o|ffs1 of|
|00001580| 66 73 32 20 64 75 70 20 | 30 3c 0d 09 09 09 49 46 |fs2 dup |0<....IF|
|00001590| 20 20 6d 61 78 20 20 45 | 4c 53 45 20 20 6d 69 6e | max E|LSE min|
|000015a0| 20 20 54 48 45 4e 0d 09 | 45 4c 53 45 09 30 0d 09 | THEN..|ELSE.0..|
|000015b0| 54 48 45 4e 20 20 3b 6d | 0d 0d 70 75 62 6c 69 63 |THEN ;m|..public|
|000015c0| 0d 0d 3a 6d 20 28 43 6f | 65 72 63 65 50 61 6e 52 |..:m (Co|ercePanR|
|000015d0| 65 63 74 29 3a 20 20 7b | 20 5c 20 70 4c 65 66 74 |ect): {| \ pLeft|
|000015e0| 20 70 54 6f 70 20 70 52 | 74 20 70 42 6f 74 20 64 | pTop pR|t pBot d|
|000015f0| 78 20 64 79 20 2d 2d 20 | 64 78 20 64 79 20 20 7d |x dy -- |dx dy }|
|00001600| 0d 09 5c 20 52 65 74 75 | 72 6e 73 20 74 68 65 20 |..\ Retu|rns the |
|00001610| 61 6d 6f 75 6e 74 20 77 | 65 20 68 61 76 65 20 74 |amount w|e have t|
|00001620| 6f 20 73 68 69 66 74 20 | 70 61 6e 52 65 63 74 20 |o shift |panRect |
|00001630| 74 6f 20 67 65 74 20 69 | 74 20 69 6e 74 6f 0d 09 |to get i|t into..|
|00001640| 5c 20 74 68 65 20 72 69 | 67 68 74 20 70 6f 73 69 |\ the ri|ght posi|
|00001650| 74 69 6f 6e 2e 20 20 57 | 65 20 70 61 73 73 20 69 |tion. W|e pass i|
|00001660| 6e 20 70 61 6e 52 65 63 | 74 27 73 20 63 6f 6f 72 |n panRec|t's coor|
|00001670| 64 69 6e 61 74 65 73 20 | 73 6f 20 74 68 61 74 0d |dinates |so that.|
|00001680| 09 5c 20 53 63 72 6f 6c | 6c 65 72 20 73 75 62 63 |.\ Scrol|ler subc|
|00001690| 6c 61 73 73 65 73 20 63 | 61 6e 20 75 73 65 20 61 |lasses c|an use a|
|000016a0| 20 64 69 66 66 65 72 65 | 6e 74 20 70 61 6e 52 65 | differe|nt panRe|
|000016b0| 63 74 20 28 54 45 53 63 | 72 6f 6c 6c 65 72 0d 09 |ct (TESc|roller..|
|000016c0| 5c 20 64 6f 65 73 20 74 | 68 69 73 29 2e 0d 09 0d |\ does t|his)....|
|000016d0| 09 67 65 74 3a 20 70 61 | 6e 52 65 63 74 20 20 2d |.get: pa|nRect -|
|000016e0| 3e 20 70 42 6f 74 20 2d | 3e 20 70 52 74 20 2d 3e |> pBot -|> pRt ->|
|000016f0| 20 70 54 6f 70 20 2d 3e | 20 70 4c 65 66 74 0d 09 | pTop ->| pLeft..|
|00001700| 67 65 74 54 6f 70 58 3a | 20 76 69 65 77 52 65 63 |getTopX:| viewRec|
|00001710| 74 20 20 70 4c 65 66 74 | 20 2d 0d 09 67 65 74 42 |t pLeft| -..getB|
|00001720| 6f 74 58 3a 20 76 69 65 | 77 52 65 63 74 20 20 70 |otX: vie|wRect p|
|00001730| 52 74 20 20 20 2d 20 20 | 20 68 6f 77 46 61 72 3a |Rt - | howFar:|
|00001740| 20 73 65 6c 66 20 20 2d | 3e 20 64 78 0d 09 67 65 | self -|> dx..ge|
|00001750| 74 54 6f 70 59 3a 20 76 | 69 65 77 52 65 63 74 20 |tTopY: v|iewRect |
|00001760| 20 70 54 6f 70 20 20 2d | 0d 09 67 65 74 42 6f 74 | pTop -|..getBot|
|00001770| 59 3a 20 76 69 65 77 52 | 65 63 74 20 20 70 42 6f |Y: viewR|ect pBo|
|00001780| 74 20 20 2d 20 20 20 68 | 6f 77 46 61 72 3a 20 73 |t - h|owFar: s|
|00001790| 65 6c 66 20 20 2d 3e 20 | 64 79 0d 09 64 78 20 64 |elf -> |dy..dx d|
|000017a0| 79 20 73 68 69 66 74 3a | 20 70 61 6e 52 65 63 74 |y shift:| panRect|
|000017b0| 0d 09 64 78 20 20 64 79 | 20 20 3b 6d 0d 09 0d 0d |..dx dy| ;m....|
|000017c0| 3a 6d 20 43 6f 65 72 63 | 65 50 61 6e 52 65 63 74 |:m Coerc|ePanRect|
|000017d0| 3a 20 20 7b 20 5c 20 64 | 78 20 64 79 20 2d 2d 20 |: { \ d|x dy -- |
|000017e0| 7d 0d 09 28 63 6f 65 72 | 63 65 50 61 6e 52 65 63 |}..(coer|cePanRec|
|000017f0| 74 29 3a 20 73 65 6c 66 | 20 20 2d 3e 20 64 79 20 |t): self| -> dy |
|00001800| 20 2d 3e 20 64 78 0d 09 | 64 78 20 64 79 20 6f 72 | -> dx..|dx dy or|
|00001810| 20 20 30 45 58 49 54 0d | 09 64 78 20 64 79 20 20 | 0EXIT.|.dx dy |
|00001820| 73 68 69 66 74 43 68 69 | 6c 64 72 65 6e 3a 20 73 |shiftChi|ldren: s|
|00001830| 65 6c 66 20 20 3b 6d 0d | 0d 0d 5c 20 48 65 72 65 |elf ;m.|..\ Here|
|00001840| 20 77 65 20 64 65 66 69 | 6e 65 20 74 68 65 20 64 | we defi|ne the d|
|00001850| 65 66 61 75 6c 74 20 70 | 61 6e 52 65 63 74 20 74 |efault p|anRect t|
|00001860| 6f 20 62 65 20 74 68 65 | 20 72 65 63 74 20 77 68 |o be the| rect wh|
|00001870| 69 63 68 20 6a 75 73 74 | 20 63 6f 6e 74 61 69 6e |ich just| contain|
|00001880| 73 0d 5c 20 61 6c 6c 20 | 74 68 65 20 63 68 69 6c |s.\ all |the chil|
|00001890| 64 20 76 69 65 77 73 2e | 20 20 43 68 61 6e 67 65 |d views.| Change|
|000018a0| 20 61 73 20 6e 65 63 65 | 73 73 61 72 79 2e 0d 0d | as nece|ssary...|
|000018b0| 3a 6d 20 44 66 6c 74 50 | 61 6e 52 65 63 74 3a 20 |:m DfltP|anRect: |
|000018c0| 20 7b 20 5c 20 6c 65 66 | 74 20 74 6f 70 20 72 74 | { \ lef|t top rt|
|000018d0| 20 62 6f 74 20 2d 2d 20 | 7d 0d 09 66 69 72 73 74 | bot -- |}..first|
|000018e0| 3f 3a 20 63 68 69 6c 64 | 72 65 6e 0d 09 4e 49 46 |?: child|ren..NIF|
|000018f0| 09 09 30 20 2d 3e 20 62 | 6f 74 20 20 30 20 2d 3e |..0 -> b|ot 0 ->|
|00001900| 20 72 74 20 20 30 20 2d | 3e 20 74 6f 70 20 20 30 | rt 0 -|> top 0|
|00001910| 20 2d 3e 20 6c 65 66 74 | 0d 09 45 4c 53 45 09 67 | -> left|..ELSE.g|
|00001920| 65 74 52 65 63 74 3a 20 | 5b 5d 20 20 2d 3e 20 62 |etRect: |[] -> b|
|00001930| 6f 74 20 20 2d 3e 20 72 | 74 20 20 2d 3e 20 74 6f |ot -> r|t -> to|
|00001940| 70 20 20 2d 3e 20 6c 65 | 66 74 0d 09 54 48 45 4e |p -> le|ft..THEN|
|00001950| 0d 09 42 45 47 49 4e 09 | 65 61 63 68 3a 20 63 68 |..BEGIN.|each: ch|
|00001960| 69 6c 64 72 65 6e 0d 09 | 57 48 49 4c 45 09 67 65 |ildren..|WHILE.ge|
|00001970| 74 52 65 63 74 3a 20 5b | 5d 0d 09 09 62 6f 74 20 |tRect: [|]...bot |
|00001980| 6d 61 78 20 2d 3e 20 62 | 6f 74 20 20 20 20 72 74 |max -> b|ot rt|
|00001990| 20 6d 61 78 20 2d 3e 20 | 72 74 0d 09 09 74 6f 70 | max -> |rt...top|
|000019a0| 20 6d 69 6e 20 2d 3e 20 | 74 6f 70 20 20 6c 65 66 | min -> |top lef|
|000019b0| 74 20 6d 69 6e 20 2d 3e | 20 6c 65 66 74 0d 09 52 |t min ->| left..R|
|000019c0| 45 50 45 41 54 0d 09 6c | 65 66 74 20 74 6f 70 20 |EPEAT..l|eft top |
|000019d0| 72 74 20 62 6f 74 20 20 | 70 75 74 3a 20 70 61 6e |rt bot |put: pan|
|000019e0| 52 65 63 74 20 20 3b 6d | 0d 0d 3a 6d 20 43 4c 41 |Rect ;m|..:m CLA|
|000019f0| 53 53 49 4e 49 54 3a 0d | 09 63 6c 61 73 73 69 6e |SSINIT:.|.classin|
|00001a00| 69 74 3a 20 73 75 70 65 | 72 20 20 73 65 74 3a 20 |it: supe|r set: |
|00001a10| 63 61 6e 48 61 76 65 46 | 6f 63 75 73 3f 20 20 3b |canHaveF|ocus? ;|
|00001a20| 6d 0d 0d 3b 63 6c 61 73 | 73 0d 0d 0d 0d 5c 09 09 |m..;clas|s....\..|
|00001a30| 09 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |.=======|========|
|00001a40| 3d 3d 20 53 63 72 6f 6c | 6c 65 72 20 3d 3d 3d 3d |== Scrol|ler ====|
|00001a50| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 0d |========|=======.|
|00001a60| 0d 5c 20 53 43 52 4f 4c | 4c 45 52 20 69 73 20 61 |.\ SCROL|LER is a|
|00001a70| 20 76 69 65 77 20 77 68 | 69 63 68 20 68 61 73 20 | view wh|ich has |
|00001a80| 73 75 70 70 6f 72 74 20 | 66 6f 72 20 61 20 76 65 |support |for a ve|
|00001a90| 72 74 69 63 61 6c 20 61 | 6e 64 20 68 6f 72 69 7a |rtical a|nd horiz|
|00001aa0| 6f 6e 74 61 6c 0d 5c 20 | 73 63 72 6f 6c 6c 20 62 |ontal.\ |scroll b|
|00001ab0| 61 72 20 61 6c 6f 6e 67 | 20 74 68 65 20 72 69 67 |ar along| the rig|
|00001ac0| 68 74 20 68 61 6e 64 20 | 61 6e 64 20 62 6f 74 74 |ht hand |and bott|
|00001ad0| 6f 6d 20 65 64 67 65 20 | 72 65 73 70 65 63 74 69 |om edge |respecti|
|00001ae0| 76 65 6c 79 2e 0d 5c 20 | 45 69 74 68 65 72 20 6d |vely..\ |Either m|
|00001af0| 61 79 20 62 65 20 70 72 | 65 73 65 6e 74 20 6f 72 |ay be pr|esent or|
|00001b00| 20 61 62 73 65 6e 74 2c | 20 61 6e 64 20 6d 61 79 | absent,| and may|
|00001b10| 20 68 61 76 65 20 61 6e | 20 6f 66 66 73 65 74 20 | have an| offset |
|00001b20| 6f 72 20 67 61 70 0d 5c | 20 61 74 20 65 69 74 68 |or gap.\| at eith|
|00001b30| 65 72 20 65 6e 64 20 6f | 66 20 61 20 73 70 65 63 |er end o|f a spec|
|00001b40| 69 66 69 65 64 20 61 6d | 6f 75 6e 74 2e 0d 0d 3a |ified am|ount...:|
|00001b50| 63 6c 61 73 73 09 53 43 | 52 4f 4c 4c 45 52 20 20 |class.SC|ROLLER |
|00001b60| 73 75 70 65 72 7b 20 76 | 69 65 77 20 7d 0d 0d 09 |super{ v|iew }...|
|00001b70| 6d 76 69 65 77 09 4d 61 | 69 6e 56 69 65 77 09 09 |mview.Ma|inView..|
|00001b80| 5c 20 54 68 65 20 64 69 | 73 70 6c 61 79 20 61 72 |\ The di|splay ar|
|00001b90| 65 61 2c 20 6d 69 6e 75 | 73 20 74 68 65 20 73 63 |ea, minu|s the sc|
|00001ba0| 72 6f 6c 6c 20 62 61 72 | 73 0d 09 76 73 63 72 6f |roll bar|s..vscro|
|00001bb0| 6c 6c 09 54 68 65 56 73 | 63 72 6f 6c 6c 0d 09 68 |ll.TheVs|croll..h|
|00001bc0| 73 63 72 6f 6c 6c 09 54 | 68 65 48 73 63 72 6f 6c |scroll.T|heHscrol|
|00001bd0| 6c 0d 0d 72 65 63 6f 72 | 64 0d 7b 09 62 6f 6f 6c |l..recor|d.{.bool|
|00001be0| 09 76 73 63 72 6f 6c 6c | 3f 09 09 5c 20 54 72 75 |.vscroll|?..\ Tru|
|00001bf0| 65 20 69 66 20 76 20 73 | 63 72 6f 6c 6c 20 62 61 |e if v s|croll ba|
|00001c00| 72 20 74 6f 20 62 65 20 | 75 73 65 64 0d 09 62 6f |r to be |used..bo|
|00001c10| 6f 6c 09 68 73 63 72 6f | 6c 6c 3f 09 09 5c 20 54 |ol.hscro|ll?..\ T|
|00001c20| 72 75 65 20 69 66 20 68 | 20 73 63 72 6f 6c 6c 20 |rue if h| scroll |
|00001c30| 62 61 72 20 74 6f 20 62 | 65 20 75 73 65 64 0d 09 |bar to b|e used..|
|00001c40| 62 6f 6f 6c 09 55 73 65 | 50 61 6e 52 65 63 74 3f |bool.Use|PanRect?|
|00001c50| 09 09 5c 20 54 72 75 65 | 20 69 66 20 77 65 27 72 |..\ True| if we'r|
|00001c60| 65 20 74 6f 20 75 73 65 | 20 50 61 6e 52 65 63 74 |e to use| PanRect|
|00001c70| 0d 0d 09 76 61 72 09 09 | 48 50 41 4e 09 09 09 5c |...var..|HPAN...\|
|00001c80| 20 48 6f 72 69 7a 6f 6e | 74 61 6c 20 70 61 6e 6e | Horizon|tal pann|
|00001c90| 69 6e 67 20 72 61 6e 67 | 65 0d 09 76 61 72 09 09 |ing rang|e..var..|
|00001ca0| 48 50 4f 53 09 09 09 5c | 20 43 75 72 72 65 6e 74 |HPOS...\| Current|
|00001cb0| 20 76 65 72 74 69 63 61 | 6c 20 70 6f 73 6e 0d 09 | vertica|l posn..|
|00001cc0| 76 61 72 09 09 56 50 41 | 4e 09 09 09 5c 20 56 65 |var..VPA|N...\ Ve|
|00001cd0| 72 74 69 63 61 6c 20 64 | 69 74 74 6f 0d 09 76 61 |rtical d|itto..va|
|00001ce0| 72 09 09 56 50 4f 53 0d | 0d 09 69 6e 74 09 09 48 |r..VPOS.|..int..H|
|00001cf0| 55 4e 49 54 09 09 09 5c | 20 23 20 70 69 78 65 6c |UNIT...\| # pixel|
|00001d00| 73 20 66 6f 72 20 6f 6e | 65 20 68 6f 72 69 7a 6f |s for on|e horizo|
|00001d10| 6e 74 61 6c 20 61 72 72 | 6f 77 20 63 6c 69 63 6b |ntal arr|ow click|
|00001d20| 0d 09 69 6e 74 09 09 56 | 55 4e 49 54 0d 09 0d 09 |..int..V|UNIT....|
|00001d30| 69 6e 74 09 09 4c 67 61 | 70 09 09 09 5c 20 54 68 |int..Lga|p...\ Th|
|00001d40| 65 20 22 67 61 70 73 22 | 20 61 74 20 74 68 65 20 |e "gaps"| at the |
|00001d50| 65 6e 64 73 20 6f 66 20 | 74 68 65 20 73 63 72 6f |ends of |the scro|
|00001d60| 6c 6c 20 62 61 72 73 0d | 09 69 6e 74 09 09 54 67 |ll bars.|.int..Tg|
|00001d70| 61 70 09 09 09 5c 20 28 | 6e 6f 72 6d 61 6c 6c 79 |ap...\ (|normally|
|00001d80| 20 7a 65 72 6f 2c 20 62 | 75 74 20 63 61 6e 20 62 | zero, b|ut can b|
|00001d90| 65 20 73 70 65 63 69 66 | 69 65 64 29 0d 09 69 6e |e specif|ied)..in|
|00001da0| 74 09 09 52 67 61 70 0d | 09 69 6e 74 09 09 42 67 |t..Rgap.|.int..Bg|
|00001db0| 61 70 0d 7d 0d 0d 3a 6d | 20 53 65 74 50 61 6e 52 |ap.}..:m| SetPanR|
|00001dc0| 61 6e 67 65 73 3a 20 20 | 7b 20 5c 20 6c 65 66 74 |anges: |{ \ left|
|00001dd0| 20 74 6f 70 20 72 74 20 | 62 6f 74 20 70 4c 65 66 | top rt |bot pLef|
|00001de0| 74 20 70 54 6f 70 20 70 | 52 74 20 70 42 6f 74 20 |t pTop p|Rt pBot |
|00001df0| 2d 2d 20 7d 0d 09 67 65 | 74 56 69 65 77 52 65 63 |-- }..ge|tViewRec|
|00001e00| 74 3a 20 6d 61 69 6e 56 | 69 65 77 20 20 2d 3e 20 |t: mainV|iew -> |
|00001e10| 62 6f 74 20 20 2d 3e 20 | 72 74 20 20 2d 3e 20 74 |bot -> |rt -> t|
|00001e20| 6f 70 20 20 2d 3e 20 6c | 65 66 74 0d 09 67 65 74 |op -> l|eft..get|
|00001e30| 50 61 6e 52 65 63 74 3a | 20 6d 61 69 6e 56 69 65 |PanRect:| mainVie|
|00001e40| 77 20 20 2d 3e 20 70 42 | 6f 74 20 20 2d 3e 20 70 |w -> pB|ot -> p|
|00001e50| 52 74 20 20 2d 3e 20 70 | 54 6f 70 20 20 2d 3e 20 |Rt -> p|Top -> |
|00001e60| 70 4c 65 66 74 0d 09 6c | 65 66 74 20 70 4c 65 66 |pLeft..l|eft pLef|
|00001e70| 74 20 2d 20 20 64 75 70 | 20 20 30 20 6d 61 78 20 |t - dup| 0 max |
|00001e80| 20 70 75 74 3a 20 48 70 | 6f 73 0d 09 70 52 74 20 | put: Hp|os..pRt |
|00001e90| 72 74 20 2d 20 20 2b 20 | 20 30 20 20 6d 61 78 20 |rt - + | 0 max |
|00001ea0| 20 70 75 74 3a 20 48 70 | 61 6e 0d 09 74 6f 70 20 | put: Hp|an..top |
|00001eb0| 70 54 6f 70 20 2d 20 20 | 64 75 70 20 20 30 20 6d |pTop - |dup 0 m|
|00001ec0| 61 78 20 20 70 75 74 3a | 20 56 70 6f 73 0d 09 70 |ax put:| Vpos..p|
|00001ed0| 42 6f 74 20 62 6f 74 20 | 2d 20 20 2b 20 20 30 20 |Bot bot |- + 0 |
|00001ee0| 6d 61 78 20 20 70 75 74 | 3a 20 56 70 61 6e 0d 0d |max put|: Vpan..|
|00001ef0| 09 6e 6f 43 6c 69 70 09 | 09 5c 20 73 65 65 6d 73 |.noClip.|.\ seems|
|00001f00| 20 77 65 20 6e 65 65 64 | 20 6f 6e 65 20 62 65 66 | we need| one bef|
|00001f10| 6f 72 65 20 73 65 74 74 | 69 6e 67 20 65 61 63 68 |ore sett|ing each|
|00001f20| 20 73 63 72 6f 6c 6c 20 | 62 61 72 0d 09 67 65 74 | scroll |bar..get|
|00001f30| 3a 20 76 73 63 72 6f 6c | 6c 3f 0d 09 49 46 09 30 |: vscrol|l?..IF.0|
|00001f40| 20 20 67 65 74 3a 20 76 | 70 61 6e 20 20 70 75 74 | get: v|pan put|
|00001f50| 52 61 6e 67 65 3a 20 74 | 68 65 56 73 63 72 6f 6c |Range: t|heVscrol|
|00001f60| 6c 0d 09 09 67 65 74 3a | 20 76 70 61 6e 0d 09 09 |l...get:| vpan...|
|00001f70| 49 46 09 67 65 74 3a 20 | 76 70 6f 73 20 20 70 75 |IF.get: |vpos pu|
|00001f80| 74 3a 20 74 68 65 56 73 | 63 72 6f 6c 6c 0d 09 09 |t: theVs|croll...|
|00001f90| 09 67 65 74 3a 20 65 6e | 61 62 6c 65 64 3f 20 49 |.get: en|abled? I|
|00001fa0| 46 20 20 65 6e 61 62 6c | 65 3a 20 74 68 65 56 73 |F enabl|e: theVs|
|00001fb0| 63 72 6f 6c 6c 20 20 54 | 48 45 4e 09 09 5c 20 4f |croll T|HEN..\ O|
|00001fc0| 63 74 39 36 20 6d 72 68 | 0d 09 09 45 4c 53 45 0d |ct96 mrh|...ELSE.|
|00001fd0| 09 09 09 30 20 70 75 74 | 3a 20 74 68 65 56 73 63 |...0 put|: theVsc|
|00001fe0| 72 6f 6c 6c 0d 09 09 09 | 64 69 73 61 62 6c 65 3a |roll....|disable:|
|00001ff0| 20 74 68 65 56 73 63 72 | 6f 6c 6c 0d 09 09 54 48 | theVscr|oll...TH|
|00002000| 45 4e 0d 09 54 48 45 4e | 0d 0d 09 6e 6f 43 6c 69 |EN..THEN|...noCli|
|00002010| 70 0d 09 67 65 74 3a 20 | 68 73 63 72 6f 6c 6c 3f |p..get: |hscroll?|
|00002020| 0d 09 49 46 09 30 20 20 | 67 65 74 3a 20 68 70 61 |..IF.0 |get: hpa|
|00002030| 6e 20 20 70 75 74 52 61 | 6e 67 65 3a 20 74 68 65 |n putRa|nge: the|
|00002040| 48 73 63 72 6f 6c 6c 0d | 09 09 67 65 74 3a 20 68 |Hscroll.|..get: h|
|00002050| 70 61 6e 0d 09 09 49 46 | 09 67 65 74 3a 20 68 70 |pan...IF|.get: hp|
|00002060| 6f 73 20 20 70 75 74 3a | 20 74 68 65 48 73 63 72 |os put:| theHscr|
|00002070| 6f 6c 6c 0d 09 09 09 67 | 65 74 3a 20 65 6e 61 62 |oll....g|et: enab|
|00002080| 6c 65 64 3f 20 49 46 20 | 20 65 6e 61 62 6c 65 3a |led? IF | enable:|
|00002090| 20 74 68 65 48 73 63 72 | 6f 6c 6c 20 20 54 48 45 | theHscr|oll THE|
|000020a0| 4e 09 09 5c 20 4f 63 74 | 39 36 20 6d 72 68 0d 09 |N..\ Oct|96 mrh..|
|000020b0| 09 45 4c 53 45 0d 09 09 | 09 30 20 70 75 74 3a 20 |.ELSE...|.0 put: |
|000020c0| 74 68 65 48 73 63 72 6f | 6c 6c 0d 09 09 09 64 69 |theHscro|ll....di|
|000020d0| 73 61 62 6c 65 3a 20 74 | 68 65 48 73 63 72 6f 6c |sable: t|heHscrol|
|000020e0| 6c 0d 09 09 54 48 45 4e | 0d 09 54 48 45 4e 0d 3b |l...THEN|..THEN.;|
|000020f0| 6d 0d 0d 0d 3a 6d 20 46 | 69 78 50 61 6e 52 65 63 |m...:m F|ixPanRec|
|00002100| 74 3a 0d 09 67 65 74 3a | 20 75 73 65 50 61 6e 52 |t:..get:| usePanR|
|00002110| 65 63 74 3f 20 20 4e 49 | 46 20 20 64 66 6c 74 50 |ect? NI|F dfltP|
|00002120| 61 6e 52 65 63 74 3a 20 | 6d 61 69 6e 56 69 65 77 |anRect: |mainView|
|00002130| 20 20 54 48 45 4e 0d 09 | 63 6f 65 72 63 65 50 61 | THEN..|coercePa|
|00002140| 6e 52 65 63 74 3a 20 6d | 61 69 6e 56 69 65 77 0d |nRect: m|ainView.|
|00002150| 09 73 65 74 50 61 6e 52 | 61 6e 67 65 73 3a 20 73 |.setPanR|anges: s|
|00002160| 65 6c 66 20 20 3b 6d 0d | 0d 0d 3a 6d 20 46 69 78 |elf ;m.|..:m Fix|
|00002170| 4d 61 69 6e 56 69 65 77 | 42 6f 75 6e 64 73 3a 0d |MainView|Bounds:.|
|00002180| 09 67 65 74 42 6f 75 6e | 64 73 3a 20 6d 61 69 6e |.getBoun|ds: main|
|00002190| 56 69 65 77 20 20 32 64 | 72 6f 70 09 09 5c 20 44 |View 2d|rop..\ D|
|000021a0| 6f 6e 27 74 20 63 68 61 | 6e 67 65 20 6c 65 66 74 |on't cha|nge left|
|000021b0| 20 6f 72 20 74 6f 70 0d | 09 2d 31 36 20 67 65 74 | or top.|.-16 get|
|000021c0| 3a 20 76 73 63 72 6f 6c | 6c 3f 20 61 6e 64 20 20 |: vscrol|l? and |
|000021d0| 2d 31 36 20 67 65 74 3a | 20 68 73 63 72 6f 6c 6c |-16 get:| hscroll|
|000021e0| 3f 20 61 6e 64 0d 09 73 | 65 74 42 6f 75 6e 64 73 |? and..s|etBounds|
|000021f0| 3a 20 6d 61 69 6e 56 69 | 65 77 20 20 3b 6d 0d 0d |: mainVi|ew ;m..|
|00002200| 0d 3a 6d 20 46 69 78 48 | 73 63 72 6f 6c 6c 42 6f |.:m FixH|scrollBo|
|00002210| 75 6e 64 73 3a 0d 09 2d | 31 20 67 65 74 3a 20 4c |unds:..-|1 get: L|
|00002220| 67 61 70 20 2b 09 09 09 | 09 09 09 5c 20 6c 65 66 |gap +...|...\ lef|
|00002230| 74 0d 09 2d 31 36 09 09 | 09 09 09 09 09 09 09 5c |t..-16..|.......\|
|00002240| 20 74 6f 70 0d 5c 09 2d | 31 35 20 67 65 74 3a 20 | top.\.-|15 get: |
|00002250| 76 73 63 72 6f 6c 6c 3f | 20 61 6e 64 20 20 67 65 |vscroll?| and ge|
|00002260| 74 3a 20 52 67 61 70 20 | 2d 09 5c 20 72 69 67 68 |t: Rgap |-.\ righ|
|00002270| 74 0d 09 67 65 74 3a 20 | 76 73 63 72 6f 6c 6c 3f |t..get: |vscroll?|
|00002280| 20 49 46 20 20 2d 31 35 | 20 20 45 4c 53 45 20 20 | IF -15| ELSE |
|00002290| 31 20 20 54 48 45 4e 0d | 09 67 65 74 3a 20 52 67 |1 THEN.|.get: Rg|
|000022a0| 61 70 20 2d 09 09 09 09 | 09 09 09 5c 20 72 69 67 |ap -....|...\ rig|
|000022b0| 68 74 09 09 2d 6d 72 68 | 20 31 33 2d 6d 61 72 2d |ht..-mrh| 13-mar-|
|000022c0| 30 37 0d 09 30 09 09 09 | 09 09 09 09 09 09 5c 20 |07..0...|......\ |
|000022d0| 62 6f 74 74 6f 6d 0d 09 | 73 65 74 42 6f 75 6e 64 |bottom..|setBound|
|000022e0| 73 3a 20 74 68 65 48 73 | 63 72 6f 6c 6c 20 20 6d |s: theHs|croll m|
|000022f0| 6f 76 65 64 3a 20 74 68 | 65 48 73 63 72 6f 6c 6c |oved: th|eHscroll|
|00002300| 20 20 3b 6d 0d 0d 3a 6d | 20 46 69 78 56 73 63 72 | ;m..:m| FixVscr|
|00002310| 6f 6c 6c 42 6f 75 6e 64 | 73 3a 0d 09 2d 31 36 09 |ollBound|s:..-16.|
|00002320| 09 09 09 09 09 09 09 09 | 5c 20 6c 65 66 74 0d 09 |........|\ left..|
|00002330| 2d 31 20 20 67 65 74 3a | 20 54 67 61 70 20 2b 09 |-1 get:| Tgap +.|
|00002340| 09 09 09 09 09 5c 20 74 | 6f 70 0d 09 30 09 09 09 |.....\ t|op..0...|
|00002350| 09 09 09 09 09 09 5c 20 | 72 69 67 68 74 0d 5c 09 |......\ |right.\.|
|00002360| 2d 31 35 20 67 65 74 3a | 20 68 73 63 72 6f 6c 6c |-15 get:| hscroll|
|00002370| 3f 20 61 6e 64 20 20 67 | 65 74 3a 20 42 67 61 70 |? and g|et: Bgap|
|00002380| 20 2d 20 20 5c 20 62 6f | 74 74 6f 6d 0d 09 67 65 | - \ bo|ttom..ge|
|00002390| 74 3a 20 68 73 63 72 6f | 6c 6c 3f 20 49 46 20 20 |t: hscro|ll? IF |
|000023a0| 2d 31 35 20 20 45 4c 53 | 45 20 20 31 20 20 54 48 |-15 ELS|E 1 TH|
|000023b0| 45 4e 0d 09 67 65 74 3a | 20 42 67 61 70 20 2d 20 |EN..get:| Bgap - |
|000023c0| 20 09 09 09 09 09 09 5c | 20 62 6f 74 74 6f 6d 09 | ......\| bottom.|
|000023d0| 2d 6d 72 68 20 31 33 2d | 6d 61 72 2d 30 37 0d 09 |-mrh 13-|mar-07..|
|000023e0| 73 65 74 42 6f 75 6e 64 | 73 3a 20 74 68 65 56 73 |setBound|s: theVs|
|000023f0| 63 72 6f 6c 6c 20 20 6d | 6f 76 65 64 3a 20 74 68 |croll m|oved: th|
|00002400| 65 56 73 63 72 6f 6c 6c | 20 20 3b 6d 0d 0d 70 75 |eVscroll| ;m..pu|
|00002410| 62 6c 69 63 0d 0d 0d 28 | 20 62 20 2d 2d 20 29 0d |blic...(| b -- ).|
|00002420| 3a 6d 20 56 53 43 52 4f | 4c 4c 3a 09 20 70 75 74 |:m VSCRO|LL:. put|
|00002430| 3a 20 76 73 63 72 6f 6c | 6c 3f 20 20 66 69 78 4d |: vscrol|l? fixM|
|00002440| 61 69 6e 56 69 65 77 42 | 6f 75 6e 64 73 3a 20 73 |ainViewB|ounds: s|
|00002450| 65 6c 66 20 20 3b 6d 0d | 3a 6d 20 48 53 43 52 4f |elf ;m.|:m HSCRO|
|00002460| 4c 4c 3a 09 20 70 75 74 | 3a 20 68 73 63 72 6f 6c |LL:. put|: hscrol|
|00002470| 6c 3f 20 20 66 69 78 4d | 61 69 6e 56 69 65 77 42 |l? fixM|ainViewB|
|00002480| 6f 75 6e 64 73 3a 20 73 | 65 6c 66 20 20 3b 6d 0d |ounds: s|elf ;m.|
|00002490| 0d 0d 3a 6d 20 50 55 54 | 50 41 4e 52 45 43 54 3a |..:m PUT|PANRECT:|
|000024a0| 20 20 28 20 6c 20 74 20 | 72 20 62 20 2d 2d 20 29 | ( l t |r b -- )|
|000024b0| 0d 09 70 75 74 50 61 6e | 52 65 63 74 3a 20 6d 61 |..putPan|Rect: ma|
|000024c0| 69 6e 56 69 65 77 20 20 | 74 72 75 65 20 70 75 74 |inView |true put|
|000024d0| 3a 20 75 73 65 50 61 6e | 52 65 63 74 3f 0d 09 63 |: usePan|Rect?..c|
|000024e0| 6f 65 72 63 65 50 61 6e | 52 65 63 74 3a 20 6d 61 |oercePan|Rect: ma|
|000024f0| 69 6e 56 69 65 77 20 20 | 73 65 74 50 61 6e 52 61 |inView |setPanRa|
|00002500| 6e 67 65 73 3a 20 73 65 | 6c 66 20 20 3b 6d 0d 0d |nges: se|lf ;m..|
|00002510| 5c 20 61 64 64 76 69 65 | 77 3a 20 6e 65 65 64 73 |\ addvie|w: needs|
|00002520| 20 74 6f 20 61 64 64 20 | 74 68 65 20 63 68 69 6c | to add |the chil|
|00002530| 64 20 76 69 65 77 20 74 | 6f 20 6d 61 69 6e 56 69 |d view t|o mainVi|
|00002540| 65 77 2c 20 6e 6f 74 20 | 74 6f 0d 5c 20 20 74 68 |ew, not |to.\ th|
|00002550| 65 20 53 63 72 6f 6c 6c | 65 72 20 69 74 73 65 6c |e Scroll|er itsel|
|00002560| 66 2e 0d 0d 3a 6d 20 41 | 44 44 56 49 45 57 3a 09 |f...:m A|DDVIEW:.|
|00002570| 09 61 64 64 56 69 65 77 | 3a 20 6d 61 69 6e 56 69 |.addView|: mainVi|
|00002580| 65 77 20 20 3b 6d 0d 0d | 28 20 6e 20 2d 2d 20 29 |ew ;m..|( n -- )|
|00002590| 0d 3a 6d 20 3e 48 55 4e | 49 54 3a 09 70 75 74 3a |.:m >HUN|IT:.put:|
|000025a0| 20 48 75 6e 69 74 20 20 | 3b 6d 0d 3a 6d 20 3e 56 | Hunit |;m.:m >V|
|000025b0| 55 4e 49 54 3a 09 70 75 | 74 3a 20 56 75 6e 69 74 |UNIT:.pu|t: Vunit|
|000025c0| 20 20 3b 6d 0d 0d 3a 6d | 20 3e 56 52 41 4e 47 45 | ;m..:m| >VRANGE|
|000025d0| 3a 09 70 75 74 52 61 6e | 67 65 3a 20 74 68 65 56 |:.putRan|ge: theV|
|000025e0| 73 63 72 6f 6c 6c 20 20 | 3b 6d 0d 3a 6d 20 3e 48 |scroll |;m.:m >H|
|000025f0| 52 41 4e 47 45 3a 09 70 | 75 74 52 61 6e 67 65 3a |RANGE:.p|utRange:|
|00002600| 20 74 68 65 48 73 63 72 | 6f 6c 6c 20 20 3b 6d 0d | theHscr|oll ;m.|
|00002610| 0d 3a 6d 20 3e 47 41 50 | 53 3a 09 28 20 6c 20 74 |.:m >GAP|S:.( l t|
|00002620| 20 72 20 62 20 2d 2d 20 | 29 0d 09 70 75 74 3a 20 | r b -- |)..put: |
|00002630| 42 67 61 70 20 20 70 75 | 74 3a 20 52 67 61 70 20 |Bgap pu|t: Rgap |
|00002640| 20 70 75 74 3a 20 54 67 | 61 70 20 20 70 75 74 3a | put: Tg|ap put:|
|00002650| 20 4c 67 61 70 0d 3b 6d | 0d 0d 3a 6d 20 3f 56 45 | Lgap.;m|..:m ?VE|
|00002660| 4e 41 42 4c 45 3a 0d 09 | 67 65 74 3a 20 76 73 63 |NABLE:..|get: vsc|
|00002670| 72 6f 6c 6c 3f 20 20 30 | 45 58 49 54 0d 09 73 68 |roll? 0|EXIT..sh|
|00002680| 6f 77 3a 20 74 68 65 56 | 73 63 72 6f 6c 6c 09 5c |ow: theV|scroll.\|
|00002690| 20 4e 6f 76 39 35 20 4a | 52 46 20 6e 6f 77 20 70 | Nov95 J|RF now p|
|000026a0| 72 6f 70 65 72 6c 79 20 | 68 69 64 69 6e 67 20 61 |roperly |hiding a|
|000026b0| 6e 64 20 73 68 6f 77 69 | 6e 67 20 73 63 72 6f 6c |nd showi|ng scrol|
|000026c0| 6c 62 61 72 73 0d 09 67 | 65 74 3a 20 56 70 61 6e |lbars..g|et: Vpan|
|000026d0| 20 20 30 45 58 49 54 0d | 09 65 6e 61 62 6c 65 3a | 0EXIT.|.enable:|
|000026e0| 20 74 68 65 56 73 63 72 | 6f 6c 6c 20 20 3b 6d 0d | theVscr|oll ;m.|
|000026f0| 0d 3a 6d 20 3f 48 45 4e | 41 42 4c 45 3a 0d 09 67 |.:m ?HEN|ABLE:..g|
|00002700| 65 74 3a 20 68 73 63 72 | 6f 6c 6c 3f 20 20 30 45 |et: hscr|oll? 0E|
|00002710| 58 49 54 0d 09 73 68 6f | 77 3a 20 74 68 65 48 73 |XIT..sho|w: theHs|
|00002720| 63 72 6f 6c 6c 09 5c 20 | 4e 6f 76 39 35 20 4a 52 |croll.\ |Nov95 JR|
|00002730| 46 0d 09 67 65 74 3a 20 | 48 70 61 6e 20 20 30 45 |F..get: |Hpan 0E|
|00002740| 58 49 54 0d 09 65 6e 61 | 62 6c 65 3a 20 74 68 65 |XIT..ena|ble: the|
|00002750| 48 73 63 72 6f 6c 6c 20 | 20 3b 6d 0d 0d 0d 3a 6d |Hscroll | ;m...:m|
|00002760| 20 4e 45 57 3a 09 09 5c | 20 6d 61 69 6e 56 69 65 | NEW:..\| mainVie|
|00002770| 77 20 61 6e 64 20 74 68 | 65 20 32 20 73 63 72 6f |w and th|e 2 scro|
|00002780| 6c 6c 20 62 61 72 73 20 | 61 72 65 20 69 76 61 72 |ll bars |are ivar|
|00002790| 73 2c 20 62 75 74 20 74 | 68 65 79 20 68 61 76 65 |s, but t|hey have|
|000027a0| 20 74 6f 20 62 65 0d 09 | 09 09 5c 20 20 63 68 69 | to be..|..\ chi|
|000027b0| 6c 64 72 65 6e 20 61 73 | 20 77 65 6c 6c 21 0d 09 |ldren as| well!..|
|000027c0| 61 64 64 72 3a 20 6d 61 | 69 6e 56 69 65 77 09 09 |addr: ma|inView..|
|000027d0| 61 64 64 56 69 65 77 3a | 20 73 75 70 65 72 0d 09 |addView:| super..|
|000027e0| 67 65 74 3a 20 68 73 63 | 72 6f 6c 6c 3f 20 20 49 |get: hsc|roll? I|
|000027f0| 46 20 20 61 64 64 72 3a | 20 74 68 65 48 73 63 72 |F addr:| theHscr|
|00002800| 6f 6c 6c 20 20 61 64 64 | 56 69 65 77 3a 20 73 75 |oll add|View: su|
|00002810| 70 65 72 20 20 54 48 45 | 4e 0d 09 67 65 74 3a 20 |per THE|N..get: |
|00002820| 76 73 63 72 6f 6c 6c 3f | 20 20 49 46 20 20 61 64 |vscroll?| IF ad|
|00002830| 64 72 3a 20 74 68 65 56 | 73 63 72 6f 6c 6c 20 20 |dr: theV|scroll |
|00002840| 61 64 64 56 69 65 77 3a | 20 73 75 70 65 72 20 20 |addView:| super |
|00002850| 54 48 45 4e 0d 09 6e 65 | 77 3a 20 73 75 70 65 72 |THEN..ne|w: super|
|00002860| 0d 09 67 65 74 3a 20 6c | 61 73 74 53 69 62 52 65 |..get: l|astSibRe|
|00002870| 63 74 0d 09 66 69 78 48 | 73 63 72 6f 6c 6c 42 6f |ct..fixH|scrollBo|
|00002880| 75 6e 64 73 3a 20 73 65 | 6c 66 20 20 66 69 78 56 |unds: se|lf fixV|
|00002890| 73 63 72 6f 6c 6c 42 6f | 75 6e 64 73 3a 20 73 65 |scrollBo|unds: se|
|000028a0| 6c 66 0d 09 66 69 78 50 | 61 6e 52 65 63 74 3a 20 |lf..fixP|anRect: |
|000028b0| 73 65 6c 66 0d 09 70 75 | 74 3a 20 6c 61 73 74 53 |self..pu|t: lastS|
|000028c0| 69 62 52 65 63 74 20 20 | 3b 6d 0d 0d 0d 3a 6d 20 |ibRect |;m...:m |
|000028d0| 45 4e 41 42 4c 45 3a 0d | 09 67 65 74 3a 20 61 6c |ENABLE:.|.get: al|
|000028e0| 69 76 65 3f 20 20 30 45 | 58 49 54 0d 09 3f 56 65 |ive? 0E|XIT..?Ve|
|000028f0| 6e 61 62 6c 65 3a 20 73 | 65 6c 66 20 20 3f 48 65 |nable: s|elf ?He|
|00002900| 6e 61 62 6c 65 3a 20 73 | 65 6c 66 0d 09 65 6e 61 |nable: s|elf..ena|
|00002910| 62 6c 65 3a 20 73 75 70 | 65 72 20 20 3b 6d 0d 0d |ble: sup|er ;m..|
|00002920| 3a 6d 20 44 49 53 41 42 | 4c 45 3a 0d 09 67 65 74 |:m DISAB|LE:..get|
|00002930| 3a 20 61 6c 69 76 65 3f | 20 20 30 45 58 49 54 0d |: alive?| 0EXIT.|
|00002940| 09 67 65 74 3a 20 76 73 | 63 72 6f 6c 6c 3f 20 20 |.get: vs|croll? |
|00002950| 69 66 20 20 64 69 73 61 | 62 6c 65 3a 20 74 68 65 |if disa|ble: the|
|00002960| 56 73 63 72 6f 6c 6c 20 | 20 68 69 64 65 3a 20 74 |Vscroll | hide: t|
|00002970| 68 65 56 73 63 72 6f 6c | 6c 20 74 68 65 6e 09 5c |heVscrol|l then.\|
|00002980| 20 4a 52 46 0d 09 67 65 | 74 3a 20 68 73 63 72 6f | JRF..ge|t: hscro|
|00002990| 6c 6c 3f 20 20 69 66 20 | 20 64 69 73 61 62 6c 65 |ll? if | disable|
|000029a0| 3a 20 74 68 65 48 73 63 | 72 6f 6c 6c 20 20 68 69 |: theHsc|roll hi|
|000029b0| 64 65 3a 20 74 68 65 48 | 73 63 72 6f 6c 6c 20 74 |de: theH|scroll t|
|000029c0| 68 65 6e 09 5c 20 4a 52 | 46 0d 09 64 69 73 61 62 |hen.\ JR|F..disab|
|000029d0| 6c 65 3a 20 73 75 70 65 | 72 20 20 3b 6d 0d 0d 0d |le: supe|r ;m...|
|000029e0| 3a 6d 20 4d 4f 56 45 44 | 3a 0d 09 6d 6f 76 65 64 |:m MOVED|:..moved|
|000029f0| 3a 20 73 75 70 65 72 0d | 09 66 69 78 50 61 6e 52 |: super.|.fixPanR|
|00002a00| 65 63 74 3a 20 73 65 6c | 66 0d 09 75 70 64 61 74 |ect: sel|f..updat|
|00002a10| 65 3a 20 73 65 6c 66 20 | 20 3b 6d 0d 0d 0d 0d 28 |e: self | ;m....(|
|00002a20| 2a 09 50 41 4e 3a 20 28 | 20 64 78 20 64 79 20 2d |*.PAN: (| dx dy -|
|00002a30| 2d 20 29 20 20 70 61 6e | 73 20 74 68 65 20 76 69 |- ) pan|s the vi|
|00002a40| 65 77 20 6f 76 65 72 20 | 74 68 65 20 73 75 62 76 |ew over |the subv|
|00002a50| 69 65 77 73 20 62 79 20 | 74 68 65 20 67 69 76 65 |iews by |the give|
|00002a60| 6e 20 64 69 73 74 61 6e | 63 65 2e 0d 09 44 6f 65 |n distan|ce...Doe|
|00002a70| 73 6e 27 74 20 61 6c 74 | 65 72 20 74 68 65 20 73 |sn't alt|er the s|
|00002a80| 63 72 6f 6c 6c 20 62 61 | 72 73 20 2d 2d 20 75 73 |croll ba|rs -- us|
|00002a90| 65 20 50 41 4e 52 49 47 | 48 54 3a 20 65 74 63 2e |e PANRIG|HT: etc.|
|00002aa0| 20 66 6f 72 20 74 68 69 | 73 2c 20 73 69 6e 63 65 | for thi|s, since|
|00002ab0| 20 74 68 65 79 0d 09 61 | 64 6a 75 73 74 20 74 68 | they..a|djust th|
|00002ac0| 65 20 61 70 70 72 6f 70 | 72 69 61 74 65 20 73 63 |e approp|riate sc|
|00002ad0| 72 6f 6c 6c 20 62 61 72 | 20 61 6e 64 20 74 68 65 |roll bar| and the|
|00002ae0| 6e 20 63 61 6c 6c 20 50 | 41 4e 3a 2e 0d 0d 09 4f |n call P|AN:....O|
|00002af0| 75 72 20 63 6f 6e 76 65 | 6e 74 69 6f 6e 20 69 73 |ur conve|ntion is|
|00002b00| 20 74 68 61 74 20 70 6f | 73 69 74 69 76 65 20 64 | that po|sitive d|
|00002b10| 78 20 61 6e 64 20 64 79 | 20 63 6f 72 72 65 73 70 |x and dy| corresp|
|00002b20| 6f 6e 64 20 74 6f 20 61 | 20 70 61 6e 20 74 6f 20 |ond to a| pan to |
|00002b30| 74 68 65 0d 09 72 69 67 | 68 74 20 61 6e 64 20 64 |the..rig|ht and d|
|00002b40| 6f 77 6e 2c 20 77 68 69 | 63 68 20 6d 65 61 6e 73 |own, whi|ch means|
|00002b50| 20 74 68 61 74 20 74 68 | 65 20 73 75 62 76 69 65 | that th|e subvie|
|00002b60| 77 73 20 61 72 65 20 62 | 65 69 6e 67 20 73 68 69 |ws are b|eing shi|
|00002b70| 66 74 65 64 20 74 6f 20 | 74 68 65 0d 09 6c 65 66 |fted to |the..lef|
|00002b80| 74 20 61 6e 64 20 75 70 | 2c 20 77 68 69 63 68 20 |t and up|, which |
|00002b90| 69 73 20 61 20 22 6e 65 | 67 61 74 69 76 65 22 20 |is a "ne|gative" |
|00002ba0| 73 68 69 66 74 2e 20 20 | 49 74 27 73 20 76 65 72 |shift. |It's ver|
|00002bb0| 79 20 65 61 73 79 20 74 | 6f 20 67 65 74 20 74 68 |y easy t|o get th|
|00002bc0| 69 73 0d 09 6d 69 78 65 | 64 20 75 70 2c 20 62 75 |is..mixe|d up, bu|
|00002bd0| 74 20 69 74 20 77 6f 75 | 6c 64 20 62 65 20 6a 75 |t it wou|ld be ju|
|00002be0| 73 74 20 61 73 20 63 6f | 6e 66 75 73 69 6e 67 20 |st as co|nfusing |
|00002bf0| 69 66 20 49 20 64 69 64 | 20 69 74 20 74 68 65 20 |if I did| it the |
|00002c00| 6f 74 68 65 72 20 77 61 | 79 0d 09 61 72 6f 75 6e |other wa|y..aroun|
|00002c10| 64 2e 20 20 49 66 20 73 | 6f 6d 65 74 68 69 6e 67 |d. If s|omething|
|00002c20| 20 64 6f 65 73 6e 27 74 | 20 77 6f 72 6b 2c 20 74 | doesn't| work, t|
|00002c30| 72 79 20 72 65 76 65 72 | 73 69 6e 67 20 74 68 65 |ry rever|sing the|
|00002c40| 20 73 69 67 6e 73 21 21 | 0d 0d 09 41 6e 6f 74 68 | signs!!|...Anoth|
|00002c50| 65 72 20 70 6f 69 6e 74 | 20 74 6f 20 6e 6f 74 65 |er point| to note|
|00002c60| 20 69 73 20 74 68 61 74 | 20 49 27 76 65 20 66 6f | is that| I've fo|
|00002c70| 75 6e 64 20 62 79 20 65 | 78 70 65 72 69 6d 65 6e |und by e|xperimen|
|00002c80| 74 61 74 69 6f 6e 20 74 | 68 61 74 20 69 66 0d 09 |tation t|hat if..|
|00002c90| 74 68 65 20 6d 6f 75 73 | 65 20 69 73 20 68 65 6c |the mous|e is hel|
|00002ca0| 64 20 64 6f 77 6e 20 69 | 6e 20 61 20 73 63 72 6f |d down i|n a scro|
|00002cb0| 6c 6c 20 62 61 72 20 61 | 72 72 6f 77 2c 20 6f 75 |ll bar a|rrow, ou|
|00002cc0| 72 20 61 72 72 6f 77 20 | 72 6f 75 74 69 6e 65 2c |r arrow |routine,|
|00002cd0| 20 77 68 69 63 68 0d 09 | 69 73 20 70 61 73 73 65 | which..|is passe|
|00002ce0| 64 20 74 6f 20 54 72 61 | 63 6b 43 6f 6e 74 72 6f |d to Tra|ckContro|
|00002cf0| 6c 20 61 73 20 61 20 70 | 72 6f 63 2c 20 67 65 74 |l as a p|roc, get|
|00002d00| 73 20 63 61 6c 6c 65 64 | 20 63 6f 6e 74 69 6e 75 |s called| continu|
|00002d10| 61 6c 6c 79 20 2d 2d 20 | 74 68 75 73 20 77 65 0d |ally -- |thus we.|
|00002d20| 09 63 61 6e 27 74 20 68 | 61 6e 64 6c 65 20 61 6e |.can't h|andle an|
|00002d30| 20 75 70 64 61 74 65 20 | 65 76 65 6e 74 20 6f 6e | update |event on|
|00002d40| 20 74 68 65 20 77 69 6e | 64 6f 77 20 61 72 65 20 | the win|dow are |
|00002d50| 75 6e 74 69 6c 20 6d 6f | 75 73 65 2d 75 70 2e 20 |until mo|use-up. |
|00002d60| 20 49 27 6d 20 6e 6f 74 | 0d 09 65 76 65 6e 20 73 | I'm not|..even s|
|00002d70| 75 72 65 20 74 68 65 72 | 65 20 69 73 20 61 6e 20 |ure ther|e is an |
|00002d80| 75 70 64 61 74 65 20 65 | 76 65 6e 74 20 75 6e 74 |update e|vent unt|
|00002d90| 69 6c 20 74 68 65 6e 2c | 20 61 6e 79 77 61 79 2e |il then,| anyway.|
|00002da0| 0d 09 49 20 67 75 65 73 | 73 20 41 70 70 6c 65 27 |..I gues|s Apple'|
|00002db0| 73 20 69 64 65 61 20 69 | 73 20 74 68 61 74 20 65 |s idea i|s that e|
|00002dc0| 61 63 68 20 74 69 6d 65 | 20 74 68 65 20 6f 72 69 |ach time| the ori|
|00002dd0| 67 69 6e 20 73 68 6f 75 | 6c 64 20 67 65 74 0d 09 |gin shou|ld get..|
|00002de0| 73 68 69 66 74 65 64 2c | 20 73 6f 20 74 68 61 74 |shifted,| so that|
|00002df0| 20 74 68 65 20 6c 69 74 | 74 6c 65 20 72 65 63 74 | the lit|tle rect|
|00002e00| 61 6e 67 6c 65 73 20 77 | 68 69 63 68 20 61 72 65 |angles w|hich are|
|00002e10| 20 69 6e 76 61 6c 69 64 | 61 74 65 64 20 65 61 63 | invalid|ated eac|
|00002e20| 68 20 74 69 6d 65 0d 09 | 67 65 74 20 61 63 63 75 |h time..|get accu|
|00002e30| 6d 75 6c 61 74 65 64 20 | 70 72 6f 70 65 72 6c 79 |mulated |properly|
|00002e40| 2e 20 20 42 75 74 20 69 | 6e 20 6f 75 72 20 77 61 |. But i|n our wa|
|00002e50| 79 20 6f 66 20 64 6f 69 | 6e 67 20 74 68 69 6e 67 |y of doi|ng thing|
|00002e60| 73 2c 20 77 65 27 72 65 | 20 75 73 69 6e 67 0d 09 |s, we're| using..|
|00002e70| 74 68 65 20 67 72 61 66 | 70 6f 72 74 20 6f 72 69 |the graf|port ori|
|00002e80| 67 69 6e 20 61 6c 6c 20 | 74 68 65 20 74 69 6d 65 |gin all |the time|
|00002e90| 20 28 75 6e 74 69 6c 20 | 61 20 44 52 41 57 3a 20 | (until |a DRAW: |
|00002ea0| 69 73 20 64 6f 6e 65 29 | 2c 20 73 6f 20 74 68 65 |is done)|, so the|
|00002eb0| 20 73 61 6d 65 0d 09 72 | 65 63 74 61 6e 67 6c 65 | same..r|ectangle|
|00002ec0| 20 77 6f 75 6c 64 20 67 | 65 74 20 69 6e 76 61 6c | would g|et inval|
|00002ed0| 69 64 61 74 65 64 20 72 | 65 70 65 61 74 65 64 6c |idated r|epeatedl|
|00002ee0| 79 2e 20 20 53 6f 20 77 | 65 20 68 61 6e 64 6c 65 |y. So w|e handle|
|00002ef0| 20 74 68 69 73 20 77 69 | 74 68 20 61 6e 0d 09 69 | this wi|th an..i|
|00002f00| 76 61 72 2c 20 23 75 70 | 64 61 74 65 73 2e 20 20 |var, #up|dates. |
|00002f10| 49 66 20 77 65 20 67 65 | 74 20 61 20 50 41 4e 3a |If we ge|t a PAN:|
|00002f20| 20 63 61 6c 6c 20 61 6e | 64 20 23 75 70 64 61 74 | call an|d #updat|
|00002f30| 65 73 20 69 73 20 7a 65 | 72 6f 2c 20 77 65 20 63 |es is ze|ro, we c|
|00002f40| 61 6c 6c 0d 09 49 6e 76 | 61 6c 52 65 63 74 20 61 |all..Inv|alRect a|
|00002f50| 73 20 6e 6f 72 6d 61 6c | 2e 20 20 49 66 20 23 75 |s normal|. If #u|
|00002f60| 70 64 61 74 65 73 20 69 | 73 20 31 2c 20 74 68 65 |pdates i|s 1, the|
|00002f70| 20 6c 69 74 74 6c 65 20 | 72 65 63 74 61 6e 67 6c | little |rectangl|
|00002f80| 65 20 77 69 6c 6c 20 61 | 6c 72 65 61 64 79 0d 09 |e will a|lready..|
|00002f90| 62 65 20 69 6e 76 61 6c | 69 64 2c 20 62 75 74 20 |be inval|id, but |
|00002fa0| 72 61 74 68 65 72 20 74 | 68 61 6e 20 74 72 79 69 |rather t|han tryi|
|00002fb0| 6e 67 20 74 6f 20 69 6e | 76 61 6c 69 64 61 74 65 |ng to in|validate|
|00002fc0| 20 61 6e 20 61 64 6a 61 | 63 65 6e 74 20 72 65 63 | an adja|cent rec|
|00002fd0| 74 61 6e 67 6c 65 0d 09 | 77 65 20 74 61 6b 65 20 |tangle..|we take |
|00002fe0| 74 68 65 20 65 61 73 79 | 20 77 61 79 20 6f 75 74 |the easy| way out|
|00002ff0| 20 61 6e 64 20 69 6e 76 | 61 6c 69 64 61 74 65 20 | and inv|alidate |
|00003000| 74 68 65 20 77 68 6f 6c | 65 20 76 69 65 77 52 65 |the whol|e viewRe|
|00003010| 63 74 2e 20 20 41 74 20 | 6c 65 61 73 74 0d 09 74 |ct. At |least..t|
|00003020| 68 61 74 20 77 61 79 20 | 77 65 20 63 61 6e 20 62 |hat way |we can b|
|00003030| 65 20 73 75 72 65 20 77 | 65 20 64 6f 6e 27 74 20 |e sure w|e don't |
|00003040| 6d 69 73 73 20 75 70 64 | 61 74 69 6e 67 20 73 6f |miss upd|ating so|
|00003050| 6d 65 74 68 69 6e 67 2e | 20 20 49 66 20 23 75 70 |mething.| If #up|
|00003060| 64 61 74 65 73 0d 09 69 | 73 20 67 72 65 61 74 65 |dates..i|s greate|
|00003070| 72 20 74 68 61 6e 20 32 | 2c 20 77 65 27 76 65 20 |r than 2|, we've |
|00003080| 61 6c 72 65 61 64 79 20 | 69 6e 76 61 6c 69 64 61 |already |invalida|
|00003090| 74 65 64 20 74 68 65 20 | 76 69 65 77 52 65 63 74 |ted the |viewRect|
|000030a0| 2c 20 73 6f 20 74 68 65 | 72 65 27 73 0d 09 6e 6f |, so the|re's..no|
|000030b0| 74 68 69 6e 67 20 6c 65 | 66 74 20 74 6f 20 64 6f |thing le|ft to do|
|000030c0| 20 2d 2d 20 73 6f 20 74 | 68 61 74 27 73 20 65 78 | -- so t|hat's ex|
|000030d0| 61 63 74 6c 79 20 77 68 | 61 74 20 77 65 20 64 6f |actly wh|at we do|
|000030e0| 2e 0d 0d 09 41 6e 6f 74 | 68 65 72 20 70 6f 69 6e |....Anot|her poin|
|000030f0| 74 20 74 68 61 74 20 68 | 61 73 20 63 6f 6d 65 20 |t that h|as come |
|00003100| 6f 75 74 20 74 68 72 6f | 75 67 68 20 65 78 70 65 |out thro|ugh expe|
|00003110| 72 69 6d 65 6e 74 61 74 | 69 6f 6e 20 69 73 20 74 |rimentat|ion is t|
|00003120| 68 61 74 20 74 68 65 0d | 09 73 63 72 6f 6c 6c 20 |hat the.|.scroll |
|00003130| 62 61 72 20 77 68 69 63 | 68 20 68 61 73 20 68 61 |bar whic|h has ha|
|00003140| 64 20 69 74 73 20 61 72 | 72 6f 77 20 63 6c 69 63 |d its ar|row clic|
|00003150| 6b 65 64 20 6d 75 73 74 | 20 6e 6f 74 20 62 65 20 |ked must| not be |
|00003160| 63 6c 69 70 70 65 64 20 | 6f 75 74 2c 20 6f 72 0d |clipped |out, or.|
|00003170| 09 74 68 65 20 74 68 75 | 6d 62 20 69 73 6e 27 74 |.the thu|mb isn't|
|00003180| 20 72 65 64 72 61 77 6e | 20 69 6e 20 74 68 65 20 | redrawn| in the |
|00003190| 72 69 67 68 74 20 70 6f | 73 69 74 69 6f 6e 2e 20 |right po|sition. |
|000031a0| 20 54 68 65 20 72 65 64 | 72 61 77 20 69 73 20 64 | The red|raw is d|
|000031b0| 6f 6e 65 20 62 79 0d 09 | 74 68 65 20 73 79 73 74 |one by..|the syst|
|000031c0| 65 6d 2c 20 62 75 74 20 | 6d 75 73 74 6e 27 74 20 |em, but |mustn't |
|000031d0| 62 65 20 63 6c 69 70 70 | 65 64 20 6f 75 74 2e 20 |be clipp|ed out. |
|000031e0| 20 53 6f 20 77 65 20 73 | 65 74 20 74 68 65 20 63 | So we s|et the c|
|000031f0| 6c 69 70 20 74 6f 20 74 | 68 65 20 72 69 67 68 74 |lip to t|he right|
|00003200| 0d 09 63 6f 6e 74 65 6e | 74 73 20 61 72 65 61 20 |..conten|ts area |
|00003210| 77 69 74 68 20 43 6c 69 | 70 52 65 63 74 2c 20 73 |with Cli|pRect, s|
|00003220| 63 72 6f 6c 6c 20 74 68 | 65 20 72 65 63 74 61 6e |croll th|e rectan|
|00003230| 67 6c 65 2c 20 74 68 65 | 6e 20 61 74 20 74 68 65 |gle, the|n at the|
|00003240| 20 65 6e 64 20 73 65 74 | 0d 09 74 68 65 20 63 6c | end set|..the cl|
|00003250| 69 70 20 74 6f 20 74 68 | 65 20 72 65 63 74 20 63 |ip to th|e rect c|
|00003260| 6f 6e 74 61 69 6e 69 6e | 67 20 74 68 65 20 61 70 |ontainin|g the ap|
|00003270| 70 72 6f 70 72 69 61 74 | 65 20 73 63 72 6f 6c 6c |propriat|e scroll|
|00003280| 20 62 61 72 20 73 6f 20 | 74 68 61 74 20 74 68 65 | bar so |that the|
|00003290| 0d 09 73 79 73 74 65 6d | 20 77 69 6c 6c 20 72 65 |..system| will re|
|000032a0| 64 72 61 77 20 69 74 20 | 70 72 6f 70 65 72 6c 79 |draw it |properly|
|000032b0| 2e 20 0d 2a 29 0d 0d 0d | 3a 6d 20 50 41 4e 3a 20 |. .*)...|:m PAN: |
|000032c0| 20 7b 20 64 78 20 64 79 | 20 5c 20 23 75 70 64 20 | { dx dy| \ #upd |
|000032d0| 68 65 78 74 20 76 65 78 | 74 20 2d 2d 20 7d 0d 09 |hext vex|t -- }..|
|000032e0| 64 78 20 20 2b 3a 20 68 | 70 6f 73 20 20 64 79 20 |dx +: h|pos dy |
|000032f0| 2b 3a 20 76 70 6f 73 0d | 09 6e 65 67 3e 20 64 78 |+: vpos.|.neg> dx|
|00003300| 20 20 6e 65 67 3e 20 64 | 79 0d 09 5e 76 69 65 77 | neg> d|y..^view|
|00003310| 52 65 63 74 3a 20 6d 61 | 69 6e 56 69 65 77 20 20 |Rect: ma|inView |
|00003320| 64 75 70 20 20 43 6c 69 | 70 52 65 63 74 0d 09 64 |dup Cli|pRect..d|
|00003330| 78 20 64 79 20 74 68 65 | 52 67 6e 20 20 53 63 72 |x dy the|Rgn Scr|
|00003340| 6f 6c 6c 52 65 63 74 0d | 09 67 65 74 3a 20 23 75 |ollRect.|.get: #u|
|00003350| 70 64 61 74 65 73 20 20 | 2d 3e 20 23 75 70 64 20 |pdates |-> #upd |
|00003360| 20 23 75 70 64 20 31 2b | 20 31 30 30 20 6d 69 6e | #upd 1+| 100 min|
|00003370| 20 20 70 75 74 3a 20 23 | 75 70 64 61 74 65 73 0d | put: #|updates.|
|00003380| 09 23 75 70 64 0d 09 4e | 49 46 09 09 74 68 65 52 |.#upd..N|IF..theR|
|00003390| 67 6e 20 20 49 6e 76 61 | 6c 52 67 6e 20 20 66 61 |gn Inva|lRgn fa|
|000033a0| 6c 73 65 20 70 75 74 3a | 20 73 65 74 43 6c 69 70 |lse put:| setClip|
|000033b0| 3f 0d 09 45 4c 53 45 09 | 23 75 70 64 20 31 20 3d |?..ELSE.|#upd 1 =|
|000033c0| 20 49 46 20 20 5e 76 69 | 65 77 52 65 63 74 3a 20 | IF ^vi|ewRect: |
|000033d0| 6d 61 69 6e 56 69 65 77 | 20 20 49 6e 76 61 6c 52 |mainView| InvalR|
|000033e0| 65 63 74 20 20 54 48 45 | 4e 0d 09 54 48 45 4e 0d |ect THE|N..THEN.|
|000033f0| 09 64 78 20 64 79 20 20 | 73 68 69 66 74 43 68 69 |.dx dy |shiftChi|
|00003400| 6c 64 72 65 6e 3a 20 6d | 61 69 6e 56 69 65 77 0d |ldren: m|ainView.|
|00003410| 09 6e 6f 43 6c 69 70 20 | 20 3b 6d 0d 09 0d 5c 20 |.noClip | ;m...\ |
|00003420| 4e 6f 74 65 3a 20 69 74 | 20 74 75 72 6e 73 20 6f |Note: it| turns o|
|00003430| 75 74 20 77 65 20 6e 65 | 65 64 20 74 68 65 20 6e |ut we ne|ed the n|
|00003440| 6f 43 6c 69 70 20 73 6f | 20 74 68 61 74 20 74 68 |oClip so| that th|
|00003450| 65 20 73 63 72 6f 6c 6c | 20 62 61 72 20 61 72 72 |e scroll| bar arr|
|00003460| 6f 77 0d 5c 20 61 6c 77 | 61 79 73 20 75 6e 68 69 |ow.\ alw|ays unhi|
|00003470| 6c 69 74 65 73 2e 0d 09 | 0d 0d 3a 6d 20 50 41 4e |lites...|..:m PAN|
|00003480| 52 49 47 48 54 3a 20 20 | 7b 20 64 78 20 5c 20 68 |RIGHT: |{ dx \ h|
|00003490| 73 20 2d 2d 20 7d 0d 09 | 67 65 74 3a 20 74 68 65 |s -- }..|get: the|
|000034a0| 48 73 63 72 6f 6c 6c 20 | 20 2d 3e 20 68 73 0d 09 |Hscroll | -> hs..|
|000034b0| 68 73 20 64 78 20 2b 20 | 20 67 65 74 3a 20 48 70 |hs dx + | get: Hp|
|000034c0| 61 6e 20 20 3e 0d 09 49 | 46 20 20 67 65 74 3a 20 |an >..I|F get: |
|000034d0| 48 70 61 6e 20 20 68 73 | 20 2d 20 20 2d 3e 20 64 |Hpan hs| - -> d|
|000034e0| 78 20 20 54 48 45 4e 0d | 09 64 78 20 20 30 45 58 |x THEN.|.dx 0EX|
|000034f0| 49 54 0d 09 68 73 20 64 | 78 20 2b 20 20 70 75 74 |IT..hs d|x + put|
|00003500| 3a 20 74 68 65 48 73 63 | 72 6f 6c 6c 0d 09 64 78 |: theHsc|roll..dx|
|00003510| 20 20 30 20 20 70 61 6e | 3a 20 5b 73 65 6c 66 5d | 0 pan|: [self]|
|00003520| 20 20 3b 6d 0d 0d 3a 6d | 20 50 41 4e 4c 45 46 54 | ;m..:m| PANLEFT|
|00003530| 3a 20 20 7b 20 64 78 20 | 5c 20 68 73 20 2d 2d 20 |: { dx |\ hs -- |
|00003540| 7d 0d 09 67 65 74 3a 20 | 74 68 65 48 73 63 72 6f |}..get: |theHscro|
|00003550| 6c 6c 20 20 2d 3e 20 68 | 73 20 20 20 68 73 20 30 |ll -> h|s hs 0|
|00003560| 45 58 49 54 0d 09 68 73 | 20 64 78 20 2d 20 20 30 |EXIT..hs| dx - 0|
|00003570| 3c 20 69 66 20 20 68 73 | 20 2d 3e 20 64 78 20 20 |< if hs| -> dx |
|00003580| 74 68 65 6e 0d 09 68 73 | 20 64 78 20 2d 20 20 70 |then..hs| dx - p|
|00003590| 75 74 3a 20 74 68 65 48 | 73 63 72 6f 6c 6c 0d 09 |ut: theH|scroll..|
|000035a0| 64 78 20 6e 65 67 61 74 | 65 20 20 30 20 20 70 61 |dx negat|e 0 pa|
|000035b0| 6e 3a 20 5b 73 65 6c 66 | 5d 20 20 3b 6d 0d 0d 3a |n: [self|] ;m..:|
|000035c0| 6d 20 50 41 4e 44 4f 57 | 4e 3a 20 20 7b 20 64 79 |m PANDOW|N: { dy|
|000035d0| 20 5c 20 76 73 20 2d 2d | 20 7d 0d 09 67 65 74 3a | \ vs --| }..get:|
|000035e0| 20 74 68 65 56 73 63 72 | 6f 6c 6c 20 20 2d 3e 20 | theVscr|oll -> |
|000035f0| 76 73 0d 09 76 73 20 64 | 79 20 2b 20 20 67 65 74 |vs..vs d|y + get|
|00003600| 3a 20 56 70 61 6e 20 20 | 3e 0d 09 49 46 20 20 67 |: Vpan |>..IF g|
|00003610| 65 74 3a 20 56 70 61 6e | 20 20 76 73 20 2d 20 20 |et: Vpan| vs - |
|00003620| 2d 3e 20 64 79 20 20 54 | 48 45 4e 0d 09 64 79 20 |-> dy T|HEN..dy |
|00003630| 20 30 45 58 49 54 0d 09 | 76 73 20 64 79 20 2b 20 | 0EXIT..|vs dy + |
|00003640| 20 70 75 74 3a 20 74 68 | 65 56 73 63 72 6f 6c 6c | put: th|eVscroll|
|00003650| 0d 09 30 20 20 64 79 20 | 20 70 61 6e 3a 20 5b 73 |..0 dy | pan: [s|
|00003660| 65 6c 66 5d 20 20 3b 6d | 0d 0d 3a 6d 20 50 41 4e |elf] ;m|..:m PAN|
|00003670| 55 50 3a 20 20 7b 20 64 | 79 20 5c 20 76 73 20 2d |UP: { d|y \ vs -|
|00003680| 2d 20 7d 0d 09 67 65 74 | 3a 20 74 68 65 56 73 63 |- }..get|: theVsc|
|00003690| 72 6f 6c 6c 20 20 2d 3e | 20 76 73 20 20 20 76 73 |roll ->| vs vs|
|000036a0| 20 30 45 58 49 54 0d 09 | 76 73 20 64 79 20 2d 20 | 0EXIT..|vs dy - |
|000036b0| 30 3c 20 20 49 46 20 20 | 76 73 20 2d 3e 20 64 79 |0< IF |vs -> dy|
|000036c0| 20 20 54 48 45 4e 0d 09 | 76 73 20 64 79 20 2d 20 | THEN..|vs dy - |
|000036d0| 20 70 75 74 3a 20 74 68 | 65 56 73 63 72 6f 6c 6c | put: th|eVscroll|
|000036e0| 0d 09 30 20 20 64 79 20 | 6e 65 67 61 74 65 20 20 |..0 dy |negate |
|000036f0| 70 61 6e 3a 20 5b 73 65 | 6c 66 5d 20 20 3b 6d 0d |pan: [se|lf] ;m.|
|00003700| 0d 0d 3a 6d 20 48 50 41 | 47 45 3a 20 20 7b 20 5c |..:m HPA|GE: { \|
|00003710| 20 6c 65 66 74 20 74 6f | 70 20 72 74 20 62 6f 74 | left to|p rt bot|
|00003720| 20 2d 2d 20 23 70 69 78 | 65 6c 73 20 7d 0d 09 67 | -- #pix|els }..g|
|00003730| 65 74 3a 20 76 69 65 77 | 52 65 63 74 20 20 2d 3e |et: view|Rect ->|
|00003740| 20 62 6f 74 20 20 2d 3e | 20 72 74 20 20 2d 3e 20 | bot ->| rt -> |
|00003750| 74 6f 70 20 20 2d 3e 20 | 6c 65 66 74 0d 09 72 74 |top -> |left..rt|
|00003760| 20 6c 65 66 74 20 2d 20 | 20 67 65 74 3a 20 48 75 | left - | get: Hu|
|00003770| 6e 69 74 20 2d 20 20 30 | 20 6d 61 78 20 20 3b 6d |nit - 0| max ;m|
|00003780| 0d 0d 3a 6d 20 56 50 41 | 47 45 3a 20 20 7b 20 5c |..:m VPA|GE: { \|
|00003790| 20 6c 65 66 74 20 74 6f | 70 20 72 74 20 62 6f 74 | left to|p rt bot|
|000037a0| 20 2d 2d 20 23 70 69 78 | 65 6c 73 20 7d 0d 09 67 | -- #pix|els }..g|
|000037b0| 65 74 3a 20 76 69 65 77 | 52 65 63 74 20 20 2d 3e |et: view|Rect ->|
|000037c0| 20 62 6f 74 20 20 2d 3e | 20 72 74 20 20 2d 3e 20 | bot ->| rt -> |
|000037d0| 74 6f 70 20 20 2d 3e 20 | 6c 65 66 74 0d 09 62 6f |top -> |left..bo|
|000037e0| 74 20 74 6f 70 20 2d 20 | 20 67 65 74 3a 20 56 75 |t top - | get: Vu|
|000037f0| 6e 69 74 20 2d 20 20 30 | 20 6d 61 78 20 20 3b 6d |nit - 0| max ;m|
|00003800| 0d 0d 3a 6d 20 31 52 49 | 47 48 54 3a 09 67 65 74 |..:m 1RI|GHT:.get|
|00003810| 3a 20 48 75 6e 69 74 20 | 20 70 61 6e 52 69 67 68 |: Hunit | panRigh|
|00003820| 74 3a 20 5b 73 65 6c 66 | 5d 20 20 3b 6d 0d 3a 6d |t: [self|] ;m.:m|
|00003830| 20 31 4c 45 46 54 3a 09 | 67 65 74 3a 20 48 75 6e | 1LEFT:.|get: Hun|
|00003840| 69 74 20 20 70 61 6e 4c | 65 66 74 3a 20 5b 73 65 |it panL|eft: [se|
|00003850| 6c 66 5d 20 20 20 3b 6d | 0d 3a 6d 20 31 55 50 3a |lf] ;m|.:m 1UP:|
|00003860| 09 09 67 65 74 3a 20 56 | 75 6e 69 74 20 20 70 61 |..get: V|unit pa|
|00003870| 6e 55 70 3a 20 5b 73 65 | 6c 66 5d 20 20 20 20 20 |nUp: [se|lf] |
|00003880| 3b 6d 0d 3a 6d 20 31 44 | 4f 57 4e 3a 09 67 65 74 |;m.:m 1D|OWN:.get|
|00003890| 3a 20 56 75 6e 69 74 20 | 20 70 61 6e 44 6f 77 6e |: Vunit | panDown|
|000038a0| 3a 20 5b 73 65 6c 66 5d | 20 20 20 3b 6d 0d 0d 3a |: [self]| ;m..:|
|000038b0| 6d 20 50 47 52 49 47 48 | 54 3a 09 68 50 61 67 65 |m PGRIGH|T:.hPage|
|000038c0| 3a 20 73 65 6c 66 20 20 | 70 61 6e 52 69 67 68 74 |: self |panRight|
|000038d0| 3a 20 5b 73 65 6c 66 5d | 09 3b 6d 0d 3a 6d 20 50 |: [self]|.;m.:m P|
|000038e0| 47 4c 45 46 54 3a 09 68 | 50 61 67 65 3a 20 73 65 |GLEFT:.h|Page: se|
|000038f0| 6c 66 20 20 70 61 6e 4c | 65 66 74 3a 20 5b 73 65 |lf panL|eft: [se|
|00003900| 6c 66 5d 09 3b 6d 0d 3a | 6d 20 50 47 55 50 3a 09 |lf].;m.:|m PGUP:.|
|00003910| 76 50 61 67 65 3a 20 73 | 65 6c 66 20 20 70 61 6e |vPage: s|elf pan|
|00003920| 55 70 3a 20 5b 73 65 6c | 66 5d 09 09 3b 6d 0d 3a |Up: [sel|f]..;m.:|
|00003930| 6d 20 50 47 44 4f 57 4e | 3a 09 76 50 61 67 65 3a |m PGDOWN|:.vPage:|
|00003940| 20 73 65 6c 66 20 20 70 | 61 6e 44 6f 77 6e 3a 20 | self p|anDown: |
|00003950| 5b 73 65 6c 66 5d 09 3b | 6d 0d 0d 3a 6d 20 56 44 |[self].;|m..:m VD|
|00003960| 52 41 47 3a 09 30 20 20 | 67 65 74 3a 20 74 68 65 |RAG:.0 |get: the|
|00003970| 56 73 63 72 6f 6c 6c 20 | 20 67 65 74 3a 20 76 70 |Vscroll | get: vp|
|00003980| 6f 73 20 2d 20 20 70 61 | 6e 3a 20 5b 73 65 6c 66 |os - pa|n: [self|
|00003990| 5d 20 20 3b 6d 0d 3a 6d | 20 48 44 52 41 47 3a 09 |] ;m.:m| HDRAG:.|
|000039a0| 67 65 74 3a 20 74 68 65 | 48 73 63 72 6f 6c 6c 20 |get: the|Hscroll |
|000039b0| 20 67 65 74 3a 20 68 70 | 6f 73 20 2d 20 20 30 20 | get: hp|os - 0 |
|000039c0| 20 70 61 6e 3a 20 5b 73 | 65 6c 66 5d 20 20 3b 6d | pan: [s|elf] ;m|
|000039d0| 0d 09 0d 0d 28 2a 09 54 | 68 65 20 76 69 65 77 5f |....(*.T|he view_|
|000039e0| 66 6f 72 5f 63 6c 69 63 | 6b 3f 3a 20 6d 65 74 68 |for_clic|k?: meth|
|000039f0| 6f 64 20 6f 6e 6c 79 20 | 68 61 73 20 74 6f 20 64 |od only |has to d|
|00003a00| 6f 20 6f 6e 65 20 65 78 | 74 72 61 20 74 68 69 6e |o one ex|tra thin|
|00003a10| 67 20 6f 76 65 72 20 77 | 68 61 74 20 56 69 65 77 |g over w|hat View|
|00003a20| 0d 09 70 72 6f 76 69 64 | 65 73 20 2d 20 77 65 20 |..provid|es - we |
|00003a30| 70 75 74 20 74 68 65 20 | 61 64 64 72 20 6f 66 20 |put the |addr of |
|00003a40| 74 68 69 73 20 53 63 72 | 6f 6c 6c 65 72 20 69 6e |this Scr|oller in|
|00003a50| 20 63 6c 69 63 6b 65 64 | 53 63 72 6f 6c 6c 65 72 | clicked|Scroller|
|00003a60| 20 73 6f 20 74 68 65 0d | 09 73 63 72 6f 6c 6c 20 | so the.|.scroll |
|00003a70| 62 61 72 20 61 63 74 69 | 6f 6e 20 68 61 6e 64 6c |bar acti|on handl|
|00003a80| 65 72 73 20 63 61 6e 20 | 73 65 6e 64 20 6d 65 73 |ers can |send mes|
|00003a90| 73 61 67 65 73 20 62 61 | 63 6b 20 74 6f 20 75 73 |sages ba|ck to us|
|00003aa0| 2e 0d 09 4e 6f 74 65 2c | 20 77 65 20 68 61 76 65 |...Note,| we have|
|00003ab0| 20 74 6f 20 64 6f 20 74 | 68 69 73 20 66 69 72 73 | to do t|his firs|
|00003ac0| 74 2c 20 65 76 65 6e 20 | 69 66 20 77 65 20 64 6f |t, even |if we do|
|00003ad0| 6e 27 74 20 77 61 6e 74 | 20 74 68 65 20 63 6c 69 |n't want| the cli|
|00003ae0| 63 6b 2c 20 73 69 6e 63 | 65 0d 09 63 6c 69 63 6b |ck, sinc|e..click|
|00003af0| 3a 20 73 75 70 65 72 20 | 6d 61 79 20 63 61 6c 6c |: super |may call|
|00003b00| 20 74 68 65 20 61 63 74 | 69 6f 6e 20 68 61 6e 64 | the act|ion hand|
|00003b10| 6c 65 72 2c 20 77 68 69 | 63 68 20 77 69 6c 6c 20 |ler, whi|ch will |
|00003b20| 72 65 6c 79 20 6f 6e 20 | 69 74 20 62 65 69 6e 67 |rely on |it being|
|00003b30| 20 73 65 74 2e 0d 09 42 | 75 74 20 74 68 69 73 20 | set...B|ut this |
|00003b40| 77 69 6c 6c 20 62 65 20 | 68 61 72 6d 6c 65 73 73 |will be |harmless|
|00003b50| 20 69 66 20 77 65 20 64 | 6f 6e 27 74 20 77 61 6e | if we d|on't wan|
|00003b60| 74 20 74 68 65 20 63 6c | 69 63 6b 2c 20 73 69 6e |t the cl|ick, sin|
|00003b70| 63 65 20 61 6e 79 20 6f | 74 68 65 72 0d 09 73 63 |ce any o|ther..sc|
|00003b80| 72 6f 6c 6c 65 72 20 74 | 68 61 74 20 77 61 6e 74 |roller t|hat want|
|00003b90| 73 20 74 68 65 20 63 6c | 69 63 6b 20 77 69 6c 6c |s the cl|ick will|
|00003ba0| 20 72 65 73 65 74 20 74 | 68 65 20 76 61 6c 75 65 | reset t|he value|
|00003bb0| 20 62 65 66 6f 72 65 20 | 69 74 20 75 73 65 73 20 | before |it uses |
|00003bc0| 69 74 2e 0d 09 54 68 65 | 6e 20 77 68 65 6e 20 77 |it...The|n when w|
|00003bd0| 65 20 73 65 65 20 74 68 | 61 74 20 77 65 20 77 61 |e see th|at we wa|
|00003be0| 6e 74 20 74 68 65 20 63 | 6c 69 63 6b 2c 20 77 65 |nt the c|lick, we|
|00003bf0| 20 68 61 76 65 20 74 6f | 20 73 65 74 20 63 6c 69 | have to| set cli|
|00003c00| 63 6b 65 64 53 63 72 6f | 6c 6c 65 72 0d 09 61 67 |ckedScro|ller..ag|
|00003c10| 61 69 6e 2c 20 73 69 6e | 63 65 20 63 61 6c 6c 69 |ain, sin|ce calli|
|00003c20| 6e 67 20 63 6c 69 63 6b | 3a 20 73 75 70 65 72 20 |ng click|: super |
|00003c30| 6d 61 79 20 68 61 76 65 | 20 63 68 61 6e 67 65 64 |may have| changed|
|00003c40| 20 69 74 2e 0d 2a 29 0d | 0d 3a 6d 20 76 69 65 77 | it..*).|.:m view|
|00003c50| 5f 66 6f 72 5f 63 6c 69 | 63 6b 3f 3a 20 20 28 20 |_for_cli|ck?: ( |
|00003c60| 2d 2d 20 5e 76 69 65 77 | 20 54 20 7c 20 2d 2d 20 |-- ^view| T | -- |
|00003c70| 46 20 29 0d 09 5e 62 61 | 73 65 20 2d 3e 20 63 6c |F )..^ba|se -> cl|
|00003c80| 69 63 6b 65 64 53 63 72 | 6f 6c 6c 65 72 0d 09 76 |ickedScr|oller..v|
|00003c90| 69 65 77 5f 66 6f 72 5f | 63 6c 69 63 6b 3f 3a 20 |iew_for_|click?: |
|00003ca0| 73 75 70 65 72 0d 3b 6d | 0d 0d 0d 3a 6d 20 43 4c |super.;m|...:m CL|
|00003cb0| 41 53 53 49 4e 49 54 3a | 0d 09 63 6c 61 73 73 69 |ASSINIT:|..classi|
|00003cc0| 6e 69 74 3a 20 73 75 70 | 65 72 0d 09 74 72 75 65 |nit: sup|er..true|
|00003cd0| 20 20 76 73 63 72 6f 6c | 6c 3a 20 73 65 6c 66 20 | vscrol|l: self |
|00003ce0| 20 20 74 72 75 65 20 20 | 68 73 63 72 6f 6c 6c 3a | true |hscroll:|
|00003cf0| 20 73 65 6c 66 09 09 5c | 20 44 65 66 61 75 6c 74 | self..\| Default|
|00003d00| 73 0d 0d 09 34 20 64 75 | 70 20 20 70 75 74 3a 20 |s...4 du|p put: |
|00003d10| 48 75 6e 69 74 20 20 70 | 75 74 3a 20 56 75 6e 69 |Hunit p|ut: Vuni|
|00003d20| 74 0d 0d 09 58 54 53 7b | 20 31 6c 20 31 72 20 70 |t...XTS{| 1l 1r p|
|00003d30| 67 6c 20 70 67 72 20 68 | 64 20 7d 09 09 09 09 09 |gl pgr h|d }.....|
|00003d40| 61 63 74 69 6f 6e 73 3a | 20 74 68 65 48 73 63 72 |actions:| theHscr|
|00003d50| 6f 6c 6c 0d 09 58 54 53 | 7b 20 31 75 20 31 64 20 |oll..XTS|{ 1u 1d |
|00003d60| 70 67 75 20 70 67 64 20 | 76 64 20 7d 09 09 09 09 |pgu pgd |vd }....|
|00003d70| 09 61 63 74 69 6f 6e 73 | 3a 20 74 68 65 56 73 63 |.actions|: theVsc|
|00003d80| 72 6f 6c 6c 0d 09 70 61 | 72 52 69 67 68 74 20 70 |roll..pa|rRight p|
|00003d90| 61 72 54 6f 70 20 70 61 | 72 52 69 67 68 74 20 70 |arTop pa|rRight p|
|00003da0| 61 72 42 6f 74 74 6f 6d | 09 09 73 65 74 4a 75 73 |arBottom|..setJus|
|00003db0| 74 3a 20 74 68 65 56 73 | 63 72 6f 6c 6c 0d 09 70 |t: theVs|croll..p|
|00003dc0| 61 72 4c 65 66 74 20 70 | 61 72 42 6f 74 74 6f 6d |arLeft p|arBottom|
|00003dd0| 20 70 61 72 52 69 67 68 | 74 20 70 61 72 42 6f 74 | parRigh|t parBot|
|00003de0| 74 6f 6d 09 73 65 74 4a | 75 73 74 3a 20 74 68 65 |tom.setJ|ust: the|
|00003df0| 48 73 63 72 6f 6c 6c 0d | 0d 09 70 61 72 4c 65 66 |Hscroll.|..parLef|
|00003e00| 74 20 70 61 72 54 6f 70 | 20 70 61 72 52 69 67 68 |t parTop| parRigh|
|00003e10| 74 20 70 61 72 42 6f 74 | 74 6f 6d 09 09 73 65 74 |t parBot|tom..set|
|00003e20| 4a 75 73 74 3a 20 6d 61 | 69 6e 56 69 65 77 0d 3b |Just: ma|inView.;|
|00003e30| 6d 0d 0d 3b 63 6c 61 73 | 73 0d 0d 0d 65 6e 64 6c |m..;clas|s...endl|
|00003e40| 6f 61 64 0d 00 00 00 00 | 00 00 00 00 00 00 00 00 |oad.....|........|
|00003e50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003e60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003e70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003e80| 00 00 01 00 00 00 01 42 | 00 00 00 42 00 00 00 3b |.......B|...B...;|
|00003e90| 00 00 04 51 29 aa ff ff | 7f 12 06 00 00 00 00 00 |...Q)...|........|
|00003ea0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003eb0| 08 53 63 72 6f 6c 6c 65 | 72 72 02 00 00 00 50 61 |.Scrolle|rr....Pa|
|00003ec0| 72 74 53 49 54 21 00 00 | 00 00 00 00 00 00 00 01 |rtSIT!..|........|
|00003ed0| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|00003ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ef0| 00 00 b3 66 c2 7a 00 00 | 00 00 00 00 01 7d 00 00 |...f.z..|.....}..|
|00003f00| 04 53 29 53 ff ff 7f 12 | 06 00 00 00 00 00 00 00 |.S)S....|........|
|00003f10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003f20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003f30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 08 00 00 |........|........|
|00003f40| 00 00 00 00 00 10 00 00 | 00 00 00 00 00 08 00 00 |........|........|
|00003f50| 00 00 00 00 00 08 00 00 | 00 00 00 00 00 10 00 00 |........|........|
|00003f60| 00 00 a7 87 57 44 00 00 | 02 1e 05 00 00 00 04 74 |....WD..|.......t|
|00003f70| 2c 25 01 01 7f 11 07 00 | 00 00 00 00 00 00 00 00 |,%......|........|
|00003f80| 00 00 00 3e 00 00 00 00 | 00 00 35 b7 00 00 00 00 |...>....|..5.....|
|00003f90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 38 90 |........|......8.|
|00003fb0| 00 00 38 90 00 00 00 00 | 00 00 00 00 00 00 00 00 |..8.....|........|
|00003fc0| 00 00 00 00 01 00 00 00 | 01 42 00 00 00 42 00 00 |........|.B...B..|
|00003fd0| 00 3b 02 39 49 08 2a 3c | 00 00 00 1c 00 32 00 00 |.;.9I.*<|.....2..|
|00003fe0| 4d 49 46 4f 00 00 00 0a | 00 80 00 00 00 00 00 00 |MIFO....|........|
|00003ff0| 02 39 4c f8 08 4d 69 73 | 63 49 6e 66 6f 00 00 00 |.9L..Mis|cInfo...|
+--------+-------------------------+-------------------------+--------+--------+