home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1990-05-23 | 10.8 KB | [TEXT/KAHL] |
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: window.c.bin
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| AMOS Picture Packer (image/amosPicturePacker)
| ext
| Supported |
1%
| dexvert
| Debian floppy split (archive/debianFloppySplit)
| ext
| Unsupported |
1%
| dexvert
| Sound Images sound sample (audio/soundImagesSoundSample)
| ext
| Unsupported |
1%
| dexvert
| DESI-III drawing (image/desiIIIDrawing)
| ext
| Unsupported |
1%
| dexvert
| MS-DOS PMODE extender executable (executable/msdosPMODEExtenderExecutable)
| ext
| Unsupported |
1%
| dexvert
| Alien Trilogytextures (other/alienTrilogyTextures)
| ext
| Unsupported |
1%
| dexvert
| APT cache data (other/aptCacheData)
| ext
| Unsupported |
1%
| dexvert
| CorelTRACE configuration (other/corelTRACEConfiguration)
| ext
| Unsupported |
1%
| dexvert
| Dreamcast Disc (other/dreamcastDisc)
| ext
| Unsupported |
1%
| dexvert
| EST flat binary (other/estFlatBinary)
| ext
| Unsupported |
1%
| dexvert
| Finale Enigma Binary Format (other/finaleEnigmaBinaryFormat)
| ext
| Unsupported |
1%
| dexvert
| Sega Genesis/Megadrive/32x ROM (other/genesisROM)
| ext
| Unsupported |
1%
| dexvert
| Myth: The Fallen Lords game archive (other/mythTheFallenLordsGameArchive)
| ext
| Unsupported |
1%
| dexvert
| Sound Images Sound Driver (other/soundImagesSoundDriver)
| ext
| Unsupported |
1%
| dexvert
| Symantec/Norton Config (other/symantecNortonConfig)
| ext
| Unsupported |
1%
| dexvert
| Vectrex ROM (other/vectrexROM)
| ext
| Unsupported |
1%
| dexvert
| BIS raP encoded format (other/bisraPEncoded)
| ext
| Unsupported |
1%
| dexvert
| Pascal Script binary (other/pascalScriptBinary)
| ext
| Unsupported |
1%
| dexvert
| 7th Level game data archive (other/seventhLevelGameDataArchive)
| ext
| Unsupported |
1%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Binary Text (image/binaryText)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary, Thu Jan 26 12:28:45 1989, modified Fri Jan 26 14:45:08 1990, creator Think C, type ASCII, 10831 bytes "window.c"
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 1
| default (weak)
| |
100%
| lsar
| MacBinary
| default
| |
100%
| gt2
| MAC Bilddatei
| default (weak)
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [KAHL] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 08 77 69 6e 64 6f 77 | 2e 63 00 00 00 00 00 00 |..window|.c......|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 00 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 2a 4f 00 | 00 00 00 a0 05 05 cd a1 |.....*O.|........|
|00000060| e6 59 44 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.YD.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000080| 20 2f 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a | /******|********|
|00000090| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000d0| 2a 2a 0d 20 2a 09 77 69 | 6e 64 6f 77 2e 63 0d 20 |**. *.wi|ndow.c. |
|000000e0| 2a 0d 20 2a 09 57 69 6e | 64 6f 77 20 4d 61 6e 61 |*. *.Win|dow Mana|
|000000f0| 67 65 6d 65 6e 74 20 50 | 61 63 6b 61 67 65 0d 20 |gement P|ackage. |
|00000100| 2a 0d 20 2a 09 57 72 69 | 74 74 65 6e 20 62 79 20 |*. *.Wri|tten by |
|00000110| 50 61 63 6f 20 58 61 6e | 64 65 72 20 4e 61 74 68 |Paco Xan|der Nath|
|00000120| 61 6e 0d 20 2a 09 a9 31 | 39 39 30 2c 20 4d 6f 74 |an. *..1|990, Mot|
|00000130| 6f 72 6f 6c 61 20 49 6e | 63 2e 20 20 50 75 62 6c |orola In|c. Publ|
|00000140| 69 63 20 64 6f 6d 61 69 | 6e 20 73 6f 75 72 63 65 |ic domai|n source|
|00000150| 20 63 6f 64 65 2e 0d 20 | 2a 2a 2a 2a 2a 2a 2a 2a | code.. |********|
|00000160| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000170| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000180| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000190| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000001a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2f 0d 0d 23 69 6e 63 6c |********|/..#incl|
|000001b0| 75 64 65 20 22 61 70 70 | 6c 69 63 2e 68 22 0d 23 |ude "app|lic.h".#|
|000001c0| 69 6e 63 6c 75 64 65 20 | 22 77 69 6e 64 6f 77 2e |include |"window.|
|000001d0| 68 22 0d 23 69 6e 63 6c | 75 64 65 20 22 64 69 61 |h".#incl|ude "dia|
|000001e0| 6c 6f 67 2e 68 22 0d 23 | 69 6e 63 6c 75 64 65 20 |log.h".#|include |
|000001f0| 22 63 6f 6e 74 65 78 74 | 2e 68 22 0d 23 69 6e 63 |"context|.h".#inc|
|00000200| 6c 75 64 65 20 22 64 6f | 63 75 6d 65 6e 74 2e 68 |lude "do|cument.h|
|00000210| 22 0d 23 69 6e 63 6c 75 | 64 65 20 22 65 72 72 6f |".#inclu|de "erro|
|00000220| 72 2e 68 22 0d 23 69 6e | 63 6c 75 64 65 20 22 74 |r.h".#in|clude "t|
|00000230| 65 78 74 2e 68 22 0d 23 | 69 6e 63 6c 75 64 65 20 |ext.h".#|include |
|00000240| 22 6c 69 73 74 2e 68 22 | 0d 0d 23 69 6e 63 6c 75 |"list.h"|..#inclu|
|00000250| 64 65 20 22 74 65 73 74 | 2e 68 22 0d 0d 0d 23 64 |de "test|.h"...#d|
|00000260| 65 66 69 6e 65 20 4d 41 | 58 50 54 52 53 09 35 30 |efine MA|XPTRS.50|
|00000270| 0d 0d 0d 74 79 70 65 64 | 65 66 20 73 74 72 75 63 |...typed|ef struc|
|00000280| 74 20 20 7b 0d 09 73 68 | 6f 72 74 20 63 6f 75 6e |t {..sh|ort coun|
|00000290| 74 3b 0d 09 57 69 6e 64 | 6f 77 50 74 72 20 77 69 |t;..Wind|owPtr wi|
|000002a0| 6e 64 5b 4d 41 58 50 54 | 52 53 5d 3b 0d 7d 20 57 |nd[MAXPT|RS];.} W|
|000002b0| 69 6e 64 50 74 72 4c 69 | 73 74 3b 0d 0d 0d 2f 2a |indPtrLi|st;.../*|
|000002c0| 20 4c 6f 63 61 6c 20 44 | 61 74 61 20 53 74 72 75 | Local D|ata Stru|
|000002d0| 63 74 75 72 65 73 0d 20 | 2a 2f 0d 73 74 61 74 69 |ctures. |*/.stati|
|000002e0| 63 20 57 69 6e 64 50 74 | 72 4c 69 73 74 0d 09 77 |c WindPt|rList..w|
|000002f0| 69 6e 64 4c 69 73 74 3b | 0d 0d 0d 2f 2a 20 45 78 |indList;|.../* Ex|
|00000300| 74 65 72 6e 61 6c 20 44 | 61 74 61 20 53 74 72 75 |ternal D|ata Stru|
|00000310| 63 74 75 72 65 73 0d 20 | 2a 2f 0d 57 69 6e 64 6f |ctures. |*/.Windo|
|00000320| 77 50 74 72 0d 09 77 50 | 74 72 54 65 78 74 20 3d |wPtr..wP|trText =|
|00000330| 20 4e 55 4c 4c 2c 20 0d | 09 77 50 74 72 54 65 73 | NULL, .|.wPtrTes|
|00000340| 74 20 3d 20 4e 55 4c 4c | 2c 0d 09 77 50 74 72 47 |t = NULL|,..wPtrG|
|00000350| 6e 6f 73 20 3d 20 4e 55 | 4c 4c 3b 0d 0d 52 65 63 |nos = NU|LL;..Rec|
|00000360| 74 20 0d 09 64 72 61 67 | 41 72 65 61 2c 0d 09 67 |t ..drag|Area,..g|
|00000370| 72 6f 77 41 72 65 61 3b | 0d 09 0d 42 6f 6f 6c 65 |rowArea;|...Boole|
|00000380| 61 6e 0d 09 77 69 6e 64 | 54 72 69 70 20 3d 20 46 |an..wind|Trip = F|
|00000390| 41 4c 53 45 3b 0d 0d 0d | 2f 2a 20 4c 6f 63 61 6c |ALSE;...|/* Local|
|000003a0| 20 46 75 6e 63 74 69 6f | 6e 20 50 72 6f 74 6f 74 | Functio|n Protot|
|000003b0| 79 70 65 73 0d 20 2a 2f | 0d 23 69 66 64 65 66 20 |ypes. */|.#ifdef |
|000003c0| 50 52 4f 54 4f 54 59 50 | 45 53 0d 76 6f 69 64 20 |PROTOTYP|ES.void |
|000003d0| 57 69 6e 64 49 6e 76 61 | 6c 47 72 6f 77 20 28 57 |WindInva|lGrow (W|
|000003e0| 69 6e 64 6f 77 50 74 72 | 20 74 68 65 57 69 6e 64 |indowPtr| theWind|
|000003f0| 6f 77 29 3b 0d 23 65 6e | 64 69 66 0d 0d 0d 2f 2a |ow);.#en|dif.../*|
|00000400| 20 49 6e 76 61 6c 69 64 | 61 74 65 20 74 68 65 20 | Invalid|ate the |
|00000410| 67 72 6f 77 20 62 6f 78 | 20 61 6e 64 20 73 63 72 |grow box| and scr|
|00000420| 6f 6c 6c 20 62 61 72 20 | 72 65 63 74 61 6e 67 6c |oll bar |rectangl|
|00000430| 65 73 20 66 6f 72 20 74 | 68 65 20 67 69 76 65 6e |es for t|he given|
|00000440| 20 77 69 6e 64 6f 77 0d | 20 2a 2f 0d 73 74 61 74 | window.| */.stat|
|00000450| 69 63 20 76 6f 69 64 0d | 57 69 6e 64 49 6e 76 61 |ic void.|WindInva|
|00000460| 6c 47 72 6f 77 20 28 74 | 68 65 57 69 6e 64 6f 77 |lGrow (t|heWindow|
|00000470| 29 0d 09 72 65 67 69 73 | 74 65 72 20 57 69 6e 64 |)..regis|ter Wind|
|00000480| 6f 77 50 74 72 20 74 68 | 65 57 69 6e 64 6f 77 3b |owPtr th|eWindow;|
|00000490| 0d 7b 0d 09 52 65 63 74 | 20 69 6e 76 61 6c 3b 0d |.{..Rect| inval;.|
|000004a0| 09 0d 09 2f 2a 20 49 6e | 76 61 6c 69 64 61 74 65 |.../* In|validate|
|000004b0| 20 74 68 65 20 76 65 72 | 74 69 63 6c 65 20 73 63 | the ver|ticle sc|
|000004c0| 72 6f 6c 6c 0d 09 20 2a | 2f 0d 09 69 6e 76 61 6c |roll.. *|/..inval|
|000004d0| 20 3d 20 74 68 65 57 69 | 6e 64 6f 77 2d 3e 70 6f | = theWi|ndow->po|
|000004e0| 72 74 52 65 63 74 3b 0d | 09 69 6e 76 61 6c 2e 6c |rtRect;.|.inval.l|
|000004f0| 65 66 74 20 3d 20 69 6e | 76 61 6c 2e 72 69 67 68 |eft = in|val.righ|
|00000500| 74 20 2d 20 31 36 3b 0d | 09 49 6e 76 61 6c 52 65 |t - 16;.|.InvalRe|
|00000510| 63 74 28 26 69 6e 76 61 | 6c 29 3b 0d 0d 09 2f 2a |ct(&inva|l);.../*|
|00000520| 20 49 6e 76 61 6c 69 64 | 61 74 65 20 74 68 65 20 | Invalid|ate the |
|00000530| 68 6f 72 69 7a 6f 6e 74 | 61 6c 20 73 63 72 6f 6c |horizont|al scrol|
|00000540| 6c 0d 09 20 2a 2f 0d 09 | 69 6e 76 61 6c 20 3d 20 |l.. */..|inval = |
|00000550| 74 68 65 57 69 6e 64 6f | 77 2d 3e 70 6f 72 74 52 |theWindo|w->portR|
|00000560| 65 63 74 3b 0d 09 69 6e | 76 61 6c 2e 74 6f 70 20 |ect;..in|val.top |
|00000570| 3d 20 69 6e 76 61 6c 2e | 62 6f 74 74 6f 6d 20 2d |= inval.|bottom -|
|00000580| 20 31 36 3b 0d 09 49 6e | 76 61 6c 52 65 63 74 28 | 16;..In|valRect(|
|00000590| 26 69 6e 76 61 6c 29 3b | 0d 7d 0d 0d 0d 2f 2a 20 |&inval);|.}.../* |
|000005a0| 43 68 65 63 6b 20 69 66 | 20 74 68 65 20 66 72 6f |Check if| the fro|
|000005b0| 6e 74 20 77 69 6e 64 6f | 77 20 69 73 20 61 20 6d |nt windo|w is a m|
|000005c0| 6f 64 65 6c 65 73 73 20 | 64 69 61 6c 6f 67 20 74 |odeless |dialog t|
|000005d0| 68 61 74 20 62 65 6c 6f | 6e 67 73 20 74 6f 20 6f |hat belo|ngs to o|
|000005e0| 75 72 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 0d 20 |ur appli|cation. |
|000005f0| 2a 2f 0d 42 6f 6f 6c 65 | 61 6e 0d 57 69 6e 64 49 |*/.Boole|an.WindI|
|00000600| 73 44 6c 6f 67 20 28 74 | 68 65 57 69 6e 64 6f 77 |sDlog (t|heWindow|
|00000610| 29 0d 09 72 65 67 69 73 | 74 65 72 20 57 69 6e 64 |)..regis|ter Wind|
|00000620| 6f 77 50 74 72 20 74 68 | 65 57 69 6e 64 6f 77 3b |owPtr th|eWindow;|
|00000630| 0d 7b 0d 09 72 65 67 69 | 73 74 65 72 20 49 6e 66 |.{..regi|ster Inf|
|00000640| 6f 50 74 72 20 69 6e 66 | 6f 50 74 72 20 3d 20 28 |oPtr inf|oPtr = (|
|00000650| 49 6e 66 6f 50 74 72 29 | 20 47 65 74 57 52 65 66 |InfoPtr)| GetWRef|
|00000660| 43 6f 6e 28 74 68 65 57 | 69 6e 64 6f 77 29 3b 0d |Con(theW|indow);.|
|00000670| 0d 09 72 65 74 75 72 6e | 20 28 74 68 65 57 69 6e |..return| (theWin|
|00000680| 64 6f 77 20 21 3d 20 4e | 55 4c 4c 29 20 26 26 20 |dow != N|ULL) && |
|00000690| 28 28 28 57 69 6e 64 6f | 77 50 65 65 6b 29 20 74 |(((Windo|wPeek) t|
|000006a0| 68 65 57 69 6e 64 6f 77 | 29 2d 3e 77 69 6e 64 6f |heWindow|)->windo|
|000006b0| 77 4b 69 6e 64 20 3e 3d | 20 30 29 20 26 26 20 28 |wKind >=| 0) && (|
|000006c0| 69 6e 66 6f 50 74 72 2d | 3e 6b 69 6e 64 20 3d 3d |infoPtr-|>kind ==|
|000006d0| 20 77 6b 44 6c 6f 67 29 | 3b 0d 7d 0d 0d 0d 2f 2a | wkDlog)|;.}.../*|
|000006e0| 20 43 68 65 63 6b 20 69 | 66 20 74 68 65 20 66 72 | Check i|f the fr|
|000006f0| 6f 6e 74 20 77 69 6e 64 | 6f 77 20 62 65 6c 6f 6e |ont wind|ow belon|
|00000700| 67 73 20 74 6f 20 6f 75 | 72 20 61 70 70 6c 69 63 |gs to ou|r applic|
|00000710| 61 74 69 6f 6e 0d 20 2a | 2f 0d 42 6f 6f 6c 65 61 |ation. *|/.Boolea|
|00000720| 6e 0d 57 69 6e 64 49 73 | 41 70 70 20 28 74 68 65 |n.WindIs|App (the|
|00000730| 57 69 6e 64 6f 77 29 0d | 09 72 65 67 69 73 74 65 |Window).|.registe|
|00000740| 72 20 57 69 6e 64 6f 77 | 50 74 72 20 74 68 65 57 |r Window|Ptr theW|
|00000750| 69 6e 64 6f 77 3b 0d 7b | 0d 09 72 65 74 75 72 6e |indow;.{|..return|
|00000760| 20 28 74 68 65 57 69 6e | 64 6f 77 20 21 3d 20 4e | (theWin|dow != N|
|00000770| 55 4c 4c 29 20 26 26 20 | 28 28 28 57 69 6e 64 6f |ULL) && |(((Windo|
|00000780| 77 50 65 65 6b 29 20 74 | 68 65 57 69 6e 64 6f 77 |wPeek) t|heWindow|
|00000790| 29 2d 3e 77 69 6e 64 6f | 77 4b 69 6e 64 20 3e 3d |)->windo|wKind >=|
|000007a0| 20 30 29 3b 0d 7d 0d 0d | 0d 2f 2a 20 43 68 65 63 | 0);.}..|./* Chec|
|000007b0| 6b 20 69 66 20 74 68 65 | 20 66 72 6f 6e 74 20 77 |k if the| front w|
|000007c0| 69 6e 64 6f 77 20 62 65 | 6c 6f 6e 67 73 20 74 6f |indow be|longs to|
|000007d0| 20 61 20 44 41 0d 20 2a | 2f 0d 42 6f 6f 6c 65 61 | a DA. *|/.Boolea|
|000007e0| 6e 0d 57 69 6e 64 49 73 | 44 41 20 28 74 68 65 57 |n.WindIs|DA (theW|
|000007f0| 69 6e 64 6f 77 29 0d 09 | 72 65 67 69 73 74 65 72 |indow)..|register|
|00000800| 20 57 69 6e 64 6f 77 50 | 74 72 20 74 68 65 57 69 | WindowP|tr theWi|
|00000810| 6e 64 6f 77 3b 0d 7b 0d | 09 72 65 74 75 72 6e 20 |ndow;.{.|.return |
|00000820| 28 74 68 65 57 69 6e 64 | 6f 77 20 21 3d 20 4e 55 |(theWind|ow != NU|
|00000830| 4c 4c 29 20 26 26 20 28 | 28 28 57 69 6e 64 6f 77 |LL) && (|((Window|
|00000840| 50 65 65 6b 29 20 74 68 | 65 57 69 6e 64 6f 77 29 |Peek) th|eWindow)|
|00000850| 2d 3e 77 69 6e 64 6f 77 | 4b 69 6e 64 20 3c 20 30 |->window|Kind < 0|
|00000860| 29 3b 0d 7d 0d 0d 0d 2f | 2a 20 52 65 73 69 7a 65 |);.}.../|* Resize|
|00000870| 20 74 68 65 20 77 69 6e | 64 6f 77 0d 20 2a 2f 0d | the win|dow. */.|
|00000880| 76 6f 69 64 0d 57 69 6e | 64 47 72 6f 77 20 28 74 |void.Win|dGrow (t|
|00000890| 68 65 57 69 6e 64 6f 77 | 2c 20 74 68 65 45 76 65 |heWindow|, theEve|
|000008a0| 6e 74 29 0d 09 72 65 67 | 69 73 74 65 72 20 57 69 |nt)..reg|ister Wi|
|000008b0| 6e 64 6f 77 50 74 72 20 | 74 68 65 57 69 6e 64 6f |ndowPtr |theWindo|
|000008c0| 77 3b 0d 09 72 65 67 69 | 73 74 65 72 20 45 76 65 |w;..regi|ster Eve|
|000008d0| 6e 74 52 65 63 6f 72 64 | 20 2a 74 68 65 45 76 65 |ntRecord| *theEve|
|000008e0| 6e 74 3b 0d 7b 0d 09 47 | 72 61 66 50 74 72 20 73 |nt;.{..G|rafPtr s|
|000008f0| 61 76 65 50 6f 72 74 3b | 0d 09 72 65 67 69 73 74 |avePort;|..regist|
|00000900| 65 72 20 6c 6f 6e 67 20 | 6e 65 77 53 69 7a 65 3b |er long |newSize;|
|00000910| 0d 09 72 65 67 69 73 74 | 65 72 20 73 68 6f 72 74 |..regist|er short|
|00000920| 20 6e 65 77 48 2c 20 6e | 65 77 56 3b 0d 0d 09 47 | newH, n|ewV;...G|
|00000930| 65 74 50 6f 72 74 28 26 | 73 61 76 65 50 6f 72 74 |etPort(&|savePort|
|00000940| 29 3b 0d 09 53 65 74 50 | 6f 72 74 28 74 68 65 57 |);..SetP|ort(theW|
|00000950| 69 6e 64 6f 77 29 3b 0d | 0d 09 69 66 20 28 6e 65 |indow);.|..if (ne|
|00000960| 77 53 69 7a 65 20 3d 20 | 47 72 6f 77 57 69 6e 64 |wSize = |GrowWind|
|00000970| 6f 77 28 74 68 65 57 69 | 6e 64 6f 77 2c 20 74 68 |ow(theWi|ndow, th|
|00000980| 65 45 76 65 6e 74 2d 3e | 77 68 65 72 65 2c 20 26 |eEvent->|where, &|
|00000990| 67 72 6f 77 41 72 65 61 | 29 29 20 7b 0d 09 09 6e |growArea|)) {...n|
|000009a0| 65 77 56 20 3d 20 4d 61 | 78 28 48 69 57 6f 72 64 |ewV = Ma|x(HiWord|
|000009b0| 28 6e 65 77 53 69 7a 65 | 29 2c 20 32 30 29 3b 0d |(newSize|), 20);.|
|000009c0| 09 09 6e 65 77 48 20 3d | 20 4d 61 78 28 4c 6f 57 |..newH =| Max(LoW|
|000009d0| 6f 72 64 28 6e 65 77 53 | 69 7a 65 29 2c 20 32 30 |ord(newS|ize), 20|
|000009e0| 29 3b 0d 0d 09 09 2f 2a | 20 52 65 73 69 7a 65 20 |);..../*| Resize |
|000009f0| 74 68 65 20 77 69 6e 64 | 6f 77 2c 20 61 64 6a 75 |the wind|ow, adju|
|00000a00| 73 74 20 77 69 6e 64 6f | 77 20 64 69 6d 65 6e 73 |st windo|w dimens|
|00000a10| 69 6f 6e 73 0d 09 09 20 | 2a 2f 0d 09 09 53 69 7a |ions... |*/...Siz|
|00000a20| 65 57 69 6e 64 6f 77 28 | 74 68 65 57 69 6e 64 6f |eWindow(|theWindo|
|00000a30| 77 2c 20 6e 65 77 48 2c | 20 6e 65 77 56 2c 20 54 |w, newH,| newV, T|
|00000a40| 52 55 45 29 3b 0d 09 09 | 57 69 6e 64 41 64 6a 75 |RUE);...|WindAdju|
|00000a50| 73 74 28 74 68 65 57 69 | 6e 64 6f 77 29 3b 0d 09 |st(theWi|ndow);..|
|00000a60| 09 49 6e 76 61 6c 52 65 | 63 74 28 26 74 68 65 57 |.InvalRe|ct(&theW|
|00000a70| 69 6e 64 6f 77 2d 3e 70 | 6f 72 74 52 65 63 74 29 |indow->p|ortRect)|
|00000a80| 3b 0d 09 7d 0d 0d 09 53 | 65 74 50 6f 72 74 28 73 |;..}...S|etPort(s|
|00000a90| 61 76 65 50 6f 72 74 29 | 3b 0d 7d 0d 0d 0d 2f 2a |avePort)|;.}.../*|
|00000aa0| 20 5a 6f 6f 6d 20 74 68 | 65 20 77 69 6e 64 6f 77 | Zoom th|e window|
|00000ab0| 20 69 6e 20 6f 72 20 6f | 75 74 0d 20 2a 2f 0d 76 | in or o|ut. */.v|
|00000ac0| 6f 69 64 0d 57 69 6e 64 | 5a 6f 6f 6d 20 28 74 68 |oid.Wind|Zoom (th|
|00000ad0| 65 57 69 6e 64 6f 77 2c | 20 74 68 65 50 61 72 74 |eWindow,| thePart|
|00000ae0| 29 0d 09 72 65 67 69 73 | 74 65 72 20 57 69 6e 64 |)..regis|ter Wind|
|00000af0| 6f 77 50 74 72 20 74 68 | 65 57 69 6e 64 6f 77 3b |owPtr th|eWindow;|
|00000b00| 0d 09 72 65 67 69 73 74 | 65 72 20 73 68 6f 72 74 |..regist|er short|
|00000b10| 20 74 68 65 50 61 72 74 | 3b 0d 7b 0d 09 47 72 61 | thePart|;.{..Gra|
|00000b20| 66 50 74 72 20 73 61 76 | 65 50 6f 72 74 3b 0d 0d |fPtr sav|ePort;..|
|00000b30| 09 47 65 74 50 6f 72 74 | 28 26 73 61 76 65 50 6f |.GetPort|(&savePo|
|00000b40| 72 74 29 3b 0d 09 53 65 | 74 50 6f 72 74 28 74 68 |rt);..Se|tPort(th|
|00000b50| 65 57 69 6e 64 6f 77 29 | 3b 0d 0d 09 2f 2a 20 5a |eWindow)|;.../* Z|
|00000b60| 6f 6f 6d 20 74 68 65 20 | 77 69 6e 64 6f 77 20 61 |oom the |window a|
|00000b70| 6e 64 20 61 64 6a 75 73 | 74 20 74 68 65 20 77 69 |nd adjus|t the wi|
|00000b80| 6e 64 6f 77 20 72 65 63 | 74 20 64 69 6d 65 6e 73 |ndow rec|t dimens|
|00000b90| 69 6f 6e 73 0d 09 20 2a | 2f 0d 09 48 69 64 65 57 |ions.. *|/..HideW|
|00000ba0| 69 6e 64 6f 77 28 74 68 | 65 57 69 6e 64 6f 77 29 |indow(th|eWindow)|
|00000bb0| 3b 0d 0d 09 5a 6f 6f 6d | 57 69 6e 64 6f 77 28 74 |;...Zoom|Window(t|
|00000bc0| 68 65 57 69 6e 64 6f 77 | 2c 20 74 68 65 50 61 72 |heWindow|, thePar|
|00000bd0| 74 2c 20 54 52 55 45 29 | 3b 0d 09 57 69 6e 64 41 |t, TRUE)|;..WindA|
|00000be0| 64 6a 75 73 74 28 74 68 | 65 57 69 6e 64 6f 77 29 |djust(th|eWindow)|
|00000bf0| 3b 0d 09 2f 2a 20 57 69 | 6e 64 49 6e 76 61 6c 47 |;../* Wi|ndInvalG|
|00000c00| 72 6f 77 28 74 68 65 57 | 69 6e 64 6f 77 29 3b 20 |row(theW|indow); |
|00000c10| 2a 2f 0d 0d 09 53 68 6f | 77 57 69 6e 64 6f 77 28 |*/...Sho|wWindow(|
|00000c20| 74 68 65 57 69 6e 64 6f | 77 29 3b 0d 09 53 65 74 |theWindo|w);..Set|
|00000c30| 50 6f 72 74 28 73 61 76 | 65 50 6f 72 74 29 3b 0d |Port(sav|ePort);.|
|00000c40| 7d 0d 0d 0d 2f 2a 20 52 | 65 70 6f 73 69 74 69 6f |}.../* R|epositio|
|00000c50| 6e 20 61 20 77 69 6e 64 | 6f 77 20 69 6e 20 74 68 |n a wind|ow in th|
|00000c60| 65 20 63 65 6e 74 65 72 | 20 6f 66 20 74 68 65 20 |e center| of the |
|00000c70| 73 63 72 65 65 6e 0d 20 | 2a 2f 0d 76 6f 69 64 0d |screen. |*/.void.|
|00000c80| 57 69 6e 64 43 65 6e 74 | 65 72 20 28 74 68 65 57 |WindCent|er (theW|
|00000c90| 69 6e 64 6f 77 29 0d 09 | 72 65 67 69 73 74 65 72 |indow)..|register|
|00000ca0| 20 57 69 6e 64 6f 77 50 | 74 72 20 74 68 65 57 69 | WindowP|tr theWi|
|00000cb0| 6e 64 6f 77 3b 0d 7b 20 | 0d 09 72 65 67 69 73 74 |ndow;.{ |..regist|
|00000cc0| 65 72 20 73 68 6f 72 74 | 20 68 57 69 6e 64 2c 20 |er short| hWind, |
|00000cd0| 76 57 69 6e 64 2c 20 68 | 53 63 72 6e 2c 20 76 53 |vWind, h|Scrn, vS|
|00000ce0| 63 72 6e 3b 0d 0d 09 68 | 53 63 72 6e 20 3d 20 73 |crn;...h|Scrn = s|
|00000cf0| 63 72 65 65 6e 42 69 74 | 73 2e 62 6f 75 6e 64 73 |creenBit|s.bounds|
|00000d00| 2e 72 69 67 68 74 20 2d | 20 73 63 72 65 65 6e 42 |.right -| screenB|
|00000d10| 69 74 73 2e 62 6f 75 6e | 64 73 2e 6c 65 66 74 3b |its.boun|ds.left;|
|00000d20| 0d 09 76 53 63 72 6e 20 | 3d 20 73 63 72 65 65 6e |..vScrn |= screen|
|00000d30| 42 69 74 73 2e 62 6f 75 | 6e 64 73 2e 62 6f 74 74 |Bits.bou|nds.bott|
|00000d40| 6f 6d 20 2d 20 73 63 72 | 65 65 6e 42 69 74 73 2e |om - scr|eenBits.|
|00000d50| 62 6f 75 6e 64 73 2e 74 | 6f 70 3b 0d 0d 09 68 57 |bounds.t|op;...hW|
|00000d60| 69 6e 64 20 3d 20 74 68 | 65 57 69 6e 64 6f 77 2d |ind = th|eWindow-|
|00000d70| 3e 70 6f 72 74 52 65 63 | 74 2e 72 69 67 68 74 20 |>portRec|t.right |
|00000d80| 2d 20 74 68 65 57 69 6e | 64 6f 77 2d 3e 70 6f 72 |- theWin|dow->por|
|00000d90| 74 52 65 63 74 2e 6c 65 | 66 74 3b 0d 09 76 57 69 |tRect.le|ft;..vWi|
|00000da0| 6e 64 20 3d 20 74 68 65 | 57 69 6e 64 6f 77 2d 3e |nd = the|Window->|
|00000db0| 70 6f 72 74 52 65 63 74 | 2e 62 6f 74 74 6f 6d 20 |portRect|.bottom |
|00000dc0| 2d 20 74 68 65 57 69 6e | 64 6f 77 2d 3e 70 6f 72 |- theWin|dow->por|
|00000dd0| 74 52 65 63 74 2e 74 6f | 70 3b 0d 0d 09 2f 2a 20 |tRect.to|p;.../* |
|00000de0| 52 65 73 65 74 20 74 68 | 65 20 68 6f 72 69 7a 6f |Reset th|e horizo|
|00000df0| 6e 74 61 6c 20 61 6e 64 | 20 74 68 65 20 76 65 72 |ntal and| the ver|
|00000e00| 74 69 63 61 6c 20 70 6f | 73 69 74 69 6f 6e 0d 09 |tical po|sition..|
|00000e10| 20 2a 2f 0d 09 4d 6f 76 | 65 57 69 6e 64 6f 77 28 | */..Mov|eWindow(|
|00000e20| 74 68 65 57 69 6e 64 6f | 77 2c 20 28 68 53 63 72 |theWindo|w, (hScr|
|00000e30| 6e 20 2d 20 68 57 69 6e | 64 29 20 2f 20 32 2c 20 |n - hWin|d) / 2, |
|00000e40| 28 28 76 53 63 72 6e 20 | 2d 20 76 57 69 6e 64 29 |((vScrn |- vWind)|
|00000e50| 20 2f 20 33 29 20 2b 20 | 4d 42 61 72 48 65 69 67 | / 3) + |MBarHeig|
|00000e60| 68 74 2c 20 46 41 4c 53 | 45 29 3b 0d 7d 0d 0d 0d |ht, FALS|E);.}...|
|00000e70| 2f 2a 20 4d 6f 76 65 73 | 20 61 6e 64 20 73 69 7a |/* Moves| and siz|
|00000e80| 65 73 20 77 69 6e 64 6f | 77 20 74 6f 20 6e 65 77 |es windo|w to new|
|00000e90| 20 6c 6f 63 61 74 69 6f | 6e 0d 20 2a 2f 0d 76 6f | locatio|n. */.vo|
|00000ea0| 69 64 20 0d 57 69 6e 64 | 50 6c 61 63 65 20 28 74 |id .Wind|Place (t|
|00000eb0| 68 65 57 69 6e 64 6f 77 | 2c 20 6c 65 66 74 2c 20 |heWindow|, left, |
|00000ec0| 74 6f 70 2c 20 72 69 67 | 68 74 2c 20 62 6f 74 74 |top, rig|ht, bott|
|00000ed0| 6f 6d 29 0d 09 72 65 67 | 69 73 74 65 72 20 57 69 |om)..reg|ister Wi|
|00000ee0| 6e 64 6f 77 50 74 72 20 | 74 68 65 57 69 6e 64 6f |ndowPtr |theWindo|
|00000ef0| 77 3b 0d 09 72 65 67 69 | 73 74 65 72 20 73 68 6f |w;..regi|ster sho|
|00000f00| 72 74 20 6c 65 66 74 2c | 20 74 6f 70 2c 20 72 69 |rt left,| top, ri|
|00000f10| 67 68 74 2c 20 62 6f 74 | 74 6f 6d 3b 0d 7b 0d 09 |ght, bot|tom;.{..|
|00000f20| 2f 2a 20 4d 6f 76 65 20 | 77 69 6e 64 6f 77 20 74 |/* Move |window t|
|00000f30| 6f 20 61 20 73 70 65 63 | 69 66 69 65 64 20 6c 6f |o a spec|ified lo|
|00000f40| 63 61 74 69 6f 6e 20 69 | 6e 20 67 6c 6f 62 61 6c |cation i|n global|
|00000f50| 20 63 6f 6f 72 64 69 6e | 61 74 65 73 0d 09 20 2a | coordin|ates.. *|
|00000f60| 2f 0d 09 4d 6f 76 65 57 | 69 6e 64 6f 77 28 74 68 |/..MoveW|indow(th|
|00000f70| 65 57 69 6e 64 6f 77 2c | 20 6c 65 66 74 2c 20 74 |eWindow,| left, t|
|00000f80| 6f 70 2c 20 46 41 4c 53 | 45 29 3b 0d 09 53 69 7a |op, FALS|E);..Siz|
|00000f90| 65 57 69 6e 64 6f 77 28 | 74 68 65 57 69 6e 64 6f |eWindow(|theWindo|
|00000fa0| 77 2c 20 72 69 67 68 74 | 20 2d 20 6c 65 66 74 2c |w, right| - left,|
|00000fb0| 20 62 6f 74 74 6f 6d 20 | 2d 20 74 6f 70 2c 20 54 | bottom |- top, T|
|00000fc0| 52 55 45 29 3b 0d 09 57 | 69 6e 64 41 64 6a 75 73 |RUE);..W|indAdjus|
|00000fd0| 74 28 74 68 65 57 69 6e | 64 6f 77 29 3b 0d 7d 0d |t(theWin|dow);.}.|
|00000fe0| 0d 0d 2f 2a 20 53 74 61 | 63 6b 73 20 77 69 6e 64 |../* Sta|cks wind|
|00000ff0| 6f 77 73 20 64 69 61 67 | 6f 6e 61 6c 6c 79 20 62 |ows diag|onally b|
|00001000| 61 73 65 64 20 6f 6e 20 | 63 6f 6e 73 74 72 61 69 |ased on |constrai|
|00001010| 6e 74 20 72 65 63 74 0d | 20 2a 2f 0d 76 6f 69 64 |nt rect.| */.void|
|00001020| 0d 57 69 6e 64 54 69 6c | 65 53 74 61 63 6b 20 28 |.WindTil|eStack (|
|00001030| 29 0d 7b 0d 09 72 65 67 | 69 73 74 65 72 20 57 4f |).{..reg|ister WO|
|00001040| 52 44 20 77 69 64 74 68 | 2c 20 68 65 69 67 68 74 |RD width|, height|
|00001050| 2c 20 76 53 74 61 67 67 | 65 72 2c 20 68 53 74 61 |, vStagg|er, hSta|
|00001060| 67 67 65 72 2c 20 69 2c | 20 6a 3b 0d 09 72 65 67 |gger, i,| j;..reg|
|00001070| 69 73 74 65 72 20 57 69 | 6e 64 6f 77 50 74 72 20 |ister Wi|ndowPtr |
|00001080| 74 68 65 57 69 6e 64 6f | 77 20 3d 20 46 72 6f 6e |theWindo|w = Fron|
|00001090| 74 57 69 6e 64 6f 77 28 | 29 3b 0d 09 72 65 67 69 |tWindow(|);..regi|
|000010a0| 73 74 65 72 20 57 4f 52 | 44 20 6e 75 6d 57 69 6e |ster WOR|D numWin|
|000010b0| 64 6f 77 73 20 3d 20 30 | 3b 0d 09 47 72 61 66 50 |dows = 0|;..GrafP|
|000010c0| 74 72 20 73 61 76 65 50 | 6f 72 74 3b 0d 0d 09 47 |tr saveP|ort;...G|
|000010d0| 65 74 50 6f 72 74 28 26 | 73 61 76 65 50 6f 72 74 |etPort(&|savePort|
|000010e0| 29 3b 0d 0d 09 2f 2a 20 | 4e 6f 77 20 77 65 20 74 |);.../* |Now we t|
|000010f0| 61 6b 65 20 61 20 74 72 | 69 70 20 74 68 72 6f 75 |ake a tr|ip throu|
|00001100| 67 68 20 74 68 65 20 6c | 6f 6f 6b 69 6e 67 20 67 |gh the l|ooking g|
|00001110| 6c 61 73 73 20 74 6f 20 | 62 75 69 6c 64 20 74 68 |lass to |build th|
|00001120| 65 20 6c 69 73 74 20 6f | 66 0d 09 20 2a 20 4f 55 |e list o|f.. * OU|
|00001130| 52 20 77 69 6e 64 6f 77 | 73 0d 09 20 2a 2f 0d 09 |R window|s.. */..|
|00001140| 77 68 69 6c 65 20 28 74 | 68 65 57 69 6e 64 6f 77 |while (t|heWindow|
|00001150| 20 21 3d 20 4e 55 4c 4c | 29 20 7b 0d 09 09 69 66 | != NULL|) {...if|
|00001160| 20 28 28 28 57 69 6e 64 | 6f 77 50 65 65 6b 29 20 | (((Wind|owPeek) |
|00001170| 74 68 65 57 69 6e 64 6f | 77 29 2d 3e 76 69 73 69 |theWindo|w)->visi|
|00001180| 62 6c 65 29 0d 09 09 09 | 09 77 69 6e 64 4c 69 73 |ble)....|.windLis|
|00001190| 74 2e 77 69 6e 64 5b 6e | 75 6d 57 69 6e 64 6f 77 |t.wind[n|umWindow|
|000011a0| 73 2b 2b 5d 20 3d 20 74 | 68 65 57 69 6e 64 6f 77 |s++] = t|heWindow|
|000011b0| 3b 0d 0d 09 09 74 68 65 | 57 69 6e 64 6f 77 20 3d |;....the|Window =|
|000011c0| 20 28 57 69 6e 64 6f 77 | 50 74 72 29 20 28 28 57 | (Window|Ptr) ((W|
|000011d0| 69 6e 64 6f 77 50 65 65 | 6b 29 20 74 68 65 57 69 |indowPee|k) theWi|
|000011e0| 6e 64 6f 77 29 2d 3e 6e | 65 78 74 57 69 6e 64 6f |ndow)->n|extWindo|
|000011f0| 77 3b 0d 09 7d 0d 0d 09 | 69 66 20 28 28 6e 75 6d |w;..}...|if ((num|
|00001200| 57 69 6e 64 6f 77 73 20 | 3e 20 31 29 20 26 26 20 |Windows |> 1) && |
|00001210| 28 6e 75 6d 57 69 6e 64 | 6f 77 73 20 3c 3d 20 4d |(numWind|ows <= M|
|00001220| 41 58 50 54 52 53 29 29 | 20 7b 0d 09 09 68 65 69 |AXPTRS))| {...hei|
|00001230| 67 68 74 20 3d 20 28 64 | 72 61 67 41 72 65 61 2e |ght = (d|ragArea.|
|00001240| 62 6f 74 74 6f 6d 20 2d | 20 64 72 61 67 41 72 65 |bottom -| dragAre|
|00001250| 61 2e 74 6f 70 29 20 2f | 20 32 3b 0d 09 09 77 69 |a.top) /| 2;...wi|
|00001260| 64 74 68 20 3d 20 28 64 | 72 61 67 41 72 65 61 2e |dth = (d|ragArea.|
|00001270| 72 69 67 68 74 20 2d 20 | 64 72 61 67 41 72 65 61 |right - |dragArea|
|00001280| 2e 6c 65 66 74 29 20 2f | 20 32 3b 0d 09 09 76 53 |.left) /| 2;...vS|
|00001290| 74 61 67 67 65 72 20 3d | 20 28 68 65 69 67 68 74 |tagger =| (height|
|000012a0| 20 2f 20 28 6e 75 6d 57 | 69 6e 64 6f 77 73 20 2d | / (numW|indows -|
|000012b0| 20 31 29 29 20 2b 20 31 | 3b 0d 09 09 68 53 74 61 | 1)) + 1|;...hSta|
|000012c0| 67 67 65 72 20 3d 20 28 | 77 69 64 74 68 20 2f 20 |gger = (|width / |
|000012d0| 28 6e 75 6d 57 69 6e 64 | 6f 77 73 20 2d 20 31 29 |(numWind|ows - 1)|
|000012e0| 29 20 2b 20 31 3b 0d 09 | 0d 09 09 66 6f 72 20 28 |) + 1;..|...for (|
|000012f0| 69 20 3d 20 6e 75 6d 57 | 69 6e 64 6f 77 73 20 2d |i = numW|indows -|
|00001300| 20 31 3b 20 69 20 3e 3d | 20 30 3b 20 69 2d 2d 29 | 1; i >=| 0; i--)|
|00001310| 20 7b 0d 09 09 09 69 66 | 20 28 74 68 65 57 69 6e | {....if| (theWin|
|00001320| 64 6f 77 20 3d 20 77 69 | 6e 64 4c 69 73 74 2e 77 |dow = wi|ndList.w|
|00001330| 69 6e 64 5b 69 5d 29 20 | 7b 09 09 0d 09 09 09 09 |ind[i]) |{.......|
|00001340| 53 65 74 50 6f 72 74 28 | 74 68 65 57 69 6e 64 6f |SetPort(|theWindo|
|00001350| 77 29 3b 0d 09 09 09 09 | 57 69 6e 64 41 63 74 69 |w);.....|WindActi|
|00001360| 76 61 74 65 28 74 68 65 | 57 69 6e 64 6f 77 2c 20 |vate(the|Window, |
|00001370| 46 41 4c 53 45 29 3b 0d | 0d 09 09 09 09 6a 20 3d |FALSE);.|.....j =|
|00001380| 20 6e 75 6d 57 69 6e 64 | 6f 77 73 20 2d 20 69 20 | numWind|ows - i |
|00001390| 2d 20 31 3b 0d 09 09 09 | 09 4d 6f 76 65 57 69 6e |- 1;....|.MoveWin|
|000013a0| 64 6f 77 28 74 68 65 57 | 69 6e 64 6f 77 2c 20 64 |dow(theW|indow, d|
|000013b0| 72 61 67 41 72 65 61 2e | 6c 65 66 74 20 2b 20 28 |ragArea.|left + (|
|000013c0| 68 53 74 61 67 67 65 72 | 20 2a 20 6a 29 2c 20 64 |hStagger| * j), d|
|000013d0| 72 61 67 41 72 65 61 2e | 74 6f 70 20 2b 20 28 76 |ragArea.|top + (v|
|000013e0| 53 74 61 67 67 65 72 20 | 2a 20 6a 29 20 2b 20 32 |Stagger |* j) + 2|
|000013f0| 30 2c 20 46 41 4c 53 45 | 29 3b 0d 09 09 09 7d 0d |0, FALSE|);....}.|
|00001400| 09 09 7d 0d 09 09 0d 09 | 09 53 65 6c 65 63 74 57 |..}.....|.SelectW|
|00001410| 69 6e 64 6f 77 28 74 68 | 65 57 69 6e 64 6f 77 29 |indow(th|eWindow)|
|00001420| 3b 0d 09 7d 0d 09 0d 09 | 2f 2a 20 54 68 61 6e 6b |;..}....|/* Thank|
|00001430| 20 79 6f 75 20 66 6f 72 | 20 63 6f 6d 69 6e 67 2c | you for| coming,|
|00001440| 20 73 65 65 20 79 6f 75 | 20 6c 61 74 65 72 0d 09 | see you| later..|
|00001450| 20 2a 2f 0d 09 77 69 6e | 64 54 72 69 70 20 3d 20 | */..win|dTrip = |
|00001460| 46 41 4c 53 45 3b 0d 09 | 53 65 74 50 6f 72 74 28 |FALSE;..|SetPort(|
|00001470| 73 61 76 65 50 6f 72 74 | 29 3b 0d 7d 0d 0d 0d 2f |savePort|);.}.../|
|00001480| 2a 20 44 72 61 77 20 61 | 6e 20 61 70 70 6c 69 63 |* Draw a|n applic|
|00001490| 61 74 69 6f 6e 20 77 69 | 6e 64 6f 77 20 2d 20 73 |ation wi|ndow - s|
|000014a0| 77 69 74 63 68 20 6f 6e | 20 70 61 72 74 69 63 75 |witch on| particu|
|000014b0| 6c 61 72 20 77 69 6e 64 | 6f 77 20 74 6f 20 64 72 |lar wind|ow to dr|
|000014c0| 61 77 20 61 6c 6c 20 74 | 68 65 20 66 61 6e 63 79 |aw all t|he fancy|
|000014d0| 0d 20 2a 20 62 65 6c 6c | 73 20 61 6e 64 20 77 68 |. * bell|s and wh|
|000014e0| 69 73 74 6c 65 73 0d 20 | 2a 2f 0d 76 6f 69 64 0d |istles. |*/.void.|
|000014f0| 57 69 6e 64 52 65 44 72 | 61 77 20 28 74 68 65 57 |WindReDr|aw (theW|
|00001500| 69 6e 64 6f 77 29 0d 09 | 72 65 67 69 73 74 65 72 |indow)..|register|
|00001510| 20 57 69 6e 64 6f 77 50 | 74 72 20 74 68 65 57 69 | WindowP|tr theWi|
|00001520| 6e 64 6f 77 3b 0d 7b 0d | 09 72 65 67 69 73 74 65 |ndow;.{.|.registe|
|00001530| 72 20 49 6e 66 6f 50 74 | 72 20 69 6e 66 6f 50 74 |r InfoPt|r infoPt|
|00001540| 72 20 3d 20 28 49 6e 66 | 6f 50 74 72 29 20 47 65 |r = (Inf|oPtr) Ge|
|00001550| 74 57 52 65 66 43 6f 6e | 28 74 68 65 57 69 6e 64 |tWRefCon|(theWind|
|00001560| 6f 77 29 3b 0d 0d 09 2f | 2a 20 44 65 74 65 72 6d |ow);.../|* Determ|
|00001570| 69 6e 65 20 77 68 69 63 | 68 20 6b 69 6e 64 20 6f |ine whic|h kind o|
|00001580| 66 20 77 69 6e 64 6f 77 | 20 74 68 69 73 20 69 73 |f window| this is|
|00001590| 2c 20 74 68 65 6e 20 6c | 6f 63 6b 20 61 6e 64 20 |, then l|ock and |
|000015a0| 75 70 64 61 74 65 0d 09 | 20 2a 2f 0d 09 73 77 69 |update..| */..swi|
|000015b0| 74 63 68 28 69 6e 66 6f | 50 74 72 2d 3e 6b 69 6e |tch(info|Ptr->kin|
|000015c0| 64 29 20 7b 0d 09 63 61 | 73 65 20 77 6b 54 65 78 |d) {..ca|se wkTex|
|000015d0| 74 3a 0d 09 09 54 45 55 | 70 64 61 74 65 28 26 74 |t:...TEU|pdate(&t|
|000015e0| 68 65 57 69 6e 64 6f 77 | 2d 3e 70 6f 72 74 52 65 |heWindow|->portRe|
|000015f0| 63 74 2c 20 69 6e 66 6f | 50 74 72 2d 3e 69 74 65 |ct, info|Ptr->ite|
|00001600| 6d 2e 74 65 78 74 2e 74 | 65 48 64 6c 29 3b 0d 09 |m.text.t|eHdl);..|
|00001610| 09 44 72 61 77 43 6f 6e | 74 72 6f 6c 73 28 74 68 |.DrawCon|trols(th|
|00001620| 65 57 69 6e 64 6f 77 29 | 3b 0d 09 09 62 72 65 61 |eWindow)|;...brea|
|00001630| 6b 3b 0d 0d 09 63 61 73 | 65 20 77 6b 4c 69 73 74 |k;...cas|e wkList|
|00001640| 3a 0d 09 09 4c 69 73 74 | 44 72 61 77 28 74 68 65 |:...List|Draw(the|
|00001650| 57 69 6e 64 6f 77 2c 20 | 54 52 55 45 29 3b 0d 09 |Window, |TRUE);..|
|00001660| 09 62 72 65 61 6b 3b 0d | 09 09 0d 09 64 65 66 61 |.break;.|....defa|
|00001670| 75 6c 74 3a 0d 09 09 62 | 72 65 61 6b 3b 0d 09 7d |ult:...b|reak;..}|
|00001680| 0d 7d 0d 0d 0d 2f 2a 20 | 55 70 64 61 74 65 20 61 |.}.../* |Update a|
|00001690| 20 77 69 6e 64 6f 77 0d | 20 2a 2f 0d 76 6f 69 64 | window.| */.void|
|000016a0| 0d 57 69 6e 64 55 70 64 | 61 74 65 20 28 74 68 65 |.WindUpd|ate (the|
|000016b0| 57 69 6e 64 6f 77 29 0d | 09 72 65 67 69 73 74 65 |Window).|.registe|
|000016c0| 72 20 57 69 6e 64 6f 77 | 50 74 72 20 74 68 65 57 |r Window|Ptr theW|
|000016d0| 69 6e 64 6f 77 3b 0d 7b | 0d 09 47 72 61 66 50 74 |indow;.{|..GrafPt|
|000016e0| 72 20 73 61 76 65 50 6f | 72 74 3b 0d 0d 09 47 65 |r savePo|rt;...Ge|
|000016f0| 74 50 6f 72 74 28 26 73 | 61 76 65 50 6f 72 74 29 |tPort(&s|avePort)|
|00001700| 3b 0d 09 53 65 74 50 6f | 72 74 28 74 68 65 57 69 |;..SetPo|rt(theWi|
|00001710| 6e 64 6f 77 29 3b 0d 0d | 09 42 65 67 69 6e 55 70 |ndow);..|.BeginUp|
|00001720| 64 61 74 65 28 74 68 65 | 57 69 6e 64 6f 77 29 3b |date(the|Window);|
|00001730| 0d 0d 09 69 66 20 28 21 | 45 6d 70 74 79 52 67 6e |...if (!|EmptyRgn|
|00001740| 28 74 68 65 57 69 6e 64 | 6f 77 2d 3e 76 69 73 52 |(theWind|ow->visR|
|00001750| 67 6e 29 29 20 7b 0d 09 | 09 43 6c 69 70 52 65 63 |gn)) {..|.ClipRec|
|00001760| 74 28 26 74 68 65 57 69 | 6e 64 6f 77 2d 3e 70 6f |t(&theWi|ndow->po|
|00001770| 72 74 52 65 63 74 29 3b | 0d 09 09 45 72 61 73 65 |rtRect);|...Erase|
|00001780| 52 65 63 74 28 26 74 68 | 65 57 69 6e 64 6f 77 2d |Rect(&th|eWindow-|
|00001790| 3e 70 6f 72 74 52 65 63 | 74 29 3b 0d 0d 09 09 57 |>portRec|t);....W|
|000017a0| 69 6e 64 52 65 44 72 61 | 77 28 74 68 65 57 69 6e |indReDra|w(theWin|
|000017b0| 64 6f 77 29 3b 0d 09 09 | 2f 2a 20 44 72 61 77 47 |dow);...|/* DrawG|
|000017c0| 72 6f 77 49 63 6f 6e 28 | 74 68 65 57 69 6e 64 6f |rowIcon(|theWindo|
|000017d0| 77 29 3b 20 2a 2f 0d 0d | 09 09 2f 2a 20 53 70 65 |w); */..|../* Spe|
|000017e0| 63 69 61 6c 6c 79 20 68 | 61 6e 64 6c 65 20 63 75 |cially h|andle cu|
|000017f0| 73 74 6f 6d 20 77 69 6e | 64 6f 77 73 0d 09 09 20 |stom win|dows... |
|00001800| 2a 2f 0d 09 09 69 66 20 | 28 74 68 65 57 69 6e 64 |*/...if |(theWind|
|00001810| 6f 77 20 3d 3d 20 77 50 | 74 72 54 65 73 74 29 0d |ow == wP|trTest).|
|00001820| 09 09 09 54 65 73 74 44 | 72 61 77 28 29 3b 0d 09 |...TestD|raw();..|
|00001830| 7d 0d 0d 09 45 6e 64 55 | 70 64 61 74 65 28 74 68 |}...EndU|pdate(th|
|00001840| 65 57 69 6e 64 6f 77 29 | 3b 0d 09 53 65 74 50 6f |eWindow)|;..SetPo|
|00001850| 72 74 28 73 61 76 65 50 | 6f 72 74 29 3b 0d 7d 0d |rt(saveP|ort);.}.|
|00001860| 0d 0d 2f 2a 20 48 61 6e | 64 6c 65 20 61 6e 20 61 |../* Han|dle an a|
|00001870| 63 74 69 76 61 74 65 2f | 64 65 61 63 74 69 76 61 |ctivate/|deactiva|
|00001880| 74 65 20 65 76 65 6e 74 | 0d 20 2a 2f 0d 76 6f 69 |te event|. */.voi|
|00001890| 64 0d 57 69 6e 64 41 63 | 74 69 76 61 74 65 20 28 |d.WindAc|tivate (|
|000018a0| 74 68 65 57 69 6e 64 6f | 77 2c 20 69 73 41 63 74 |theWindo|w, isAct|
|000018b0| 69 76 65 29 0d 09 72 65 | 67 69 73 74 65 72 20 57 |ive)..re|gister W|
|000018c0| 69 6e 64 6f 77 50 74 72 | 20 74 68 65 57 69 6e 64 |indowPtr| theWind|
|000018d0| 6f 77 3b 0d 09 72 65 67 | 69 73 74 65 72 20 42 6f |ow;..reg|ister Bo|
|000018e0| 6f 6c 65 61 6e 20 69 73 | 41 63 74 69 76 65 3b 0d |olean is|Active;.|
|000018f0| 7b 0d 09 72 65 67 69 73 | 74 65 72 20 49 6e 66 6f |{..regis|ter Info|
|00001900| 50 74 72 20 69 6e 66 6f | 50 74 72 20 3d 20 28 49 |Ptr info|Ptr = (I|
|00001910| 6e 66 6f 50 74 72 29 20 | 47 65 74 57 52 65 66 43 |nfoPtr) |GetWRefC|
|00001920| 6f 6e 28 74 68 65 57 69 | 6e 64 6f 77 29 3b 0d 09 |on(theWi|ndow);..|
|00001930| 47 72 61 66 50 74 72 20 | 73 61 76 65 50 6f 72 74 |GrafPtr |savePort|
|00001940| 3b 0d 0d 09 47 65 74 50 | 6f 72 74 28 26 73 61 76 |;...GetP|ort(&sav|
|00001950| 65 50 6f 72 74 29 3b 0d | 09 53 65 74 50 6f 72 74 |ePort);.|.SetPort|
|00001960| 28 74 68 65 57 69 6e 64 | 6f 77 29 3b 0d 0d 09 2f |(theWind|ow);.../|
|00001970| 2a 20 44 65 74 65 72 6d | 69 6e 65 20 77 68 69 63 |* Determ|ine whic|
|00001980| 68 20 6b 69 6e 64 20 6f | 66 20 77 69 6e 64 6f 77 |h kind o|f window|
|00001990| 20 74 68 69 73 20 69 73 | 2c 20 74 68 65 6e 20 6c | this is|, then l|
|000019a0| 6f 63 6b 20 61 6e 64 20 | 61 63 74 69 76 61 74 65 |ock and |activate|
|000019b0| 2f 64 65 61 63 74 69 76 | 61 74 65 0d 09 20 2a 2f |/deactiv|ate.. */|
|000019c0| 0d 09 73 77 69 74 63 68 | 28 69 6e 66 6f 50 74 72 |..switch|(infoPtr|
|000019d0| 2d 3e 6b 69 6e 64 29 20 | 7b 0d 09 63 61 73 65 20 |->kind) |{..case |
|000019e0| 77 6b 54 65 78 74 3a 0d | 09 09 54 65 78 74 41 63 |wkText:.|..TextAc|
|000019f0| 74 69 76 61 74 65 28 69 | 73 41 63 74 69 76 65 2c |tivate(i|sActive,|
|00001a00| 20 74 68 65 57 69 6e 64 | 6f 77 29 3b 0d 09 09 62 | theWind|ow);...b|
|00001a10| 72 65 61 6b 3b 0d 0d 09 | 63 61 73 65 20 77 6b 4c |reak;...|case wkL|
|00001a20| 69 73 74 3a 0d 09 09 4c | 41 63 74 69 76 61 74 65 |ist:...L|Activate|
|00001a30| 28 69 73 41 63 74 69 76 | 65 2c 20 69 6e 66 6f 50 |(isActiv|e, infoP|
|00001a40| 74 72 2d 3e 69 74 65 6d | 2e 6c 69 73 74 29 3b 0d |tr->item|.list);.|
|00001a50| 09 09 62 72 65 61 6b 3b | 0d 09 09 0d 09 64 65 66 |..break;|.....def|
|00001a60| 61 75 6c 74 3a 0d 09 09 | 62 72 65 61 6b 3b 0d 09 |ault:...|break;..|
|00001a70| 7d 0d 0d 09 2f 2a 20 52 | 65 64 72 61 77 20 74 68 |}.../* R|edraw th|
|00001a80| 65 20 67 72 6f 77 20 62 | 6f 78 0d 09 20 2a 2f 0d |e grow b|ox.. */.|
|00001a90| 09 2f 2a 20 57 69 6e 64 | 49 6e 76 61 6c 47 72 6f |./* Wind|InvalGro|
|00001aa0| 77 28 74 68 65 57 69 6e | 64 6f 77 29 3b 20 2a 2f |w(theWin|dow); */|
|00001ab0| 0d 0d 09 53 65 74 50 6f | 72 74 28 73 61 76 65 50 |...SetPo|rt(saveP|
|00001ac0| 6f 72 74 29 3b 0d 7d 0d | 0d 09 0d 2f 2a 20 44 65 |ort);.}.|.../* De|
|00001ad0| 74 65 72 6d 69 6e 65 20 | 77 68 69 63 68 20 6b 69 |termine |which ki|
|00001ae0| 6e 64 20 6f 66 20 77 69 | 6e 64 6f 77 20 74 6f 20 |nd of wi|ndow to |
|00001af0| 61 64 6a 75 73 74 0d 20 | 2a 2f 0d 76 6f 69 64 0d |adjust. |*/.void.|
|00001b00| 57 69 6e 64 41 64 6a 75 | 73 74 20 28 74 68 65 57 |WindAdju|st (theW|
|00001b10| 69 6e 64 6f 77 29 0d 09 | 72 65 67 69 73 74 65 72 |indow)..|register|
|00001b20| 20 57 69 6e 64 6f 77 50 | 74 72 20 74 68 65 57 69 | WindowP|tr theWi|
|00001b30| 6e 64 6f 77 3b 0d 7b 0d | 09 72 65 67 69 73 74 65 |ndow;.{.|.registe|
|00001b40| 72 20 49 6e 66 6f 50 74 | 72 20 69 6e 66 6f 50 74 |r InfoPt|r infoPt|
|00001b50| 72 20 3d 20 28 49 6e 66 | 6f 50 74 72 29 20 47 65 |r = (Inf|oPtr) Ge|
|00001b60| 74 57 52 65 66 43 6f 6e | 28 74 68 65 57 69 6e 64 |tWRefCon|(theWind|
|00001b70| 6f 77 29 3b 0d 0d 09 73 | 77 69 74 63 68 20 28 69 |ow);...s|witch (i|
|00001b80| 6e 66 6f 50 74 72 2d 3e | 6b 69 6e 64 29 20 7b 0d |nfoPtr->|kind) {.|
|00001b90| 09 63 61 73 65 20 77 6b | 54 65 78 74 3a 0d 09 09 |.case wk|Text:...|
|00001ba0| 54 65 78 74 41 64 6a 75 | 73 74 28 74 68 65 57 69 |TextAdju|st(theWi|
|00001bb0| 6e 64 6f 77 29 3b 0d 09 | 09 62 72 65 61 6b 3b 0d |ndow);..|.break;.|
|00001bc0| 0d 09 63 61 73 65 20 77 | 6b 4c 69 73 74 3a 0d 09 |..case w|kList:..|
|00001bd0| 09 4c 69 73 74 41 64 6a | 75 73 74 28 74 68 65 57 |.ListAdj|ust(theW|
|00001be0| 69 6e 64 6f 77 29 3b 0d | 09 09 62 72 65 61 6b 3b |indow);.|..break;|
|00001bf0| 0d 0d 09 64 65 66 61 75 | 6c 74 3a 0d 09 09 62 72 |...defau|lt:...br|
|00001c00| 65 61 6b 3b 0d 09 7d 0d | 0d 09 2f 2a 20 52 65 73 |eak;..}.|../* Res|
|00001c10| 65 74 20 63 6c 69 70 72 | 65 63 74 20 74 6f 20 6e |et clipr|ect to n|
|00001c20| 65 77 20 73 69 7a 65 2e | 0d 09 20 2a 2f 0d 09 43 |ew size.|.. */..C|
|00001c30| 6c 69 70 52 65 63 74 28 | 26 28 74 68 65 57 69 6e |lipRect(|&(theWin|
|00001c40| 64 6f 77 2d 3e 70 6f 72 | 74 52 65 63 74 29 29 3b |dow->por|tRect));|
|00001c50| 0d 7d 0d 0d 0d 2f 2a 20 | 44 65 63 69 64 65 20 68 |.}.../* |Decide h|
|00001c60| 6f 77 20 74 6f 20 68 61 | 6e 64 6c 65 20 61 20 6d |ow to ha|ndle a m|
|00001c70| 6f 75 73 65 20 63 6c 69 | 63 6b 20 69 6e 20 74 68 |ouse cli|ck in th|
|00001c80| 65 20 63 6f 6e 74 65 6e | 74 20 6f 66 20 61 20 77 |e conten|t of a w|
|00001c90| 69 6e 64 6f 77 0d 20 2a | 2f 0d 76 6f 69 64 0d 57 |indow. *|/.void.W|
|00001ca0| 69 6e 64 43 6f 6e 74 65 | 6e 74 20 28 74 68 65 57 |indConte|nt (theW|
|00001cb0| 69 6e 64 6f 77 2c 20 74 | 68 65 45 76 65 6e 74 29 |indow, t|heEvent)|
|00001cc0| 0d 09 72 65 67 69 73 74 | 65 72 20 57 69 6e 64 6f |..regist|er Windo|
|00001cd0| 77 50 74 72 20 74 68 65 | 57 69 6e 64 6f 77 3b 0d |wPtr the|Window;.|
|00001ce0| 09 72 65 67 69 73 74 65 | 72 20 45 76 65 6e 74 52 |.registe|r EventR|
|00001cf0| 65 63 6f 72 64 20 2a 74 | 68 65 45 76 65 6e 74 3b |ecord *t|heEvent;|
|00001d00| 0d 7b 0d 09 72 65 67 69 | 73 74 65 72 20 49 6e 66 |.{..regi|ster Inf|
|00001d10| 6f 50 74 72 20 69 6e 66 | 6f 50 74 72 20 3d 20 28 |oPtr inf|oPtr = (|
|00001d20| 49 6e 66 6f 50 74 72 29 | 20 47 65 74 57 52 65 66 |InfoPtr)| GetWRef|
|00001d30| 43 6f 6e 28 74 68 65 57 | 69 6e 64 6f 77 29 3b 0d |Con(theW|indow);.|
|00001d40| 09 47 72 61 66 50 74 72 | 20 73 61 76 65 50 6f 72 |.GrafPtr| savePor|
|00001d50| 74 3b 0d 09 50 6f 69 6e | 74 20 74 68 65 50 6f 69 |t;..Poin|t thePoi|
|00001d60| 6e 74 3b 0d 0d 09 2f 2a | 20 43 6f 6e 76 65 72 74 |nt;.../*| Convert|
|00001d70| 20 74 6f 20 67 6c 6f 62 | 61 6c 20 63 6f 6f 72 64 | to glob|al coord|
|00001d80| 69 6e 61 74 65 73 0d 09 | 20 2a 2f 0d 09 47 65 74 |inates..| */..Get|
|00001d90| 50 6f 72 74 28 26 73 61 | 76 65 50 6f 72 74 29 3b |Port(&sa|vePort);|
|00001da0| 0d 09 53 65 74 50 6f 72 | 74 28 74 68 65 57 69 6e |..SetPor|t(theWin|
|00001db0| 64 6f 77 29 3b 0d 0d 09 | 74 68 65 50 6f 69 6e 74 |dow);...|thePoint|
|00001dc0| 20 3d 20 74 68 65 45 76 | 65 6e 74 2d 3e 77 68 65 | = theEv|ent->whe|
|00001dd0| 72 65 3b 0d 09 47 6c 6f | 62 61 6c 54 6f 4c 6f 63 |re;..Glo|balToLoc|
|00001de0| 61 6c 28 26 74 68 65 50 | 6f 69 6e 74 29 3b 09 0d |al(&theP|oint);..|
|00001df0| 0d 09 69 66 20 28 74 68 | 65 57 69 6e 64 6f 77 20 |..if (th|eWindow |
|00001e00| 3d 3d 20 77 50 74 72 54 | 65 73 74 29 0d 09 09 54 |== wPtrT|est)...T|
|00001e10| 65 73 74 43 6c 69 63 6b | 28 74 68 65 50 6f 69 6e |estClick|(thePoin|
|00001e20| 74 29 3b 0d 0d 09 73 77 | 69 74 63 68 20 28 69 6e |t);...sw|itch (in|
|00001e30| 66 6f 50 74 72 2d 3e 6b | 69 6e 64 29 20 7b 0d 09 |foPtr->k|ind) {..|
|00001e40| 63 61 73 65 20 77 6b 54 | 65 78 74 3a 0d 09 09 2f |case wkT|ext:.../|
|00001e50| 2a 20 43 6c 69 63 6b 20 | 69 6e 20 6f 6e 65 20 6f |* Click |in one o|
|00001e60| 66 20 74 68 65 20 74 65 | 78 74 20 77 69 6e 64 6f |f the te|xt windo|
|00001e70| 77 73 0d 09 09 20 2a 2f | 0d 09 09 54 65 78 74 43 |ws... */|...TextC|
|00001e80| 6f 6e 74 65 6e 74 28 74 | 68 65 57 69 6e 64 6f 77 |ontent(t|heWindow|
|00001e90| 2c 20 74 68 65 45 76 65 | 6e 74 2d 3e 6d 6f 64 69 |, theEve|nt->modi|
|00001ea0| 66 69 65 72 73 2c 20 74 | 68 65 50 6f 69 6e 74 29 |fiers, t|hePoint)|
|00001eb0| 3b 0d 09 09 62 72 65 61 | 6b 3b 0d 09 09 0d 09 63 |;...brea|k;.....c|
|00001ec0| 61 73 65 20 77 6b 4c 69 | 73 74 3a 0d 09 09 2f 2a |ase wkLi|st:.../*|
|00001ed0| 20 43 6c 69 63 6b 20 69 | 6e 20 6f 6e 65 20 6f 66 | Click i|n one of|
|00001ee0| 20 74 68 65 20 6c 69 73 | 74 20 77 69 6e 64 6f 77 | the lis|t window|
|00001ef0| 73 0d 09 09 20 2a 2f 0d | 09 09 4c 69 73 74 43 6f |s... */.|..ListCo|
|00001f00| 6e 74 65 6e 74 28 74 68 | 65 57 69 6e 64 6f 77 2c |ntent(th|eWindow,|
|00001f10| 20 74 68 65 45 76 65 6e | 74 2d 3e 6d 6f 64 69 66 | theEven|t->modif|
|00001f20| 69 65 72 73 2c 20 74 68 | 65 50 6f 69 6e 74 29 3b |iers, th|ePoint);|
|00001f30| 0d 09 09 62 72 65 61 6b | 3b 0d 09 09 0d 09 64 65 |...break|;.....de|
|00001f40| 66 61 75 6c 74 3a 0d 09 | 09 62 72 65 61 6b 3b 0d |fault:..|.break;.|
|00001f50| 09 7d 0d 09 0d 09 53 65 | 74 50 6f 72 74 28 73 61 |.}....Se|tPort(sa|
|00001f60| 76 65 50 6f 72 74 29 3b | 0d 7d 0d 0d 0d 2f 2a 20 |vePort);|.}.../* |
|00001f70| 4f 70 65 6e 20 6f 72 20 | 63 6c 6f 73 65 20 61 20 |Open or |close a |
|00001f80| 77 69 6e 64 6f 77 20 63 | 6f 6e 74 65 78 74 2c 20 |window c|ontext, |
|00001f90| 64 65 70 65 6e 64 69 6e | 67 20 6f 6e 20 68 6f 77 |dependin|g on how|
|00001fa0| 20 22 70 6c 65 61 73 65 | 4f 70 65 6e 22 20 69 73 | "please|Open" is|
|00001fb0| 20 73 65 74 0d 20 2a 2f | 0d 76 6f 69 64 20 0d 57 | set. */|.void .W|
|00001fc0| 69 6e 64 53 77 69 74 63 | 68 20 28 74 68 65 57 69 |indSwitc|h (theWi|
|00001fd0| 6e 64 6f 77 2c 20 70 6c | 65 61 73 65 4f 70 65 6e |ndow, pl|easeOpen|
|00001fe0| 29 0d 09 72 65 67 69 73 | 74 65 72 20 57 69 6e 64 |)..regis|ter Wind|
|00001ff0| 6f 77 50 74 72 20 74 68 | 65 57 69 6e 64 6f 77 3b |owPtr th|eWindow;|
|00002000| 0d 09 72 65 67 69 73 74 | 65 72 20 42 6f 6f 6c 65 |..regist|er Boole|
|00002010| 61 6e 20 70 6c 65 61 73 | 65 4f 70 65 6e 3b 0d 7b |an pleas|eOpen;.{|
|00002020| 0d 09 72 65 67 69 73 74 | 65 72 20 57 69 6e 64 6f |..regist|er Windo|
|00002030| 77 50 74 72 20 66 72 6f | 6e 74 57 69 6e 64 20 3d |wPtr fro|ntWind =|
|00002040| 20 46 72 6f 6e 74 57 69 | 6e 64 6f 77 28 29 3b 0d | FrontWi|ndow();.|
|00002050| 0d 09 2f 2a 20 4f 70 65 | 6e 2f 43 6c 6f 73 65 20 |../* Ope|n/Close |
|00002060| 74 68 65 20 73 70 65 63 | 69 66 69 65 64 20 77 69 |the spec|ified wi|
|00002070| 6e 64 6f 77 0d 09 20 2a | 2f 0d 09 69 66 20 28 70 |ndow.. *|/..if (p|
|00002080| 6c 65 61 73 65 4f 70 65 | 6e 29 20 7b 0d 09 09 69 |leaseOpe|n) {...i|
|00002090| 66 20 28 21 28 28 57 69 | 6e 64 6f 77 50 65 65 6b |f (!((Wi|ndowPeek|
|000020a0| 29 20 74 68 65 57 69 6e | 64 6f 77 29 2d 3e 76 69 |) theWin|dow)->vi|
|000020b0| 73 69 62 6c 65 29 20 7b | 0d 09 09 09 53 68 6f 77 |sible) {|....Show|
|000020c0| 48 69 64 65 28 74 68 65 | 57 69 6e 64 6f 77 2c 20 |Hide(the|Window, |
|000020d0| 54 52 55 45 29 3b 0d 09 | 09 09 77 69 6e 64 54 72 |TRUE);..|..windTr|
|000020e0| 69 70 20 3d 20 54 52 55 | 45 3b 0d 09 09 7d 0d 0d |ip = TRU|E;...}..|
|000020f0| 09 09 69 66 20 28 74 68 | 65 57 69 6e 64 6f 77 20 |..if (th|eWindow |
|00002100| 21 3d 20 66 72 6f 6e 74 | 57 69 6e 64 29 0d 09 09 |!= front|Wind)...|
|00002110| 09 53 65 6c 65 63 74 57 | 69 6e 64 6f 77 28 74 68 |.SelectW|indow(th|
|00002120| 65 57 69 6e 64 6f 77 29 | 3b 0d 09 7d 0d 09 65 6c |eWindow)|;..}..el|
|00002130| 73 65 20 7b 0d 09 09 69 | 66 20 28 28 28 57 69 6e |se {...i|f (((Win|
|00002140| 64 6f 77 50 65 65 6b 29 | 20 74 68 65 57 69 6e 64 |dowPeek)| theWind|
|00002150| 6f 77 29 2d 3e 76 69 73 | 69 62 6c 65 29 20 7b 0d |ow)->vis|ible) {.|
|00002160| 09 09 09 57 69 6e 64 41 | 63 74 69 76 61 74 65 28 |...WindA|ctivate(|
|00002170| 74 68 65 57 69 6e 64 6f | 77 2c 20 46 41 4c 53 45 |theWindo|w, FALSE|
|00002180| 29 3b 0d 09 09 09 53 68 | 6f 77 48 69 64 65 28 74 |);....Sh|owHide(t|
|00002190| 68 65 57 69 6e 64 6f 77 | 2c 20 46 41 4c 53 45 29 |heWindow|, FALSE)|
|000021a0| 3b 0d 09 09 09 77 69 6e | 64 54 72 69 70 20 3d 20 |;....win|dTrip = |
|000021b0| 54 52 55 45 3b 0d 09 09 | 7d 0d 09 7d 0d 7d 0d 0d |TRUE;...|}..}.}..|
|000021c0| 0d 2f 2a 20 41 6c 6c 6f | 63 61 74 65 20 61 20 6e |./* Allo|cate a n|
|000021d0| 65 77 20 77 69 6e 64 6f | 77 20 62 61 73 65 64 20 |ew windo|w based |
|000021e0| 6f 6e 20 74 68 65 20 73 | 70 65 63 69 66 69 65 64 |on the s|pecified|
|000021f0| 20 77 69 6e 64 6f 77 20 | 74 65 6d 70 6c 61 74 65 | window |template|
|00002200| 0d 20 2a 2f 0d 57 69 6e | 64 6f 77 50 74 72 0d 57 |. */.Win|dowPtr.W|
|00002210| 69 6e 64 41 6c 6c 6f 63 | 61 74 65 20 28 77 69 6e |indAlloc|ate (win|
|00002220| 64 49 44 2c 20 69 73 41 | 63 74 69 76 65 29 0d 09 |dID, isA|ctive)..|
|00002230| 72 65 67 69 73 74 65 72 | 20 73 68 6f 72 74 20 77 |register| short w|
|00002240| 69 6e 64 49 44 3b 0d 09 | 72 65 67 69 73 74 65 72 |indID;..|register|
|00002250| 20 42 6f 6f 6c 65 61 6e | 20 69 73 41 63 74 69 76 | Boolean| isActiv|
|00002260| 65 3b 0d 7b 0d 09 72 65 | 67 69 73 74 65 72 20 57 |e;.{..re|gister W|
|00002270| 69 6e 64 6f 77 50 74 72 | 20 74 68 65 57 69 6e 64 |indowPtr| theWind|
|00002280| 6f 77 3b 0d 09 72 65 67 | 69 73 74 65 72 20 49 6e |ow;..reg|ister In|
|00002290| 66 6f 50 74 72 20 69 6e | 66 6f 50 74 72 3b 0d 09 |foPtr in|foPtr;..|
|000022a0| 72 65 67 69 73 74 65 72 | 20 52 65 63 74 20 62 6f |register| Rect bo|
|000022b0| 75 6e 64 73 3b 0d 09 73 | 74 61 74 69 63 20 73 68 |unds;..s|tatic sh|
|000022c0| 6f 72 74 20 6f 66 66 73 | 65 74 20 3d 20 30 3b 0d |ort offs|et = 0;.|
|000022d0| 09 47 72 61 66 50 74 72 | 20 73 61 76 65 50 6f 72 |.GrafPtr| savePor|
|000022e0| 74 3b 0d 0d 09 2f 2a 20 | 43 72 65 61 74 65 20 74 |t;.../* |Create t|
|000022f0| 68 65 20 77 69 6e 64 6f | 77 20 72 65 63 6f 72 64 |he windo|w record|
|00002300| 20 66 72 6f 6d 20 74 68 | 65 20 77 69 6e 64 6f 77 | from th|e window|
|00002310| 20 74 65 6d 70 6c 61 74 | 65 20 72 65 73 6f 75 72 | templat|e resour|
|00002320| 63 65 73 0d 09 20 2a 2f | 0d 09 69 66 20 28 6c 61 |ces.. */|..if (la|
|00002330| 4d 61 63 68 69 6e 65 2e | 68 61 73 43 6f 6c 6f 72 |Machine.|hasColor|
|00002340| 29 0d 09 09 74 68 65 57 | 69 6e 64 6f 77 20 3d 20 |)...theW|indow = |
|00002350| 28 57 69 6e 64 6f 77 50 | 74 72 29 20 47 65 74 4e |(WindowP|tr) GetN|
|00002360| 65 77 43 57 69 6e 64 6f | 77 28 77 69 6e 64 49 44 |ewCWindo|w(windID|
|00002370| 2c 20 4e 55 4c 4c 2c 20 | 2d 31 4c 29 3b 0d 09 65 |, NULL, |-1L);..e|
|00002380| 6c 73 65 0d 09 09 74 68 | 65 57 69 6e 64 6f 77 20 |lse...th|eWindow |
|00002390| 3d 20 28 57 69 6e 64 6f | 77 50 74 72 29 20 47 65 |= (Windo|wPtr) Ge|
|000023a0| 74 4e 65 77 57 69 6e 64 | 6f 77 28 77 69 6e 64 49 |tNewWind|ow(windI|
|000023b0| 44 2c 20 4e 55 4c 4c 2c | 20 2d 31 4c 29 3b 0d 09 |D, NULL,| -1L);..|
|000023c0| 0d 09 69 66 20 28 74 68 | 65 57 69 6e 64 6f 77 29 |..if (th|eWindow)|
|000023d0| 20 7b 0d 09 09 47 65 74 | 50 6f 72 74 28 26 73 61 | {...Get|Port(&sa|
|000023e0| 76 65 50 6f 72 74 29 3b | 0d 09 09 53 65 74 50 6f |vePort);|...SetPo|
|000023f0| 72 74 28 74 68 65 57 69 | 6e 64 6f 77 29 3b 0d 0d |rt(theWi|ndow);..|
|00002400| 09 09 69 66 20 28 69 6e | 66 6f 50 74 72 20 3d 20 |..if (in|foPtr = |
|00002410| 28 49 6e 66 6f 50 74 72 | 29 20 45 72 72 4e 65 77 |(InfoPtr|) ErrNew|
|00002420| 50 74 72 28 73 69 7a 65 | 6f 66 28 49 6e 66 6f 52 |Ptr(size|of(InfoR|
|00002430| 65 63 6f 72 64 29 29 29 | 20 7b 0d 09 09 69 6e 66 |ecord)))| {...inf|
|00002440| 6f 50 74 72 2d 3e 6b 69 | 6e 64 20 3d 20 77 6b 4e |oPtr->ki|nd = wkN|
|00002450| 6f 6e 65 3b 0d 09 09 09 | 69 6e 66 6f 50 74 72 2d |one;....|infoPtr-|
|00002460| 3e 61 63 74 69 76 65 20 | 3d 20 69 73 41 63 74 69 |>active |= isActi|
|00002470| 76 65 3b 0d 09 09 09 69 | 6e 66 6f 50 74 72 2d 3e |ve;....i|nfoPtr->|
|00002480| 64 69 72 74 79 20 3d 20 | 69 6e 66 6f 50 74 72 2d |dirty = |infoPtr-|
|00002490| 3e 6e 61 6d 65 64 20 3d | 20 46 41 4c 53 45 3b 0d |>named =| FALSE;.|
|000024a0| 09 09 09 53 65 74 57 52 | 65 66 43 6f 6e 28 74 68 |...SetWR|efCon(th|
|000024b0| 65 57 69 6e 64 6f 77 2c | 20 28 6c 6f 6e 67 29 20 |eWindow,| (long) |
|000024c0| 69 6e 66 6f 50 74 72 29 | 3b 0d 0d 09 09 09 6f 66 |infoPtr)|;.....of|
|000024d0| 66 73 65 74 20 2b 3d 20 | 31 30 3b 0d 09 09 09 62 |fset += |10;....b|
|000024e0| 6f 75 6e 64 73 2e 6c 65 | 66 74 20 3d 20 64 72 61 |ounds.le|ft = dra|
|000024f0| 67 41 72 65 61 2e 6c 65 | 66 74 20 2b 20 6f 66 66 |gArea.le|ft + off|
|00002500| 73 65 74 3b 0d 09 09 09 | 62 6f 75 6e 64 73 2e 74 |set;....|bounds.t|
|00002510| 6f 70 20 3d 20 64 72 61 | 67 41 72 65 61 2e 74 6f |op = dra|gArea.to|
|00002520| 70 20 2b 20 6f 66 66 73 | 65 74 20 2b 20 33 30 3b |p + offs|et + 30;|
|00002530| 0d 09 09 09 62 6f 75 6e | 64 73 2e 72 69 67 68 74 |....boun|ds.right|
|00002540| 20 3d 20 62 6f 75 6e 64 | 73 2e 6c 65 66 74 20 2b | = bound|s.left +|
|00002550| 20 28 74 68 65 57 69 6e | 64 6f 77 2d 3e 70 6f 72 | (theWin|dow->por|
|00002560| 74 52 65 63 74 2e 72 69 | 67 68 74 20 2d 20 74 68 |tRect.ri|ght - th|
|00002570| 65 57 69 6e 64 6f 77 2d | 3e 70 6f 72 74 52 65 63 |eWindow-|>portRec|
|00002580| 74 2e 6c 65 66 74 29 3b | 0d 09 09 09 62 6f 75 6e |t.left);|....boun|
|00002590| 64 73 2e 62 6f 74 74 6f | 6d 20 3d 20 62 6f 75 6e |ds.botto|m = boun|
|000025a0| 64 73 2e 74 6f 70 20 2b | 20 28 74 68 65 57 69 6e |ds.top +| (theWin|
|000025b0| 64 6f 77 2d 3e 70 6f 72 | 74 52 65 63 74 2e 62 6f |dow->por|tRect.bo|
|000025c0| 74 74 6f 6d 20 2d 20 74 | 68 65 57 69 6e 64 6f 77 |ttom - t|heWindow|
|000025d0| 2d 3e 70 6f 72 74 52 65 | 63 74 2e 74 6f 70 29 3b |->portRe|ct.top);|
|000025e0| 0d 09 09 09 57 69 6e 64 | 50 6c 61 63 65 28 74 68 |....Wind|Place(th|
|000025f0| 65 57 69 6e 64 6f 77 2c | 20 62 6f 75 6e 64 73 2e |eWindow,| bounds.|
|00002600| 6c 65 66 74 2c 20 62 6f | 75 6e 64 73 2e 74 6f 70 |left, bo|unds.top|
|00002610| 2c 20 62 6f 75 6e 64 73 | 2e 72 69 67 68 74 2c 20 |, bounds|.right, |
|00002620| 62 6f 75 6e 64 73 2e 62 | 6f 74 74 6f 6d 29 3b 0d |bounds.b|ottom);.|
|00002630| 09 09 7d 0d 09 09 65 6c | 73 65 20 7b 0d 09 09 09 |..}...el|se {....|
|00002640| 44 69 73 70 6f 73 65 57 | 69 6e 64 6f 77 28 74 68 |DisposeW|indow(th|
|00002650| 65 57 69 6e 64 6f 77 29 | 3b 0d 09 09 09 74 68 65 |eWindow)|;....the|
|00002660| 57 69 6e 64 6f 77 20 3d | 20 4e 55 4c 4c 3b 0d 09 |Window =| NULL;..|
|00002670| 09 7d 0d 0d 09 09 53 65 | 74 50 6f 72 74 28 73 61 |.}....Se|tPort(sa|
|00002680| 76 65 50 6f 72 74 29 3b | 0d 09 7d 0d 09 0d 09 72 |vePort);|..}....r|
|00002690| 65 74 75 72 6e 20 74 68 | 65 57 69 6e 64 6f 77 3b |eturn th|eWindow;|
|000026a0| 0d 7d 0d 0d 0d 2f 2a 20 | 43 6c 6f 73 65 20 74 68 |.}.../* |Close th|
|000026b0| 65 20 73 70 65 63 69 66 | 69 65 64 20 77 69 6e 64 |e specif|ied wind|
|000026c0| 6f 77 0d 20 2a 2f 0d 76 | 6f 69 64 0d 57 69 6e 64 |ow. */.v|oid.Wind|
|000026d0| 43 6c 6f 73 65 20 28 74 | 68 65 57 69 6e 64 6f 77 |Close (t|heWindow|
|000026e0| 29 0d 09 72 65 67 69 73 | 74 65 72 20 57 69 6e 64 |)..regis|ter Wind|
|000026f0| 6f 77 50 74 72 20 74 68 | 65 57 69 6e 64 6f 77 3b |owPtr th|eWindow;|
|00002700| 0d 7b 0d 09 72 65 67 69 | 73 74 65 72 20 49 6e 66 |.{..regi|ster Inf|
|00002710| 6f 50 74 72 20 69 6e 66 | 6f 50 74 72 20 3d 20 28 |oPtr inf|oPtr = (|
|00002720| 49 6e 66 6f 50 74 72 29 | 20 47 65 74 57 52 65 66 |InfoPtr)| GetWRef|
|00002730| 43 6f 6e 28 74 68 65 57 | 69 6e 64 6f 77 29 3b 0d |Con(theW|indow);.|
|00002740| 0d 09 69 66 20 28 28 74 | 68 65 57 69 6e 64 6f 77 |..if ((t|heWindow|
|00002750| 20 3d 3d 20 77 50 74 72 | 54 65 78 74 29 20 7c 7c | == wPtr|Text) |||
|00002760| 20 28 74 68 65 57 69 6e | 64 6f 77 20 3d 3d 20 64 | (theWin|dow == d|
|00002770| 50 74 72 41 6e 61 6c 29 | 29 0d 09 09 57 69 6e 64 |PtrAnal)|)...Wind|
|00002780| 53 77 69 74 63 68 28 74 | 68 65 57 69 6e 64 6f 77 |Switch(t|heWindow|
|00002790| 2c 20 46 41 4c 53 45 29 | 3b 0d 09 65 6c 73 65 20 |, FALSE)|;..else |
|000027a0| 69 66 20 28 74 68 65 57 | 69 6e 64 6f 77 20 3d 3d |if (theW|indow ==|
|000027b0| 20 77 50 74 72 54 65 73 | 74 29 0d 09 09 57 69 6e | wPtrTes|t)...Win|
|000027c0| 64 5a 61 70 50 6f 72 74 | 28 74 68 65 57 69 6e 64 |dZapPort|(theWind|
|000027d0| 6f 77 2c 20 46 41 4c 53 | 45 29 3b 0d 09 65 6c 73 |ow, FALS|E);..els|
|000027e0| 65 20 69 66 20 28 69 6e | 66 6f 50 74 72 2d 3e 6b |e if (in|foPtr->k|
|000027f0| 69 6e 64 20 3d 3d 20 77 | 6b 54 65 78 74 29 20 7b |ind == w|kText) {|
|00002800| 0d 09 09 2f 2a 20 44 65 | 61 6c 6c 6f 63 61 74 65 |.../* De|allocate|
|00002810| 20 61 20 74 65 78 74 20 | 77 69 6e 64 6f 77 0d 09 | a text |window..|
|00002820| 09 20 2a 2f 0d 09 09 44 | 6f 63 43 6c 6f 73 65 28 |. */...D|ocClose(|
|00002830| 74 68 65 57 69 6e 64 6f | 77 29 3b 0d 09 09 57 69 |theWindo|w);...Wi|
|00002840| 6e 64 5a 61 70 50 6f 72 | 74 28 74 68 65 57 69 6e |ndZapPor|t(theWin|
|00002850| 64 6f 77 2c 20 46 41 4c | 53 45 29 3b 0d 09 09 54 |dow, FAL|SE);...T|
|00002860| 45 44 69 73 70 6f 73 65 | 28 69 6e 66 6f 50 74 72 |EDispose|(infoPtr|
|00002870| 2d 3e 69 74 65 6d 2e 74 | 65 78 74 2e 74 65 48 64 |->item.t|ext.teHd|
|00002880| 6c 29 3b 0d 09 09 44 69 | 73 70 6f 73 65 43 6f 6e |l);...Di|sposeCon|
|00002890| 74 72 6f 6c 28 69 6e 66 | 6f 50 74 72 2d 3e 69 74 |trol(inf|oPtr->it|
|000028a0| 65 6d 2e 74 65 78 74 2e | 73 63 72 6f 6c 6c 29 3b |em.text.|scroll);|
|000028b0| 0d 09 09 44 69 73 70 6f | 73 50 74 72 28 69 6e 66 |...Dispo|sPtr(inf|
|000028c0| 6f 50 74 72 29 3b 0d 09 | 09 44 69 73 70 6f 73 65 |oPtr);..|.Dispose|
|000028d0| 57 69 6e 64 6f 77 28 74 | 68 65 57 69 6e 64 6f 77 |Window(t|heWindow|
|000028e0| 29 3b 0d 09 7d 0d 09 65 | 6c 73 65 20 69 66 20 28 |);..}..e|lse if (|
|000028f0| 69 6e 66 6f 50 74 72 2d | 3e 6b 69 6e 64 20 3d 3d |infoPtr-|>kind ==|
|00002900| 20 77 6b 4c 69 73 74 29 | 20 7b 0d 09 09 2f 2a 20 | wkList)| {.../* |
|00002910| 44 65 61 6c 6c 6f 63 61 | 74 65 20 61 20 6c 69 73 |Dealloca|te a lis|
|00002920| 74 20 77 69 6e 64 6f 77 | 0d 09 09 20 2a 2f 0d 09 |t window|... */..|
|00002930| 09 57 69 6e 64 5a 61 70 | 50 6f 72 74 28 74 68 65 |.WindZap|Port(the|
|00002940| 57 69 6e 64 6f 77 2c 20 | 46 41 4c 53 45 29 3b 0d |Window, |FALSE);.|
|00002950| 09 09 4c 44 69 73 70 6f | 73 65 28 69 6e 66 6f 50 |..LDispo|se(infoP|
|00002960| 74 72 2d 3e 69 74 65 6d | 2e 6c 69 73 74 29 3b 0d |tr->item|.list);.|
|00002970| 09 09 44 69 73 70 6f 73 | 50 74 72 28 69 6e 66 6f |..Dispos|Ptr(info|
|00002980| 50 74 72 29 3b 0d 09 09 | 44 69 73 70 6f 73 65 57 |Ptr);...|DisposeW|
|00002990| 69 6e 64 6f 77 28 74 68 | 65 57 69 6e 64 6f 77 29 |indow(th|eWindow)|
|000029a0| 3b 0d 09 7d 0d 09 65 6c | 73 65 20 69 66 20 28 69 |;..}..el|se if (i|
|000029b0| 6e 66 6f 50 74 72 2d 3e | 6b 69 6e 64 20 3d 3d 20 |nfoPtr->|kind == |
|000029c0| 77 6b 44 6c 6f 67 29 20 | 7b 0d 09 09 2f 2a 20 44 |wkDlog) |{.../* D|
|000029d0| 65 61 6c 6c 6f 63 61 74 | 65 20 61 20 6d 6f 64 65 |eallocat|e a mode|
|000029e0| 6c 65 73 73 20 64 69 61 | 6c 6f 67 20 77 69 6e 64 |less dia|log wind|
|000029f0| 6f 77 0d 09 09 20 2a 2f | 0d 09 09 44 6c 6f 67 44 |ow... */|...DlogD|
|00002a00| 69 73 70 6f 73 65 28 74 | 68 65 57 69 6e 64 6f 77 |ispose(t|heWindow|
|00002a10| 29 3b 0d 09 7d 0d 7d 0d | 0d 0d 2f 2a 20 5a 61 70 |);..}.}.|../* Zap|
|00002a20| 20 74 68 65 20 73 70 65 | 63 69 66 69 65 64 20 70 | the spe|cified p|
|00002a30| 6f 72 74 20 6f 70 65 6e | 20 6f 72 20 63 6c 6f 73 |ort open| or clos|
|00002a40| 65 64 0d 20 2a 2f 0d 76 | 6f 69 64 0d 57 69 6e 64 |ed. */.v|oid.Wind|
|00002a50| 5a 61 70 50 6f 72 74 20 | 28 77 69 6e 64 2c 20 75 |ZapPort |(wind, u|
|00002a60| 70 29 0d 09 72 65 67 69 | 73 74 65 72 20 57 69 6e |p)..regi|ster Win|
|00002a70| 64 6f 77 50 74 72 20 77 | 69 6e 64 3b 0d 09 72 65 |dowPtr w|ind;..re|
|00002a80| 67 69 73 74 65 72 20 42 | 6f 6f 6c 65 61 6e 20 75 |gister B|oolean u|
|00002a90| 70 3b 0d 7b 0d 09 2f 2a | 20 43 61 6e 27 74 20 67 |p;.{../*| Can't g|
|00002aa0| 69 76 65 20 69 74 20 61 | 6c 6c 20 61 77 61 79 2e |ive it a|ll away.|
|00002ab0| 2e 2e 0d 09 20 2a 2f 0d | 09 53 68 6f 77 48 69 64 |.... */.|.ShowHid|
|00002ac0| 65 28 77 69 6e 64 2c 20 | 75 70 29 3b 0d 7d 0d 00 |e(wind, |up);.}..|
|00002ad0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002af0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+