home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / Languages / Mops 2.5 / Mops source.sit / Mops source / Toolbox classes / View < prev    next >
MacBinary  |  1994-06-04  |  16.3 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: View

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
10% dexvert Jesper Olsen Module (music/jesperOlsen) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file TTComp archive data, binary, 1K dictionary default (weak)
99% file MacBinary II, inited, Sat Jun 4 13:02:24 1994, modified Sat Jun 4 13:02:24 1994, creator 'MSET', type ASCII, 16003 bytes "View" , at 0x3f03 375 bytes resource default (weak)
98% file data default
49% TrID Macintosh plain text (MacBinary) default
33% TrID TTComp archive compressed (bin-1K) default (weak)
16% TrID MacBinary 2 default (weak)
0% TrID Sybase iAnywhere database files default (weak)
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MSET]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 04 56 69 65 77 00 00 | 00 00 00 00 00 00 00 00 |..View..|........|
|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 3e 83 00 | 00 01 77 aa 16 64 20 aa |.....>..|..w..d .|
|00000060| 16 64 20 00 00 08 00 00 | 00 00 00 00 00 00 00 00 |.d .....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 0b 1f 00 00 |........|........|
|00000080| 5c 20 56 49 45 57 20 63 | 6c 61 73 73 2e 0d 0d 5c |\ VIEW c|lass...\|
|00000090| 20 4f 63 74 20 39 31 09 | 6d 72 68 09 49 6e 69 74 | Oct 91.|mrh.Init|
|000000a0| 69 61 6c 20 76 65 72 73 | 69 6f 6e 2e 0d 5c 20 4d |ial vers|ion..\ M|
|000000b0| 61 79 20 39 32 09 6d 72 | 68 09 53 75 70 70 6f 72 |ay 92.mr|h.Suppor|
|000000c0| 74 20 66 6f 72 20 22 6e | 65 77 2d 73 74 79 6c 65 |t for "n|ew-style|
|000000d0| 22 20 63 6f 6e 74 72 6f | 6c 73 0d 5c 20 46 65 62 |" contro|ls.\ Feb|
|000000e0| 20 39 33 09 6d 72 68 09 | 41 64 64 65 64 20 49 44 | 93.mrh.|Added ID|
|000000f0| 4c 45 3a 20 6d 65 74 68 | 6f 64 0d 5c 20 53 65 70 |LE: meth|od.\ Sep|
|00000100| 74 20 39 33 09 6d 72 68 | 09 45 6e 68 61 6e 63 65 |t 93.mrh|.Enhance|
|00000110| 64 20 61 6c 6f 6e 67 20 | 6c 69 6e 65 73 20 6f 66 |d along |lines of|
|00000120| 20 4e 65 77 74 6f 6e 20 | 76 69 65 77 20 73 63 68 | Newton |view sch|
|00000130| 65 6d 65 0d 0d 0d 3a 20 | 50 74 49 6e 52 65 63 74 |eme...: |PtInRect|
|00000140| 20 7b 20 78 20 79 20 72 | 70 74 72 20 2d 2d 20 62 | { x y r|ptr -- b|
|00000150| 20 7d 0d 20 20 20 20 20 | 20 20 20 77 6f 72 64 30 | }. | word0|
|00000160| 20 78 20 79 20 70 61 63 | 6b 20 20 72 70 74 72 20 | x y pac|k rptr |
|00000170| 63 61 6c 6c 20 50 74 49 | 6e 52 65 63 74 20 20 69 |call PtI|nRect i|
|00000180| 2d 3e 6c 20 20 3b 0d 0d | 0d 5c 20 56 49 45 57 20 |->l ;..|.\ VIEW |
|00000190| 69 73 20 74 68 65 20 67 | 65 6e 65 72 69 63 20 73 |is the g|eneric s|
|000001a0| 75 70 65 72 63 6c 61 73 | 73 20 66 6f 72 20 65 76 |uperclas|s for ev|
|000001b0| 65 72 79 74 68 69 6e 67 | 20 74 68 61 74 20 63 61 |erything| that ca|
|000001c0| 6e 20 62 65 20 64 72 61 | 77 6e 20 69 6e 20 61 0d |n be dra|wn in a.|
|000001d0| 5c 20 77 69 6e 64 6f 77 | 2e 20 20 46 6f 72 20 65 |\ window|. For e|
|000001e0| 78 61 6d 70 6c 65 2c 20 | 61 6c 6c 20 63 6f 6e 74 |xample, |all cont|
|000001f0| 72 6f 6c 73 20 61 72 65 | 20 6e 6f 77 20 73 75 62 |rols are| now sub|
|00000200| 63 6c 61 73 73 65 73 20 | 6f 66 20 76 69 65 77 2e |classes |of view.|
|00000210| 0d 5c 20 49 6e 20 4d 6f | 70 73 20 61 20 57 69 6e |.\ In Mo|ps a Win|
|00000220| 64 6f 77 20 69 74 73 65 | 6c 66 20 69 73 6e 27 74 |dow itse|lf isn't|
|00000230| 20 61 20 76 69 65 77 2c | 20 62 75 74 20 63 6f 6e | a view,| but con|
|00000240| 74 61 69 6e 73 20 6f 6e | 65 20 73 70 65 63 69 61 |tains on|e specia|
|00000250| 6c 20 76 69 65 77 0d 5c | 20 28 74 68 65 20 43 6f |l view.\| (the Co|
|00000260| 6e 74 56 69 65 77 29 20 | 77 68 69 63 68 20 63 6f |ntView) |which co|
|00000270| 76 65 72 73 20 74 68 65 | 20 77 68 6f 6c 65 20 64 |vers the| whole d|
|00000280| 72 61 77 69 6e 67 20 61 | 72 65 61 20 6f 66 20 74 |rawing a|rea of t|
|00000290| 68 65 20 77 69 6e 64 6f | 77 2e 0d 0d 5c 20 49 6e |he windo|w...\ In|
|000002a0| 20 74 68 65 20 76 69 65 | 77 2c 20 77 65 20 68 61 | the vie|w, we ha|
|000002b0| 76 65 20 61 6e 20 69 76 | 61 72 20 77 68 69 63 68 |ve an iv|ar which|
|000002c0| 20 69 73 20 61 20 72 65 | 63 74 2c 20 56 69 65 77 | is a re|ct, View|
|000002d0| 52 65 63 74 2e 20 20 54 | 68 69 73 20 69 73 20 74 |Rect. T|his is t|
|000002e0| 68 65 0d 5c 20 72 65 63 | 74 61 6e 67 6c 65 20 64 |he.\ rec|tangle d|
|000002f0| 65 66 69 6e 69 6e 67 20 | 74 68 65 20 6f 75 74 65 |efining |the oute|
|00000300| 72 20 62 6f 75 6e 64 61 | 72 79 20 6f 66 20 74 68 |r bounda|ry of th|
|00000310| 69 73 20 76 69 65 77 2c | 20 72 65 6c 61 74 69 76 |is view,| relativ|
|00000320| 65 20 74 6f 20 74 68 65 | 0d 5c 20 63 75 72 72 65 |e to the|.\ curre|
|00000330| 6e 74 20 67 72 61 66 50 | 6f 72 74 2e 20 20 54 68 |nt grafP|ort. Th|
|00000340| 69 73 20 72 65 63 74 20 | 69 73 20 75 73 65 64 20 |is rect |is used |
|00000350| 62 79 20 74 68 65 20 76 | 69 65 77 20 74 6f 20 73 |by the v|iew to s|
|00000360| 65 74 20 74 68 65 20 63 | 6c 69 70 0d 5c 20 72 65 |et the c|lip.\ re|
|00000370| 67 69 6f 6e 20 61 6e 64 | 20 74 68 65 20 63 6f 6f |gion and| the coo|
|00000380| 72 64 69 6e 61 74 65 20 | 6f 72 69 67 69 6e 20 62 |rdinate |origin b|
|00000390| 65 66 6f 72 65 20 64 72 | 61 77 69 6e 67 2e 0d 0d |efore dr|awing...|
|000003a0| 5c 20 54 68 65 20 56 69 | 65 77 52 65 63 74 20 73 |\ The Vi|ewRect s|
|000003b0| 68 6f 75 6c 64 6e 27 74 | 20 6e 6f 77 20 62 65 20 |houldn't| now be |
|000003c0| 73 65 74 20 64 69 72 65 | 63 74 6c 79 20 66 72 6f |set dire|ctly fro|
|000003d0| 6d 20 61 20 70 72 6f 67 | 72 61 6d 20 28 77 65 20 |m a prog|ram (we |
|000003e0| 64 6f 6e 27 74 20 68 61 | 76 65 0d 5c 20 61 20 53 |don't ha|ve.\ a S|
|000003f0| 65 74 56 69 65 77 52 65 | 63 74 3a 20 6d 65 74 68 |etViewRe|ct: meth|
|00000400| 6f 64 20 61 6e 79 20 6c | 6f 6e 67 65 72 29 2c 20 |od any l|onger), |
|00000410| 62 75 74 20 74 68 65 72 | 65 20 69 73 20 61 6e 6f |but ther|e is ano|
|00000420| 74 68 65 72 20 72 65 63 | 74 2c 20 42 6f 75 6e 64 |ther rec|t, Bound|
|00000430| 73 2c 20 77 68 69 63 68 | 0d 5c 20 69 73 20 69 6e |s, which|.\ is in|
|00000440| 74 65 6e 64 65 64 20 74 | 6f 20 6d 61 6b 65 20 74 |tended t|o make t|
|00000450| 68 69 6e 67 73 20 6d 6f | 72 65 20 63 6f 6e 76 65 |hings mo|re conve|
|00000460| 6e 69 65 6e 74 2c 20 73 | 69 6e 63 65 20 69 74 20 |nient, s|ince it |
|00000470| 64 65 66 69 6e 65 73 20 | 74 68 65 20 76 69 65 77 |defines |the view|
|00000480| 27 73 0d 5c 20 73 69 7a | 65 20 61 6e 64 20 70 6f |'s.\ siz|e and po|
|00000490| 73 69 74 69 6f 6e 20 72 | 65 6c 61 74 69 76 65 20 |sition r|elative |
|000004a0| 74 6f 20 69 74 73 20 70 | 61 72 65 6e 74 20 6f 72 |to its p|arent or|
|000004b0| 20 73 69 62 6c 69 6e 67 | 73 2e 20 20 57 68 65 6e | sibling|s. When|
|000004c0| 65 76 65 72 20 74 68 65 | 20 70 61 72 65 6e 74 0d |ever the| parent.|
|000004d0| 5c 20 76 69 65 77 20 69 | 73 20 72 65 73 69 7a 65 |\ view i|s resize|
|000004e0| 64 2c 20 69 74 20 73 65 | 6e 64 73 20 4d 4f 56 45 |d, it se|nds MOVE|
|000004f0| 44 3a 20 74 6f 20 74 68 | 69 73 20 76 69 65 77 2c |D: to th|is view,|
|00000500| 20 61 6e 64 20 42 6f 75 | 6e 64 73 20 69 73 20 74 | and Bou|nds is t|
|00000510| 68 65 6e 20 75 73 65 64 | 20 69 6e 0d 5c 20 63 6f |hen used| in.\ co|
|00000520| 6e 6a 75 6e 63 74 69 6f | 6e 20 77 69 74 68 20 74 |njunctio|n with t|
|00000530| 68 65 20 22 6a 75 73 74 | 69 66 69 63 61 74 69 6f |he "just|ificatio|
|00000540| 6e 22 20 69 76 61 72 73 | 2c 20 4c 6a 75 73 74 2c |n" ivars|, Ljust,|
|00000550| 20 54 6a 75 73 74 2c 20 | 52 6a 75 73 74 20 61 6e | Tjust, |Rjust an|
|00000560| 64 20 42 6a 75 73 74 2c | 0d 5c 20 74 6f 20 73 65 |d Bjust,|.\ to se|
|00000570| 74 20 56 69 65 77 52 65 | 63 74 2e 0d 0d 5c 20 4e |t ViewRe|ct...\ N|
|00000580| 6f 74 65 20 74 68 61 74 | 20 76 69 65 77 73 20 61 |ote that| views a|
|00000590| 72 65 20 6c 61 74 65 2d | 62 6f 75 6e 64 20 74 6f |re late-|bound to|
|000005a0| 2c 20 73 6f 20 63 61 6e | 27 74 20 61 70 70 65 61 |, so can|'t appea|
|000005b0| 72 20 77 69 74 68 69 6e | 20 72 65 63 6f 72 64 73 |r within| records|
|000005c0| 2e 0d 0d 0d 5c 20 48 65 | 72 65 20 61 72 65 20 74 |....\ He|re are t|
|000005d0| 68 65 20 74 79 70 65 20 | 64 65 66 69 6e 69 74 69 |he type |definiti|
|000005e0| 6f 6e 73 20 66 6f 72 20 | 74 68 65 20 6a 75 73 74 |ons for |the just|
|000005f0| 69 66 69 63 61 74 69 6f | 6e 20 69 76 61 72 73 3a |ificatio|n ivars:|
|00000600| 0d 0d 74 79 70 65 7b 09 | 70 61 72 4c 65 66 74 20 |..type{.|parLeft |
|00000610| 70 61 72 52 69 67 68 74 | 20 70 61 72 43 65 6e 74 |parRight| parCent|
|00000620| 65 72 09 70 61 72 50 72 | 6f 70 09 73 69 62 4c 65 |er.parPr|op.sibLe|
|00000630| 66 74 09 73 69 62 52 69 | 67 68 74 20 7d 0d 09 09 |ft.sibRi|ght }...|
|00000640| 0d 74 79 70 65 7b 09 70 | 61 72 54 6f 70 20 70 61 |.type{.p|arTop pa|
|00000650| 72 42 6f 74 74 6f 6d 20 | 64 75 6d 6d 79 09 09 64 |rBottom |dummy..d|
|00000660| 75 6d 6d 79 09 73 69 62 | 54 6f 70 09 73 69 62 42 |ummy.sib|Top.sibB|
|00000670| 6f 74 74 6f 6d 20 20 7d | 0d 0d 0d 09 30 09 76 61 |ottom }|....0.va|
|00000680| 6c 75 65 09 4d 50 4f 49 | 4e 54 09 09 09 5c 20 50 |lue.MPOI|NT...\ P|
|00000690| 6f 69 6e 74 20 77 68 65 | 72 65 20 61 20 63 6c 69 |oint whe|re a cli|
|000006a0| 63 6b 20 6f 63 63 75 72 | 72 65 64 0d 09 09 72 65 |ck occur|red...re|
|000006b0| 63 74 09 4c 61 73 74 53 | 69 62 52 65 63 74 0d 0d |ct.LastS|ibRect..|
|000006c0| 0d 5c 20 43 6c 61 73 73 | 20 50 74 72 4c 69 73 74 |.\ Class| PtrList|
|000006d0| 20 69 73 20 75 73 65 64 | 20 66 6f 72 20 61 20 6c | is used| for a l|
|000006e0| 69 73 74 20 6f 66 20 70 | 6f 69 6e 74 65 72 73 20 |ist of p|ointers |
|000006f0| 77 68 69 63 68 20 6e 65 | 65 64 73 20 74 6f 20 62 |which ne|eds to b|
|00000700| 65 20 65 78 70 61 6e 64 | 61 62 6c 65 2e 0d 5c 20 |e expand|able..\ |
|00000710| 57 65 20 77 69 6c 6c 20 | 75 73 65 20 74 68 69 73 |We will |use this|
|00000720| 20 74 6f 20 69 6d 70 6c | 65 6d 65 6e 74 20 61 20 | to impl|ement a |
|00000730| 76 69 65 77 27 73 20 6c | 69 73 74 20 6f 66 20 69 |view's l|ist of i|
|00000740| 74 73 20 63 68 69 6c 64 | 72 65 6e 2c 20 61 6e 64 |ts child|ren, and|
|00000750| 20 61 6c 73 6f 0d 5c 20 | 69 74 73 20 6c 69 73 74 | also.\ |its list|
|00000760| 20 6f 66 20 63 6f 6e 74 | 72 6f 6c 73 2e 20 20 57 | of cont|rols. W|
|00000770| 65 20 6d 61 79 20 65 76 | 65 6e 74 75 61 6c 6c 79 |e may ev|entually|
|00000780| 20 6d 69 67 72 61 74 65 | 20 69 74 20 62 61 63 6b | migrate| it back|
|00000790| 20 69 6e 74 6f 20 4d 6f | 70 73 2e 64 69 63 20 69 | into Mo|ps.dic i|
|000007a0| 66 0d 5c 20 69 74 20 74 | 75 72 6e 73 20 6f 75 74 |f.\ it t|urns out|
|000007b0| 20 74 6f 20 62 65 20 75 | 73 65 66 75 6c 20 65 6e | to be u|seful en|
|000007c0| 6f 75 67 68 2e 20 20 41 | 6c 73 6f 20 77 65 20 64 |ough. A|lso we d|
|000007d0| 6f 6e 27 74 20 68 61 76 | 65 20 61 20 52 45 4d 4f |on't hav|e a REMO|
|000007e0| 56 45 3a 20 6d 65 74 68 | 6f 64 0d 5c 20 79 65 74 |VE: meth|od.\ yet|
|000007f0| 20 2d 2d 20 70 75 74 20 | 69 74 20 69 6e 20 69 66 | -- put |it in if|
|00000800| 20 79 6f 75 20 6e 65 65 | 64 20 69 74 21 0d 0d 0d | you nee|d it!...|
|00000810| 5c 20 3a 63 6c 61 73 73 | 09 50 54 52 4c 49 53 54 |\ :class|.PTRLIST|
|00000820| 20 20 73 75 70 65 72 7b | 20 73 74 72 69 6e 67 20 | super{| string |
|00000830| 20 73 65 71 75 65 6e 63 | 65 20 7d 0d 5c 0d 5c 20 | sequenc|e }.\.\ |
|00000840| 3a 6d 20 41 44 44 3a 09 | 09 5c 20 28 20 70 74 72 |:m ADD:.|.\ ( ptr|
|00000850| 20 2d 2d 20 29 0d 5c 09 | 70 61 64 20 21 20 20 70 | -- ).\.|pad ! p|
|00000860| 61 64 20 34 20 20 61 64 | 64 3a 20 73 75 70 65 72 |ad 4 ad|d: super|
|00000870| 20 20 3b 6d 0d 5c 0d 5c | 20 3a 6d 20 46 49 52 53 | ;m.\.\| :m FIRS|
|00000880| 54 3f 3a 0d 5c 09 73 69 | 7a 65 3a 20 73 75 70 65 |T?:.\.si|ze: supe|
|00000890| 72 20 20 4e 49 46 20 20 | 66 61 6c 73 65 20 20 45 |r NIF |false E|
|000008a0| 58 49 54 20 20 54 48 45 | 4e 09 09 5c 20 4e 6f 20 |XIT THE|N..\ No |
|000008b0| 65 6c 65 6d 65 6e 74 73 | 20 2d 20 72 65 74 75 72 |elements| - retur|
|000008c0| 6e 20 66 61 6c 73 65 0d | 5c 09 72 65 73 65 74 3a |n false.|\.reset:|
|000008d0| 20 73 75 70 65 72 20 20 | 5e 31 73 74 3a 20 73 75 | super |^1st: su|
|000008e0| 70 65 72 20 40 20 20 74 | 72 75 65 20 20 3b 6d 0d |per @ t|rue ;m.|
|000008f0| 5c 0d 5c 20 3a 6d 20 4e | 45 58 54 3f 3a 09 5c 20 |\.\ :m N|EXT?:.\ |
|00000900| 28 20 2d 2d 20 70 74 72 | 20 54 20 20 7c 20 20 2d |( -- ptr| T | -|
|00000910| 2d 20 46 20 29 0d 5c 09 | 34 20 73 6b 69 70 3a 20 |- F ).\.|4 skip: |
|00000920| 73 75 70 65 72 20 20 6c | 65 6e 3a 20 73 75 70 65 |super l|en: supe|
|00000930| 72 20 20 4e 49 46 20 20 | 66 61 6c 73 65 20 20 45 |r NIF |false E|
|00000940| 58 49 54 20 20 54 48 45 | 4e 0d 5c 09 5e 31 73 74 |XIT THE|N.\.^1st|
|00000950| 3a 20 73 75 70 65 72 20 | 20 40 20 20 74 72 75 65 |: super | @ true|
|00000960| 20 20 3b 6d 0d 5c 09 0d | 5c 20 3b 63 6c 61 73 73 | ;m.\..|\ ;class|
|00000970| 0d 0d 0d 5c 09 09 09 3d | 3d 3d 3d 3d 3d 3d 3d 3d |...\...=|========|
|00000980| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000990| 3d 3d 3d 3d 3d 0d 0d 3a | 63 6c 61 73 73 09 56 49 |=====..:|class.VI|
|000009a0| 45 57 09 73 75 70 65 72 | 7b 20 6f 62 6a 65 63 74 |EW.super|{ object|
|000009b0| 20 7d 20 20 67 65 6e 65 | 72 61 6c 09 09 5c 20 77 | } gene|ral..\ w|
|000009c0| 65 20 6c 61 74 65 2d 62 | 69 6e 64 20 74 6f 20 6f |e late-b|ind to o|
|000009d0| 74 68 65 72 20 76 69 65 | 77 73 2c 0d 09 09 09 09 |ther vie|ws,.....|
|000009e0| 09 09 09 09 09 09 09 09 | 5c 20 74 68 75 73 20 77 |........|\ thus w|
|000009f0| 65 20 75 73 65 20 22 67 | 65 6e 65 72 61 6c 22 2e |e use "g|eneral".|
|00000a00| 0d 72 65 63 6f 72 64 0d | 7b 09 72 65 63 74 09 09 |.record.|{.rect..|
|00000a10| 56 49 45 57 52 45 43 54 | 09 09 5c 20 42 6f 75 6e |VIEWRECT|..\ Boun|
|00000a20| 64 69 6e 67 20 72 65 63 | 74 61 6e 67 6c 65 2c 20 |ding rec|tangle, |
|00000a30| 72 65 6c 20 74 6f 20 67 | 72 61 66 70 6f 72 74 2e |rel to g|rafport.|
|00000a40| 0d 09 72 65 63 74 09 09 | 42 4f 55 4e 44 53 09 09 |..rect..|BOUNDS..|
|00000a50| 09 5c 20 57 65 20 75 73 | 65 20 74 68 69 73 20 74 |.\ We us|e this t|
|00000a60| 6f 20 73 65 74 20 74 68 | 65 20 76 69 65 77 52 65 |o set th|e viewRe|
|00000a70| 63 74 0d 09 70 74 72 09 | 09 09 5e 50 41 52 45 4e |ct..ptr.|..^PAREN|
|00000a80| 54 09 09 09 5c 20 50 6f | 69 6e 74 73 20 74 6f 20 |T...\ Po|ints to |
|00000a90| 70 61 72 65 6e 74 20 28 | 63 6f 6e 74 61 69 6e 69 |parent (|containi|
|00000aa0| 6e 67 29 20 76 69 65 77 | 0d 09 70 74 72 09 09 09 |ng) view|..ptr...|
|00000ab0| 5e 4d 79 57 49 4e 44 09 | 09 09 5c 20 50 6f 69 6e |^MyWIND.|..\ Poin|
|00000ac0| 74 73 20 74 6f 20 6f 77 | 6e 69 6e 67 20 77 69 6e |ts to ow|ning win|
|00000ad0| 64 6f 77 0d 7d 0d 09 70 | 74 72 4c 69 73 74 09 09 |dow.}..p|trList..|
|00000ae0| 43 48 49 4c 44 52 45 4e | 09 09 5c 20 4c 69 73 74 |CHILDREN|..\ List|
|00000af0| 20 6f 66 20 76 69 65 77 | 73 20 74 68 61 74 20 74 | of view|s that t|
|00000b00| 68 69 73 20 6f 6e 65 20 | 63 6f 6e 74 61 69 6e 73 |his one |contains|
|00000b10| 0d 09 09 09 09 09 09 09 | 09 5c 20 20 69 74 20 69 |........|.\ it i|
|00000b20| 6e 68 65 72 69 74 73 20 | 66 72 6f 6d 20 73 65 71 |nherits |from seq|
|00000b30| 75 65 6e 63 65 20 73 6f | 20 63 61 6e 27 74 20 62 |uence so| can't b|
|00000b40| 65 0d 09 09 09 09 09 09 | 09 09 5c 20 20 69 6e 20 |e.......|..\ in |
|00000b50| 61 20 72 65 63 6f 72 64 | 0d 72 65 63 6f 72 64 0d |a record|.record.|
|00000b60| 7b 09 78 2d 61 64 64 72 | 09 09 44 52 41 57 09 09 |{.x-addr|..DRAW..|
|00000b70| 09 5c 20 44 72 61 77 20 | 68 61 6e 64 6c 65 72 0d |.\ Draw |handler.|
|00000b80| 09 78 2d 61 64 64 72 09 | 09 43 6c 69 63 6b 48 6e |.x-addr.|.ClickHn|
|00000b90| 64 6c 72 09 09 5c 20 43 | 6c 69 63 6b 20 68 61 6e |dlr..\ C|lick han|
|00000ba0| 64 6c 65 72 0d 09 62 6f | 6f 6c 09 09 41 4c 49 56 |dler..bo|ol..ALIV|
|00000bb0| 45 3f 0d 09 62 6f 6f 6c | 09 09 45 4e 41 42 4c 45 |E?..bool|..ENABLE|
|00000bc0| 44 3f 0d 09 62 6f 6f 6c | 09 09 57 61 6e 74 73 43 |D?..bool|..WantsC|
|00000bd0| 6c 69 63 6b 73 3f 09 5c | 20 54 72 75 65 20 69 66 |licks?.\| True if|
|00000be0| 20 77 65 20 63 61 6e 20 | 61 63 63 65 70 74 20 63 | we can |accept c|
|00000bf0| 6c 69 63 6b 73 0d 09 62 | 6f 6f 6c 09 09 53 65 74 |licks..b|ool..Set|
|00000c00| 43 6c 69 70 3f 09 09 5c | 20 54 72 75 65 20 69 66 |Clip?..\| True if|
|00000c10| 20 77 65 20 6e 65 65 64 | 20 74 6f 20 73 65 74 20 | we need| to set |
|00000c20| 74 68 65 20 63 6c 69 70 | 20 28 64 65 66 61 75 6c |the clip| (defaul|
|00000c30| 74 29 0d 09 62 6f 6f 6c | 09 09 4d 65 61 73 75 72 |t)..bool|..Measur|
|00000c40| 65 46 72 6f 6d 4d 65 3f | 09 5c 20 54 72 75 65 20 |eFromMe?|.\ True |
|00000c50| 69 66 20 6f 74 68 65 72 | 20 73 69 62 6c 69 6e 67 |if other| sibling|
|00000c60| 73 20 61 72 65 20 74 6f | 20 75 73 65 20 74 68 69 |s are to| use thi|
|00000c70| 73 0d 09 09 09 09 09 09 | 09 09 5c 20 20 76 69 65 |s.......|..\ vie|
|00000c80| 77 20 66 6f 72 20 73 69 | 62 6c 69 6e 67 20 72 65 |w for si|bling re|
|00000c90| 6c 61 74 69 76 65 20 6a | 75 73 74 69 66 69 63 61 |lative j|ustifica|
|00000ca0| 74 69 6f 6e 0d 09 09 09 | 09 09 09 09 09 5c 20 20 |tion....|.....\ |
|00000cb0| 6d 6f 64 65 73 0d 09 62 | 79 74 65 09 09 23 75 70 |modes..b|yte..#up|
|00000cc0| 64 61 74 65 73 09 09 5c | 20 43 6f 75 6e 74 73 20 |dates..\| Counts |
|00000cd0| 6e 75 6d 62 65 72 20 6f | 66 20 70 65 6e 64 69 6e |number o|f pendin|
|00000ce0| 67 20 75 70 64 61 74 65 | 73 0d 09 62 79 74 65 09 |g update|s..byte.|
|00000cf0| 09 4c 6a 75 73 74 09 09 | 09 5c 20 4c 65 66 74 20 |.Ljust..|.\ Left |
|00000d00| 6a 75 73 74 69 66 69 63 | 61 74 69 6f 6e 0d 09 62 |justific|ation..b|
|00000d10| 79 74 65 09 09 54 6a 75 | 73 74 09 09 09 5c 20 54 |yte..Tju|st...\ T|
|00000d20| 6f 70 0d 09 62 79 74 65 | 09 09 52 6a 75 73 74 09 |op..byte|..Rjust.|
|00000d30| 09 09 5c 20 52 69 67 68 | 74 0d 09 62 79 74 65 09 |..\ Righ|t..byte.|
|00000d40| 09 42 6a 75 73 74 09 09 | 09 5c 20 42 6f 74 74 6f |.Bjust..|.\ Botto|
|00000d50| 6d 0d 7d 0d 0d 3a 6d 20 | 47 45 54 56 49 45 57 52 |m.}..:m |GETVIEWR|
|00000d60| 45 43 54 3a 09 67 65 74 | 3a 20 76 69 65 77 52 65 |ECT:.get|: viewRe|
|00000d70| 63 74 09 3b 6d 0d 3a 6d | 20 47 45 54 52 45 43 54 |ct.;m.:m| GETRECT|
|00000d80| 3a 09 09 67 65 74 3a 20 | 76 69 65 77 52 65 63 74 |:..get: |viewRect|
|00000d90| 09 3b 6d 09 09 09 5c 20 | 61 20 73 79 6e 6f 6e 79 |.;m...\ |a synony|
|00000da0| 6d 20 66 6f 72 20 63 6f | 6d 70 61 74 69 62 69 6c |m for co|mpatibil|
|00000db0| 69 74 79 0d 0d 3a 6d 20 | 5e 56 49 45 57 52 45 43 |ity..:m |^VIEWREC|
|00000dc0| 54 3a 09 61 64 64 72 3a | 20 76 69 65 77 52 65 63 |T:.addr:| viewRec|
|00000dd0| 74 09 3b 6d 09 09 09 5c | 20 4e 65 65 64 65 64 20 |t.;m...\| Needed |
|00000de0| 66 6f 72 20 53 63 72 6f | 6c 6c 65 72 20 73 75 70 |for Scro|ller sup|
|00000df0| 70 6f 72 74 0d 0d 0d 5c | 20 4d 6f 73 74 20 76 69 |port...\| Most vi|
|00000e00| 65 77 73 20 63 61 6e 20 | 62 65 20 73 65 74 20 75 |ews can |be set u|
|00000e10| 70 20 61 74 20 63 6f 6d | 70 69 6c 65 20 74 69 6d |p at com|pile tim|
|00000e20| 65 20 75 73 69 6e 67 20 | 73 65 74 42 6f 75 6e 64 |e using |setBound|
|00000e30| 73 3a 20 61 6e 64 20 73 | 65 74 4a 75 73 74 3a 2e |s: and s|etJust:.|
|00000e40| 0d 5c 20 54 68 65 6e 20 | 61 74 20 72 75 6e 20 74 |.\ Then |at run t|
|00000e50| 69 6d 65 20 61 64 64 56 | 69 65 77 3a 20 63 61 6c |ime addV|iew: cal|
|00000e60| 6c 73 20 6d 75 73 74 20 | 62 65 20 6d 61 64 65 20 |ls must |be made |
|00000e70| 74 6f 20 65 73 74 61 62 | 6c 69 73 68 20 74 68 65 |to estab|lish the|
|00000e80| 20 70 61 72 65 6e 74 2d | 63 68 69 6c 64 0d 5c 20 | parent-|child.\ |
|00000e90| 72 65 6c 61 74 69 6f 6e | 73 68 69 70 73 2e 0d 0d |relation|ships...|
|00000ea0| 3a 6d 20 42 4f 55 4e 44 | 53 3a 09 09 28 20 2d 2d |:m BOUND|S:..( --|
|00000eb0| 20 6c 20 74 20 72 20 62 | 20 29 09 09 67 65 74 3a | l t r b| )..get:|
|00000ec0| 20 62 6f 75 6e 64 73 20 | 20 3b 6d 0d 3a 6d 20 47 | bounds | ;m.:m G|
|00000ed0| 45 54 42 4f 55 4e 44 53 | 3a 09 09 09 09 09 09 67 |ETBOUNDS|:......g|
|00000ee0| 65 74 3a 20 62 6f 75 6e | 64 73 20 20 3b 6d 09 09 |et: boun|ds ;m..|
|00000ef0| 5c 20 61 20 73 79 6e 6f | 6e 79 6d 0d 0d 3a 6d 20 |\ a syno|nym..:m |
|00000f00| 53 45 54 42 4f 55 4e 44 | 53 3a 09 28 20 6c 20 74 |SETBOUND|S:.( l t|
|00000f10| 20 72 20 62 20 2d 2d 20 | 29 09 09 70 75 74 3a 20 | r b -- |)..put: |
|00000f20| 62 6f 75 6e 64 73 20 20 | 3b 6d 0d 0d 3a 6d 20 47 |bounds |;m..:m G|
|00000f30| 45 54 4a 55 53 54 3a 09 | 28 20 2d 2d 20 6c 6a 20 |ETJUST:.|( -- lj |
|00000f40| 74 6a 20 72 6a 20 62 6a | 20 29 09 67 65 74 3a 20 |tj rj bj| ).get: |
|00000f50| 4c 6a 75 73 74 20 20 67 | 65 74 3a 20 54 6a 75 73 |Ljust g|et: Tjus|
|00000f60| 74 0d 09 09 09 09 09 09 | 09 09 67 65 74 3a 20 52 |t.......|..get: R|
|00000f70| 6a 75 73 74 20 20 67 65 | 74 3a 20 42 6a 75 73 74 |just ge|t: Bjust|
|00000f80| 20 20 3b 6d 0d 09 09 09 | 09 09 09 09 09 0d 3a 6d | ;m....|......:m|
|00000f90| 20 53 45 54 4a 55 53 54 | 3a 09 28 20 6c 6a 20 74 | SETJUST|:.( lj t|
|00000fa0| 6a 20 72 6a 20 62 6a 20 | 2d 2d 20 29 09 70 75 74 |j rj bj |-- ).put|
|00000fb0| 3a 20 42 6a 75 73 74 20 | 20 70 75 74 3a 20 52 6a |: Bjust | put: Rj|
|00000fc0| 75 73 74 0d 09 09 09 09 | 09 09 09 09 70 75 74 3a |ust.....|....put:|
|00000fd0| 20 54 6a 75 73 74 20 20 | 70 75 74 3a 20 4c 6a 75 | Tjust |put: Lju|
|00000fe0| 73 74 20 20 3b 6d 0d 0d | 3a 6d 20 4d 65 61 73 75 |st ;m..|:m Measu|
|00000ff0| 72 65 46 72 6f 6d 3a 20 | 20 28 20 62 20 2d 2d 20 |reFrom: | ( b -- |
|00001000| 29 09 09 70 75 74 3a 20 | 6d 65 61 73 75 72 65 46 |)..put: |measureF|
|00001010| 72 6f 6d 4d 65 3f 20 20 | 3b 6d 0d 0d 0d 5c 20 41 |romMe? |;m...\ A|
|00001020| 44 44 56 49 45 57 3a 20 | 61 64 64 73 20 74 68 65 |DDVIEW: |adds the|
|00001030| 20 70 61 73 73 65 64 2d | 69 6e 20 76 69 65 77 20 | passed-|in view |
|00001040| 74 6f 20 74 68 69 73 20 | 76 69 65 77 27 73 20 6c |to this |view's l|
|00001050| 69 73 74 20 6f 66 20 63 | 68 69 6c 64 72 65 6e 2e |ist of c|hildren.|
|00001060| 20 20 54 68 69 73 0d 5c | 20 6d 65 74 68 6f 64 20 | This.\| method |
|00001070| 6d 75 73 74 20 62 65 20 | 63 61 6c 6c 65 64 20 61 |must be |called a|
|00001080| 74 20 72 75 6e 20 74 69 | 6d 65 2c 20 73 69 6e 63 |t run ti|me, sinc|
|00001090| 65 20 70 6f 69 6e 74 65 | 72 73 20 61 72 65 20 75 |e pointe|rs are u|
|000010a0| 73 65 64 2c 20 61 6e 64 | 20 61 6c 73 6f 20 69 74 |sed, and| also it|
|000010b0| 20 68 61 73 0d 5c 20 74 | 6f 20 62 65 20 63 61 6c | has.\ t|o be cal|
|000010c0| 6c 65 64 20 62 65 66 6f | 72 65 20 4e 45 57 3a 2c |led befo|re NEW:,|
|000010d0| 20 73 69 6e 63 65 20 4e | 45 57 3a 20 61 73 73 75 | since N|EW: assu|
|000010e0| 6d 65 73 20 74 68 65 20 | 6c 69 73 74 20 69 73 20 |mes the |list is |
|000010f0| 73 65 74 20 75 70 20 61 | 6c 72 65 61 64 79 2e 0d |set up a|lready..|
|00001100| 0d 3a 6d 20 41 44 44 56 | 49 45 57 3a 20 20 7b 20 |.:m ADDV|IEW: { |
|00001110| 5e 76 69 65 77 20 2d 2d | 20 7d 0d 09 5e 76 69 65 |^view --| }..^vie|
|00001120| 77 20 20 61 64 64 3a 20 | 63 68 69 6c 64 72 65 6e |w add: |children|
|00001130| 0d 09 5e 62 61 73 65 20 | 20 73 65 74 50 61 72 65 |..^base | setPare|
|00001140| 6e 74 3a 20 5e 76 69 65 | 77 20 20 3b 6d 0d 0d 0d |nt: ^vie|w ;m...|
|00001150| 3a 6d 20 45 4e 41 42 4c | 45 44 3f 3a 09 67 65 74 |:m ENABL|ED?:.get|
|00001160| 3a 20 65 6e 61 62 6c 65 | 64 3f 09 3b 6d 0d 3a 6d |: enable|d?.;m.:m|
|00001170| 20 57 49 4e 44 4f 57 3a | 09 09 67 65 74 3a 20 5e | WINDOW:|..get: ^|
|00001180| 4d 79 57 69 6e 64 09 3b | 6d 0d 3a 6d 20 53 45 54 |MyWind.;|m.:m SET|
|00001190| 57 49 4e 44 4f 57 3a 09 | 70 75 74 3a 20 5e 4d 79 |WINDOW:.|put: ^My|
|000011a0| 57 69 6e 64 09 3b 6d 09 | 09 5c 20 4e 6f 72 6d 61 |Wind.;m.|.\ Norma|
|000011b0| 6c 6c 79 20 74 68 69 73 | 20 69 73 20 6f 6e 6c 79 |lly this| is only|
|000011c0| 20 63 61 6c 6c 65 64 20 | 66 72 6f 6d 0d 09 09 09 | called |from....|
|000011d0| 09 09 09 09 09 09 09 5c | 20 20 74 68 65 20 77 69 |.......\| the wi|
|000011e0| 6e 64 6f 77 20 77 68 65 | 6e 20 73 65 74 74 69 6e |ndow whe|n settin|
|000011f0| 67 20 75 70 20 69 74 73 | 0d 09 09 09 09 09 09 09 |g up its|........|
|00001200| 09 09 09 5c 20 20 63 6f | 6e 74 56 69 65 77 2e 0d |...\ co|ntView..|
|00001210| 3a 6d 20 57 41 4e 54 53 | 43 4c 49 43 4b 53 3a 09 |:m WANTS|CLICKS:.|
|00001220| 70 75 74 3a 20 77 61 6e | 74 73 43 6c 69 63 6b 73 |put: wan|tsClicks|
|00001230| 3f 20 20 3b 6d 0d 3a 6d | 20 53 45 54 43 4c 49 43 |? ;m.:m| SETCLIC|
|00001240| 4b 3a 09 70 75 74 3a 20 | 43 6c 69 63 6b 48 6e 64 |K:.put: |ClickHnd|
|00001250| 6c 72 20 20 74 72 75 65 | 20 20 70 75 74 3a 20 77 |lr true| put: w|
|00001260| 61 6e 74 73 43 6c 69 63 | 6b 73 3f 20 20 3b 6d 0d |antsClic|ks? ;m.|
|00001270| 3a 6d 20 53 45 54 44 52 | 41 57 3a 09 09 70 75 74 |:m SETDR|AW:..put|
|00001280| 3a 20 64 72 61 77 20 20 | 3b 6d 0d 3a 6d 20 50 41 |: draw |;m.:m PA|
|00001290| 52 45 4e 54 3a 09 09 67 | 65 74 3a 20 5e 70 61 72 |RENT:..g|et: ^par|
|000012a0| 65 6e 74 20 20 3b 6d 0d | 3a 6d 20 53 45 54 50 41 |ent ;m.|:m SETPA|
|000012b0| 52 45 4e 54 3a 09 70 75 | 74 3a 20 5e 70 61 72 65 |RENT:.pu|t: ^pare|
|000012c0| 6e 74 20 20 3b 6d 0d 0d | 5c 20 55 50 44 41 54 45 |nt ;m..|\ UPDATE|
|000012d0| 3a 20 67 65 6e 65 72 61 | 74 65 73 20 61 6e 20 75 |: genera|tes an u|
|000012e0| 70 64 61 74 65 20 65 76 | 65 6e 74 20 66 6f 72 20 |pdate ev|ent for |
|000012f0| 74 68 65 20 76 69 65 77 | 2c 20 61 6e 64 20 43 4c |the view|, and CL|
|00001300| 45 41 52 3a 20 65 72 61 | 73 65 73 20 69 74 2e 20 |EAR: era|ses it. |
|00001310| 20 0d 0d 3a 6d 20 55 50 | 44 41 54 45 3a 09 61 64 | ..:m UP|DATE:.ad|
|00001320| 64 72 3a 20 76 69 65 77 | 52 65 63 74 20 20 63 61 |dr: view|Rect ca|
|00001330| 6c 6c 20 49 6e 76 61 6c | 52 65 63 74 20 20 3b 6d |ll Inval|Rect ;m|
|00001340| 0d 3a 6d 20 43 4c 45 41 | 52 3a 09 63 6c 65 61 72 |.:m CLEA|R:.clear|
|00001350| 3a 20 76 69 65 77 52 65 | 63 74 20 20 3b 6d 0d 0d |: viewRe|ct ;m..|
|00001360| 0d 70 72 69 76 61 74 65 | 09 09 09 5c 20 73 65 74 |.private|...\ set|
|00001370| 74 69 6e 67 20 75 70 20 | 66 6f 72 20 4d 4f 56 45 |ting up |for MOVE|
|00001380| 44 3a 0d 0d 3a 6d 20 28 | 3e 56 52 29 3a 20 20 7b |D:..:m (|>VR): {|
|00001390| 20 6c 65 66 74 20 72 74 | 20 50 6c 65 66 74 20 50 | left rt| Pleft P|
|000013a0| 72 74 20 53 6c 65 66 74 | 20 53 72 74 20 4c 6a 75 |rt Sleft| Srt Lju|
|000013b0| 73 74 20 52 6a 75 73 74 | 0d 09 09 09 5c 20 63 65 |st Rjust|....\ ce|
|000013c0| 6e 74 20 6c 65 66 74 27 | 20 72 74 27 20 2d 2d 20 |nt left'| rt' -- |
|000013d0| 6c 65 66 74 27 20 72 74 | 27 20 7d 0d 0d 09 5c 20 |left' rt|' }...\ |
|000013e0| 4e 6f 74 65 3a 20 77 65 | 27 72 65 20 73 61 79 69 |Note: we|'re sayi|
|000013f0| 6e 67 20 22 6c 65 66 74 | 22 20 61 6e 64 20 22 72 |ng "left|" and "r|
|00001400| 69 67 68 74 22 20 62 75 | 74 20 74 68 69 73 20 72 |ight" bu|t this r|
|00001410| 6f 75 74 69 6e 65 20 67 | 65 74 73 20 75 73 65 64 |outine g|ets used|
|00001420| 0d 09 5c 20 66 6f 72 20 | 74 6f 70 20 61 6e 64 20 |..\ for |top and |
|00001430| 62 6f 74 74 6f 6d 20 61 | 73 20 77 65 6c 6c 20 73 |bottom a|s well s|
|00001440| 69 6e 63 65 20 74 68 65 | 20 61 6c 67 6f 72 69 74 |ince the| algorit|
|00001450| 68 6d 20 61 6e 64 20 6a | 75 73 74 69 66 69 63 61 |hm and j|ustifica|
|00001460| 74 69 6f 6e 0d 09 5c 20 | 76 61 6c 75 65 73 20 61 |tion..\ |values a|
|00001470| 72 65 20 65 78 61 63 74 | 6c 79 20 74 68 65 20 73 |re exact|ly the s|
|00001480| 61 6d 65 2e 0d 09 0d 09 | 4c 6a 75 73 74 0d 09 53 |ame.....|Ljust..S|
|00001490| 45 4c 45 43 54 5b 09 70 | 61 72 4c 65 66 74 09 09 |ELECT[.p|arLeft..|
|000014a0| 5d 3d 3e 09 6c 65 66 74 | 20 50 6c 65 66 74 20 2b |]=>.left| Pleft +|
|000014b0| 09 2d 3e 20 6c 65 66 74 | 27 0d 09 09 09 09 09 09 |.-> left|'.......|
|000014c0| 0d 09 09 20 20 5b 09 70 | 61 72 52 69 67 68 74 09 |... [.p|arRight.|
|000014d0| 5d 3d 3e 09 6c 65 66 74 | 20 50 72 74 20 2b 09 09 |]=>.left| Prt +..|
|000014e0| 2d 3e 20 6c 65 66 74 27 | 0d 0d 09 09 20 20 5b 09 |-> left'|.... [.|
|000014f0| 70 61 72 43 65 6e 74 65 | 72 09 5d 3d 3e 09 50 6c |parCente|r.]=>.Pl|
|00001500| 65 66 74 20 50 72 74 20 | 2b 20 32 2f 09 2d 3e 20 |eft Prt |+ 2/.-> |
|00001510| 63 65 6e 74 0d 09 09 20 | 20 09 09 09 09 09 6c 65 |cent... | .....le|
|00001520| 66 74 20 63 65 6e 74 20 | 2b 09 09 2d 3e 20 6c 65 |ft cent |+..-> le|
|00001530| 66 74 27 0d 09 09 20 20 | 09 09 09 09 09 0d 09 09 |ft'... |........|
|00001540| 20 20 5b 09 70 61 72 50 | 72 6f 70 09 09 5d 3d 3e | [.parP|rop..]=>|
|00001550| 20 6c 65 66 74 0d 09 09 | 20 20 09 09 09 09 09 50 | left...| .....P|
|00001560| 72 74 20 50 6c 65 66 74 | 20 2d 20 20 31 30 30 30 |rt Pleft| - 1000|
|00001570| 30 20 2a 2f 0d 09 09 20 | 20 09 09 09 09 09 50 6c |0 */... | .....Pl|
|00001580| 65 66 74 20 2b 09 09 09 | 2d 3e 20 6c 65 66 74 27 |eft +...|-> left'|
|00001590| 0d 09 09 20 20 09 09 09 | 09 09 0d 09 09 20 20 5b |... ...|..... [|
|000015a0| 09 73 69 62 4c 65 66 74 | 09 09 5d 3d 3e 09 6c 65 |.sibLeft|..]=>.le|
|000015b0| 66 74 20 73 6c 65 66 74 | 20 2b 09 2d 3e 20 6c 65 |ft sleft| +.-> le|
|000015c0| 66 74 27 0d 09 09 20 20 | 09 09 09 09 09 0d 09 09 |ft'... |........|
|000015d0| 20 20 5b 09 73 69 62 52 | 69 67 68 74 09 5d 3d 3e | [.sibR|ight.]=>|
|000015e0| 09 6c 65 66 74 20 73 72 | 74 20 2b 09 09 2d 3e 20 |.left sr|t +..-> |
|000015f0| 6c 65 66 74 27 0d 0d 09 | 09 20 20 44 45 46 41 55 |left'...|. DEFAU|
|00001600| 4c 54 3d 3e 0d 09 5d 53 | 45 4c 45 43 54 0d 09 09 |LT=>..]S|ELECT...|
|00001610| 20 20 0d 09 52 6a 75 73 | 74 0d 09 53 45 4c 45 43 | ..Rjus|t..SELEC|
|00001620| 54 5b 20 70 61 72 4c 65 | 66 74 09 09 5d 3d 3e 09 |T[ parLe|ft..]=>.|
|00001630| 72 74 20 20 20 50 6c 65 | 66 74 20 2b 09 2d 3e 20 |rt Ple|ft +.-> |
|00001640| 72 74 27 0d 0d 09 09 20 | 20 5b 09 70 61 72 52 69 |rt'.... | [.parRi|
|00001650| 67 68 74 09 5d 3d 3e 09 | 72 74 09 20 50 72 74 20 |ght.]=>.|rt. Prt |
|00001660| 2b 09 09 2d 3e 20 72 74 | 27 0d 0d 09 09 20 20 5b |+..-> rt|'.... [|
|00001670| 09 70 61 72 43 65 6e 74 | 65 72 09 5d 3d 3e 09 50 |.parCent|er.]=>.P|
|00001680| 6c 65 66 74 20 50 72 74 | 20 2b 20 32 2f 09 2d 3e |left Prt| + 2/.->|
|00001690| 20 63 65 6e 74 0d 09 09 | 20 20 09 09 09 09 09 72 | cent...| .....r|
|000016a0| 74 20 20 20 63 65 6e 74 | 20 2b 09 09 2d 3e 20 72 |t cent| +..-> r|
|000016b0| 74 27 0d 0d 09 09 20 20 | 5b 09 70 61 72 50 72 6f |t'.... |[.parPro|
|000016c0| 70 09 09 5d 3d 3e 20 72 | 74 0d 09 09 20 20 09 09 |p..]=> r|t... ..|
|000016d0| 09 09 09 50 72 74 20 50 | 6c 65 66 74 20 2d 20 20 |...Prt P|left - |
|000016e0| 31 30 30 30 30 20 2a 2f | 0d 09 09 20 20 09 09 09 |10000 */|... ...|
|000016f0| 09 09 50 6c 65 66 74 20 | 2b 09 09 09 2d 3e 20 72 |..Pleft |+...-> r|
|00001700| 74 27 0d 0d 09 09 20 20 | 5b 09 73 69 62 4c 65 66 |t'.... |[.sibLef|
|00001710| 74 09 09 5d 3d 3e 09 72 | 74 09 20 73 6c 65 66 74 |t..]=>.r|t. sleft|
|00001720| 20 2b 09 2d 3e 20 72 74 | 27 0d 09 09 20 20 09 09 | +.-> rt|'... ..|
|00001730| 09 09 09 0d 09 09 20 20 | 5b 09 73 69 62 52 69 67 |...... |[.sibRig|
|00001740| 68 74 09 5d 3d 3e 09 72 | 74 09 20 73 72 74 20 2b |ht.]=>.r|t. srt +|
|00001750| 09 09 2d 3e 20 72 74 27 | 0d 0d 09 09 20 20 44 45 |..-> rt'|.... DE|
|00001760| 46 41 55 4c 54 3d 3e 0d | 09 5d 53 45 4c 45 43 54 |FAULT=>.|.]SELECT|
|00001770| 0d 0d 09 6c 65 66 74 27 | 20 72 74 27 0d 3b 6d 0d |...left'| rt'.;m.|
|00001780| 0d 0d 3a 6d 20 42 4f 55 | 4e 44 53 3e 56 49 45 57 |..:m BOU|NDS>VIEW|
|00001790| 52 45 43 54 3a 20 20 7b | 20 5c 09 62 6c 65 66 74 |RECT: {| \.bleft|
|000017a0| 20 62 74 6f 70 20 62 72 | 74 20 62 62 6f 74 0d 09 | btop br|t bbot..|
|000017b0| 09 09 09 09 09 09 70 6c | 65 66 74 20 70 74 6f 70 |......pl|eft ptop|
|000017c0| 20 70 72 74 20 70 62 6f | 74 0d 09 09 09 09 09 09 | prt pbo|t.......|
|000017d0| 09 73 6c 65 66 74 20 73 | 74 6f 70 20 73 72 74 20 |.sleft s|top srt |
|000017e0| 73 62 6f 74 0d 09 09 09 | 09 09 09 09 76 6c 65 66 |sbot....|....vlef|
|000017f0| 74 20 76 74 6f 70 20 76 | 72 74 20 76 62 6f 74 20 |t vtop v|rt vbot |
|00001800| 2d 2d 20 7d 0d 0d 5c 20 | 46 69 72 73 74 2c 20 69 |-- }..\ |First, i|
|00001810| 66 20 74 68 69 73 20 69 | 73 20 61 20 63 6f 6e 74 |f this i|s a cont|
|00001820| 56 69 65 77 2c 20 74 68 | 65 72 65 27 73 20 6e 6f |View, th|ere's no|
|00001830| 20 70 61 72 65 6e 74 2c | 20 73 6f 20 77 65 20 6a | parent,| so we j|
|00001840| 75 73 74 20 63 6f 70 79 | 0d 5c 20 74 68 65 20 62 |ust copy|.\ the b|
|00001850| 6f 75 6e 64 73 20 74 6f | 20 74 68 65 20 76 69 65 |ounds to| the vie|
|00001860| 77 52 65 63 74 20 61 6e | 64 20 67 65 74 20 6f 75 |wRect an|d get ou|
|00001870| 74 2e 0d 0d 09 6e 69 6c | 3f 3a 20 5e 70 61 72 65 |t....nil|?: ^pare|
|00001880| 6e 74 0d 09 49 46 09 09 | 61 64 64 72 3a 20 62 6f |nt..IF..|addr: bo|
|00001890| 75 6e 64 73 20 20 2d 3e | 3a 20 76 69 65 77 52 65 |unds ->|: viewRe|
|000018a0| 63 74 20 20 45 58 49 54 | 20 20 54 48 45 4e 0d 09 |ct EXIT| THEN..|
|000018b0| 09 09 09 09 09 09 09 09 | 09 09 0d 09 67 65 74 56 |........|....getV|
|000018c0| 69 65 77 52 65 63 74 3a | 20 5b 20 67 65 74 3a 20 |iewRect:| [ get: |
|000018d0| 5e 70 61 72 65 6e 74 20 | 5d 09 09 09 09 5c 20 50 |^parent |]....\ P|
|000018e0| 61 72 65 6e 74 27 73 20 | 76 69 65 77 52 65 63 74 |arent's |viewRect|
|000018f0| 0d 09 2d 3e 20 70 62 6f | 74 20 2d 3e 20 70 72 74 |..-> pbo|t -> prt|
|00001900| 20 2d 3e 20 70 74 6f 70 | 20 2d 3e 20 70 6c 65 66 | -> ptop| -> plef|
|00001910| 74 0d 09 67 65 74 3a 20 | 6c 61 73 74 53 69 62 52 |t..get: |lastSibR|
|00001920| 65 63 74 20 20 2d 3e 20 | 73 62 6f 74 20 20 2d 3e |ect -> |sbot ->|
|00001930| 20 73 72 74 20 20 2d 3e | 20 73 74 6f 70 20 20 2d | srt ->| stop -|
|00001940| 3e 20 73 6c 65 66 74 0d | 09 67 65 74 3a 20 62 6f |> sleft.|.get: bo|
|00001950| 75 6e 64 73 09 09 20 20 | 2d 3e 20 62 62 6f 74 20 |unds.. |-> bbot |
|00001960| 20 2d 3e 20 62 72 74 20 | 20 2d 3e 20 62 74 6f 70 | -> brt | -> btop|
|00001970| 20 20 2d 3e 20 62 6c 65 | 66 74 0d 09 62 6c 65 66 | -> ble|ft..blef|
|00001980| 74 20 62 72 74 20 20 70 | 6c 65 66 74 20 70 72 74 |t brt p|left prt|
|00001990| 20 20 73 6c 65 66 74 20 | 73 72 74 20 20 67 65 74 | sleft |srt get|
|000019a0| 3a 20 4c 6a 75 73 74 20 | 20 67 65 74 3a 20 52 6a |: Ljust | get: Rj|
|000019b0| 75 73 74 20 20 28 3e 76 | 72 29 3a 20 73 65 6c 66 |ust (>v|r): self|
|000019c0| 0d 09 09 2d 3e 20 76 72 | 74 20 2d 3e 20 76 6c 65 |...-> vr|t -> vle|
|000019d0| 66 74 0d 09 62 74 6f 70 | 20 62 62 6f 74 20 20 70 |ft..btop| bbot p|
|000019e0| 74 6f 70 20 70 62 6f 74 | 20 20 73 74 6f 70 20 73 |top pbot| stop s|
|000019f0| 62 6f 74 20 20 67 65 74 | 3a 20 54 6a 75 73 74 20 |bot get|: Tjust |
|00001a00| 20 67 65 74 3a 20 42 6a | 75 73 74 20 20 28 3e 76 | get: Bj|ust (>v|
|00001a10| 72 29 3a 20 73 65 6c 66 | 0d 09 09 2d 3e 20 76 62 |r): self|...-> vb|
|00001a20| 6f 74 20 2d 3e 20 76 74 | 6f 70 0d 09 76 6c 65 66 |ot -> vt|op..vlef|
|00001a30| 74 20 76 74 6f 70 20 76 | 72 74 20 76 62 6f 74 20 |t vtop v|rt vbot |
|00001a40| 20 70 75 74 3a 20 76 69 | 65 77 52 65 63 74 0d 09 | put: vi|ewRect..|
|00001a50| 67 65 74 3a 20 6d 65 61 | 73 75 72 65 46 72 6f 6d |get: mea|sureFrom|
|00001a60| 4d 65 3f 0d 09 49 46 09 | 61 64 64 72 3a 20 76 69 |Me?..IF.|addr: vi|
|00001a70| 65 77 52 65 63 74 20 20 | 2d 3e 3a 20 6c 61 73 74 |ewRect |->: last|
|00001a80| 53 69 62 52 65 63 74 20 | 20 54 48 45 4e 0d 3b 6d |SibRect | THEN.;m|
|00001a90| 0d 0d 0d 3a 6d 20 43 68 | 69 6c 64 72 65 6e 4d 6f |...:m Ch|ildrenMo|
|00001aa0| 76 65 64 3a 20 20 7b 20 | 5c 20 6c 20 74 20 72 20 |ved: { |\ l t r |
|00001ab0| 62 20 2d 2d 20 7d 0d 09 | 67 65 74 3a 20 6c 61 73 |b -- }..|get: las|
|00001ac0| 74 53 69 62 52 65 63 74 | 0d 09 67 65 74 3a 20 76 |tSibRect|..get: v|
|00001ad0| 69 65 77 52 65 63 74 20 | 2d 3e 20 62 20 2d 3e 20 |iewRect |-> b -> |
|00001ae0| 72 20 2d 3e 20 74 20 2d | 3e 20 6c 20 20 20 72 20 |r -> t -|> l r |
|00001af0| 62 20 6c 20 74 20 20 70 | 75 74 3a 20 6c 61 73 74 |b l t p|ut: last|
|00001b00| 53 69 62 52 65 63 74 0d | 09 42 45 47 49 4e 20 20 |SibRect.|.BEGIN |
|00001b10| 65 61 63 68 3a 20 63 68 | 69 6c 64 72 65 6e 20 20 |each: ch|ildren |
|00001b20| 57 48 49 4c 45 20 20 6d | 6f 76 65 64 3a 20 5b 5d |WHILE m|oved: []|
|00001b30| 20 20 52 45 50 45 41 54 | 0d 09 70 75 74 3a 20 6c | REPEAT|..put: l|
|00001b40| 61 73 74 53 69 62 52 65 | 63 74 20 20 3b 6d 0d 0d |astSibRe|ct ;m..|
|00001b50| 0d 70 75 62 6c 69 63 0d | 0d 5c 20 4d 4f 56 45 44 |.public.|.\ MOVED|
|00001b60| 3a 20 6d 65 61 6e 73 20 | 74 68 61 74 20 73 6f 6d |: means |that som|
|00001b70| 65 74 68 69 6e 67 20 68 | 61 73 20 68 61 70 70 65 |ething h|as happe|
|00001b80| 6e 65 64 20 74 6f 20 63 | 68 61 6e 67 65 20 74 68 |ned to c|hange th|
|00001b90| 65 20 70 6f 73 69 74 69 | 6f 6e 20 6f 66 0d 5c 20 |e positi|on of.\ |
|00001ba0| 74 68 69 73 20 76 69 65 | 77 20 28 73 75 63 68 20 |this vie|w (such |
|00001bb0| 61 73 20 74 68 65 20 70 | 61 72 65 6e 74 20 76 69 |as the p|arent vi|
|00001bc0| 65 77 20 6d 6f 76 69 6e | 67 2c 20 6f 72 20 74 68 |ew movin|g, or th|
|00001bd0| 65 20 62 6f 75 6e 64 73 | 20 6f 72 20 6a 75 73 74 |e bounds| or just|
|00001be0| 69 66 69 63 61 74 69 6f | 6e 0d 5c 20 70 61 72 61 |ificatio|n.\ para|
|00001bf0| 6d 65 74 65 72 73 20 63 | 68 61 6e 67 69 6e 67 29 |meters c|hanging)|
|00001c00| 2c 20 73 6f 20 77 65 20 | 6d 75 73 74 20 72 65 63 |, so we |must rec|
|00001c10| 6f 6d 70 75 74 65 20 74 | 68 65 20 76 69 65 77 52 |ompute t|he viewR|
|00001c20| 65 63 74 2e 20 20 54 68 | 69 73 20 6d 65 61 6e 73 |ect. Th|is means|
|00001c30| 0d 5c 20 63 61 6c 6c 69 | 6e 67 20 62 6f 75 6e 64 |.\ calli|ng bound|
|00001c40| 73 3e 76 69 65 77 52 65 | 63 74 3a 2c 20 61 6e 64 |s>viewRe|ct:, and|
|00001c50| 20 63 61 6c 6c 69 6e 67 | 20 4d 4f 56 45 44 3a 20 | calling| MOVED: |
|00001c60| 6f 6e 20 6f 75 72 20 63 | 68 69 6c 64 72 65 6e 20 |on our c|hildren |
|00001c70| 61 73 20 77 65 6c 6c 2e | 0d 0d 5c 20 54 68 65 20 |as well.|..\ The |
|00001c80| 73 69 74 75 61 74 69 6f | 6e 20 77 69 74 68 20 74 |situatio|n with t|
|00001c90| 68 65 20 63 6c 69 70 20 | 61 6e 64 20 75 70 64 61 |he clip |and upda|
|00001ca0| 74 69 6e 67 20 69 73 20 | 61 20 62 69 74 20 74 72 |ting is |a bit tr|
|00001cb0| 69 63 6b 79 20 2d 20 61 | 74 20 73 6f 6d 65 20 73 |icky - a|t some s|
|00001cc0| 74 61 67 65 0d 5c 20 77 | 65 20 73 68 6f 75 6c 64 |tage.\ w|e should|
|00001cd0| 20 73 65 74 20 74 68 65 | 20 63 6c 69 70 20 74 6f | set the| clip to|
|00001ce0| 20 74 68 65 20 6e 65 77 | 20 76 69 65 77 20 70 6f | the new| view po|
|00001cf0| 73 69 74 69 6f 6e 2c 20 | 61 6e 64 20 70 72 6f 62 |sition, |and prob|
|00001d00| 61 62 6c 79 20 61 6e 20 | 75 70 64 61 74 65 0d 5c |ably an |update.\|
|00001d10| 20 69 73 20 6e 65 65 64 | 65 64 20 65 76 65 6e 74 | is need|ed event|
|00001d20| 75 61 6c 6c 79 20 61 73 | 20 77 65 6c 6c 2e 20 20 |ually as| well. |
|00001d30| 42 75 74 20 69 6e 20 73 | 75 62 63 6c 61 73 73 65 |But in s|ubclasse|
|00001d40| 73 20 77 65 20 6d 69 67 | 68 74 20 61 6c 73 6f 20 |s we mig|ht also |
|00001d50| 68 61 76 65 20 74 6f 0d | 5c 20 65 72 61 73 65 20 |have to.|\ erase |
|00001d60| 74 68 65 20 6f 6c 64 20 | 70 6f 73 69 74 69 6f 6e |the old |position|
|00001d70| 20 28 43 74 6c 20 64 6f | 65 73 20 74 68 69 73 2c | (Ctl do|es this,|
|00001d80| 20 66 6f 72 20 65 78 61 | 6d 70 6c 65 29 2c 20 77 | for exa|mple), w|
|00001d90| 68 69 63 68 20 77 69 6c | 6c 20 70 72 6f 62 61 62 |hich wil|l probab|
|00001da0| 6c 79 0d 5c 20 62 65 20 | 6f 75 74 73 69 64 65 20 |ly.\ be |outside |
|00001db0| 74 68 65 20 6e 65 77 20 | 76 69 65 77 20 61 72 65 |the new |view are|
|00001dc0| 61 2e 20 20 41 6c 73 6f | 20 77 65 20 6d 69 67 68 |a. Also| we migh|
|00001dd0| 74 20 62 65 20 69 6e 73 | 69 64 65 20 61 20 73 6d |t be ins|ide a sm|
|00001de0| 61 6c 6c 65 72 20 70 61 | 72 65 6e 74 0d 5c 20 76 |aller pa|rent.\ v|
|00001df0| 69 65 77 2c 20 73 6f 20 | 73 65 74 74 69 6e 67 20 |iew, so |setting |
|00001e00| 74 68 65 20 63 6c 69 70 | 20 6d 69 67 68 74 20 62 |the clip| might b|
|00001e10| 65 20 69 6e 61 70 70 72 | 6f 70 72 69 61 74 65 2e |e inappr|opriate.|
|00001e20| 20 20 41 73 20 77 65 6c | 6c 20 61 73 20 74 68 69 | As wel|l as thi|
|00001e30| 73 2c 20 77 65 0d 5c 20 | 6d 69 67 68 74 20 68 61 |s, we.\ |might ha|
|00001e40| 76 65 20 74 6f 20 64 6f | 20 73 6f 6d 65 20 6f 74 |ve to do| some ot|
|00001e50| 68 65 72 20 64 72 61 77 | 69 6e 67 20 77 68 69 63 |her draw|ing whic|
|00001e60| 68 20 6d 69 67 68 74 20 | 6d 61 6b 65 20 61 6e 20 |h might |make an |
|00001e70| 75 70 64 61 74 65 20 75 | 6e 6e 65 63 65 73 73 61 |update u|nnecessa|
|00001e80| 72 79 2e 0d 0d 5c 20 53 | 6f 20 68 65 72 65 20 69 |ry...\ S|o here i|
|00001e90| 6e 20 56 69 65 77 2c 20 | 77 65 20 6a 75 73 74 20 |n View, |we just |
|00001ea0| 64 6f 20 74 68 65 20 62 | 61 73 69 63 20 73 74 75 |do the b|asic stu|
|00001eb0| 66 66 2c 20 61 6e 64 20 | 64 6f 6e 27 74 20 73 65 |ff, and |don't se|
|00001ec0| 74 20 74 68 65 20 63 6c | 69 70 0d 5c 20 6f 72 20 |t the cl|ip.\ or |
|00001ed0| 75 70 64 61 74 65 2e 0d | 0d 0d 3a 6d 20 4d 4f 56 |update..|..:m MOV|
|00001ee0| 45 44 3a 0d 09 62 6f 75 | 6e 64 73 3e 76 69 65 77 |ED:..bou|nds>view|
|00001ef0| 52 65 63 74 3a 20 73 65 | 6c 66 0d 09 67 65 74 3a |Rect: se|lf..get:|
|00001f00| 20 61 6c 69 76 65 3f 20 | 49 46 20 20 63 68 69 6c | alive? |IF chil|
|00001f10| 64 72 65 6e 4d 6f 76 65 | 64 3a 20 73 65 6c 66 20 |drenMove|d: self |
|00001f20| 20 54 48 45 4e 0d 3b 6d | 0d 0d 0d 5c 20 4e 45 57 | THEN.;m|...\ NEW|
|00001f30| 3a 20 20 28 20 2d 2d 20 | 29 20 20 66 69 72 65 73 |: ( -- |) fires|
|00001f40| 20 75 70 20 74 68 65 20 | 76 69 65 77 2e 20 20 54 | up the |view. T|
|00001f50| 68 69 73 20 6d 65 74 68 | 6f 64 20 69 6e 20 6e 6f |his meth|od in no|
|00001f60| 72 6d 61 6c 6c 79 20 63 | 61 6c 6c 65 64 0d 5c 20 |rmally c|alled.\ |
|00001f70| 61 75 74 6f 6d 61 74 69 | 63 61 6c 6c 79 20 66 72 |automati|cally fr|
|00001f80| 6f 6d 20 74 68 65 20 6f | 77 6e 69 6e 67 20 77 69 |om the o|wning wi|
|00001f90| 6e 64 6f 77 20 77 68 65 | 6e 20 74 68 65 20 77 69 |ndow whe|n the wi|
|00001fa0| 6e 64 6f 77 20 67 65 74 | 73 20 61 20 4e 45 57 3a |ndow get|s a NEW:|
|00001fb0| 2e 0d 0d 70 72 69 76 61 | 74 65 09 09 09 5c 20 48 |...priva|te...\ H|
|00001fc0| 65 72 65 20 77 65 20 6a | 75 73 74 20 66 61 63 74 |ere we j|ust fact|
|00001fd0| 6f 72 20 6f 75 74 20 73 | 6f 6d 65 20 73 74 75 66 |or out s|ome stuf|
|00001fe0| 66 20 77 68 69 63 68 20 | 73 75 62 63 6c 61 73 73 |f which |subclass|
|00001ff0| 65 73 20 63 61 6e 0d 09 | 09 09 09 5c 20 63 61 6c |es can..|...\ cal|
|00002000| 6c 2c 20 73 69 6e 63 65 | 20 74 68 65 79 27 6c 6c |l, since| they'll|
|00002010| 20 75 73 75 61 6c 6c 79 | 20 6e 65 65 64 20 69 74 | usually| need it|
|00002020| 2c 20 62 75 74 20 6e 6f | 74 20 61 6c 6c 20 61 74 |, but no|t all at|
|00002030| 20 6f 6e 63 65 2e 0d 09 | 09 09 09 5c 20 54 68 65 | once...|...\ The|
|00002040| 20 73 65 74 75 70 4e 65 | 77 3a 20 6f 70 65 72 61 | setupNe|w: opera|
|00002050| 74 69 6f 6e 73 20 77 6f | 75 6c 64 20 6e 6f 72 6d |tions wo|uld norm|
|00002060| 61 6c 6c 79 20 62 65 20 | 6e 65 65 64 65 64 20 61 |ally be |needed a|
|00002070| 74 20 74 68 65 0d 09 09 | 09 09 5c 20 73 74 61 72 |t the...|..\ star|
|00002080| 74 20 28 73 69 6e 63 65 | 20 77 65 20 68 61 76 65 |t (since| we have|
|00002090| 20 74 6f 20 6d 61 6b 65 | 20 74 68 65 20 76 69 65 | to make| the vie|
|000020a0| 77 52 65 63 74 20 76 61 | 6c 69 64 29 2c 20 61 6e |wRect va|lid), an|
|000020b0| 64 20 74 68 65 0d 09 09 | 09 09 5c 20 77 69 6e 64 |d the...|..\ wind|
|000020c0| 75 70 4e 65 77 3a 20 6f | 70 73 20 61 74 20 74 68 |upNew: o|ps at th|
|000020d0| 65 20 65 6e 64 2c 20 73 | 69 6e 63 65 20 4e 45 57 |e end, s|ince NEW|
|000020e0| 3a 20 6d 61 79 20 64 72 | 61 77 20 73 6f 6d 65 74 |: may dr|aw somet|
|000020f0| 68 69 6e 67 2c 0d 09 09 | 09 09 5c 20 61 6e 64 20 |hing,...|..\ and |
|00002100| 74 68 65 20 63 68 69 6c | 64 20 76 69 65 77 73 20 |the chil|d views |
|00002110| 73 68 6f 75 6c 64 20 6e | 6f 72 6d 61 6c 6c 79 20 |should n|ormally |
|00002120| 62 65 20 64 72 61 77 6e | 20 61 66 74 65 72 0d 09 |be drawn| after..|
|00002130| 09 09 09 5c 20 74 68 65 | 20 70 61 72 65 6e 74 20 |...\ the| parent |
|00002140| 28 73 6f 20 74 68 65 79 | 20 63 6f 6d 65 20 6f 75 |(so they| come ou|
|00002150| 74 20 6f 6e 20 74 6f 70 | 29 2e 20 20 42 75 74 20 |t on top|). But |
|00002160| 74 68 69 73 20 69 73 6e | 27 74 20 61 0d 09 09 09 |this isn|'t a....|
|00002170| 09 5c 20 68 61 72 64 20 | 61 6e 64 20 66 61 73 74 |.\ hard |and fast|
|00002180| 20 72 75 6c 65 2c 20 73 | 6f 20 77 65 20 77 6f 6e | rule, s|o we won|
|00002190| 27 74 20 75 73 65 20 63 | 61 6c 6c 46 69 72 73 74 |'t use c|allFirst|
|000021a0| 2f 63 61 6c 6c 4c 61 73 | 74 0d 09 09 09 09 5c 20 |/callLas|t.....\ |
|000021b0| 68 65 72 65 2e 0d 3a 6d | 20 53 65 74 75 70 4e 65 |here..:m| SetupNe|
|000021c0| 77 3a 0d 09 62 6f 75 6e | 64 73 3e 76 69 65 77 52 |w:..boun|ds>viewR|
|000021d0| 65 63 74 3a 20 73 65 6c | 66 0d 09 4e 49 4c 3f 3a |ect: sel|f..NIL?:|
|000021e0| 20 5e 70 61 72 65 6e 74 | 0d 09 4e 49 46 09 09 67 | ^parent|..NIF..g|
|000021f0| 65 74 3a 20 5e 70 61 72 | 65 6e 74 20 20 77 69 6e |et: ^par|ent win|
|00002200| 64 6f 77 3a 20 76 69 65 | 77 20 20 73 65 74 57 69 |dow: vie|w setWi|
|00002210| 6e 64 6f 77 3a 20 73 65 | 6c 66 0d 09 54 48 45 4e |ndow: se|lf..THEN|
|00002220| 20 20 3b 6d 0d 0d 3a 6d | 20 57 69 6e 64 75 70 4e | ;m..:m| WindupN|
|00002230| 65 77 3a 0d 09 42 45 47 | 49 4e 20 20 28 20 5e 62 |ew:..BEG|IN ( ^b|
|00002240| 61 73 65 20 29 20 20 65 | 61 63 68 3a 20 63 68 69 |ase ) e|ach: chi|
|00002250| 6c 64 72 65 6e 20 20 57 | 48 49 4c 45 20 20 6e 65 |ldren W|HILE ne|
|00002260| 77 3a 20 5b 5d 20 20 52 | 45 50 45 41 54 0d 09 74 |w: [] R|EPEAT..t|
|00002270| 72 75 65 20 20 70 75 74 | 3a 20 61 6c 69 76 65 3f |rue put|: alive?|
|00002280| 20 20 3b 6d 0d 0d 70 75 | 62 6c 69 63 0d 0d 3a 6d | ;m..pu|blic..:m|
|00002290| 20 4e 45 57 3a 0d 09 73 | 65 74 75 70 4e 65 77 3a | NEW:..s|etupNew:|
|000022a0| 20 73 65 6c 66 20 20 20 | 77 69 6e 64 75 70 4e 65 | self |windupNe|
|000022b0| 77 3a 20 73 65 6c 66 20 | 20 3b 6d 0d 0d 0d 3a 6d |w: self | ;m...:m|
|000022c0| 20 52 45 4c 45 41 53 45 | 3a 0d 09 42 45 47 49 4e | RELEASE|:..BEGIN|
|000022d0| 20 20 20 65 61 63 68 3a | 20 63 68 69 6c 64 72 65 | each:| childre|
|000022e0| 6e 20 20 57 48 49 4c 45 | 20 20 72 65 6c 65 61 73 |n WHILE| releas|
|000022f0| 65 3a 20 5b 5d 20 20 52 | 45 50 45 41 54 0d 09 72 |e: [] R|EPEAT..r|
|00002300| 65 6c 65 61 73 65 3a 20 | 63 68 69 6c 64 72 65 6e |elease: |children|
|00002310| 0d 09 66 61 6c 73 65 20 | 20 70 75 74 3a 20 61 6c |..false | put: al|
|00002320| 69 76 65 3f 20 20 20 3b | 6d 0d 0d 0d 5c 20 44 52 |ive? ;|m...\ DR|
|00002330| 41 57 3a 20 69 73 20 74 | 68 65 20 6d 65 74 68 6f |AW: is t|he metho|
|00002340| 64 20 63 61 6c 6c 65 64 | 20 74 6f 20 67 65 74 20 |d called| to get |
|00002350| 74 68 65 20 76 69 65 77 | 20 74 6f 20 64 72 61 77 |the view| to draw|
|00002360| 20 69 74 73 65 6c 66 2e | 20 20 54 68 65 72 65 0d | itself.| There.|
|00002370| 5c 20 61 72 65 20 61 20 | 66 65 77 20 73 75 62 74 |\ are a |few subt|
|00002380| 6c 65 74 69 65 73 2e 20 | 20 42 65 66 6f 72 65 20 |leties. | Before |
|00002390| 64 72 61 77 69 6e 67 20 | 69 73 20 64 6f 6e 65 2c |drawing |is done,|
|000023a0| 20 77 65 20 22 66 6f 63 | 75 73 22 20 77 68 69 63 | we "foc|us" whic|
|000023b0| 68 20 6d 65 61 6e 73 0d | 5c 20 73 65 74 74 69 6e |h means.|\ settin|
|000023c0| 67 20 74 68 65 20 63 6c | 69 70 20 72 65 67 69 6f |g the cl|ip regio|
|000023d0| 6e 20 74 6f 20 76 69 65 | 77 52 65 63 74 2c 20 61 |n to vie|wRect, a|
|000023e0| 6e 64 20 74 68 65 20 6f | 72 69 67 69 6e 20 73 6f |nd the o|rigin so|
|000023f0| 20 74 68 61 74 20 74 68 | 65 20 74 6f 70 20 6c 65 | that th|e top le|
|00002400| 66 74 0d 5c 20 63 6f 72 | 6e 65 72 20 6f 66 20 76 |ft.\ cor|ner of v|
|00002410| 69 65 77 52 65 63 74 20 | 77 69 6c 6c 20 62 65 20 |iewRect |will be |
|00002420| 28 30 2c 20 30 29 2e 20 | 20 54 68 65 6e 20 61 66 |(0, 0). | Then af|
|00002430| 74 65 72 20 64 72 61 77 | 69 6e 67 2c 20 77 65 20 |ter draw|ing, we |
|00002440| 6e 65 65 64 20 74 6f 20 | 63 61 6c 6c 0d 5c 20 64 |need to |call.\ d|
|00002450| 72 61 77 3a 20 66 6f 72 | 20 61 6c 6c 20 74 68 65 |raw: for| all the|
|00002460| 20 63 68 69 6c 64 72 65 | 6e 2e 20 20 4e 6f 77 20 | childre|n. Now |
|00002470| 68 65 72 65 27 73 20 74 | 68 65 20 67 6f 6f 64 20 |here's t|he good |
|00002480| 70 61 72 74 2e 20 20 42 | 6f 74 68 20 74 68 65 73 |part. B|oth thes|
|00002490| 65 20 6a 6f 62 73 0d 5c | 20 63 61 6e 20 62 65 20 |e jobs.\| can be |
|000024a0| 64 6f 6e 65 20 76 69 61 | 20 74 68 65 20 43 61 6c |done via| the Cal|
|000024b0| 6c 46 69 72 73 74 2f 43 | 61 6c 6c 4c 61 73 74 20 |lFirst/C|allLast |
|000024c0| 6d 65 63 68 61 6e 69 73 | 6d 2c 20 73 6f 20 74 68 |mechanis|m, so th|
|000024d0| 65 20 44 52 41 57 3a 20 | 6d 65 74 68 6f 64 0d 5c |e DRAW: |method.\|
|000024e0| 20 69 74 73 65 6c 66 20 | 63 61 6e 20 6a 75 73 74 | itself |can just|
|000024f0| 20 64 6f 20 74 68 65 20 | 64 72 61 77 69 6e 67 2e | do the |drawing.|
|00002500| 20 20 48 65 72 65 20 69 | 6e 20 74 68 65 20 56 69 | Here i|n the Vi|
|00002510| 65 77 20 63 6c 61 73 73 | 20 69 74 73 65 6c 66 2c |ew class| itself,|
|00002520| 20 74 68 69 73 20 6a 75 | 73 74 0d 5c 20 63 6f 6e | this ju|st.\ con|
|00002530| 73 69 73 74 73 20 6f 66 | 20 65 78 65 63 75 74 69 |sists of| executi|
|00002540| 6e 67 20 74 68 65 20 64 | 72 61 77 20 68 61 6e 64 |ng the d|raw hand|
|00002550| 6c 65 72 2e 0d 0d 5c 20 | 46 6f 72 20 73 6f 6d 65 |ler...\ |For some|
|00002560| 20 6b 69 6e 64 73 20 6f | 66 20 73 75 62 76 69 65 | kinds o|f subvie|
|00002570| 77 20 28 6e 6f 74 61 62 | 6c 79 20 43 6f 6e 74 72 |w (notab|ly Contr|
|00002580| 6f 6c 29 2c 20 77 65 20 | 6d 61 79 20 6e 6f 74 20 |ol), we |may not |
|00002590| 77 61 6e 74 20 74 68 65 | 20 6f 72 69 67 69 6e 0d |want the| origin.|
|000025a0| 5c 20 63 68 61 6e 67 65 | 2c 20 62 75 74 20 72 61 |\ change|, but ra|
|000025b0| 74 68 65 72 20 77 61 6e | 74 20 74 68 65 20 47 72 |ther wan|t the Gr|
|000025c0| 61 66 50 6f 72 74 20 6f | 72 69 67 69 6e 2e 20 20 |afPort o|rigin. |
|000025d0| 49 6e 20 74 68 65 73 65 | 20 76 69 65 77 73 20 77 |In these| views w|
|000025e0| 65 20 63 61 6e 20 6a 75 | 73 74 0d 5c 20 70 75 74 |e can ju|st.\ put|
|000025f0| 20 22 30 20 63 61 6c 6c | 20 53 65 74 4f 72 69 67 | "0 call| SetOrig|
|00002600| 69 6e 22 20 62 65 66 6f | 72 65 20 74 68 65 20 64 |in" befo|re the d|
|00002610| 72 61 77 69 6e 67 20 63 | 6f 64 65 2e 0d 0d 5c 20 |rawing c|ode...\ |
|00002620| 41 6e 6f 74 68 65 72 20 | 75 73 65 66 75 6c 20 70 |Another |useful p|
|00002630| 6f 69 6e 74 3a 20 77 68 | 65 6e 20 74 68 65 20 64 |oint: wh|en the d|
|00002640| 72 61 77 20 68 61 6e 64 | 6c 65 72 20 69 73 20 65 |raw hand|ler is e|
|00002650| 78 65 63 75 74 65 64 2c | 20 74 65 6d 70 52 65 63 |xecuted,| tempRec|
|00002660| 74 20 77 69 6c 6c 0d 5c | 20 63 6f 6e 74 61 69 6e |t will.\| contain|
|00002670| 20 74 68 65 20 62 6f 75 | 6e 64 69 6e 67 20 72 65 | the bou|nding re|
|00002680| 63 74 61 6e 67 6c 65 20 | 66 6f 72 20 74 68 65 20 |ctangle |for the |
|00002690| 64 72 61 77 69 6e 67 2c | 20 72 65 6c 61 74 69 76 |drawing,| relativ|
|000026a0| 65 20 74 6f 20 74 68 65 | 20 63 75 72 72 65 6e 74 |e to the| current|
|000026b0| 0d 5c 20 6f 72 69 67 69 | 6e 2e 20 20 54 68 69 73 |.\ origi|n. This|
|000026c0| 20 63 61 6e 20 62 65 20 | 75 73 65 64 20 74 6f 20 | can be |used to |
|000026d0| 64 72 61 77 20 61 20 66 | 72 61 6d 65 2c 20 66 6f |draw a f|rame, fo|
|000026e0| 72 20 65 78 61 6d 70 6c | 65 2e 0d 0d 5c 20 46 69 |r exampl|e...\ Fi|
|000026f0| 6e 61 6c 20 6e 6f 74 65 | 3a 20 77 65 20 44 4f 4e |nal note|: we DON|
|00002700| 27 54 20 63 6c 65 61 72 | 20 74 68 65 20 64 72 61 |'T clear| the dra|
|00002710| 77 69 6e 67 20 61 72 65 | 61 20 62 65 66 6f 72 65 |wing are|a before|
|00002720| 20 63 61 6c 6c 69 6e 67 | 20 74 68 65 20 64 72 61 | calling| the dra|
|00002730| 77 0d 5c 20 68 61 6e 64 | 6c 65 72 2e 20 20 49 66 |w.\ hand|ler. If|
|00002740| 20 79 6f 75 20 6e 65 65 | 64 20 69 74 20 63 6c 65 | you nee|d it cle|
|00002750| 61 72 65 64 2c 20 79 6f | 75 20 63 61 6e 20 63 61 |ared, yo|u can ca|
|00002760| 6c 6c 20 43 4c 45 41 52 | 3a 20 73 65 6c 66 20 69 |ll CLEAR|: self i|
|00002770| 6e 20 74 68 65 20 64 72 | 61 77 0d 5c 20 68 61 6e |n the dr|aw.\ han|
|00002780| 64 6c 65 72 2e 0d 0d 70 | 72 69 76 61 74 65 0d 0d |dler...p|rivate..|
|00002790| 3a 6d 20 53 65 74 54 65 | 6d 70 52 65 63 74 3a 20 |:m SetTe|mpRect: |
|000027a0| 20 7b 20 5c 20 6c 65 66 | 74 20 74 6f 70 20 72 74 | { \ lef|t top rt|
|000027b0| 20 62 6f 74 20 2d 2d 20 | 7d 0d 09 09 5c 20 53 65 | bot -- |}...\ Se|
|000027c0| 74 73 20 74 65 6d 70 52 | 65 63 74 20 74 6f 20 61 |ts tempR|ect to a|
|000027d0| 20 76 69 65 77 2d 72 65 | 6c 61 74 69 76 65 20 76 | view-re|lative v|
|000027e0| 65 72 73 69 6f 6e 20 6f | 66 20 76 69 65 77 52 65 |ersion o|f viewRe|
|000027f0| 63 74 0d 09 09 5c 20 2d | 2d 20 77 65 20 75 73 65 |ct...\ -|- we use|
|00002800| 20 74 68 69 73 20 66 6f | 72 20 61 20 6e 75 6d 62 | this fo|r a numb|
|00002810| 65 72 20 6f 66 20 74 68 | 69 6e 67 73 2e 0d 09 67 |er of th|ings...g|
|00002820| 65 74 3a 20 76 69 65 77 | 52 65 63 74 20 20 2d 3e |et: view|Rect ->|
|00002830| 20 62 6f 74 20 20 2d 3e | 20 72 74 20 20 2d 3e 20 | bot ->| rt -> |
|00002840| 74 6f 70 20 20 2d 3e 20 | 6c 65 66 74 0d 09 30 20 |top -> |left..0 |
|00002850| 20 30 20 20 72 74 20 6c | 65 66 74 20 2d 20 20 62 | 0 rt l|eft - b|
|00002860| 6f 74 20 74 6f 70 20 2d | 20 20 70 75 74 3a 20 74 |ot top -| put: t|
|00002870| 65 6d 70 52 65 63 74 20 | 20 3b 6d 0d 0d 70 75 62 |empRect | ;m..pub|
|00002880| 6c 69 63 0d 0d 5c 20 53 | 45 54 43 4c 49 50 3a 20 |lic..\ S|ETCLIP: |
|00002890| 73 65 74 73 20 74 68 65 | 20 63 6c 69 70 20 62 65 |sets the| clip be|
|000028a0| 66 6f 72 65 20 64 72 61 | 77 69 6e 67 2e 20 20 54 |fore dra|wing. T|
|000028b0| 68 69 73 20 69 73 20 61 | 20 72 61 74 68 65 72 20 |his is a| rather |
|000028c0| 65 6c 61 62 6f 72 61 74 | 65 0d 5c 20 70 72 6f 63 |elaborat|e.\ proc|
|000028d0| 65 73 73 2c 20 73 69 6e | 63 65 20 77 65 20 6e 65 |ess, sin|ce we ne|
|000028e0| 65 64 20 74 6f 20 73 65 | 74 20 74 68 65 20 63 6c |ed to se|t the cl|
|000028f0| 69 70 20 74 6f 20 74 68 | 65 20 69 6e 74 65 72 73 |ip to th|e inters|
|00002900| 65 63 74 69 6f 6e 20 6f | 66 20 74 68 69 73 0d 5c |ection o|f this.\|
|00002910| 20 76 69 65 77 27 73 20 | 76 69 65 77 52 65 63 74 | view's |viewRect|
|00002920| 20 61 6e 64 20 61 6c 6c | 20 69 74 73 20 70 61 72 | and all| its par|
|00002930| 65 6e 74 20 76 69 65 77 | 73 27 20 76 69 65 77 52 |ent view|s' viewR|
|00002940| 65 63 74 73 20 28 77 68 | 69 63 68 20 63 6f 75 6c |ects (wh|ich coul|
|00002950| 64 20 70 6f 73 73 69 62 | 6c 79 0d 5c 20 62 65 20 |d possib|ly.\ be |
|00002960| 73 6d 61 6c 6c 65 72 29 | 2e 20 20 54 68 69 73 20 |smaller)|. This |
|00002970| 63 61 6e 20 61 6c 6c 20 | 62 65 20 69 6e 68 69 62 |can all |be inhib|
|00002980| 69 74 65 64 20 62 79 20 | 73 65 74 74 69 6e 67 20 |ited by |setting |
|00002990| 53 65 74 43 6c 69 70 3f | 20 66 61 6c 73 65 0d 5c |SetClip?| false.\|
|000029a0| 20 28 77 68 69 63 68 20 | 77 65 20 64 6f 20 77 68 | (which |we do wh|
|000029b0| 65 6e 20 73 63 72 6f 6c | 6c 69 6e 67 2c 20 66 6f |en scrol|ling, fo|
|000029c0| 72 20 65 78 61 6d 70 6c | 65 2c 20 73 69 6e 63 65 |r exampl|e, since|
|000029d0| 20 74 68 65 20 73 79 73 | 74 65 6d 20 68 61 73 20 | the sys|tem has |
|000029e0| 6b 69 6e 64 6c 79 0d 5c | 20 73 65 74 20 74 68 65 |kindly.\| set the|
|000029f0| 20 63 6c 69 70 20 66 6f | 72 20 75 73 20 61 6c 72 | clip fo|r us alr|
|00002a00| 65 61 64 79 29 2e 0d 0d | 5c 20 4e 6f 74 65 3a 20 |eady)...|\ Note: |
|00002a10| 77 68 65 6e 20 74 68 69 | 73 20 6d 65 74 68 6f 64 |when thi|s method|
|00002a20| 20 69 73 20 63 61 6c 6c | 65 64 2c 20 74 68 65 20 | is call|ed, the |
|00002a30| 6f 72 69 67 69 6e 20 68 | 61 73 20 62 65 65 6e 20 |origin h|as been |
|00002a40| 73 65 74 20 73 6f 20 74 | 68 61 74 20 74 68 65 0d |set so t|hat the.|
|00002a50| 5c 20 74 6f 70 20 6c 65 | 66 74 20 6f 66 20 74 68 |\ top le|ft of th|
|00002a60| 69 73 20 76 69 65 77 20 | 69 73 20 28 30 2c 30 29 |is view |is (0,0)|
|00002a70| 2e 20 20 54 68 69 73 20 | 69 73 20 62 65 63 61 75 |. This |is becau|
|00002a80| 73 65 20 77 65 27 72 65 | 20 67 6f 69 6e 67 20 74 |se we're| going t|
|00002a90| 6f 20 75 73 65 0d 5c 20 | 74 68 69 73 20 6f 72 69 |o use.\ |this ori|
|00002aa0| 67 69 6e 20 66 6f 72 20 | 74 68 65 20 64 72 61 77 |gin for |the draw|
|00002ab0| 69 6e 67 2c 20 61 6e 64 | 20 75 6e 6c 65 73 73 20 |ing, and| unless |
|00002ac0| 77 65 20 75 73 65 20 74 | 68 65 20 73 61 6d 65 20 |we use t|he same |
|00002ad0| 77 68 65 6e 20 77 65 20 | 73 65 74 20 74 68 65 0d |when we |set the.|
|00002ae0| 5c 20 63 6c 69 70 2c 20 | 74 68 65 20 63 6c 69 70 |\ clip, |the clip|
|00002af0| 20 72 65 63 74 61 6e 67 | 6c 65 20 67 65 74 73 20 | rectang|le gets |
|00002b00| 74 72 61 6e 73 6c 61 74 | 65 64 20 61 77 61 79 20 |translat|ed away |
|00002b10| 73 6f 6d 65 77 68 65 72 | 65 20 73 74 72 61 6e 67 |somewher|e strang|
|00002b20| 65 21 0d 0d 5c 20 54 68 | 69 73 20 6d 65 74 68 6f |e!..\ Th|is metho|
|00002b30| 64 20 68 61 73 20 74 6f | 20 62 65 20 70 75 62 6c |d has to| be publ|
|00002b40| 69 63 20 73 69 6e 63 65 | 20 77 65 20 6c 61 74 65 |ic since| we late|
|00002b50| 2d 62 69 6e 64 20 74 6f | 20 69 74 2e 0d 0d 3a 6d |-bind to| it...:m|
|00002b60| 20 53 65 74 43 6c 69 70 | 3a 20 7b 20 5c 20 5e 76 | SetClip|: { \ ^v|
|00002b70| 69 65 77 20 6f 4c 65 66 | 74 20 6f 54 6f 70 20 6c |iew oLef|t oTop l|
|00002b80| 65 66 74 20 74 6f 70 20 | 72 74 20 62 6f 74 20 2d |eft top |rt bot -|
|00002b90| 2d 20 7d 0d 09 09 09 09 | 09 09 09 09 09 5c 20 20 |- }.....|.....\ |
|00002ba0| 4e 6f 74 65 3a 20 6f 72 | 69 67 69 6e 20 69 73 20 |Note: or|igin is |
|00002bb0| 72 65 6c 20 74 6f 20 74 | 68 69 73 20 76 69 65 77 |rel to t|his view|
|00002bc0| 2e 0d 09 67 65 74 3a 20 | 73 65 74 43 6c 69 70 3f |...get: |setClip?|
|00002bd0| 20 20 4e 49 46 20 20 74 | 72 75 65 20 70 75 74 3a | NIF t|rue put:|
|00002be0| 20 73 65 74 43 6c 69 70 | 3f 20 20 45 58 49 54 20 | setClip|? EXIT |
|00002bf0| 20 54 48 45 4e 0d 09 67 | 65 74 3a 20 76 69 65 77 | THEN..g|et: view|
|00002c00| 52 65 63 74 20 20 2d 3e | 20 62 6f 74 20 20 2d 3e |Rect ->| bot ->|
|00002c10| 20 72 74 20 20 2d 3e 20 | 74 6f 70 20 20 2d 3e 20 | rt -> |top -> |
|00002c20| 6c 65 66 74 0d 09 6c 65 | 66 74 20 2d 3e 20 6f 4c |left..le|ft -> oL|
|00002c30| 65 66 74 20 20 74 6f 70 | 20 2d 3e 20 6f 54 6f 70 |eft top| -> oTop|
|00002c40| 09 09 09 5c 20 46 6f 72 | 20 6f 72 69 67 69 6e 20 |...\ For| origin |
|00002c50| 61 64 6a 75 73 74 6d 65 | 6e 74 20 6c 61 74 65 72 |adjustme|nt later|
|00002c60| 0d 09 67 65 74 3a 20 5e | 70 61 72 65 6e 74 20 2d |..get: ^|parent -|
|00002c70| 3e 20 5e 76 69 65 77 0d | 09 42 45 47 49 4e 09 5e |> ^view.|.BEGIN.^|
|00002c80| 76 69 65 77 20 6e 69 6c | 50 20 3c 3e 0d 09 57 48 |view nil|P <>..WH|
|00002c90| 49 4c 45 09 5e 76 69 65 | 77 20 20 67 65 74 56 69 |ILE.^vie|w getVi|
|00002ca0| 65 77 52 65 63 74 3a 20 | 76 69 65 77 09 5c 20 4d |ewRect: |view.\ M|
|00002cb0| 73 67 20 74 6f 20 63 6c | 61 73 73 20 66 6f 72 20 |sg to cl|ass for |
|00002cc0| 73 70 65 65 64 0d 09 09 | 62 6f 74 20 6d 69 6e 20 |speed...|bot min |
|00002cd0| 2d 3e 20 62 6f 74 20 20 | 72 74 20 6d 69 6e 20 2d |-> bot |rt min -|
|00002ce0| 3e 20 72 74 20 20 74 6f | 70 20 6d 61 78 20 2d 3e |> rt to|p max ->|
|00002cf0| 20 74 6f 70 20 20 6c 65 | 66 74 20 6d 61 78 20 2d | top le|ft max -|
|00002d00| 3e 20 6c 65 66 74 0d 09 | 09 5e 76 69 65 77 20 70 |> left..|.^view p|
|00002d10| 61 72 65 6e 74 3a 20 76 | 69 65 77 20 20 2d 3e 20 |arent: v|iew -> |
|00002d20| 5e 76 69 65 77 0d 09 52 | 45 50 45 41 54 0d 09 6c |^view..R|EPEAT..l|
|00002d30| 65 66 74 20 6f 4c 65 66 | 74 20 2d 20 20 74 6f 70 |eft oLef|t - top|
|00002d40| 20 6f 54 6f 70 20 2d 20 | 20 72 74 20 6f 4c 65 66 | oTop - | rt oLef|
|00002d50| 74 20 2d 20 20 62 6f 74 | 20 6f 54 6f 70 20 2d 20 |t - bot| oTop - |
|00002d60| 20 70 75 74 3a 20 74 65 | 6d 70 52 65 63 74 0d 09 | put: te|mpRect..|
|00002d70| 61 64 64 72 3a 20 74 65 | 6d 70 52 65 63 74 20 20 |addr: te|mpRect |
|00002d80| 63 61 6c 6c 20 43 6c 69 | 70 52 65 63 74 20 20 3b |call Cli|pRect ;|
|00002d90| 6d 0d 0d 70 72 69 76 61 | 74 65 0d 0d 5c 20 53 65 |m..priva|te..\ Se|
|00002da0| 74 75 70 44 72 61 77 3a | 20 69 73 20 74 68 65 20 |tupDraw:| is the |
|00002db0| 65 71 75 69 76 61 6c 65 | 6e 74 20 6f 66 20 46 6f |equivale|nt of Fo|
|00002dc0| 63 75 73 28 29 20 66 6f | 72 20 61 20 76 69 65 77 |cus() fo|r a view|
|00002dd0| 20 69 6e 20 4d 61 63 41 | 70 70 2e 0d 5c 20 4f 75 | in MacA|pp..\ Ou|
|00002de0| 72 20 43 61 6c 6c 46 69 | 72 73 74 20 6d 65 63 68 |r CallFi|rst mech|
|00002df0| 61 6e 69 73 6d 20 6d 61 | 6b 65 73 20 69 74 20 61 |anism ma|kes it a|
|00002e00| 75 74 6f 6d 61 74 69 63 | 21 0d 0d 3a 6d 20 53 65 |utomatic|!..:m Se|
|00002e10| 74 75 70 44 72 61 77 3a | 20 20 7b 20 5c 20 6c 65 |tupDraw:| { \ le|
|00002e20| 66 74 20 74 6f 70 20 72 | 74 20 62 6f 74 20 2d 2d |ft top r|t bot --|
|00002e30| 20 70 6f 72 74 20 7d 0d | 09 70 75 73 68 50 6f 72 | port }.|.pushPor|
|00002e40| 74 09 09 09 09 09 5c 20 | 53 61 76 65 20 63 75 72 |t.....\ |Save cur|
|00002e50| 72 65 6e 74 20 70 6f 72 | 74 0d 09 67 65 74 3a 20 |rent por|t..get: |
|00002e60| 5e 6d 79 57 69 6e 64 20 | 20 73 65 74 3a 20 77 69 |^myWind | set: wi|
|00002e70| 6e 64 6f 77 09 5c 20 20 | 61 6e 64 20 73 65 74 20 |ndow.\ |and set |
|00002e80| 72 69 67 68 74 20 70 6f | 72 74 20 66 6f 72 20 64 |right po|rt for d|
|00002e90| 72 61 77 69 6e 67 0d 09 | 30 20 20 63 61 6c 6c 20 |rawing..|0 call |
|00002ea0| 53 65 74 4f 72 69 67 69 | 6e 0d 09 67 65 74 3a 20 |SetOrigi|n..get: |
|00002eb0| 76 69 65 77 52 65 63 74 | 20 20 20 2d 3e 20 62 6f |viewRect| -> bo|
|00002ec0| 74 20 20 2d 3e 20 72 74 | 20 20 2d 3e 20 74 6f 70 |t -> rt| -> top|
|00002ed0| 20 20 2d 3e 20 6c 65 66 | 74 0d 09 6c 65 66 74 20 | -> lef|t..left |
|00002ee0| 6e 65 67 61 74 65 20 74 | 6f 70 20 6e 65 67 61 74 |negate t|op negat|
|00002ef0| 65 20 20 20 70 61 63 6b | 20 20 63 61 6c 6c 20 53 |e pack| call S|
|00002f00| 65 74 4f 72 69 67 69 6e | 0d 09 67 65 74 3a 20 73 |etOrigin|..get: s|
|00002f10| 65 74 43 6c 69 70 3f 0d | 09 49 46 20 20 73 65 74 |etClip?.|.IF set|
|00002f20| 43 6c 69 70 3a 20 5b 73 | 65 6c 66 5d 20 20 45 4c |Clip: [s|elf] EL|
|00002f30| 53 45 20 20 74 72 75 65 | 20 70 75 74 3a 20 73 65 |SE true| put: se|
|00002f40| 74 43 6c 69 70 3f 20 20 | 54 48 45 4e 0d 09 73 65 |tClip? |THEN..se|
|00002f50| 74 54 65 6d 70 52 65 63 | 74 3a 20 73 65 6c 66 20 |tTempRec|t: self |
|00002f60| 20 3b 6d 0d 0d 3a 6d 20 | 57 69 6e 64 75 70 44 72 | ;m..:m |WindupDr|
|00002f70| 61 77 3a 09 09 5c 20 28 | 20 70 6f 72 74 20 2d 2d |aw:..\ (| port --|
|00002f80| 20 29 0d 09 42 45 47 49 | 4e 20 20 65 61 63 68 3a | )..BEGI|N each:|
|00002f90| 20 63 68 69 6c 64 72 65 | 6e 20 20 57 48 49 4c 45 | childre|n WHILE|
|00002fa0| 20 20 64 72 61 77 3a 20 | 5b 5d 20 20 52 45 50 45 | draw: |[] REPE|
|00002fb0| 41 54 0d 09 30 20 20 20 | 63 61 6c 6c 20 53 65 74 |AT..0 |call Set|
|00002fc0| 4f 72 69 67 69 6e 0d 09 | 30 20 70 75 74 3a 20 23 |Origin..|0 put: #|
|00002fd0| 75 70 64 61 74 65 73 0d | 09 70 6f 70 50 6f 72 74 |updates.|.popPort|
|00002fe0| 20 20 3b 6d 0d 09 0d 70 | 75 62 6c 69 63 0d 0d 0d | ;m...p|ublic...|
|00002ff0| 5c 20 28 44 52 41 57 29 | 3a 20 64 6f 65 73 20 74 |\ (DRAW)|: does t|
|00003000| 68 65 20 61 63 74 75 61 | 6c 20 77 6f 72 6b 20 66 |he actua|l work f|
|00003010| 6f 72 20 44 52 41 57 3a | 20 2d 20 77 65 20 64 6f |or DRAW:| - we do|
|00003020| 20 69 74 20 74 68 69 73 | 20 77 61 79 20 73 6f 20 | it this| way so |
|00003030| 74 68 61 74 0d 5c 20 73 | 75 62 63 6c 61 73 73 65 |that.\ s|ubclasse|
|00003040| 73 20 63 61 6e 20 63 61 | 6c 6c 20 28 64 72 61 77 |s can ca|ll (draw|
|00003050| 29 3a 20 73 75 70 65 72 | 20 77 69 74 68 6f 75 74 |): super| without|
|00003060| 20 74 72 69 67 67 65 72 | 69 6e 67 20 74 68 65 20 | trigger|ing the |
|00003070| 63 61 6c 6c 46 69 72 73 | 74 0d 5c 20 61 6e 64 20 |callFirs|t.\ and |
|00003080| 63 61 6c 6c 4c 61 73 74 | 20 63 6f 64 65 20 61 67 |callLast| code ag|
|00003090| 61 69 6e 2e 0d 0d 3a 6d | 20 28 44 52 41 57 29 3a |ain...:m| (DRAW):|
|000030a0| 09 65 78 65 63 3a 20 64 | 72 61 77 20 20 3b 6d 0d |.exec: d|raw ;m.|
|000030b0| 0d 0d 63 61 6c 6c 46 69 | 72 73 74 09 73 65 74 75 |..callFi|rst.setu|
|000030c0| 70 44 72 61 77 3a 0d 63 | 61 6c 6c 4c 61 73 74 09 |pDraw:.c|allLast.|
|000030d0| 77 69 6e 64 75 70 44 72 | 61 77 3a 0d 0d 3a 6d 20 |windupDr|aw:..:m |
|000030e0| 44 52 41 57 3a 09 28 64 | 72 61 77 29 3a 20 73 65 |DRAW:.(d|raw): se|
|000030f0| 6c 66 20 20 3b 6d 0d 0d | 0d 0d 3a 6d 20 49 44 4c |lf ;m..|..:m IDL|
|00003100| 45 3a 09 5c 20 43 61 6e | 20 62 65 20 75 73 65 64 |E:.\ Can| be used|
|00003110| 20 69 6e 20 63 68 69 6c | 64 20 76 69 65 77 73 20 | in chil|d views |
|00003120| 74 6f 20 63 61 6c 6c 20 | 54 45 69 64 6c 65 20 6f |to call |TEidle o|
|00003130| 72 20 77 68 61 74 65 76 | 65 72 2e 0d 09 42 45 47 |r whatev|er...BEG|
|00003140| 49 4e 20 20 65 61 63 68 | 3a 20 63 68 69 6c 64 72 |IN each|: childr|
|00003150| 65 6e 20 20 57 48 49 4c | 45 20 20 69 64 6c 65 3a |en WHIL|E idle:|
|00003160| 20 5b 5d 20 20 52 45 50 | 45 41 54 20 20 3b 6d 20 | [] REP|EAT ;m |
|00003170| 0d 0d 0d 3a 6d 20 43 4c | 49 43 4b 3a 09 5c 20 28 |...:m CL|ICK:.\ (|
|00003180| 20 2d 2d 20 62 20 29 20 | 20 20 52 65 74 75 72 6e | -- b ) | Return|
|00003190| 73 20 74 72 75 65 20 69 | 66 20 77 65 27 76 65 20 |s true i|f we've |
|000031a0| 68 61 6e 64 6c 65 64 20 | 74 68 65 20 63 6c 69 63 |handled |the clic|
|000031b0| 6b 2e 0d 0d 5c 20 46 69 | 72 73 74 20 77 65 20 67 |k...\ Fi|rst we g|
|000031c0| 65 74 20 73 74 72 61 69 | 67 68 74 20 6f 75 74 20 |et strai|ght out |
|000031d0| 69 66 20 77 65 20 64 6f | 6e 27 74 20 77 61 6e 74 |if we do|n't want|
|000031e0| 20 63 6c 69 63 6b 73 20 | 61 74 20 61 6c 6c 3a 0d | clicks |at all:.|
|000031f0| 0d 09 67 65 74 3a 20 77 | 61 6e 74 73 43 6c 69 63 |..get: w|antsClic|
|00003200| 6b 73 3f 20 20 4e 49 46 | 20 20 66 61 6c 73 65 20 |ks? NIF| false |
|00003210| 20 45 58 49 54 20 20 54 | 48 45 4e 0d 0d 5c 20 4e | EXIT T|HEN..\ N|
|00003220| 6f 77 20 77 65 20 67 65 | 74 20 6f 75 74 20 69 66 |ow we ge|t out if|
|00003230| 20 74 68 65 20 63 6c 69 | 63 6b 20 69 73 6e 27 74 | the cli|ck isn't|
|00003240| 20 69 6e 20 6f 75 72 20 | 6f 77 6e 20 61 72 65 61 | in our |own area|
|00003250| 2e 20 20 4e 6f 74 65 20 | 74 68 61 74 20 76 69 65 |. Note |that vie|
|00003260| 77 0d 5c 20 73 75 62 63 | 6c 61 73 73 65 73 20 63 |w.\ subc|lasses c|
|00003270| 61 6e 20 64 65 66 69 6e | 65 20 22 6f 77 6e 20 61 |an defin|e "own a|
|00003280| 72 65 61 22 20 68 6f 77 | 65 76 65 72 20 74 68 65 |rea" how|ever the|
|00003290| 79 20 6c 69 6b 65 2e 20 | 20 54 68 65 79 20 63 6f |y like. | They co|
|000032a0| 75 6c 64 0d 5c 20 68 61 | 76 65 20 73 65 76 65 72 |uld.\ ha|ve sever|
|000032b0| 61 6c 20 6e 6f 6e 2d 63 | 6f 6e 74 69 67 75 6f 75 |al non-c|ontiguou|
|000032c0| 73 20 72 65 63 74 73 2c | 20 72 65 67 69 6f 6e 73 |s rects,| regions|
|000032d0| 2c 20 61 6e 79 74 68 69 | 6e 67 2e 0d 5c 20 41 6c |, anythi|ng..\ Al|
|000032e0| 73 6f 20 6e 6f 74 65 20 | 74 68 61 74 20 77 65 20 |so note |that we |
|000032f0| 64 6f 20 74 68 69 73 20 | 63 68 65 63 6b 20 62 65 |do this |check be|
|00003300| 66 6f 72 65 20 77 65 20 | 63 68 65 63 6b 20 69 66 |fore we |check if|
|00003310| 20 74 68 65 20 63 6c 69 | 63 6b 20 77 61 73 20 69 | the cli|ck was i|
|00003320| 6e 20 6f 6e 65 0d 5c 20 | 6f 66 20 6f 75 72 20 63 |n one.\ |of our c|
|00003330| 68 69 6c 64 72 65 6e 2e | 20 20 54 68 69 73 20 69 |hildren.| This i|
|00003340| 73 20 73 69 67 6e 69 66 | 69 63 61 6e 74 2c 20 73 |s signif|icant, s|
|00003350| 69 6e 63 65 20 6f 75 72 | 20 63 68 69 6c 64 72 65 |ince our| childre|
|00003360| 6e 20 63 61 6e 20 67 6f | 20 6f 75 74 73 69 64 65 |n can go| outside|
|00003370| 0d 5c 20 6f 75 72 20 61 | 72 65 61 20 28 61 73 20 |.\ our a|rea (as |
|00003380| 77 69 74 68 20 73 63 72 | 6f 6c 6c 69 6e 67 20 76 |with scr|olling v|
|00003390| 69 65 77 73 29 2e 20 20 | 42 75 74 20 77 65 20 64 |iews). |But we d|
|000033a0| 6f 6e 27 74 20 77 61 6e | 74 20 74 6f 20 72 65 73 |on't wan|t to res|
|000033b0| 70 6f 6e 64 20 74 6f 0d | 5c 20 63 6c 69 63 6b 73 |pond to.|\ clicks|
|000033c0| 20 69 6e 20 74 68 65 20 | 22 6f 75 74 73 69 64 65 | in the |"outside|
|000033d0| 22 20 70 61 72 74 20 6f | 66 20 6f 6e 65 20 6f 66 |" part o|f one of|
|000033e0| 20 6f 75 72 20 63 68 69 | 6c 64 72 65 6e 2c 20 73 | our chi|ldren, s|
|000033f0| 69 6e 63 65 20 74 68 69 | 73 20 69 73 20 61 0d 5c |ince thi|s is a.\|
|00003400| 20 70 6c 61 63 65 20 69 | 6e 20 74 68 65 20 63 68 | place i|n the ch|
|00003410| 69 6c 64 20 76 69 65 77 | 20 77 68 69 63 68 20 64 |ild view| which d|
|00003420| 6f 65 73 6e 27 74 20 72 | 65 61 6c 6c 79 20 65 78 |oesn't r|eally ex|
|00003430| 69 73 74 20 66 72 6f 6d | 20 74 68 65 20 75 73 65 |ist from| the use|
|00003440| 72 27 73 20 70 6f 69 6e | 74 0d 5c 20 6f 66 20 76 |r's poin|t.\ of v|
|00003450| 69 65 77 2e 0d 0d 09 77 | 68 65 72 65 3a 20 66 45 |iew....w|here: fE|
|00003460| 76 65 6e 74 20 20 67 2d | 3e 6c 20 20 2d 3e 20 6d |vent g-|>l -> m|
|00003470| 70 6f 69 6e 74 0d 09 6d | 70 6f 69 6e 74 20 20 75 |point..m|point u|
|00003480| 6e 70 61 63 6b 20 20 61 | 64 64 72 3a 20 76 69 65 |npack a|ddr: vie|
|00003490| 77 52 65 63 74 20 20 50 | 74 49 6e 52 65 63 74 0d |wRect P|tInRect.|
|000034a0| 09 4e 49 46 20 20 66 61 | 6c 73 65 20 20 45 58 49 |.NIF fa|lse EXI|
|000034b0| 54 20 20 54 48 45 4e 09 | 09 09 09 5c 20 6e 6f 74 |T THEN.|...\ not|
|000034c0| 20 69 6e 20 6f 75 72 20 | 61 72 65 61 20 2d 20 67 | in our |area - g|
|000034d0| 65 74 20 6f 75 74 0d 0d | 5c 20 4f 4b 2c 20 69 74 |et out..|\ OK, it|
|000034e0| 27 73 20 69 6e 20 6f 75 | 72 20 61 72 65 61 2e 20 |'s in ou|r area. |
|000034f0| 20 57 65 20 6e 6f 77 20 | 6c 6f 6f 6b 20 61 74 20 | We now |look at |
|00003500| 6f 75 72 20 63 68 69 6c | 64 72 65 6e 20 66 69 72 |our chil|dren fir|
|00003510| 73 74 2c 20 73 69 6e 63 | 65 20 74 68 65 79 0d 5c |st, sinc|e they.\|
|00003520| 20 6d 75 73 74 20 67 65 | 74 20 66 69 72 73 74 20 | must ge|t first |
|00003530| 73 68 6f 74 20 61 74 20 | 74 68 65 20 63 6c 69 63 |shot at |the clic|
|00003540| 6b 3a 0d 0d 09 42 45 47 | 49 4e 09 65 61 63 68 3a |k:...BEG|IN.each:|
|00003550| 20 63 68 69 6c 64 72 65 | 6e 0d 09 57 48 49 4c 45 | childre|n..WHILE|
|00003560| 09 63 6c 69 63 6b 3a 20 | 5b 5d 20 20 49 46 20 20 |.click: |[] IF |
|00003570| 75 6e 65 61 63 68 3a 20 | 63 68 69 6c 64 72 65 6e |uneach: |children|
|00003580| 20 20 74 72 75 65 20 20 | 45 58 49 54 20 20 54 48 | true |EXIT TH|
|00003590| 45 4e 0d 09 52 45 50 45 | 41 54 0d 0d 5c 20 49 66 |EN..REPE|AT..\ If|
|000035a0| 20 77 65 20 67 6f 74 20 | 68 65 72 65 2c 20 69 74 | we got |here, it|
|000035b0| 20 77 61 73 6e 27 74 20 | 69 6e 20 74 68 65 20 63 | wasn't |in the c|
|000035c0| 68 69 6c 64 72 65 6e 2e | 20 20 53 6f 20 77 65 20 |hildren.| So we |
|000035d0| 68 61 6e 64 6c 65 20 69 | 74 20 68 65 72 65 2c 20 |handle i|t here, |
|000035e0| 61 6e 64 0d 5c 20 77 65 | 27 72 65 20 64 6f 6e 65 |and.\ we|'re done|
|000035f0| 3a 0d 0d 09 65 78 65 63 | 3a 20 63 6c 69 63 6b 48 |:...exec|: clickH|
|00003600| 6e 64 6c 72 20 20 74 72 | 75 65 20 20 3b 6d 0d 0d |ndlr tr|ue ;m..|
|00003610| 0d 3a 6d 20 4b 45 59 3a | 09 09 5c 20 28 20 63 20 |.:m KEY:|..\ ( c |
|00003620| 2d 2d 20 29 0d 09 42 45 | 47 49 4e 20 20 64 75 70 |-- )..BE|GIN dup|
|00003630| 20 20 65 61 63 68 3a 20 | 63 68 69 6c 64 72 65 6e | each: |children|
|00003640| 20 20 57 48 49 4c 45 20 | 20 6b 65 79 3a 20 5b 5d | WHILE | key: []|
|00003650| 20 20 52 45 50 45 41 54 | 20 20 64 72 6f 70 20 20 | REPEAT| drop |
|00003660| 3b 6d 0d 0d 0d 3a 6d 20 | 45 4e 41 42 4c 45 3a 0d |;m...:m |ENABLE:.|
|00003670| 09 74 72 75 65 20 70 75 | 74 3a 20 65 6e 61 62 6c |.true pu|t: enabl|
|00003680| 65 64 3f 0d 09 42 45 47 | 49 4e 20 20 65 61 63 68 |ed?..BEG|IN each|
|00003690| 3a 20 63 68 69 6c 64 72 | 65 6e 20 20 57 48 49 4c |: childr|en WHIL|
|000036a0| 45 20 20 65 6e 61 62 6c | 65 3a 20 5b 5d 20 20 52 |E enabl|e: [] R|
|000036b0| 45 50 45 41 54 20 20 3b | 6d 20 0d 0d 3a 6d 20 44 |EPEAT ;|m ..:m D|
|000036c0| 49 53 41 42 4c 45 3a 0d | 09 66 61 6c 73 65 20 70 |ISABLE:.|.false p|
|000036d0| 75 74 3a 20 65 6e 61 62 | 6c 65 64 3f 0d 09 42 45 |ut: enab|led?..BE|
|000036e0| 47 49 4e 20 20 65 61 63 | 68 3a 20 63 68 69 6c 64 |GIN eac|h: child|
|000036f0| 72 65 6e 20 20 57 48 49 | 4c 45 20 20 64 69 73 61 |ren WHI|LE disa|
|00003700| 62 6c 65 3a 20 5b 5d 20 | 20 52 45 50 45 41 54 20 |ble: [] | REPEAT |
|00003710| 20 3b 6d 0d 09 0d 0d 3a | 6d 20 4d 6f 75 73 65 48 | ;m....:|m MouseH|
|00003720| 65 72 65 3f 3a 09 5c 20 | 28 20 2d 2d 20 62 20 29 |ere?:.\ |( -- b )|
|00003730| 20 20 52 65 74 75 72 6e | 73 20 74 72 75 65 20 69 | Return|s true i|
|00003740| 66 20 74 68 65 20 6d 6f | 75 73 65 20 69 73 20 69 |f the mo|use is i|
|00003750| 6e 20 74 68 69 73 20 76 | 69 65 77 2e 0d 09 77 68 |n this v|iew...wh|
|00003760| 65 72 65 3a 20 74 68 65 | 4d 6f 75 73 65 20 20 61 |ere: the|Mouse a|
|00003770| 64 64 72 3a 20 76 69 65 | 77 52 65 63 74 20 20 50 |ddr: vie|wRect P|
|00003780| 74 49 6e 52 65 63 74 20 | 20 3b 6d 0d 0d 3a 6d 20 |tInRect | ;m..:m |
|00003790| 43 4c 41 53 53 49 4e 49 | 54 3a 09 0d 09 74 72 75 |CLASSINI|T:...tru|
|000037a0| 65 20 70 75 74 3a 20 77 | 61 6e 74 73 43 6c 69 63 |e put: w|antsClic|
|000037b0| 6b 73 3f 20 20 74 72 75 | 65 20 70 75 74 3a 20 73 |ks? tru|e put: s|
|000037c0| 65 74 43 6c 69 70 3f 20 | 20 3b 6d 0d 0d 0d 3a 6d |etClip? | ;m...:m|
|000037d0| 20 44 55 4d 50 3a 20 20 | 7b 20 5c 20 6c 20 74 20 | DUMP: |{ \ l t |
|000037e0| 72 20 62 20 2d 2d 20 7d | 0d 09 2e 22 20 76 69 65 |r b -- }|..." vie|
|000037f0| 77 20 22 20 2e 69 64 3a | 20 73 65 6c 66 20 20 34 |w " .id:| self 4|
|00003800| 20 73 70 61 63 65 73 0d | 09 2e 22 20 76 69 65 77 | spaces.|.." view|
|00003810| 52 65 63 74 3a 20 22 20 | 20 67 65 74 56 69 65 77 |Rect: " | getView|
|00003820| 52 65 63 74 3a 20 73 65 | 6c 66 20 20 2d 3e 20 62 |Rect: se|lf -> b|
|00003830| 20 2d 3e 20 72 20 2d 3e | 20 74 20 2d 3e 20 6c 0d | -> r ->| t -> l.|
|00003840| 09 2e 22 20 6c 65 66 74 | 3a 20 22 20 6c 20 2e 20 |.." left|: " l . |
|00003850| 2e 22 20 20 74 6f 70 3a | 20 22 20 74 20 2e 20 2e |." top:| " t . .|
|00003860| 22 20 20 20 72 69 67 68 | 74 3a 20 22 20 72 20 2e |" righ|t: " r .|
|00003870| 20 2e 22 20 20 62 6f 74 | 74 6f 6d 3a 20 22 20 62 | ." bot|tom: " b|
|00003880| 20 2e 20 20 63 72 0d 09 | 66 69 72 73 74 3f 3a 20 | . cr..|first?: |
|00003890| 63 68 69 6c 64 72 65 6e | 20 20 49 46 20 20 2e 22 |children| IF ."|
|000038a0| 20 63 68 69 6c 64 72 65 | 6e 3a 22 20 20 63 72 20 | childre|n:" cr |
|000038b0| 20 64 72 6f 70 20 20 54 | 48 45 4e 0d 09 42 45 47 | drop T|HEN..BEG|
|000038c0| 49 4e 20 20 65 61 63 68 | 3a 20 63 68 69 6c 64 72 |IN each|: childr|
|000038d0| 65 6e 20 20 57 48 49 4c | 45 20 20 34 20 73 70 61 |en WHIL|E 4 spa|
|000038e0| 63 65 73 20 20 64 75 6d | 70 3a 20 5b 5d 20 20 52 |ces dum|p: [] R|
|000038f0| 45 50 45 41 54 20 20 3b | 6d 0d 0d 0d 5c 20 44 52 |EPEAT ;|m...\ DR|
|00003900| 41 57 58 3a 20 63 61 6e | 20 62 65 20 75 73 65 66 |AWX: can| be usef|
|00003910| 75 6c 20 69 6e 20 64 65 | 62 75 67 67 69 6e 67 2c |ul in de|bugging,|
|00003920| 20 77 68 65 6e 20 79 6f | 75 20 77 61 6e 74 20 74 | when yo|u want t|
|00003930| 6f 20 73 65 65 20 74 68 | 65 20 76 69 65 77 20 62 |o see th|e view b|
|00003940| 75 74 0d 5c 20 64 6f 6e | 27 74 20 68 61 76 65 20 |ut.\ don|'t have |
|00003950| 22 72 65 61 6c 22 20 64 | 72 61 77 69 6e 67 20 63 |"real" d|rawing c|
|00003960| 6f 64 65 20 79 65 74 2e | 20 20 49 74 20 6a 75 73 |ode yet.| It jus|
|00003970| 74 20 64 72 61 77 73 20 | 61 20 62 69 67 20 58 20 |t draws |a big X |
|00003980| 61 63 72 6f 73 73 0d 5c | 20 74 68 65 20 76 69 65 |across.\| the vie|
|00003990| 77 20 61 72 65 61 2c 20 | 6a 6f 69 6e 69 6e 67 20 |w area, |joining |
|000039a0| 74 68 65 20 64 69 61 67 | 6f 6e 61 6c 6c 79 20 6f |the diag|onally o|
|000039b0| 70 70 6f 73 69 74 65 20 | 63 6f 72 6e 65 72 73 2e |pposite |corners.|
|000039c0| 0d 0d 3a 6d 20 44 52 41 | 57 58 3a 20 20 7b 20 5c |..:m DRA|WX: { \|
|000039d0| 20 6c 20 74 20 72 20 62 | 20 2d 2d 20 7d 0d 09 67 | l t r b| -- }..g|
|000039e0| 65 74 3a 20 74 65 6d 70 | 52 65 63 74 20 20 2d 3e |et: temp|Rect ->|
|000039f0| 20 62 20 20 2d 3e 20 72 | 20 20 2d 3e 20 74 20 20 | b -> r| -> t |
|00003a00| 2d 3e 20 6c 0d 09 30 20 | 30 20 67 6f 74 6f 78 79 |-> l..0 |0 gotoxy|
|00003a10| 20 20 72 20 62 20 70 61 | 63 6b 20 63 61 6c 6c 20 | r b pa|ck call |
|00003a20| 4c 69 6e 65 54 6f 0d 09 | 6c 20 62 20 67 6f 74 6f |LineTo..|l b goto|
|00003a30| 78 79 20 20 72 20 30 20 | 70 61 63 6b 20 63 61 6c |xy r 0 |pack cal|
|00003a40| 6c 20 4c 69 6e 65 54 6f | 20 20 3b 6d 0d 0d 3b 63 |l LineTo| ;m..;c|
|00003a50| 6c 61 73 73 0d 0d 0d 65 | 6e 64 6c 6f 61 64 0d 0d |lass...e|ndload..|
|00003a60| 5c 20 54 65 73 74 69 6e | 67 3a 0d 0d 76 69 65 77 |\ Testin|g:..view|
|00003a70| 20 56 56 09 09 5c 20 4d | 61 69 6e 20 76 69 65 77 | VV..\ M|ain view|
|00003a80| 0d 76 69 65 77 20 43 31 | 09 09 5c 20 35 20 63 68 |.view C1|..\ 5 ch|
|00003a90| 69 6c 64 20 76 69 65 77 | 73 0d 76 69 65 77 20 43 |ild view|s.view C|
|00003aa0| 32 0d 76 69 65 77 20 43 | 33 0d 76 69 65 77 20 43 |2.view C|3.view C|
|00003ab0| 34 0d 76 69 65 77 20 43 | 35 0d 0d 34 30 20 34 30 |4.view C|5..40 40|
|00003ac0| 20 33 30 30 20 32 30 30 | 09 73 65 74 42 6f 75 6e | 300 200|.setBoun|
|00003ad0| 64 73 3a 20 76 76 0d 0d | 31 30 20 31 30 20 32 30 |ds: vv..|10 10 20|
|00003ae0| 20 32 30 09 09 73 65 74 | 42 6f 75 6e 64 73 3a 20 | 20..set|Bounds: |
|00003af0| 63 31 0d 09 09 09 09 74 | 72 75 65 20 20 6d 65 61 |c1.....t|rue mea|
|00003b00| 73 75 72 65 46 72 6f 6d | 3a 20 63 31 0d 0d 32 20 |sureFrom|: c1..2 |
|00003b10| 30 20 33 30 20 36 30 09 | 09 73 65 74 42 6f 75 6e |0 30 60.|.setBoun|
|00003b20| 64 73 3a 20 63 32 0d 09 | 09 09 09 73 69 62 52 69 |ds: c2..|...sibRi|
|00003b30| 67 68 74 20 73 69 62 42 | 6f 74 74 6f 6d 20 32 64 |ght sibB|ottom 2d|
|00003b40| 75 70 20 20 73 65 74 4a | 75 73 74 3a 20 63 32 0d |up setJ|ust: c2.|
|00003b50| 09 09 09 09 74 72 75 65 | 20 20 6d 65 61 73 75 72 |....true| measur|
|00003b60| 65 46 72 6f 6d 3a 20 63 | 32 0d 0d 32 20 30 20 32 |eFrom: c|2..2 0 2|
|00003b70| 30 20 36 30 09 09 73 65 | 74 42 6f 75 6e 64 73 3a |0 60..se|tBounds:|
|00003b80| 20 63 33 0d 09 09 09 09 | 73 69 62 52 69 67 68 74 | c3.....|sibRight|
|00003b90| 20 73 69 62 42 6f 74 74 | 6f 6d 20 32 64 75 70 20 | sibBott|om 2dup |
|00003ba0| 20 73 65 74 4a 75 73 74 | 3a 20 63 33 0d 09 09 09 | setJust|: c3....|
|00003bb0| 09 74 72 75 65 20 20 6d | 65 61 73 75 72 65 46 72 |.true m|easureFr|
|00003bc0| 6f 6d 3a 20 63 33 0d 09 | 09 09 09 09 09 09 0d 30 |om: c3..|.......0|
|00003bd0| 20 32 20 34 30 20 36 30 | 09 09 73 65 74 42 6f 75 | 2 40 60|..setBou|
|00003be0| 6e 64 73 3a 20 63 34 0d | 09 09 09 09 73 69 62 52 |nds: c4.|....sibR|
|00003bf0| 69 67 68 74 20 73 69 62 | 42 6f 74 74 6f 6d 20 32 |ight sib|Bottom 2|
|00003c00| 64 75 70 20 20 73 65 74 | 4a 75 73 74 3a 20 63 34 |dup set|Just: c4|
|00003c10| 0d 09 09 09 09 74 72 75 | 65 20 20 6d 65 61 73 75 |.....tru|e measu|
|00003c20| 72 65 46 72 6f 6d 3a 20 | 63 34 0d 09 09 09 09 09 |reFrom: |c4......|
|00003c30| 0d 0d 0d 3a 20 44 72 61 | 77 69 74 09 64 72 61 77 |...: Dra|wit.draw|
|00003c40| 3a 20 74 65 6d 70 52 65 | 63 74 20 20 3b 09 09 5c |: tempRe|ct ;..\|
|00003c50| 20 44 72 61 77 20 68 61 | 6e 64 6c 65 72 20 66 6f | Draw ha|ndler fo|
|00003c60| 72 20 6f 75 72 20 76 69 | 65 77 73 0d 0d 3a 20 44 |r our vi|ews..: D|
|00003c70| 72 61 77 56 56 09 64 72 | 61 77 3a 20 76 76 20 20 |rawVV.dr|aw: vv |
|00003c80| 3b 09 09 09 09 5c 20 44 | 72 61 77 20 68 61 6e 64 |;....\ D|raw hand|
|00003c90| 6c 65 72 20 66 6f 72 20 | 66 57 69 6e 64 20 66 6f |ler for |fWind fo|
|00003ca0| 72 20 74 65 73 74 0d 0d | 3a 20 43 6c 69 63 6b 65 |r test..|: Clicke|
|00003cb0| 64 09 6e 6f 63 6c 69 70 | 20 20 2e 22 20 63 6c 69 |d.noclip| ." cli|
|00003cc0| 63 6b 65 64 20 22 20 2e | 69 64 3a 20 5b 73 65 6c |cked " .|id: [sel|
|00003cd0| 66 5d 20 63 72 20 20 3b | 0d 0d 3a 20 63 6f 6e 74 |f] cr ;|..: cont|
|00003ce0| 65 6e 74 43 6c 69 63 6b | 09 09 09 5c 20 4e 65 77 |entClick|...\ New|
|00003cf0| 20 63 6f 6e 74 65 6e 74 | 20 63 6c 69 63 6b 20 68 | content| click h|
|00003d00| 61 6e 64 6c 65 72 20 66 | 6f 72 20 66 57 69 6e 64 |andler f|or fWind|
|00003d10| 0d 09 09 09 63 6c 69 63 | 6b 3a 20 76 76 20 20 64 |....clic|k: vv d|
|00003d20| 72 6f 70 20 20 3b 0d 09 | 09 09 0d 27 20 64 72 61 |rop ;..|...' dra|
|00003d30| 77 69 74 09 64 75 70 20 | 73 65 74 44 72 61 77 3a |wit.dup |setDraw:|
|00003d40| 20 76 76 20 20 64 75 70 | 20 73 65 74 44 72 61 77 | vv dup| setDraw|
|00003d50| 3a 20 63 31 20 20 64 75 | 70 20 73 65 74 44 72 61 |: c1 du|p setDra|
|00003d60| 77 3a 20 63 32 0d 09 09 | 09 64 75 70 20 73 65 74 |w: c2...|.dup set|
|00003d70| 44 72 61 77 3a 20 63 33 | 20 20 64 75 70 20 73 65 |Draw: c3| dup se|
|00003d80| 74 44 72 61 77 3a 20 63 | 34 20 20 73 65 74 44 72 |tDraw: c|4 setDr|
|00003d90| 61 77 3a 20 63 35 0d 0d | 27 20 63 6c 69 63 6b 65 |aw: c5..|' clicke|
|00003da0| 64 09 64 75 70 20 73 65 | 74 63 6c 69 63 6b 3a 20 |d.dup se|tclick: |
|00003db0| 76 76 20 64 75 70 20 73 | 65 74 63 6c 69 63 6b 3a |vv dup s|etclick:|
|00003dc0| 20 63 31 20 64 75 70 20 | 73 65 74 63 6c 69 63 6b | c1 dup |setclick|
|00003dd0| 3a 20 63 32 0d 09 09 09 | 64 75 70 20 73 65 74 63 |: c2....|dup setc|
|00003de0| 6c 69 63 6b 3a 20 63 33 | 20 64 75 70 20 73 65 74 |lick: c3| dup set|
|00003df0| 63 6c 69 63 6b 3a 20 63 | 34 20 73 65 74 63 6c 69 |click: c|4 setcli|
|00003e00| 63 6b 3a 20 63 35 0d 0d | 3a 20 47 4f 0d 09 63 6c |ck: c5..|: GO..cl|
|00003e10| 73 0d 09 78 74 73 7b 20 | 6e 75 6c 6c 20 6e 75 6c |s..xts{ |null nul|
|00003e20| 6c 20 64 72 61 77 56 56 | 20 63 6f 6e 74 65 6e 74 |l drawVV| content|
|00003e30| 43 6c 69 63 6b 20 7d 20 | 20 61 63 74 69 6f 6e 73 |Click } | actions|
|00003e40| 3a 20 66 57 69 6e 64 0d | 09 63 31 20 61 64 64 76 |: fWind.|.c1 addv|
|00003e50| 69 65 77 3a 20 76 76 20 | 20 63 32 20 61 64 64 76 |iew: vv | c2 addv|
|00003e60| 69 65 77 3a 20 76 76 0d | 09 63 33 20 61 64 64 76 |iew: vv.|.c3 addv|
|00003e70| 69 65 77 3a 20 76 76 20 | 20 63 34 20 61 64 64 76 |iew: vv | c4 addv|
|00003e80| 69 65 77 3a 20 76 76 20 | 20 63 35 20 61 64 64 76 |iew: vv | c5 addv|
|00003e90| 69 65 77 3a 20 76 76 0d | 09 66 57 69 6e 64 20 20 |iew: vv.|.fWind |
|00003ea0| 73 65 74 57 69 6e 64 6f | 77 3a 20 76 76 09 5c 20 |setWindo|w: vv.\ |
|00003eb0| 4e 6f 72 6d 61 6c 6c 79 | 20 64 6f 6e 65 20 61 75 |Normally| done au|
|00003ec0| 74 6f 6d 61 74 69 63 61 | 6c 6c 79 20 66 72 6f 6d |tomatica|lly from|
|00003ed0| 20 4e 45 57 3a 20 69 6e | 20 57 69 6e 64 6f 77 2b | NEW: in| Window+|
|00003ee0| 0d 09 6e 65 77 3a 20 76 | 76 09 09 09 09 09 5c 20 |..new: v|v.....\ |
|00003ef0| 44 69 74 74 6f 0d 09 64 | 72 61 77 3a 20 76 76 20 |Ditto..d|raw: vv |
|00003f00| 20 3b 0d 00 00 00 00 00 | 00 00 00 00 00 00 00 00 | ;......|........|
|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 00 00 00 |........|........|
|00003f40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003f50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003f80| 00 00 01 00 00 00 01 3c | 00 00 00 3c 00 00 00 3b |.......<|...<...;|
|00003f90| 70 65 61 74 20 20 3b 6d | 0d 0d 3a 6d 20 43 4c 41 |peat ;m|..:m CLA|
|00003fa0| 53 53 49 4e 49 54 3a 09 | 0d 09 74 72 75 65 20 70 |SSINIT:.|..true p|
|00003fb0| 04 56 69 65 77 81 02 00 | 00 00 50 61 72 74 53 49 |.View...|..PartSI|
|00003fc0| 54 78 00 00 00 00 00 00 | 00 00 00 01 83 ee 00 00 |Tx......|........|
|00003fd0| 00 00 50 61 72 74 53 49 | 54 78 00 00 00 00 00 00 |..PartSI|Tx......|
|00003fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ff0| 00 00 ab 06 23 66 00 00 | 00 00 00 00 01 77 20 3b |....#f..|.....w ;|
|00004000| 6d 0d 0d 3b 63 6c 61 73 | 73 0d 0d 65 6e 64 6c 6f |m..;clas|s..endlo|
|00004010| 61 64 0d f0 a6 07 59 71 | a4 4c 70 45 00 00 00 00 |ad....Yq|.LpE....|
|00004020| 00 00 10 f3 00 00 00 d2 | 00 00 00 02 65 2d 6d 61 |........|....e-ma|
|00004030| 69 6c 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |il......|........|
|00004040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 31 00 0d |........|.....1..|
|00004050| 01 b1 02 41 01 00 00 50 | 00 00 01 40 80 00 ff ff |...A...P|...@....|
|00004060| ff f7 a7 1e c3 ab a3 fa | a3 ea 00 00 00 00 00 00 |........|........|
|00004070| 00 18 00 00 00 f3 00 00 | 00 02 4d 61 69 6c 00 00 |........|..Mail..|
|00004080| 00 00 00 38 00 00 00 00 | 00 00 17 15 00 00 00 00 |...8....|........|
|00004090| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000040a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 08 74 |........|.......t|
|000040b0| 00 00 08 74 00 00 00 00 | 00 00 00 00 00 00 01 00 |...t....|........|
|000040c0| 00 00 01 3c 00 00 00 3c | 00 00 00 3b 00 31 2c d0 |...<...<|...;.1,.|
|000040d0| 08 74 00 00 00 1c 00 32 | 00 00 4d 49 46 4f 00 00 |.t.....2|..MIFO..|
|000040e0| 00 0a 00 80 00 00 00 00 | 00 00 00 31 32 d4 08 4d |........|...12..M|
|000040f0| 69 73 63 49 6e 66 6f 00 | 00 00 00 00 00 00 00 00 |iscInfo.|........|
+--------+-------------------------+-------------------------+--------+--------+