home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 January / Chip_2003-01_cd1.bin / zkuste / macos / Files / hexedit.sit / HexEdit_Release / Project / Source / Main.c < prev    next >
MacBinary  |  2002-10-31  |  22.3 KB  |  [TEXT/CWIE]

view JSON data     |     view as text     |     open on a Mac     |     open on a PC

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

You can browse this item here: Main.c

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
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 MacBinary II, inited, Thu Oct 31 22:19:14 2002, modified Thu Oct 31 22:19:14 2002, creator 'CWIE', type ASCII, 22001 bytes "Main.c" , at 0x5671 514 bytes resource default (weak)
99% file data default
49% TrID Macintosh plain text (MacBinary) default
33% TrID TTComp archive compressed (bin-4K) default (weak)
16% TrID MacBinary 2 default (weak)
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[CWIE]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 06 4d 61 69 6e 2e 63 | 00 00 00 00 00 00 00 00 |..Main.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 43 57 49 | 45 01 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 55 f1 00 | 00 02 02 b9 e7 a3 32 b9 |.....U..|......2.|
|00000060| e7 a3 32 00 00 0c 00 00 | 00 00 00 00 00 00 00 00 |..2.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 ce cb 00 00 |........|........|
|00000080| 2f 2a 0d 20 2a 20 54 68 | 65 20 63 6f 6e 74 65 6e |/*. * Th|e conten|
|00000090| 74 73 20 6f 66 20 74 68 | 69 73 20 66 69 6c 65 20 |ts of th|is file |
|000000a0| 61 72 65 20 73 75 62 6a | 65 63 74 20 74 6f 20 74 |are subj|ect to t|
|000000b0| 68 65 20 4d 6f 7a 69 6c | 6c 61 20 50 75 62 6c 69 |he Mozil|la Publi|
|000000c0| 63 0d 20 2a 20 4c 69 63 | 65 6e 73 65 20 56 65 72 |c. * Lic|ense Ver|
|000000d0| 73 69 6f 6e 20 31 2e 31 | 20 28 74 68 65 20 22 4c |sion 1.1| (the "L|
|000000e0| 69 63 65 6e 73 65 22 29 | 3b 20 79 6f 75 20 6d 61 |icense")|; you ma|
|000000f0| 79 20 6e 6f 74 20 75 73 | 65 20 74 68 69 73 20 66 |y not us|e this f|
|00000100| 69 6c 65 0d 20 2a 20 65 | 78 63 65 70 74 20 69 6e |ile. * e|xcept in|
|00000110| 20 63 6f 6d 70 6c 69 61 | 6e 63 65 20 77 69 74 68 | complia|nce with|
|00000120| 20 74 68 65 20 4c 69 63 | 65 6e 73 65 2e 20 59 6f | the Lic|ense. Yo|
|00000130| 75 20 6d 61 79 20 6f 62 | 74 61 69 6e 20 61 20 63 |u may ob|tain a c|
|00000140| 6f 70 79 20 6f 66 0d 20 | 2a 20 74 68 65 20 4c 69 |opy of. |* the Li|
|00000150| 63 65 6e 73 65 20 61 74 | 20 68 74 74 70 3a 2f 2f |cense at| http://|
|00000160| 77 77 77 2e 6d 6f 7a 69 | 6c 6c 61 2e 6f 72 67 2f |www.mozi|lla.org/|
|00000170| 4d 50 4c 2f 0d 20 2a 20 | 0d 20 2a 20 53 6f 66 74 |MPL/. * |. * Soft|
|00000180| 77 61 72 65 20 64 69 73 | 74 72 69 62 75 74 65 64 |ware dis|tributed|
|00000190| 20 75 6e 64 65 72 20 74 | 68 65 20 4c 69 63 65 6e | under t|he Licen|
|000001a0| 73 65 20 69 73 20 64 69 | 73 74 72 69 62 75 74 65 |se is di|stribute|
|000001b0| 64 20 6f 6e 20 61 6e 20 | 22 41 53 0d 20 2a 20 49 |d on an |"AS. * I|
|000001c0| 53 22 20 62 61 73 69 73 | 2c 20 57 49 54 48 4f 55 |S" basis|, WITHOU|
|000001d0| 54 20 57 41 52 52 41 4e | 54 59 20 4f 46 20 41 4e |T WARRAN|TY OF AN|
|000001e0| 59 20 4b 49 4e 44 2c 20 | 65 69 74 68 65 72 20 65 |Y KIND, |either e|
|000001f0| 78 70 72 65 73 73 20 6f | 72 0d 20 2a 20 69 6d 70 |xpress o|r. * imp|
|00000200| 6c 69 65 64 2e 20 53 65 | 65 20 74 68 65 20 4c 69 |lied. Se|e the Li|
|00000210| 63 65 6e 73 65 20 66 6f | 72 20 74 68 65 20 73 70 |cense fo|r the sp|
|00000220| 65 63 69 66 69 63 20 6c | 61 6e 67 75 61 67 65 20 |ecific l|anguage |
|00000230| 67 6f 76 65 72 6e 69 6e | 67 0d 20 2a 20 72 69 67 |governin|g. * rig|
|00000240| 68 74 73 20 61 6e 64 20 | 6c 69 6d 69 74 61 74 69 |hts and |limitati|
|00000250| 6f 6e 73 20 75 6e 64 65 | 72 20 74 68 65 20 4c 69 |ons unde|r the Li|
|00000260| 63 65 6e 73 65 2e 0d 20 | 2a 20 0d 20 2a 20 54 68 |cense.. |* . * Th|
|00000270| 65 20 4f 72 69 67 69 6e | 61 6c 20 43 6f 64 65 20 |e Origin|al Code |
|00000280| 69 73 20 43 6f 70 79 72 | 69 67 68 74 20 31 39 39 |is Copyr|ight 199|
|00000290| 33 20 4a 69 6d 20 42 75 | 6d 67 61 72 64 6e 65 72 |3 Jim Bu|mgardner|
|000002a0| 2e 0d 20 2a 20 0d 20 2a | 20 54 68 65 20 49 6e 69 |.. * . *| The Ini|
|000002b0| 74 69 61 6c 20 44 65 76 | 65 6c 6f 70 65 72 20 6f |tial Dev|eloper o|
|000002c0| 66 20 74 68 65 20 4f 72 | 69 67 69 6e 61 6c 20 43 |f the Or|iginal C|
|000002d0| 6f 64 65 20 69 73 20 4a | 69 6d 20 42 75 6d 67 61 |ode is J|im Bumga|
|000002e0| 72 64 6e 65 72 0d 20 2a | 20 50 6f 72 74 69 6f 6e |rdner. *| Portion|
|000002f0| 73 20 63 72 65 61 74 65 | 64 20 62 79 20 4c 61 6e |s create|d by Lan|
|00000300| 65 20 52 6f 61 74 68 65 | 20 28 4c 52 29 20 61 72 |e Roathe| (LR) ar|
|00000310| 65 0d 20 2a 20 43 6f 70 | 79 72 69 67 68 74 20 28 |e. * Cop|yright (|
|00000320| 43 29 20 43 6f 70 79 72 | 69 67 68 74 20 a9 20 31 |C) Copyr|ight . 1|
|00000330| 39 39 36 2d 32 30 30 32 | 2e 0d 20 2a 20 41 6c 6c |996-2002|.. * All|
|00000340| 20 52 69 67 68 74 73 20 | 52 65 73 65 72 76 65 64 | Rights |Reserved|
|00000350| 2e 0d 20 2a 0d 20 2a 20 | 4d 6f 64 69 66 69 65 64 |.. *. * |Modified|
|00000360| 3a 20 24 44 61 74 65 3a | 20 32 30 30 32 2f 31 31 |: $Date:| 2002/11|
|00000370| 2f 30 31 20 30 35 3a 31 | 39 3a 31 33 20 24 0d 20 |/01 05:1|9:13 $. |
|00000380| 2a 20 52 65 76 69 73 69 | 6f 6e 3a 20 24 49 64 3a |* Revisi|on: $Id:|
|00000390| 20 4d 61 69 6e 2e 63 2c | 76 20 31 2e 33 31 20 32 | Main.c,|v 1.31 2|
|000003a0| 30 30 32 2f 31 31 2f 30 | 31 20 30 35 3a 31 39 3a |002/11/0|1 05:19:|
|000003b0| 31 33 20 72 61 76 69 6e | 67 20 45 78 70 20 24 0d |13 ravin|g Exp $.|
|000003c0| 20 2a 0d 20 2a 20 43 6f | 6e 74 72 69 62 75 74 6f | *. * Co|ntributo|
|000003d0| 72 28 73 29 3a 0d 20 2a | 09 09 4c 61 6e 65 20 52 |r(s):. *|..Lane R|
|000003e0| 6f 61 74 68 65 20 28 4c | 52 29 0d 20 2a 09 09 4e |oathe (L|R). *..N|
|000003f0| 69 63 6b 20 53 68 61 6e | 6b 73 20 28 4e 53 29 0d |ick Shan|ks (NS).|
|00000400| 20 2a 09 09 53 63 6f 74 | 74 20 45 2e 20 4c 61 73 | *..Scot|t E. Las|
|00000410| 6c 65 79 20 28 53 45 4c | 29 20 0d 20 2a 09 09 42 |ley (SEL|) . *..B|
|00000420| 72 69 61 6e 20 42 65 72 | 67 73 74 72 61 6e 64 20 |rian Ber|gstrand |
|00000430| 28 42 42 29 20 0d 20 2a | 09 09 45 72 69 63 20 46 |(BB) . *|..Eric F|
|00000440| 72 6f 65 6d 6c 69 6e 67 | 20 28 45 46 29 0d 20 2a |roemling| (EF). *|
|00000450| 2f 0d 0d 2f 2f 20 30 35 | 2f 31 30 2f 30 31 20 2d |/..// 05|/10/01 -|
|00000460| 20 47 41 42 3a 20 4d 50 | 57 20 65 6e 76 69 72 6f | GAB: MP|W enviro|
|00000470| 6e 6d 65 6e 74 20 73 75 | 70 70 6f 72 74 0d 23 69 |nment su|pport.#i|
|00000480| 66 64 65 66 20 5f 5f 4d | 50 57 5f 5f 0d 23 69 6e |fdef __M|PW__.#in|
|00000490| 63 6c 75 64 65 20 22 4d | 50 57 49 6e 63 6c 75 64 |clude "M|PWInclud|
|000004a0| 65 73 2e 68 22 0d 23 65 | 6e 64 69 66 0d 0d 23 69 |es.h".#e|ndif..#i|
|000004b0| 66 64 65 66 20 5f 5f 4d | 57 45 52 4b 53 5f 5f 0d |fdef __M|WERKS__.|
|000004c0| 20 20 20 20 23 69 6e 63 | 6c 75 64 65 20 3c 64 65 | #inc|lude <de|
|000004d0| 62 75 67 67 69 6e 67 2e | 68 3e 0d 23 65 6c 73 65 |bugging.|h>.#else|
|000004e0| 0d 20 20 20 20 2f 2f 23 | 69 6e 63 6c 75 64 65 20 |. //#|include |
|000004f0| 3c 46 6c 61 74 43 61 72 | 62 6f 6e 2f 44 65 62 75 |<FlatCar|bon/Debu|
|00000500| 67 67 69 6e 67 2e 68 3e | 0d 20 20 20 20 2f 2f 23 |gging.h>|. //#|
|00000510| 69 6e 63 6c 75 64 65 20 | 3c 43 6f 72 65 53 65 72 |include |<CoreSer|
|00000520| 76 69 63 65 73 2f 43 6f | 72 65 53 65 72 76 69 63 |vices/Co|reServic|
|00000530| 65 73 2e 68 3e 0d 23 65 | 6e 64 69 66 0d 0d 23 69 |es.h>.#e|ndif..#i|
|00000540| 6e 63 6c 75 64 65 20 22 | 4d 61 69 6e 2e 68 22 0d |nclude "|Main.h".|
|00000550| 23 69 6e 63 6c 75 64 65 | 20 22 4d 65 6e 75 73 2e |#include| "Menus.|
|00000560| 68 22 0d 23 69 6e 63 6c | 75 64 65 20 22 50 72 65 |h".#incl|ude "Pre|
|00000570| 66 73 2e 68 22 0d 23 69 | 6e 63 6c 75 64 65 20 22 |fs.h".#i|nclude "|
|00000580| 55 74 69 6c 69 74 79 2e | 68 22 0d 23 69 6e 63 6c |Utility.|h".#incl|
|00000590| 75 64 65 20 22 45 64 69 | 74 57 69 6e 64 6f 77 2e |ude "Edi|tWindow.|
|000005a0| 68 22 0d 23 69 6e 63 6c | 75 64 65 20 22 45 64 69 |h".#incl|ude "Edi|
|000005b0| 74 52 6f 75 74 69 6e 65 | 73 2e 68 22 0d 23 69 6e |tRoutine|s.h".#in|
|000005c0| 63 6c 75 64 65 20 22 45 | 64 69 74 53 63 72 6f 6c |clude "E|ditScrol|
|000005d0| 6c 62 61 72 2e 68 22 0d | 23 69 6e 63 6c 75 64 65 |lbar.h".|#include|
|000005e0| 20 22 48 65 78 43 6f 6d | 70 61 72 65 2e 68 22 0d | "HexCom|pare.h".|
|000005f0| 23 69 6e 63 6c 75 64 65 | 20 22 48 65 78 53 65 61 |#include| "HexSea|
|00000600| 72 63 68 2e 68 22 0d 0d | 2f 2f 20 73 65 74 20 75 |rch.h"..|// set u|
|00000610| 70 20 67 6c 6f 62 61 6c | 20 26 20 67 50 72 65 66 |p global| & gPref|
|00000620| 73 20 73 74 72 75 63 74 | 75 72 65 73 20 68 65 72 |s struct|ures her|
|00000630| 65 0d 67 6c 6f 62 61 6c | 73 20 67 3b 0d 70 72 65 |e.global|s g;.pre|
|00000640| 66 73 5f 74 20 67 50 72 | 65 66 73 3b 0d 0d 2f 2f |fs_t gPr|efs;..//|
|00000650| 20 4c 52 3a 20 2d 2d 2d | 20 54 68 65 73 65 20 61 | LR: ---| These a|
|00000660| 72 65 20 75 73 65 64 20 | 74 6f 20 73 65 74 75 70 |re used |to setup|
|00000670| 20 6e 65 77 20 55 50 50 | 20 73 74 75 66 66 20 2d | new UPP| stuff -|
|00000680| 2d 2d 0d 41 45 45 76 65 | 6e 74 48 61 6e 64 6c 65 |--.AEEve|ntHandle|
|00000690| 72 55 50 50 20 41 45 48 | 61 6e 64 6c 65 72 55 50 |rUPP AEH|andlerUP|
|000006a0| 50 2c 20 41 45 43 6f 6d | 70 61 72 65 48 61 6e 64 |P, AECom|pareHand|
|000006b0| 6c 65 72 55 50 50 3b 0d | 0d 23 69 66 20 21 54 41 |lerUPP;.|.#if !TA|
|000006c0| 52 47 45 54 5f 41 50 49 | 5f 4d 41 43 5f 43 41 52 |RGET_API|_MAC_CAR|
|000006d0| 42 4f 4e 09 2f 2f 20 4c | 52 3a 20 76 31 2e 36 0d |BON.// L|R: v1.6.|
|000006e0| 09 65 78 74 65 72 6e 20 | 44 6c 67 48 6f 6f 6b 55 |.extern |DlgHookU|
|000006f0| 50 50 20 6d 79 47 65 74 | 46 69 6c 65 55 50 50 3b |PP myGet|FileUPP;|
|00000700| 0d 23 65 6e 64 69 66 0d | 0d 2f 2f 4c 52 20 31 37 |.#endif.|.//LR 17|
|00000710| 37 20 65 78 74 65 72 6e | 20 53 49 6e 74 31 36 09 |7 extern| SInt16.|
|00000720| 09 43 6f 6d 70 61 72 65 | 46 6c 61 67 3b 0d 65 78 |.Compare|Flag;.ex|
|00000730| 74 65 72 6e 20 57 69 6e | 64 6f 77 52 65 66 09 43 |tern Win|dowRef.C|
|00000740| 6f 6d 70 57 69 6e 64 31 | 2c 20 43 6f 6d 70 57 69 |ompWind1|, CompWi|
|00000750| 6e 64 32 3b 0d 73 74 61 | 74 69 63 20 53 49 6e 74 |nd2;.sta|tic SInt|
|00000760| 33 32 09 09 63 61 72 65 | 74 54 69 6d 65 3b 0d 73 |32..care|tTime;.s|
|00000770| 74 61 74 69 63 20 42 6f | 6f 6c 65 61 6e 09 09 73 |tatic Bo|olean..s|
|00000780| 6b 69 70 4f 70 65 6e 20 | 3d 20 66 61 6c 73 65 3b |kipOpen |= false;|
|00000790| 0d 0d 2f 2f 20 30 35 2f | 31 30 2f 30 31 20 2d 20 |..// 05/|10/01 - |
|000007a0| 47 41 42 3a 20 71 64 20 | 6d 75 73 74 20 62 65 20 |GAB: qd |must be |
|000007b0| 73 75 70 70 6c 69 65 64 | 20 62 79 20 49 6e 74 65 |supplied| by Inte|
|000007c0| 72 66 61 63 65 2e 6f 20 | 61 70 70 6c 69 63 61 74 |rface.o |applicat|
|000007d0| 69 6f 6e 73 0d 23 69 66 | 20 21 5f 5f 4d 57 45 52 |ions.#if| !__MWER|
|000007e0| 4b 53 5f 5f 20 26 26 20 | 21 54 41 52 47 45 54 5f |KS__ && |!TARGET_|
|000007f0| 41 50 49 5f 4d 41 43 5f | 43 41 52 42 4f 4e 0d 51 |API_MAC_|CARBON.Q|
|00000800| 44 47 6c 6f 62 61 6c 73 | 09 71 64 3b 0d 23 65 6e |DGlobals|.qd;.#en|
|00000810| 64 69 66 0d 0d 2f 2f 20 | 44 6f 20 49 64 6c 65 20 |dif..// |Do Idle |
|00000820| 54 69 6d 65 20 50 72 6f | 63 65 73 73 69 6e 67 0d |Time Pro|cessing.|
|00000830| 0d 2f 2a 2a 2a 20 49 44 | 4c 45 20 4f 42 4a 45 43 |./*** ID|LE OBJEC|
|00000840| 54 53 20 2a 2a 2a 2f 0d | 73 74 61 74 69 63 20 4f |TS ***/.|static O|
|00000850| 53 53 74 61 74 75 73 20 | 5f 69 64 6c 65 4f 62 6a |SStatus |_idleObj|
|00000860| 65 63 74 73 28 20 45 76 | 65 6e 74 52 65 63 6f 72 |ects( Ev|entRecor|
|00000870| 64 20 2a 65 72 20 29 0d | 7b 0d 09 57 69 6e 64 6f |d *er ).|{..Windo|
|00000880| 77 52 65 66 20 74 68 65 | 57 69 6e 20 3d 20 46 72 |wRef the|Win = Fr|
|00000890| 6f 6e 74 4e 6f 6e 46 6c | 6f 61 74 69 6e 67 57 69 |ontNonFl|oatingWi|
|000008a0| 6e 64 6f 77 28 29 3b 0d | 09 4f 62 6a 65 63 74 57 |ndow();.|.ObjectW|
|000008b0| 69 6e 64 6f 77 50 74 72 | 20 6f 62 6a 65 63 74 57 |indowPtr| objectW|
|000008c0| 69 6e 64 6f 77 3b 0d 0d | 09 77 68 69 6c 65 28 20 |indow;..|.while( |
|000008d0| 74 68 65 57 69 6e 20 29 | 0d 09 7b 0d 09 09 6f 62 |theWin )|..{...ob|
|000008e0| 6a 65 63 74 57 69 6e 64 | 6f 77 20 3d 20 28 4f 62 |jectWind|ow = (Ob|
|000008f0| 6a 65 63 74 57 69 6e 64 | 6f 77 50 74 72 29 47 65 |jectWind|owPtr)Ge|
|00000900| 74 57 52 65 66 43 6f 6e | 28 20 74 68 65 57 69 6e |tWRefCon|( theWin|
|00000910| 20 29 3b 09 2f 2f 4c 52 | 3a 20 31 2e 36 36 20 2d | );.//LR|: 1.66 -|
|00000920| 20 64 6f 6e 27 74 20 75 | 73 65 20 4e 55 4c 4c 20 | don't u|se NULL |
|00000930| 77 69 6e 64 6f 77 2c 20 | 61 6e 64 20 75 70 64 61 |window, |and upda|
|00000940| 74 65 20 66 6f 72 20 61 | 6c 6c 20 77 69 6e 64 6f |te for a|ll windo|
|00000950| 77 73 21 0d 0d 09 09 69 | 66 28 20 47 65 74 57 69 |ws!....i|f( GetWi|
|00000960| 6e 64 6f 77 4b 69 6e 64 | 28 20 74 68 65 57 69 6e |ndowKind|( theWin|
|00000970| 20 29 20 3d 3d 20 6b 48 | 65 78 45 64 69 74 57 69 | ) == kH|exEditWi|
|00000980| 6e 64 6f 77 54 61 67 20 | 26 26 20 6f 62 6a 65 63 |ndowTag |&& objec|
|00000990| 74 57 69 6e 64 6f 77 2d | 3e 49 64 6c 65 20 29 0d |tWindow-|>Idle ).|
|000009a0| 09 09 09 6f 62 6a 65 63 | 74 57 69 6e 64 6f 77 2d |...objec|tWindow-|
|000009b0| 3e 49 64 6c 65 28 20 74 | 68 65 57 69 6e 2c 20 65 |>Idle( t|heWin, e|
|000009c0| 72 20 29 3b 0d 0d 09 09 | 74 68 65 57 69 6e 20 3d |r );....|theWin =|
|000009d0| 20 47 65 74 4e 65 78 74 | 57 69 6e 64 6f 77 28 20 | GetNext|Window( |
|000009e0| 74 68 65 57 69 6e 20 29 | 3b 0d 09 7d 0d 09 72 65 |theWin )|;..}..re|
|000009f0| 74 75 72 6e 28 20 6e 6f | 45 72 72 20 29 3b 0d 7d |turn( no|Err );.}|
|00000a00| 0d 0d 2f 2f 20 54 68 65 | 20 4d 61 69 6e 20 45 76 |..// The| Main Ev|
|00000a10| 65 6e 74 20 44 69 73 70 | 61 74 63 68 65 72 20 2d |ent Disp|atcher -|
|00000a20| 20 74 68 69 73 20 72 6f | 75 74 69 6e 65 20 73 68 | this ro|utine sh|
|00000a30| 6f 75 6c 64 20 62 65 20 | 63 61 6c 6c 65 64 20 72 |ould be |called r|
|00000a40| 65 70 65 61 74 65 64 6c | 79 0d 0d 2f 2a 2a 2a 20 |epeatedl|y../*** |
|00000a50| 48 41 4e 44 4c 45 20 45 | 56 45 4e 54 20 2a 2a 2a |HANDLE E|VENT ***|
|00000a60| 2f 0d 4f 53 53 74 61 74 | 75 73 20 48 61 6e 64 6c |/.OSStat|us Handl|
|00000a70| 65 45 76 65 6e 74 28 20 | 76 6f 69 64 20 29 0d 7b |eEvent( |void ).{|
|00000a80| 0d 09 45 76 65 6e 74 52 | 65 63 6f 72 64 09 74 68 |..EventR|ecord.th|
|00000a90| 65 45 76 65 6e 74 3b 0d | 09 42 6f 6f 6c 65 61 6e |eEvent;.|.Boolean|
|00000aa0| 09 09 6f 6b 3b 0d 0d 09 | 2f 2f 20 49 66 20 74 68 |..ok;...|// If th|
|00000ab0| 65 20 6d 6f 72 65 20 6d | 6f 64 65 72 6e 20 57 61 |e more m|odern Wa|
|00000ac0| 69 74 4e 65 78 74 45 76 | 65 6e 74 20 69 73 20 69 |itNextEv|ent is i|
|00000ad0| 6d 70 6c 65 6d 65 6e 74 | 65 64 2c 20 75 73 65 20 |mplement|ed, use |
|00000ae0| 69 74 20 0d 0d 23 69 66 | 20 54 41 52 47 45 54 5f |it ..#if| TARGET_|
|00000af0| 41 50 49 5f 4d 41 43 5f | 43 41 52 42 4f 4e 09 2f |API_MAC_|CARBON./|
|00000b00| 2f 20 4c 52 3a 20 76 31 | 2e 36 0d 09 6f 6b 20 3d |/ LR: v1|.6..ok =|
|00000b10| 20 57 61 69 74 4e 65 78 | 74 45 76 65 6e 74 28 20 | WaitNex|tEvent( |
|00000b20| 65 76 65 72 79 45 76 65 | 6e 74 2c 20 26 74 68 65 |everyEve|nt, &the|
|00000b30| 45 76 65 6e 74 2c 20 63 | 61 72 65 74 54 69 6d 65 |Event, c|aretTime|
|00000b40| 2c 20 4e 55 4c 4c 20 29 | 3b 0d 23 65 6c 73 65 0d |, NULL )|;.#else.|
|00000b50| 09 69 66 28 20 67 2e 57 | 4e 45 49 6d 70 6c 65 6d |.if( g.W|NEImplem|
|00000b60| 65 6e 74 65 64 20 29 0d | 09 09 2f 2f 20 57 65 20 |ented ).|..// We |
|00000b70| 64 6f 6e 27 74 20 68 61 | 76 65 20 74 6f 20 63 61 |don't ha|ve to ca|
|00000b80| 6c 6c 20 53 79 73 74 65 | 6d 54 61 73 6b 20 62 65 |ll Syste|mTask be|
|00000b90| 63 61 75 73 65 20 57 61 | 69 74 4e 65 78 74 45 76 |cause Wa|itNextEv|
|00000ba0| 65 6e 74 20 63 61 6c 6c | 73 20 69 74 20 66 6f 72 |ent call|s it for|
|00000bb0| 20 75 73 0d 09 09 2f 2f | 20 47 65 74 20 74 68 65 | us...//| Get the|
|00000bc0| 20 6e 65 78 74 20 65 76 | 65 6e 74 20 28 20 4c 52 | next ev|ent ( LR|
|00000bd0| 20 39 38 30 37 31 36 3a | 20 67 69 76 65 20 75 70 | 980716:| give up|
|00000be0| 20 6c 6f 74 73 20 6f 66 | 20 74 69 6d 65 2c 20 27 | lots of| time, '|
|00000bf0| 63 6f 73 20 77 65 20 64 | 6f 6e 27 74 20 6e 65 65 |cos we d|on't nee|
|00000c00| 64 20 69 74 20 3a 20 29 | 0d 09 09 6f 6b 20 3d 20 |d it : )|...ok = |
|00000c10| 57 61 69 74 4e 65 78 74 | 45 76 65 6e 74 28 20 65 |WaitNext|Event( e|
|00000c20| 76 65 72 79 45 76 65 6e | 74 2c 20 26 74 68 65 45 |veryEven|t, &theE|
|00000c30| 76 65 6e 74 2c 20 63 61 | 72 65 74 54 69 6d 65 2c |vent, ca|retTime,|
|00000c40| 20 4e 55 4c 4c 20 29 3b | 0d 09 65 6c 73 65 0d 09 | NULL );|..else..|
|00000c50| 7b 0d 09 09 2f 2f 20 77 | 65 20 61 72 65 20 72 75 |{...// w|e are ru|
|00000c60| 6e 6e 69 6e 67 20 69 6e | 20 28 20 53 69 6e 67 6c |nning in| ( Singl|
|00000c70| 65 20 29 20 46 69 6e 64 | 65 72 20 75 6e 64 65 72 |e ) Find|er under|
|00000c80| 20 73 79 73 74 65 6d 20 | 36 20 6f 72 20 6c 65 73 | system |6 or les|
|00000c90| 73 0d 09 09 2f 2f 20 47 | 69 76 65 20 44 65 73 6b |s...// G|ive Desk|
|00000ca0| 20 41 63 63 65 73 73 6f | 72 69 65 73 20 73 6f 6d | Accesso|ries som|
|00000cb0| 65 20 70 72 6f 63 65 73 | 73 69 6e 67 20 74 69 6d |e proces|sing tim|
|00000cc0| 65 0d 09 09 53 79 73 74 | 65 6d 54 61 73 6b 20 28 |e...Syst|emTask (|
|00000cd0| 29 3b 0d 0d 09 09 2f 2f | 20 47 65 74 20 74 68 65 |);....//| Get the|
|00000ce0| 20 6e 65 78 74 20 65 76 | 65 6e 74 0d 09 09 6f 6b | next ev|ent...ok|
|00000cf0| 20 3d 20 47 65 74 4e 65 | 78 74 45 76 65 6e 74 28 | = GetNe|xtEvent(|
|00000d00| 20 65 76 65 72 79 45 76 | 65 6e 74 2c 20 26 74 68 | everyEv|ent, &th|
|00000d10| 65 45 76 65 6e 74 20 29 | 3b 0d 09 7d 0d 23 65 6e |eEvent )|;..}.#en|
|00000d20| 64 69 66 0d 0d 09 69 66 | 28 20 49 73 44 69 61 6c |dif...if|( IsDial|
|00000d30| 6f 67 45 76 65 6e 74 28 | 20 26 74 68 65 45 76 65 |ogEvent(| &theEve|
|00000d40| 6e 74 20 29 20 29 09 44 | 6f 4d 6f 64 65 6c 65 73 |nt ) ).D|oModeles|
|00000d50| 73 44 69 61 6c 6f 67 45 | 76 65 6e 74 28 20 26 74 |sDialogE|vent( &t|
|00000d60| 68 65 45 76 65 6e 74 20 | 29 3b 0d 09 65 6c 73 65 |heEvent |);..else|
|00000d70| 20 69 66 28 20 6f 6b 20 | 29 09 09 09 09 09 09 44 | if( ok |)......D|
|00000d80| 6f 45 76 65 6e 74 28 20 | 26 74 68 65 45 76 65 6e |oEvent( |&theEven|
|00000d90| 74 20 29 3b 0d 09 65 6c | 73 65 09 09 09 09 09 09 |t );..el|se......|
|00000da0| 09 09 5f 69 64 6c 65 4f | 62 6a 65 63 74 73 28 20 |.._idleO|bjects( |
|00000db0| 26 74 68 65 45 76 65 6e | 74 20 29 3b 0d 0d 09 72 |&theEven|t );...r|
|00000dc0| 65 74 75 72 6e 20 6e 6f | 45 72 72 3b 0d 7d 0d 0d |eturn no|Err;.}..|
|00000dd0| 0d 2f 2a 2a 2a 20 44 4f | 20 45 56 45 4e 54 20 2a |./*** DO| EVENT *|
|00000de0| 2a 2a 2f 0d 4f 53 53 74 | 61 74 75 73 20 44 6f 45 |**/.OSSt|atus DoE|
|00000df0| 76 65 6e 74 28 20 45 76 | 65 6e 74 52 65 63 6f 72 |vent( Ev|entRecor|
|00000e00| 64 20 2a 74 68 65 45 76 | 65 6e 74 20 29 0d 7b 0d |d *theEv|ent ).{.|
|00000e10| 09 73 68 6f 72 74 20 09 | 09 09 77 69 6e 64 6f 77 |.short .|..window|
|00000e20| 43 6f 64 65 3b 0d 09 57 | 69 6e 64 6f 77 52 65 66 |Code;..W|indowRef|
|00000e30| 09 09 74 68 65 57 69 6e | 3b 0d 09 4f 62 6a 65 63 |..theWin|;..Objec|
|00000e40| 74 57 69 6e 64 6f 77 50 | 74 72 09 6f 62 6a 65 63 |tWindowP|tr.objec|
|00000e50| 74 57 69 6e 64 6f 77 3b | 0d 09 52 65 63 74 09 09 |tWindow;|..Rect..|
|00000e60| 09 77 69 6e 52 65 63 74 | 3b 0d 09 6c 6f 6e 67 09 |.winRect|;..long.|
|00000e70| 09 09 77 69 6e 64 6f 77 | 4b 69 6e 64 3b 0d 0d 09 |..window|Kind;...|
|00000e80| 73 77 69 74 63 68 28 20 | 74 68 65 45 76 65 6e 74 |switch( |theEvent|
|00000e90| 2d 3e 77 68 61 74 20 29 | 0d 09 7b 0d 09 63 61 73 |->what )|..{..cas|
|00000ea0| 65 20 6d 6f 75 73 65 44 | 6f 77 6e 3a 0d 09 09 2f |e mouseD|own:.../|
|00000eb0| 2f 20 46 69 6e 64 20 6f | 75 74 20 77 68 65 72 65 |/ Find o|ut where|
|00000ec0| 20 74 68 65 20 6d 6f 75 | 73 65 20 77 65 6e 74 20 | the mou|se went |
|00000ed0| 64 6f 77 6e 0d 09 09 77 | 69 6e 64 6f 77 43 6f 64 |down...w|indowCod|
|00000ee0| 65 20 3d 20 46 69 6e 64 | 57 69 6e 64 6f 77 20 28 |e = Find|Window (|
|00000ef0| 20 74 68 65 45 76 65 6e | 74 2d 3e 77 68 65 72 65 | theEven|t->where|
|00000f00| 2c 20 26 74 68 65 57 69 | 6e 20 29 3b 0d 0d 09 09 |, &theWi|n );....|
|00000f10| 09 73 77 69 74 63 68 20 | 28 20 77 69 6e 64 6f 77 |.switch |( window|
|00000f20| 43 6f 64 65 20 29 0d 09 | 09 09 7b 0d 23 69 66 20 |Code )..|..{.#if |
|00000f30| 21 54 41 52 47 45 54 5f | 41 50 49 5f 4d 41 43 5f |!TARGET_|API_MAC_|
|00000f40| 43 41 52 42 4f 4e 09 2f | 2f 20 4c 52 3a 20 76 31 |CARBON./|/ LR: v1|
|00000f50| 2e 36 0d 09 09 09 63 61 | 73 65 20 69 6e 53 79 73 |.6....ca|se inSys|
|00000f60| 57 69 6e 64 6f 77 3a 0d | 09 09 09 09 53 79 73 74 |Window:.|....Syst|
|00000f70| 65 6d 43 6c 69 63 6b 20 | 28 20 74 68 65 45 76 65 |emClick |( theEve|
|00000f80| 6e 74 2c 20 74 68 65 57 | 69 6e 20 29 3b 0d 09 09 |nt, theW|in );...|
|00000f90| 09 09 62 72 65 61 6b 3b | 0d 23 65 6e 64 69 66 0d |..break;|.#endif.|
|00000fa0| 09 09 09 09 0d 09 09 09 | 63 61 73 65 20 69 6e 4d |........|case inM|
|00000fb0| 65 6e 75 42 61 72 3a 0d | 09 09 09 09 41 64 6a 75 |enuBar:.|....Adju|
|00000fc0| 73 74 4d 65 6e 75 73 28 | 29 3b 0d 09 09 09 09 48 |stMenus(|);.....H|
|00000fd0| 61 6e 64 6c 65 4d 65 6e | 75 28 20 4d 65 6e 75 53 |andleMen|u( MenuS|
|00000fe0| 65 6c 65 63 74 28 20 74 | 68 65 45 76 65 6e 74 2d |elect( t|heEvent-|
|00000ff0| 3e 77 68 65 72 65 20 29 | 2c 20 74 68 65 45 76 65 |>where )|, theEve|
|00001000| 6e 74 2d 3e 6d 6f 64 69 | 66 69 65 72 73 20 29 3b |nt->modi|fiers );|
|00001010| 0d 09 09 09 09 62 72 65 | 61 6b 3b 0d 0d 09 09 09 |.....bre|ak;.....|
|00001020| 64 65 66 61 75 6c 74 3a | 09 09 09 2f 2f 20 43 75 |default:|...// Cu|
|00001030| 72 73 6f 72 20 77 61 73 | 20 69 6e 73 69 64 65 20 |rsor was| inside |
|00001040| 6f 75 72 20 74 68 65 57 | 69 6e 0d 09 09 09 7b 0d |our theW|in....{.|
|00001050| 09 09 09 09 73 77 69 74 | 63 68 20 28 20 77 69 6e |....swit|ch ( win|
|00001060| 64 6f 77 43 6f 64 65 20 | 29 0d 09 09 09 09 7b 0d |dowCode |).....{.|
|00001070| 09 09 09 09 09 63 61 73 | 65 20 69 6e 43 6f 6e 74 |.....cas|e inCont|
|00001080| 65 6e 74 3a 09 2f 2f 45 | 46 20 31 38 30 20 2d 2d |ent:.//E|F 180 --|
|00001090| 20 63 6f 72 72 65 63 74 | 6c 79 20 68 61 6e 64 6c | correct|ly handl|
|000010a0| 65 20 73 65 6c 65 63 74 | 69 6e 67 20 77 69 6e 64 |e select|ing wind|
|000010b0| 6f 77 73 0d 09 09 09 09 | 09 7b 0d 09 09 09 09 09 |ows.....|.{......|
|000010c0| 09 2f 2f 20 49 66 20 74 | 68 65 20 74 68 65 57 69 |.// If t|he theWi|
|000010d0| 6e 20 69 73 6e 27 74 20 | 69 6e 20 74 68 65 20 66 |n isn't |in the f|
|000010e0| 72 6f 6e 74 0d 09 09 09 | 09 09 09 69 66 28 20 74 |ront....|...if( t|
|000010f0| 68 65 57 69 6e 20 21 3d | 20 46 72 6f 6e 74 4e 6f |heWin !=| FrontNo|
|00001100| 6e 46 6c 6f 61 74 69 6e | 67 57 69 6e 64 6f 77 28 |nFloatin|gWindow(|
|00001110| 29 20 29 0d 09 09 09 09 | 09 09 7b 0d 09 09 09 09 |) ).....|..{.....|
|00001120| 09 09 09 2f 2f 20 4d 61 | 6b 65 20 69 74 20 73 6f |...// Ma|ke it so|
|00001130| 2e 2e 2e 0d 09 09 09 09 | 09 09 09 53 65 6c 65 63 |........|...Selec|
|00001140| 74 57 69 6e 64 6f 77 28 | 20 74 68 65 57 69 6e 20 |tWindow(| theWin |
|00001150| 29 3b 0d 09 09 09 09 09 | 09 09 41 64 6a 75 73 74 |);......|..Adjust|
|00001160| 4d 65 6e 75 73 28 29 3b | 0d 09 09 09 09 09 09 7d |Menus();|.......}|
|00001170| 0d 09 09 09 09 09 09 65 | 6c 73 65 09 2f 2f 20 57 |.......e|lse.// W|
|00001180| 69 6e 64 6f 77 20 69 73 | 20 61 6c 72 65 61 64 79 |indow is| already|
|00001190| 20 69 6e 20 74 68 65 20 | 66 72 6f 6e 74 2c 20 68 | in the |front, h|
|000011a0| 61 6e 64 6c 65 20 74 68 | 65 20 63 6c 69 63 6b 0d |andle th|e click.|
|000011b0| 09 09 09 09 09 09 7b 0d | 09 09 09 09 09 09 09 77 |......{.|.......w|
|000011c0| 69 6e 64 6f 77 4b 69 6e | 64 20 3d 20 47 65 74 57 |indowKin|d = GetW|
|000011d0| 69 6e 64 6f 77 4b 69 6e | 64 28 20 74 68 65 57 69 |indowKin|d( theWi|
|000011e0| 6e 20 29 3b 0d 09 09 09 | 09 09 09 09 6f 62 6a 65 |n );....|....obje|
|000011f0| 63 74 57 69 6e 64 6f 77 | 20 3d 20 28 4f 62 6a 65 |ctWindow| = (Obje|
|00001200| 63 74 57 69 6e 64 6f 77 | 50 74 72 29 20 47 65 74 |ctWindow|Ptr) Get|
|00001210| 57 52 65 66 43 6f 6e 28 | 20 74 68 65 57 69 6e 20 |WRefCon(| theWin |
|00001220| 29 3b 0d 0d 09 09 09 09 | 09 09 09 69 66 28 20 77 |);......|...if( w|
|00001230| 69 6e 64 6f 77 4b 69 6e | 64 20 3d 3d 20 6b 48 65 |indowKin|d == kHe|
|00001240| 78 45 64 69 74 57 69 6e | 64 6f 77 54 61 67 20 26 |xEditWin|dowTag &|
|00001250| 26 20 6f 62 6a 65 63 74 | 57 69 6e 64 6f 77 2d 3e |& object|Window->|
|00001260| 48 61 6e 64 6c 65 43 6c | 69 63 6b 20 29 0d 09 09 |HandleCl|ick )...|
|00001270| 09 09 09 09 09 09 6f 62 | 6a 65 63 74 57 69 6e 64 |......ob|jectWind|
|00001280| 6f 77 2d 3e 48 61 6e 64 | 6c 65 43 6c 69 63 6b 28 |ow->Hand|leClick(|
|00001290| 20 74 68 65 57 69 6e 2c | 20 74 68 65 45 76 65 6e | theWin,| theEven|
|000012a0| 74 2d 3e 77 68 65 72 65 | 2c 20 74 68 65 45 76 65 |t->where|, theEve|
|000012b0| 6e 74 20 29 3b 0d 09 09 | 09 09 09 09 7d 0d 09 09 |nt );...|....}...|
|000012c0| 09 09 09 09 62 72 65 61 | 6b 3b 0d 09 09 09 09 09 |....brea|k;......|
|000012d0| 7d 0d 0d 09 09 09 09 09 | 63 61 73 65 20 69 6e 44 |}.......|case inD|
|000012e0| 72 61 67 3a 0d 09 09 09 | 09 09 7b 0d 09 09 09 09 |rag:....|..{.....|
|000012f0| 09 09 52 65 63 74 09 64 | 72 61 67 52 65 63 74 3b |..Rect.d|ragRect;|
|00001300| 0d 23 69 66 20 54 41 52 | 47 45 54 5f 41 50 49 5f |.#if TAR|GET_API_|
|00001310| 4d 41 43 5f 43 41 52 42 | 4f 4e 09 2f 2f 20 4c 52 |MAC_CARB|ON.// LR|
|00001320| 3a 20 76 31 2e 36 0d 09 | 09 09 09 09 09 42 69 74 |: v1.6..|.....Bit|
|00001330| 4d 61 70 20 71 64 53 63 | 72 65 65 6e 42 69 74 73 |Map qdSc|reenBits|
|00001340| 3b 0d 0d 09 09 09 09 09 | 09 47 65 74 51 44 47 6c |;.......|.GetQDGl|
|00001350| 6f 62 61 6c 73 53 63 72 | 65 65 6e 42 69 74 73 28 |obalsScr|eenBits(|
|00001360| 20 26 71 64 53 63 72 65 | 65 6e 42 69 74 73 20 29 | &qdScre|enBits )|
|00001370| 3b 0d 09 09 09 09 09 09 | 64 72 61 67 52 65 63 74 |;.......|dragRect|
|00001380| 20 3d 20 71 64 53 63 72 | 65 65 6e 42 69 74 73 2e | = qdScr|eenBits.|
|00001390| 62 6f 75 6e 64 73 3b 0d | 23 65 6c 73 65 0d 09 09 |bounds;.|#else...|
|000013a0| 09 09 09 09 64 72 61 67 | 52 65 63 74 20 3d 20 71 |....drag|Rect = q|
|000013b0| 64 2e 73 63 72 65 65 6e | 42 69 74 73 2e 62 6f 75 |d.screen|Bits.bou|
|000013c0| 6e 64 73 3b 09 2f 2f 20 | 4c 52 3a 20 71 64 2e 0d |nds;.// |LR: qd..|
|000013d0| 23 65 6e 64 69 66 0d 09 | 09 09 09 09 09 2f 2f 20 |#endif..|.....// |
|000013e0| 48 61 6e 64 6c 65 20 74 | 68 65 20 64 72 61 67 67 |Handle t|he dragg|
|000013f0| 69 6e 67 20 6f 66 20 74 | 68 65 20 74 68 65 57 69 |ing of t|he theWi|
|00001400| 6e 0d 09 09 09 09 09 09 | 44 72 61 67 57 69 6e 64 |n.......|DragWind|
|00001410| 6f 77 28 20 74 68 65 57 | 69 6e 2c 20 74 68 65 45 |ow( theW|in, theE|
|00001420| 76 65 6e 74 2d 3e 77 68 | 65 72 65 2c 20 26 64 72 |vent->wh|ere, &dr|
|00001430| 61 67 52 65 63 74 20 29 | 3b 0d 0d 09 09 09 09 09 |agRect )|;.......|
|00001440| 09 62 72 65 61 6b 3b 0d | 09 09 09 09 09 7d 0d 0d |.break;.|.....}..|
|00001450| 09 09 09 09 09 20 63 61 | 73 65 20 69 6e 47 6f 41 |..... ca|se inGoA|
|00001460| 77 61 79 3a 0d 09 09 09 | 09 09 09 69 66 28 20 54 |way:....|...if( T|
|00001470| 72 61 63 6b 47 6f 41 77 | 61 79 28 20 74 68 65 57 |rackGoAw|ay( theW|
|00001480| 69 6e 2c 20 74 68 65 45 | 76 65 6e 74 2d 3e 77 68 |in, theE|vent->wh|
|00001490| 65 72 65 20 29 20 29 0d | 09 09 09 09 09 09 7b 0d |ere ) ).|......{.|
|000014a0| 09 09 09 09 09 09 09 2f | 2f 20 49 66 20 6d 6f 75 |......./|/ If mou|
|000014b0| 73 65 20 69 73 20 72 65 | 6c 65 61 73 65 64 20 69 |se is re|leased i|
|000014c0| 6e 73 69 64 65 20 74 68 | 65 20 63 6c 6f 73 65 20 |nside th|e close |
|000014d0| 62 6f 78 0d 09 09 09 09 | 09 09 09 2f 2f 20 48 69 |box.....|...// Hi|
|000014e0| 64 65 20 6f 72 20 63 6c | 6f 73 65 20 74 68 65 20 |de or cl|ose the |
|000014f0| 74 68 65 57 69 6e 0d 09 | 09 09 09 09 09 09 77 69 |theWin..|......wi|
|00001500| 6e 64 6f 77 4b 69 6e 64 | 20 3d 20 47 65 74 57 69 |ndowKind| = GetWi|
|00001510| 6e 64 6f 77 4b 69 6e 64 | 28 20 74 68 65 57 69 6e |ndowKind|( theWin|
|00001520| 20 29 3b 0d 09 09 09 09 | 09 09 09 69 66 28 20 77 | );.....|...if( w|
|00001530| 69 6e 64 6f 77 4b 69 6e | 64 20 3d 3d 20 6b 48 65 |indowKin|d == kHe|
|00001540| 78 45 64 69 74 57 69 6e | 64 6f 77 54 61 67 20 29 |xEditWin|dowTag )|
|00001550| 0d 09 09 09 09 09 09 09 | 7b 0d 09 09 09 09 09 09 |........|{.......|
|00001560| 09 09 43 6c 6f 73 65 45 | 64 69 74 57 69 6e 64 6f |..CloseE|ditWindo|
|00001570| 77 28 20 74 68 65 57 69 | 6e 20 29 3b 0d 09 09 09 |w( theWi|n );....|
|00001580| 09 09 09 09 7d 0d 09 09 | 09 09 09 09 09 65 6c 73 |....}...|.....els|
|00001590| 65 20 69 66 28 20 67 2e | 73 65 61 72 63 68 44 6c |e if( g.|searchDl|
|000015a0| 67 20 26 26 20 74 68 65 | 57 69 6e 20 3d 3d 20 47 |g && the|Win == G|
|000015b0| 65 74 44 69 61 6c 6f 67 | 57 69 6e 64 6f 77 28 20 |etDialog|Window( |
|000015c0| 67 2e 73 65 61 72 63 68 | 44 6c 67 20 29 20 29 09 |g.search|Dlg ) ).|
|000015d0| 09 2f 2f 4c 52 3a 20 31 | 2e 37 20 2d 2d 20 63 6f |.//LR: 1|.7 -- co|
|000015e0| 6d 70 61 72 65 73 20 61 | 6c 73 6f 20 6e 65 65 64 |mpares a|lso need|
|000015f0| 20 47 65 74 44 69 61 6c | 6f 67 57 69 6e 64 6f 77 | GetDial|ogWindow|
|00001600| 21 0d 09 09 09 09 09 09 | 09 7b 0d 2f 2f 20 4c 52 |!.......|.{.// LR|
|00001610| 3a 20 76 31 2e 36 2e 35 | 09 09 09 09 09 44 69 73 |: v1.6.5|.....Dis|
|00001620| 70 6f 73 65 44 69 61 6c | 6f 67 28 20 67 2e 73 65 |poseDial|og( g.se|
|00001630| 61 72 63 68 44 6c 67 20 | 29 3b 0d 2f 2f 20 4c 52 |archDlg |);.// LR|
|00001640| 3a 20 76 31 2e 36 2e 35 | 09 09 09 09 09 67 2e 73 |: v1.6.5|.....g.s|
|00001650| 65 61 72 63 68 44 6c 67 | 20 3d 20 4e 55 4c 4c 3b |earchDlg| = NULL;|
|00001660| 0d 0d 09 09 09 09 09 09 | 09 09 48 69 64 65 57 69 |........|..HideWi|
|00001670| 6e 64 6f 77 28 20 47 65 | 74 44 69 61 6c 6f 67 57 |ndow( Ge|tDialogW|
|00001680| 69 6e 64 6f 77 28 20 67 | 2e 73 65 61 72 63 68 44 |indow( g|.searchD|
|00001690| 6c 67 20 29 20 29 3b 0d | 09 09 09 09 09 09 09 7d |lg ) );.|.......}|
|000016a0| 0d 09 09 09 09 09 09 09 | 65 6c 73 65 20 69 66 28 |........|else if(|
|000016b0| 20 67 2e 67 6f 74 6f 44 | 6c 67 20 26 26 20 74 68 | g.gotoD|lg && th|
|000016c0| 65 57 69 6e 20 3d 3d 20 | 47 65 74 44 69 61 6c 6f |eWin == |GetDialo|
|000016d0| 67 57 69 6e 64 6f 77 28 | 20 67 2e 67 6f 74 6f 44 |gWindow(| g.gotoD|
|000016e0| 6c 67 20 29 20 29 09 09 | 2f 2f 20 4c 52 3a 20 76 |lg ) )..|// LR: v|
|000016f0| 31 2e 36 2e 35 0d 09 09 | 09 09 09 09 09 7b 0d 09 |1.6.5...|.....{..|
|00001700| 09 09 09 09 09 09 09 48 | 69 64 65 57 69 6e 64 6f |.......H|ideWindo|
|00001710| 77 28 20 47 65 74 44 69 | 61 6c 6f 67 57 69 6e 64 |w( GetDi|alogWind|
|00001720| 6f 77 28 20 67 2e 67 6f | 74 6f 44 6c 67 20 29 20 |ow( g.go|toDlg ) |
|00001730| 29 3b 0d 09 09 09 09 09 | 09 09 7d 0d 0d 09 09 09 |);......|..}.....|
|00001740| 09 09 09 09 41 64 6a 75 | 73 74 4d 65 6e 75 73 28 |....Adju|stMenus(|
|00001750| 29 3b 0d 09 09 09 09 09 | 09 7d 0d 09 09 09 09 09 |);......|.}......|
|00001760| 09 62 72 65 61 6b 3b 0d | 0d 09 09 09 09 09 63 61 |.break;.|......ca|
|00001770| 73 65 20 69 6e 47 72 6f | 77 3a 0d 09 09 09 09 09 |se inGro|w:......|
|00001780| 7b 0d 09 09 09 09 09 09 | 6c 6f 6e 67 20 67 72 6f |{.......|long gro|
|00001790| 77 52 65 73 75 6c 74 3b | 0d 09 09 09 09 09 09 52 |wResult;|.......R|
|000017a0| 65 63 74 20 72 3b 0d 0d | 09 09 09 09 09 09 53 65 |ect r;..|......Se|
|000017b0| 6c 65 63 74 57 69 6e 64 | 6f 77 28 20 74 68 65 57 |lectWind|ow( theW|
|000017c0| 69 6e 20 29 3b 0d 09 09 | 09 09 09 09 53 65 74 52 |in );...|....SetR|
|000017d0| 65 63 74 28 20 26 72 2c | 20 6b 48 65 78 57 69 6e |ect( &r,| kHexWin|
|000017e0| 64 6f 77 57 69 64 74 68 | 20 2b 20 31 2c 20 6b 48 |dowWidth| + 1, kH|
|000017f0| 65 61 64 65 72 48 65 69 | 67 68 74 20 2b 20 28 31 |eaderHei|ght + (1|
|00001800| 30 20 2a 20 6b 4c 69 6e | 65 48 65 69 67 68 74 29 |0 * kLin|eHeight)|
|00001810| 2c 20 6b 48 65 78 57 69 | 6e 64 6f 77 57 69 64 74 |, kHexWi|ndowWidt|
|00001820| 68 20 2b 20 31 2c 20 67 | 2e 6d 61 78 48 65 69 67 |h + 1, g|.maxHeig|
|00001830| 68 74 20 29 3b 0d 0d 09 | 09 09 09 09 09 2f 2f 20 |ht );...|.....// |
|00001840| 48 61 6e 64 6c 65 20 74 | 68 65 20 6d 6f 75 73 65 |Handle t|he mouse|
|00001850| 20 74 72 61 63 6b 69 6e | 67 20 66 6f 72 20 74 68 | trackin|g for th|
|00001860| 65 20 72 65 73 69 7a 69 | 6e 67 0d 09 09 09 09 09 |e resizi|ng......|
|00001870| 09 67 72 6f 77 52 65 73 | 75 6c 74 20 3d 20 47 72 |.growRes|ult = Gr|
|00001880| 6f 77 57 69 6e 64 6f 77 | 28 20 74 68 65 57 69 6e |owWindow|( theWin|
|00001890| 2c 20 74 68 65 45 76 65 | 6e 74 2d 3e 77 68 65 72 |, theEve|nt->wher|
|000018a0| 65 2c 20 26 72 20 29 3b | 0d 0d 09 09 09 09 09 09 |e, &r );|........|
|000018b0| 2f 2f 20 43 68 61 6e 67 | 65 20 74 68 65 20 73 69 |// Chang|e the si|
|000018c0| 7a 65 20 6f 66 20 74 68 | 65 20 74 68 65 57 69 6e |ze of th|e theWin|
|000018d0| 0d 09 09 09 09 09 09 53 | 69 7a 65 57 69 6e 64 6f |.......S|izeWindo|
|000018e0| 77 28 20 74 68 65 57 69 | 6e 2c 20 4c 6f 57 6f 72 |w( theWi|n, LoWor|
|000018f0| 64 28 20 67 72 6f 77 52 | 65 73 75 6c 74 20 29 2c |d( growR|esult ),|
|00001900| 20 48 69 57 6f 72 64 28 | 20 67 72 6f 77 52 65 73 | HiWord(| growRes|
|00001910| 75 6c 74 20 29 2c 20 74 | 72 75 65 20 29 3b 0d 0d |ult ), t|rue );..|
|00001920| 09 09 09 09 09 09 2f 2f | 20 4c 52 3a 20 31 2e 37 |......//| LR: 1.7|
|00001930| 20 2d 20 73 65 65 20 69 | 66 20 75 73 65 72 20 77 | - see i|f user w|
|00001940| 61 6e 74 73 20 73 69 7a | 69 6e 67 20 72 65 73 74 |ants siz|ing rest|
|00001950| 72 69 63 74 65 64 20 74 | 6f 20 66 75 6c 6c 20 6c |ricted t|o full l|
|00001960| 69 6e 65 73 0d 09 09 09 | 09 09 09 47 65 74 57 69 |ines....|...GetWi|
|00001970| 6e 64 6f 77 50 6f 72 74 | 42 6f 75 6e 64 73 28 20 |ndowPort|Bounds( |
|00001980| 74 68 65 57 69 6e 2c 20 | 26 72 20 29 3b 0d 09 09 |theWin, |&r );...|
|00001990| 09 09 09 09 69 66 28 20 | 67 50 72 65 66 73 2e 63 |....if( |gPrefs.c|
|000019a0| 6f 6e 73 74 72 61 69 6e | 53 69 7a 65 20 29 0d 09 |onstrain|Size )..|
|000019b0| 09 09 09 09 09 7b 0d 09 | 09 09 09 09 09 09 72 2e |.....{..|......r.|
|000019c0| 62 6f 74 74 6f 6d 20 3d | 20 72 2e 74 6f 70 20 2b |bottom =| r.top +|
|000019d0| 20 28 73 68 6f 72 74 29 | 28 28 28 28 72 2e 62 6f | (short)|((((r.bo|
|000019e0| 74 74 6f 6d 20 2d 20 72 | 2e 74 6f 70 29 20 2f 20 |ttom - r|.top) / |
|000019f0| 6b 4c 69 6e 65 48 65 69 | 67 68 74 29 20 2d 20 31 |kLineHei|ght) - 1|
|00001a00| 29 20 2a 20 6b 4c 69 6e | 65 48 65 69 67 68 74 29 |) * kLin|eHeight)|
|00001a10| 20 2b 20 6b 48 65 61 64 | 65 72 48 65 69 67 68 74 | + kHead|erHeight|
|00001a20| 3b 09 2f 2f 20 66 6f 72 | 63 65 20 74 6f 20 66 75 |;.// for|ce to fu|
|00001a30| 6c 6c 20 6c 69 6e 65 20 | 68 65 69 67 68 74 73 0d |ll line |heights.|
|00001a40| 09 09 09 09 09 09 09 53 | 69 7a 65 57 69 6e 64 6f |.......S|izeWindo|
|00001a50| 77 28 20 74 68 65 57 69 | 6e 2c 20 28 72 2e 72 69 |w( theWi|n, (r.ri|
|00001a60| 67 68 74 20 2d 20 72 2e | 6c 65 66 74 29 2c 20 28 |ght - r.|left), (|
|00001a70| 72 2e 62 6f 74 74 6f 6d | 20 2d 20 72 2e 74 6f 70 |r.bottom| - r.top|
|00001a80| 29 2c 20 74 72 75 65 20 | 29 3b 0d 09 09 09 09 09 |), true |);......|
|00001a90| 09 7d 0d 0d 09 09 09 09 | 09 09 41 64 6a 75 73 74 |.}......|..Adjust|
|00001aa0| 53 63 72 6f 6c 6c 42 61 | 72 73 28 20 74 68 65 57 |ScrollBa|rs( theW|
|00001ab0| 69 6e 2c 20 74 72 75 65 | 20 29 3b 0d 23 69 66 20 |in, true| );.#if |
|00001ac0| 21 54 41 52 47 45 54 5f | 41 50 49 5f 4d 41 43 5f |!TARGET_|API_MAC_|
|00001ad0| 43 41 52 42 4f 4e 09 2f | 2f 20 4c 52 3a 20 76 31 |CARBON./|/ LR: v1|
|00001ae0| 2e 36 0d 2f 2f 20 4c 52 | 3a 20 31 2e 35 09 09 09 |.6.// LR|: 1.5...|
|00001af0| 09 09 44 72 61 77 50 61 | 67 65 28 20 28 45 64 69 |..DrawPa|ge( (Edi|
|00001b00| 74 57 69 6e 64 6f 77 50 | 74 72 29 20 47 65 74 57 |tWindowP|tr) GetW|
|00001b10| 52 65 66 43 6f 6e 28 20 | 74 68 65 57 69 6e 20 29 |RefCon( |theWin )|
|00001b20| 20 29 3b 0d 23 65 6e 64 | 69 66 0d 0d 09 09 09 09 | );.#end|if......|
|00001b30| 09 09 2f 2f 20 52 65 64 | 72 61 77 20 74 68 65 20 |..// Red|raw the |
|00001b40| 74 68 65 57 69 6e 0d 09 | 09 09 09 09 09 53 65 74 |theWin..|.....Set|
|00001b50| 50 6f 72 74 57 69 6e 64 | 6f 77 50 6f 72 74 28 20 |PortWind|owPort( |
|00001b60| 74 68 65 57 69 6e 20 29 | 3b 0d 09 09 09 09 09 09 |theWin )|;.......|
|00001b70| 49 6e 76 61 6c 57 69 6e | 64 6f 77 52 65 63 74 28 |InvalWin|dowRect(|
|00001b80| 20 74 68 65 57 69 6e 2c | 20 26 72 20 29 3b 0d 09 | theWin,| &r );..|
|00001b90| 09 09 09 09 09 62 72 65 | 61 6b 3b 0d 09 09 09 09 |.....bre|ak;.....|
|00001ba0| 09 7d 0d 0d 09 09 09 09 | 09 63 61 73 65 20 69 6e |.}......|.case in|
|00001bb0| 5a 6f 6f 6d 49 6e 3a 0d | 09 09 09 09 09 63 61 73 |ZoomIn:.|.....cas|
|00001bc0| 65 20 69 6e 5a 6f 6f 6d | 4f 75 74 3a 0d 09 09 09 |e inZoom|Out:....|
|00001bd0| 09 09 09 69 66 28 20 54 | 72 61 63 6b 42 6f 78 28 |...if( T|rackBox(|
|00001be0| 20 74 68 65 57 69 6e 2c | 20 74 68 65 45 76 65 6e | theWin,| theEven|
|00001bf0| 74 2d 3e 77 68 65 72 65 | 2c 20 77 69 6e 64 6f 77 |t->where|, window|
|00001c00| 43 6f 64 65 20 29 20 29 | 0d 09 09 09 09 09 09 7b |Code ) )|.......{|
|00001c10| 0d 09 09 09 09 09 09 09 | 47 65 74 57 69 6e 64 6f |........|GetWindo|
|00001c20| 77 50 6f 72 74 42 6f 75 | 6e 64 73 28 20 74 68 65 |wPortBou|nds( the|
|00001c30| 57 69 6e 2c 20 26 77 69 | 6e 52 65 63 74 20 29 3b |Win, &wi|nRect );|
|00001c40| 0d 09 09 09 09 09 09 09 | 53 65 74 50 6f 72 74 57 |........|SetPortW|
|00001c50| 69 6e 64 6f 77 50 6f 72 | 74 28 20 74 68 65 57 69 |indowPor|t( theWi|
|00001c60| 6e 20 29 3b 0d 09 09 09 | 09 09 09 09 45 72 61 73 |n );....|....Eras|
|00001c70| 65 52 65 63 74 28 20 26 | 77 69 6e 52 65 63 74 20 |eRect( &|winRect |
|00001c80| 29 3b 0d 0d 09 09 09 09 | 09 09 09 5a 6f 6f 6d 57 |);......|...ZoomW|
|00001c90| 69 6e 64 6f 77 28 20 74 | 68 65 57 69 6e 2c 20 77 |indow( t|heWin, w|
|00001ca0| 69 6e 64 6f 77 43 6f 64 | 65 2c 20 74 72 75 65 20 |indowCod|e, true |
|00001cb0| 29 3b 0d 09 09 09 09 09 | 09 09 41 64 6a 75 73 74 |);......|..Adjust|
|00001cc0| 53 63 72 6f 6c 6c 42 61 | 72 73 28 20 74 68 65 57 |ScrollBa|rs( theW|
|00001cd0| 69 6e 2c 20 74 72 75 65 | 20 29 3b 0d 0d 09 09 09 |in, true| );.....|
|00001ce0| 09 09 09 09 2f 2f 20 52 | 65 64 72 61 77 20 74 68 |....// R|edraw th|
|00001cf0| 65 20 74 68 65 57 69 6e | 0d 09 09 09 09 09 09 09 |e theWin|........|
|00001d00| 47 65 74 57 69 6e 64 6f | 77 50 6f 72 74 42 6f 75 |GetWindo|wPortBou|
|00001d10| 6e 64 73 28 20 74 68 65 | 57 69 6e 2c 20 26 77 69 |nds( the|Win, &wi|
|00001d20| 6e 52 65 63 74 20 29 3b | 0d 09 09 09 09 09 09 09 |nRect );|........|
|00001d30| 53 65 74 50 6f 72 74 57 | 69 6e 64 6f 77 50 6f 72 |SetPortW|indowPor|
|00001d40| 74 28 20 74 68 65 57 69 | 6e 20 29 3b 0d 09 09 09 |t( theWi|n );....|
|00001d50| 09 09 09 09 49 6e 76 61 | 6c 57 69 6e 64 6f 77 52 |....Inva|lWindowR|
|00001d60| 65 63 74 28 20 74 68 65 | 57 69 6e 2c 20 26 77 69 |ect( the|Win, &wi|
|00001d70| 6e 52 65 63 74 20 29 3b | 0d 09 09 09 09 09 09 7d |nRect );|.......}|
|00001d80| 0d 09 09 09 09 7d 0d 09 | 09 09 7d 0d 09 09 09 62 |.....}..|..}....b|
|00001d90| 72 65 61 6b 3b 0d 09 09 | 7d 0d 09 09 62 72 65 61 |reak;...|}...brea|
|00001da0| 6b 3b 0d 09 09 0d 09 2f | 2f 20 57 61 73 20 61 20 |k;...../|/ Was a |
|00001db0| 6b 65 79 20 70 72 65 73 | 73 65 64 3f 0d 09 63 61 |key pres|sed?..ca|
|00001dc0| 73 65 20 6b 65 79 44 6f | 77 6e 3a 20 0d 09 63 61 |se keyDo|wn: ..ca|
|00001dd0| 73 65 20 61 75 74 6f 4b | 65 79 3a 0d 09 09 2f 2f |se autoK|ey:...//|
|00001de0| 20 57 61 73 20 74 68 65 | 20 63 6d 64 2d 6b 65 79 | Was the| cmd-key|
|00001df0| 20 62 65 69 6e 67 20 68 | 65 6c 64 20 64 6f 77 6e | being h|eld down|
|00001e00| 3f 09 49 66 20 73 6f 2c | 20 70 72 6f 63 65 73 73 |?.If so,| process|
|00001e10| 20 6d 65 6e 75 20 62 61 | 72 20 73 68 6f 72 74 20 | menu ba|r short |
|00001e20| 63 75 74 73 2e 0d 09 09 | 69 66 28 20 28 20 74 68 |cuts....|if( ( th|
|00001e30| 65 45 76 65 6e 74 2d 3e | 6d 6f 64 69 66 69 65 72 |eEvent->|modifier|
|00001e40| 73 20 26 20 63 6d 64 4b | 65 79 20 29 20 21 3d 20 |s & cmdK|ey ) != |
|00001e50| 30 20 29 0d 09 09 7b 0d | 09 09 09 41 64 6a 75 73 |0 )...{.|...Adjus|
|00001e60| 74 4d 65 6e 75 73 28 29 | 3b 0d 09 09 09 48 61 6e |tMenus()|;....Han|
|00001e70| 64 6c 65 4d 65 6e 75 28 | 20 4d 65 6e 75 4b 65 79 |dleMenu(| MenuKey|
|00001e80| 28 20 28 63 68 61 72 29 | 20 28 74 68 65 45 76 65 |( (char)| (theEve|
|00001e90| 6e 74 2d 3e 6d 65 73 73 | 61 67 65 20 26 20 63 68 |nt->mess|age & ch|
|00001ea0| 61 72 43 6f 64 65 4d 61 | 73 6b 29 20 29 2c 20 74 |arCodeMa|sk) ), t|
|00001eb0| 68 65 45 76 65 6e 74 2d | 3e 6d 6f 64 69 66 69 65 |heEvent-|>modifie|
|00001ec0| 72 73 20 29 3b 0d 09 09 | 7d 0d 09 09 65 6c 73 65 |rs );...|}...else|
|00001ed0| 0d 09 09 7b 0d 09 09 09 | 74 68 65 57 69 6e 20 3d |...{....|theWin =|
|00001ee0| 20 46 72 6f 6e 74 4e 6f | 6e 46 6c 6f 61 74 69 6e | FrontNo|nFloatin|
|00001ef0| 67 57 69 6e 64 6f 77 28 | 29 3b 09 2f 2f 4c 52 3a |gWindow(|);.//LR:|
|00001f00| 20 31 2e 36 36 20 64 6f | 6e 27 74 20 75 73 65 20 | 1.66 do|n't use |
|00001f10| 4e 55 4c 4c 20 77 69 6e | 64 6f 77 21 0d 09 09 09 |NULL win|dow!....|
|00001f20| 69 66 28 20 74 68 65 57 | 69 6e 20 29 0d 09 09 09 |if( theW|in )....|
|00001f30| 7b 0d 09 09 09 09 77 69 | 6e 64 6f 77 4b 69 6e 64 |{.....wi|ndowKind|
|00001f40| 20 3d 20 47 65 74 57 69 | 6e 64 6f 77 4b 69 6e 64 | = GetWi|ndowKind|
|00001f50| 28 20 74 68 65 57 69 6e | 20 29 3b 0d 09 09 09 09 |( theWin| );.....|
|00001f60| 6f 62 6a 65 63 74 57 69 | 6e 64 6f 77 20 3d 20 28 |objectWi|ndow = (|
|00001f70| 4f 62 6a 65 63 74 57 69 | 6e 64 6f 77 50 74 72 29 |ObjectWi|ndowPtr)|
|00001f80| 47 65 74 57 52 65 66 43 | 6f 6e 28 20 74 68 65 57 |GetWRefC|on( theW|
|00001f90| 69 6e 20 29 3b 0d 2f 2f | 20 4c 52 3a 20 76 31 2e |in );.//| LR: v1.|
|00001fa0| 36 2e 35 20 57 48 41 54 | 20 54 48 45 3f 3f 3f 09 |6.5 WHAT| THE???.|
|00001fb0| 09 09 6f 62 6a 65 63 74 | 57 69 6e 64 6f 77 2d 3e |..object|Window->|
|00001fc0| 44 69 73 70 6f 73 65 28 | 20 74 68 65 57 69 6e 20 |Dispose(| theWin |
|00001fd0| 29 3b 0d 09 09 09 09 69 | 66 28 20 77 69 6e 64 6f |);.....i|f( windo|
|00001fe0| 77 4b 69 6e 64 20 3d 3d | 20 6b 48 65 78 45 64 69 |wKind ==| kHexEdi|
|00001ff0| 74 57 69 6e 64 6f 77 54 | 61 67 20 26 26 20 6f 62 |tWindowT|ag && ob|
|00002000| 6a 65 63 74 57 69 6e 64 | 6f 77 2d 3e 50 72 6f 63 |jectWind|ow->Proc|
|00002010| 65 73 73 4b 65 79 20 21 | 3d 20 4e 55 4c 4c 20 29 |essKey !|= NULL )|
|00002020| 0d 09 09 09 09 09 6f 62 | 6a 65 63 74 57 69 6e 64 |......ob|jectWind|
|00002030| 6f 77 2d 3e 50 72 6f 63 | 65 73 73 4b 65 79 28 20 |ow->Proc|essKey( |
|00002040| 74 68 65 57 69 6e 2c 20 | 74 68 65 45 76 65 6e 74 |theWin, |theEvent|
|00002050| 20 29 3b 0d 09 09 09 7d | 0d 09 09 7d 0d 09 09 62 | );....}|...}...b|
|00002060| 72 65 61 6b 3b 0d 0d 09 | 2f 2f 20 44 6f 65 73 20 |reak;...|// Does |
|00002070| 61 20 74 68 65 57 69 6e | 20 6e 65 65 64 20 74 6f |a theWin| need to|
|00002080| 20 62 65 20 72 65 64 72 | 61 77 6e 3f 0d 09 63 61 | be redr|awn?..ca|
|00002090| 73 65 20 75 70 64 61 74 | 65 45 76 74 3a 0d 09 7b |se updat|eEvt:..{|
|000020a0| 0d 09 09 74 68 65 57 69 | 6e 20 3d 20 28 57 69 6e |...theWi|n = (Win|
|000020b0| 64 6f 77 52 65 66 29 20 | 74 68 65 45 76 65 6e 74 |dowRef) |theEvent|
|000020c0| 2d 3e 6d 65 73 73 61 67 | 65 3b 0d 0d 09 09 6f 62 |->messag|e;....ob|
|000020d0| 6a 65 63 74 57 69 6e 64 | 6f 77 20 3d 20 28 4f 62 |jectWind|ow = (Ob|
|000020e0| 6a 65 63 74 57 69 6e 64 | 6f 77 50 74 72 29 20 47 |jectWind|owPtr) G|
|000020f0| 65 74 57 52 65 66 43 6f | 6e 28 20 74 68 65 57 69 |etWRefCo|n( theWi|
|00002100| 6e 20 29 3b 0d 09 09 69 | 66 28 20 47 65 74 57 69 |n );...i|f( GetWi|
|00002110| 6e 64 6f 77 4b 69 6e 64 | 28 20 74 68 65 57 69 6e |ndowKind|( theWin|
|00002120| 20 29 20 3d 3d 20 6b 48 | 65 78 45 64 69 74 57 69 | ) == kH|exEditWi|
|00002130| 6e 64 6f 77 54 61 67 20 | 26 26 20 6f 62 6a 65 63 |ndowTag |&& objec|
|00002140| 74 57 69 6e 64 6f 77 2d | 3e 55 70 64 61 74 65 20 |tWindow-|>Update |
|00002150| 29 0d 09 09 09 6f 62 6a | 65 63 74 57 69 6e 64 6f |)....obj|ectWindo|
|00002160| 77 2d 3e 55 70 64 61 74 | 65 28 20 74 68 65 57 69 |w->Updat|e( theWi|
|00002170| 6e 20 29 3b 0d 09 09 62 | 72 65 61 6b 3b 0d 09 7d |n );...b|reak;..}|
|00002180| 0d 0d 09 2f 2f 20 48 61 | 73 20 61 20 74 68 65 57 |...// Ha|s a theW|
|00002190| 69 6e 20 62 65 65 6e 20 | 61 63 74 69 76 61 74 65 |in been |activate|
|000021a0| 64 20 6f 72 20 64 65 61 | 63 74 69 76 61 74 65 64 |d or dea|ctivated|
|000021b0| 3f 0d 09 63 61 73 65 20 | 61 63 74 69 76 61 74 65 |?..case |activate|
|000021c0| 45 76 74 3a 0d 09 09 74 | 68 65 57 69 6e 20 3d 20 |Evt:...t|heWin = |
|000021d0| 28 57 69 6e 64 6f 77 52 | 65 66 29 20 74 68 65 45 |(WindowR|ef) theE|
|000021e0| 76 65 6e 74 2d 3e 6d 65 | 73 73 61 67 65 3b 0d 0d |vent->me|ssage;..|
|000021f0| 09 09 2f 2f 20 46 6f 72 | 63 65 20 69 74 20 74 6f |..// For|ce it to|
|00002200| 20 62 65 20 72 65 64 72 | 61 77 6e 0d 09 09 6f 62 | be redr|awn...ob|
|00002210| 6a 65 63 74 57 69 6e 64 | 6f 77 20 3d 20 28 4f 62 |jectWind|ow = (Ob|
|00002220| 6a 65 63 74 57 69 6e 64 | 6f 77 50 74 72 29 47 65 |jectWind|owPtr)Ge|
|00002230| 74 57 52 65 66 43 6f 6e | 28 20 74 68 65 57 69 6e |tWRefCon|( theWin|
|00002240| 20 29 3b 0d 09 09 69 66 | 28 20 47 65 74 57 69 6e | );...if|( GetWin|
|00002250| 64 6f 77 4b 69 6e 64 28 | 20 74 68 65 57 69 6e 20 |dowKind(| theWin |
|00002260| 29 20 3d 3d 20 6b 48 65 | 78 45 64 69 74 57 69 6e |) == kHe|xEditWin|
|00002270| 64 6f 77 54 61 67 20 26 | 26 20 6f 62 6a 65 63 74 |dowTag &|& object|
|00002280| 57 69 6e 64 6f 77 2d 3e | 41 63 74 69 76 61 74 65 |Window->|Activate|
|00002290| 20 29 0d 09 09 7b 0d 09 | 09 09 42 6f 6f 6c 65 61 | )...{..|..Boolea|
|000022a0| 6e 20 61 63 74 69 76 65 | 20 3d 20 28 74 68 65 45 |n active| = (theE|
|000022b0| 76 65 6e 74 2d 3e 6d 6f | 64 69 66 69 65 72 73 20 |vent->mo|difiers |
|000022c0| 26 20 61 63 74 69 76 65 | 46 6c 61 67 29 3b 0d 09 |& active|Flag);..|
|000022d0| 09 09 6f 62 6a 65 63 74 | 57 69 6e 64 6f 77 2d 3e |..object|Window->|
|000022e0| 41 63 74 69 76 61 74 65 | 28 20 74 68 65 57 69 6e |Activate|( theWin|
|000022f0| 2c 20 61 63 74 69 76 65 | 20 29 3b 0d 0d 09 09 09 |, active| );.....|
|00002300| 69 66 28 20 61 63 74 69 | 76 65 20 26 26 20 67 2e |if( acti|ve && g.|
|00002310| 73 65 61 72 63 68 44 6c | 67 20 29 09 2f 2f 4c 52 |searchDl|g ).//LR|
|00002320| 20 31 2e 37 32 20 2d 2d | 20 69 66 20 61 63 74 69 | 1.72 --| if acti|
|00002330| 76 61 74 69 6e 67 2c 20 | 67 65 74 20 74 65 78 74 |vating, |get text|
|00002340| 20 66 72 6f 6d 20 73 65 | 61 72 63 68 20 64 69 61 | from se|arch dia|
|00002350| 6c 6f 67 0d 09 09 09 7b | 0d 09 09 09 09 47 65 74 |log....{|.....Get|
|00002360| 54 65 78 74 28 20 67 2e | 73 65 61 72 63 68 44 6c |Text( g.|searchDl|
|00002370| 67 2c 20 53 65 61 72 63 | 68 54 65 78 74 49 74 65 |g, Searc|hTextIte|
|00002380| 6d 2c 20 67 2e 73 65 61 | 72 63 68 54 65 78 74 20 |m, g.sea|rchText |
|00002390| 29 3b 0d 09 09 09 09 69 | 66 28 20 21 53 74 72 69 |);.....i|f( !Stri|
|000023a0| 6e 67 54 6f 53 65 61 72 | 63 68 42 75 66 66 65 72 |ngToSear|chBuffer|
|000023b0| 28 20 67 50 72 65 66 73 | 2e 73 65 61 72 63 68 43 |( gPrefs|.searchC|
|000023c0| 61 73 65 20 29 20 29 0d | 09 09 09 09 7b 0d 09 09 |ase ) ).|....{...|
|000023d0| 09 09 09 67 2e 73 65 61 | 72 63 68 54 65 78 74 5b |...g.sea|rchText[|
|000023e0| 30 5d 20 3d 20 67 2e 73 | 65 61 72 63 68 42 75 66 |0] = g.s|earchBuf|
|000023f0| 66 65 72 5b 30 5d 20 3d | 20 30 3b 09 2f 2f 4c 52 |fer[0] =| 0;.//LR|
|00002400| 20 31 2e 37 33 20 2d 2d | 20 6f 6e 20 65 72 72 6f | 1.73 --| on erro|
|00002410| 72 2c 20 6b 65 65 70 20 | 66 72 6f 6d 20 72 65 70 |r, keep |from rep|
|00002420| 65 61 74 69 6e 67 21 0d | 09 09 09 09 09 53 65 74 |eating!.|.....Set|
|00002430| 54 65 78 74 28 20 67 2e | 73 65 61 72 63 68 44 6c |Text( g.|searchDl|
|00002440| 67 2c 20 53 65 61 72 63 | 68 54 65 78 74 49 74 65 |g, Searc|hTextIte|
|00002450| 6d 2c 20 67 2e 73 65 61 | 72 63 68 54 65 78 74 20 |m, g.sea|rchText |
|00002460| 29 3b 0d 09 09 09 09 7d | 0d 09 09 09 7d 0d 09 09 |);.....}|....}...|
|00002470| 7d 0d 09 09 62 72 65 61 | 6b 3b 0d 0d 09 63 61 73 |}...brea|k;...cas|
|00002480| 65 20 6f 73 45 76 74 3a | 0d 09 09 2f 2f 20 46 6f |e osEvt:|...// Fo|
|00002490| 72 63 65 20 69 74 20 74 | 6f 20 62 65 20 72 65 64 |rce it t|o be red|
|000024a0| 72 61 77 6e 0d 09 09 73 | 77 69 74 63 68 20 28 20 |rawn...s|witch ( |
|000024b0| 74 68 65 45 76 65 6e 74 | 2d 3e 6d 65 73 73 61 67 |theEvent|->messag|
|000024c0| 65 20 3e 3e 20 32 34 20 | 29 0d 09 09 7b 0d 09 09 |e >> 24 |)...{...|
|000024d0| 09 63 61 73 65 20 73 75 | 73 70 65 6e 64 52 65 73 |.case su|spendRes|
|000024e0| 75 6d 65 4d 65 73 73 61 | 67 65 3a 0d 09 09 09 09 |umeMessa|ge:.....|
|000024f0| 74 68 65 57 69 6e 20 3d | 20 46 72 6f 6e 74 4e 6f |theWin =| FrontNo|
|00002500| 6e 46 6c 6f 61 74 69 6e | 67 57 69 6e 64 6f 77 28 |nFloatin|gWindow(|
|00002510| 29 3b 0d 09 09 09 09 69 | 66 28 20 74 68 65 57 69 |);.....i|f( theWi|
|00002520| 6e 20 29 0d 09 09 09 09 | 7b 0d 09 09 09 09 09 6f |n ).....|{......o|
|00002530| 62 6a 65 63 74 57 69 6e | 64 6f 77 20 3d 20 28 4f |bjectWin|dow = (O|
|00002540| 62 6a 65 63 74 57 69 6e | 64 6f 77 50 74 72 29 20 |bjectWin|dowPtr) |
|00002550| 47 65 74 57 52 65 66 43 | 6f 6e 28 20 74 68 65 57 |GetWRefC|on( theW|
|00002560| 69 6e 20 29 3b 0d 09 09 | 09 09 09 77 69 6e 64 6f |in );...|...windo|
|00002570| 77 4b 69 6e 64 20 3d 20 | 47 65 74 57 69 6e 64 6f |wKind = |GetWindo|
|00002580| 77 4b 69 6e 64 28 20 74 | 68 65 57 69 6e 20 29 3b |wKind( t|heWin );|
|00002590| 0d 09 09 09 09 09 69 66 | 28 20 77 69 6e 64 6f 77 |......if|( window|
|000025a0| 4b 69 6e 64 20 3d 3d 20 | 6b 48 65 78 45 64 69 74 |Kind == |kHexEdit|
|000025b0| 57 69 6e 64 6f 77 54 61 | 67 20 26 26 20 6f 62 6a |WindowTa|g && obj|
|000025c0| 65 63 74 57 69 6e 64 6f | 77 2d 3e 41 63 74 69 76 |ectWindo|w->Activ|
|000025d0| 61 74 65 20 29 0d 09 09 | 09 09 09 09 6f 62 6a 65 |ate )...|....obje|
|000025e0| 63 74 57 69 6e 64 6f 77 | 2d 3e 41 63 74 69 76 61 |ctWindow|->Activa|
|000025f0| 74 65 28 20 74 68 65 57 | 69 6e 2c 20 28 74 68 65 |te( theW|in, (the|
|00002600| 45 76 65 6e 74 2d 3e 6d | 65 73 73 61 67 65 20 26 |Event->m|essage &|
|00002610| 20 72 65 73 75 6d 65 46 | 6c 61 67 29 20 3e 20 30 | resumeF|lag) > 0|
|00002620| 20 29 3b 0d 09 09 09 09 | 7d 0d 09 09 09 09 69 66 | );.....|}.....if|
|00002630| 28 20 74 68 65 45 76 65 | 6e 74 2d 3e 6d 65 73 73 |( theEve|nt->mess|
|00002640| 61 67 65 20 26 20 72 65 | 73 75 6d 65 46 6c 61 67 |age & re|sumeFlag|
|00002650| 20 26 26 20 28 20 43 6f | 6d 70 57 69 6e 64 31 20 | && ( Co|mpWind1 |
|00002660| 26 26 20 43 6f 6d 70 57 | 69 6e 64 32 20 29 20 29 |&& CompW|ind2 ) )|
|00002670| 0d 09 09 09 09 09 44 6f | 43 6f 6d 70 61 72 69 73 |......Do|Comparis|
|00002680| 6f 6e 28 29 3b 0d 09 09 | 09 09 62 72 65 61 6b 3b |on();...|..break;|
|00002690| 0d 09 09 7d 0d 09 09 62 | 72 65 61 6b 3b 09 09 0d |...}...b|reak;...|
|000026a0| 0d 09 63 61 73 65 20 6b | 48 69 67 68 4c 65 76 65 |..case k|HighLeve|
|000026b0| 6c 45 76 65 6e 74 3a 0d | 23 69 66 20 21 54 41 52 |lEvent:.|#if !TAR|
|000026c0| 47 45 54 5f 41 50 49 5f | 4d 41 43 5f 43 41 52 42 |GET_API_|MAC_CARB|
|000026d0| 4f 4e 09 2f 2f 20 4c 52 | 3a 20 76 31 2e 36 0d 09 |ON.// LR|: v1.6..|
|000026e0| 09 69 66 28 20 67 2e 73 | 79 73 37 46 6c 61 67 20 |.if( g.s|ys7Flag |
|000026f0| 29 0d 23 65 6e 64 69 66 | 0d 09 09 09 41 45 50 72 |).#endif|....AEPr|
|00002700| 6f 63 65 73 73 41 70 70 | 6c 65 45 76 65 6e 74 28 |ocessApp|leEvent(|
|00002710| 20 74 68 65 45 76 65 6e | 74 20 29 3b 0d 09 09 62 | theEven|t );...b|
|00002720| 72 65 61 6b 3b 0d 09 7d | 0d 09 72 65 74 75 72 6e |reak;..}|..return|
|00002730| 20 6e 6f 45 72 72 3b 0d | 7d 0d 0d 23 70 72 61 67 | noErr;.|}..#prag|
|00002740| 6d 61 20 6d 61 72 6b 20 | 2d 0d 0d 2f 2a 2a 2a 20 |ma mark |-../*** |
|00002750| 47 4f 54 20 52 45 51 55 | 49 52 45 44 20 50 41 52 |GOT REQU|IRED PAR|
|00002760| 41 4d 53 20 2a 2a 2a 2f | 0d 73 74 61 74 69 63 20 |AMS ***/|.static |
|00002770| 42 6f 6f 6c 65 61 6e 20 | 5f 67 6f 74 52 65 71 75 |Boolean |_gotRequ|
|00002780| 69 72 65 64 50 61 72 61 | 6d 73 28 20 63 6f 6e 73 |iredPara|ms( cons|
|00002790| 74 20 41 70 70 6c 65 45 | 76 65 6e 74 20 2a 74 68 |t AppleE|vent *th|
|000027a0| 65 45 76 65 6e 74 20 29 | 0d 7b 0d 09 44 65 73 63 |eEvent )|.{..Desc|
|000027b0| 54 79 70 65 20 72 65 74 | 75 72 6e 65 64 54 79 70 |Type ret|urnedTyp|
|000027c0| 65 3b 0d 09 53 69 7a 65 | 20 09 61 63 74 75 61 6c |e;..Size| .actual|
|000027d0| 53 69 7a 65 3b 0d 09 4f | 53 45 72 72 09 65 72 72 |Size;..O|SErr.err|
|000027e0| 20 3d 20 41 45 47 65 74 | 41 74 74 72 69 62 75 74 | = AEGet|Attribut|
|000027f0| 65 50 74 72 28 20 74 68 | 65 45 76 65 6e 74 2c 20 |ePtr( th|eEvent, |
|00002800| 6b 65 79 4d 69 73 73 65 | 64 4b 65 79 77 6f 72 64 |keyMisse|dKeyword|
|00002810| 41 74 74 72 2c 20 74 79 | 70 65 57 69 6c 64 43 61 |Attr, ty|peWildCa|
|00002820| 72 64 2c 20 26 72 65 74 | 75 72 6e 65 64 54 79 70 |rd, &ret|urnedTyp|
|00002830| 65 2c 20 4e 55 4c 4c 2c | 20 30 2c 20 26 61 63 74 |e, NULL,| 0, &act|
|00002840| 75 61 6c 53 69 7a 65 20 | 29 3b 0d 09 72 65 74 75 |ualSize |);..retu|
|00002850| 72 6e 20 65 72 72 20 3d | 3d 20 65 72 72 41 45 44 |rn err =|= errAED|
|00002860| 65 73 63 4e 6f 74 46 6f | 75 6e 64 3b 0d 7d 0d 0d |escNotFo|und;.}..|
|00002870| 2f 2a 2a 2a 20 44 4f 20 | 4f 50 45 4e 20 45 56 45 |/*** DO |OPEN EVE|
|00002880| 4e 54 20 2a 2a 2a 2f 0d | 73 74 61 74 69 63 20 4f |NT ***/.|static O|
|00002890| 53 53 74 61 74 75 73 20 | 5f 64 6f 4f 70 65 6e 41 |SStatus |_doOpenA|
|000028a0| 70 70 6c 65 45 76 65 6e | 74 28 20 63 6f 6e 73 74 |ppleEven|t( const|
|000028b0| 20 41 70 70 6c 65 45 76 | 65 6e 74 20 2a 74 68 65 | AppleEv|ent *the|
|000028c0| 45 76 65 6e 74 2c 20 42 | 6f 6f 6c 65 61 6e 20 70 |Event, B|oolean p|
|000028d0| 72 69 6e 74 20 29 0d 7b | 0d 09 4f 53 53 74 61 74 |rint ).{|..OSStat|
|000028e0| 75 73 09 65 72 72 6f 72 | 3b 0d 2f 2f 4c 52 20 31 |us.error|;.//LR 1|
|000028f0| 37 35 09 48 61 6e 64 6c | 65 09 09 64 6f 63 4c 69 |75.Handl|e..docLi|
|00002900| 73 74 20 3d 20 4e 55 4c | 4c 3b 0d 09 46 53 53 70 |st = NUL|L;..FSSp|
|00002910| 65 63 09 09 6d 79 46 53 | 53 3b 0d 09 41 45 44 65 |ec..myFS|S;..AEDe|
|00002920| 73 63 4c 69 73 74 09 74 | 68 65 4c 69 73 74 3b 0d |scList.t|heList;.|
|00002930| 09 41 45 4b 65 79 77 6f | 72 64 09 61 65 4b 65 79 |.AEKeywo|rd.aeKey|
|00002940| 77 6f 72 64 20 3d 20 6b | 65 79 44 69 72 65 63 74 |word = k|eyDirect|
|00002950| 4f 62 6a 65 63 74 3b 0d | 09 6c 6f 6e 67 09 09 69 |Object;.|.long..i|
|00002960| 74 65 6d 43 6f 75 6e 74 | 2c 20 69 3b 0d 09 44 65 |temCount|, i;..De|
|00002970| 73 63 54 79 70 65 09 61 | 63 74 75 61 6c 54 79 70 |scType.a|ctualTyp|
|00002980| 65 3b 0d 09 53 69 7a 65 | 09 09 61 63 74 75 61 6c |e;..Size|..actual|
|00002990| 53 69 7a 65 3b 0d 09 0d | 09 2f 2f 20 67 65 74 20 |Size;...|.// get |
|000029a0| 65 76 65 6e 74 20 64 65 | 73 63 72 69 70 74 69 6f |event de|scriptio|
|000029b0| 6e 0d 09 65 72 72 6f 72 | 20 3d 20 41 45 47 65 74 |n..error| = AEGet|
|000029c0| 50 61 72 61 6d 44 65 73 | 63 28 20 74 68 65 45 76 |ParamDes|c( theEv|
|000029d0| 65 6e 74 2c 20 6b 65 79 | 44 69 72 65 63 74 4f 62 |ent, key|DirectOb|
|000029e0| 6a 65 63 74 2c 20 74 79 | 70 65 41 45 4c 69 73 74 |ject, ty|peAEList|
|000029f0| 2c 20 26 74 68 65 4c 69 | 73 74 20 29 3b 0d 09 69 |, &theLi|st );..i|
|00002a00| 66 28 20 65 72 72 6f 72 | 20 21 3d 20 6e 6f 45 72 |f( error| != noEr|
|00002a10| 72 20 29 0d 09 7b 0d 2f | 2f 20 30 35 2f 31 30 2f |r )..{./|/ 05/10/|
|00002a20| 30 31 20 2d 20 47 41 42 | 3a 20 44 45 42 55 47 53 |01 - GAB|: DEBUGS|
|00002a30| 54 52 20 6e 6f 74 20 64 | 65 66 69 6e 65 64 20 69 |TR not d|efined i|
|00002a40| 6e 20 6e 6f 6e 2d 43 61 | 72 62 6f 6e 20 62 75 69 |n non-Ca|rbon bui|
|00002a50| 6c 64 73 0d 23 69 66 20 | 21 54 41 52 47 45 54 5f |lds.#if |!TARGET_|
|00002a60| 41 50 49 5f 4d 41 43 5f | 43 41 52 42 4f 4e 0d 09 |API_MAC_|CARBON..|
|00002a70| 09 44 45 42 55 47 53 54 | 52 28 20 22 5c 70 41 45 |.DEBUGST|R( "\pAE|
|00002a80| 47 65 74 50 61 72 61 6d | 44 65 73 63 22 20 29 3b |GetParam|Desc" );|
|00002a90| 0d 23 65 6e 64 69 66 0d | 09 09 72 65 74 75 72 6e |.#endif.|..return|
|00002aa0| 28 20 65 72 72 6f 72 20 | 29 3b 0d 09 7d 0d 0d 09 |( error |);..}...|
|00002ab0| 2f 2f 20 6d 61 6b 65 20 | 73 75 72 65 20 65 76 65 |// make |sure eve|
|00002ac0| 6e 74 20 64 65 73 63 72 | 69 70 74 69 6f 6e 20 69 |nt descr|iption i|
|00002ad0| 73 20 63 6f 72 72 65 63 | 74 0d 09 69 66 28 20 21 |s correc|t..if( !|
|00002ae0| 5f 67 6f 74 52 65 71 75 | 69 72 65 64 50 61 72 61 |_gotRequ|iredPara|
|00002af0| 6d 73 28 20 74 68 65 45 | 76 65 6e 74 20 29 20 29 |ms( theE|vent ) )|
|00002b00| 0d 09 7b 0d 2f 2f 20 30 | 35 2f 31 30 2f 30 31 20 |..{.// 0|5/10/01 |
|00002b10| 2d 20 47 41 42 3a 20 44 | 45 42 55 47 53 54 52 20 |- GAB: D|EBUGSTR |
|00002b20| 6e 6f 74 20 64 65 66 69 | 6e 65 64 20 66 6f 72 20 |not defi|ned for |
|00002b30| 6e 6f 6e 2d 43 61 72 62 | 6f 6e 20 62 75 69 6c 64 |non-Carb|on build|
|00002b40| 73 0d 23 69 66 20 21 54 | 41 52 47 45 54 5f 41 50 |s.#if !T|ARGET_AP|
|00002b50| 49 5f 4d 41 43 5f 43 41 | 52 42 4f 4e 0d 09 09 44 |I_MAC_CA|RBON...D|
|00002b60| 45 42 55 47 53 54 52 28 | 20 22 5c 70 5f 67 6f 74 |EBUGSTR(| "\p_got|
|00002b70| 52 65 71 75 69 72 65 64 | 50 61 72 61 6d 73 22 20 |Required|Params" |
|00002b80| 29 3b 0d 23 65 6e 64 69 | 66 0d 09 09 72 65 74 75 |);.#endi|f...retu|
|00002b90| 72 6e 28 20 65 72 72 6f | 72 20 29 3b 0d 09 7d 0d |rn( erro|r );..}.|
|00002ba0| 0d 09 2f 2f 20 63 6f 75 | 6e 74 20 69 74 65 6d 73 |..// cou|nt items|
|00002bb0| 20 74 6f 20 6f 70 65 6e | 0d 09 65 72 72 6f 72 20 | to open|..error |
|00002bc0| 3d 20 41 45 43 6f 75 6e | 74 49 74 65 6d 73 28 20 |= AECoun|tItems( |
|00002bd0| 26 74 68 65 4c 69 73 74 | 2c 20 26 69 74 65 6d 43 |&theList|, &itemC|
|00002be0| 6f 75 6e 74 20 29 3b 0d | 09 69 66 28 20 65 72 72 |ount );.|.if( err|
|00002bf0| 6f 72 20 21 3d 20 6e 6f | 45 72 72 20 29 0d 09 7b |or != no|Err )..{|
|00002c00| 0d 2f 2f 20 30 35 2f 31 | 30 2f 30 31 20 2d 20 47 |.// 05/1|0/01 - G|
|00002c10| 41 42 3a 20 44 45 42 55 | 47 53 54 52 20 6e 6f 74 |AB: DEBU|GSTR not|
|00002c20| 20 64 65 66 69 6e 65 64 | 20 66 6f 72 20 6e 6f 6e | defined| for non|
|00002c30| 2d 43 61 72 62 6f 6e 20 | 62 75 69 6c 64 73 0d 23 |-Carbon |builds.#|
|00002c40| 69 66 20 21 54 41 52 47 | 45 54 5f 41 50 49 5f 4d |if !TARG|ET_API_M|
|00002c50| 41 43 5f 43 41 52 42 4f | 4e 0d 09 09 44 45 42 55 |AC_CARBO|N...DEBU|
|00002c60| 47 53 54 52 28 20 22 5c | 70 41 45 43 6f 75 6e 74 |GSTR( "\|pAECount|
|00002c70| 49 74 65 6d 73 22 20 29 | 3b 0d 23 65 6e 64 69 66 |Items" )|;.#endif|
|00002c80| 0d 09 09 72 65 74 75 72 | 6e 28 20 65 72 72 6f 72 |...retur|n( error|
|00002c90| 20 29 3b 0d 09 7d 0d 0d | 09 2f 2f 20 6f 70 65 6e | );..}..|.// open|
|00002ca0| 20 61 6c 6c 20 69 74 65 | 6d 73 0d 09 66 6f 72 28 | all ite|ms..for(|
|00002cb0| 20 69 20 3d 20 31 3b 20 | 69 20 3c 3d 20 69 74 65 | i = 1; |i <= ite|
|00002cc0| 6d 43 6f 75 6e 74 3b 20 | 69 2b 2b 20 29 0d 09 7b |mCount; |i++ )..{|
|00002cd0| 0d 09 09 65 72 72 6f 72 | 20 3d 20 41 45 47 65 74 |...error| = AEGet|
|00002ce0| 4e 74 68 50 74 72 28 20 | 26 74 68 65 4c 69 73 74 |NthPtr( |&theList|
|00002cf0| 2c 20 69 2c 20 74 79 70 | 65 46 53 53 2c 20 26 61 |, i, typ|eFSS, &a|
|00002d00| 65 4b 65 79 77 6f 72 64 | 2c 20 26 61 63 74 75 61 |eKeyword|, &actua|
|00002d10| 6c 54 79 70 65 2c 20 28 | 50 74 72 29 20 26 6d 79 |lType, (|Ptr) &my|
|00002d20| 46 53 53 2c 20 73 69 7a | 65 6f 66 28 20 46 53 53 |FSS, siz|eof( FSS|
|00002d30| 70 65 63 20 29 2c 20 26 | 61 63 74 75 61 6c 53 69 |pec ), &|actualSi|
|00002d40| 7a 65 20 29 3b 0d 09 09 | 69 66 28 20 65 72 72 6f |ze );...|if( erro|
|00002d50| 72 20 3d 3d 20 6e 6f 45 | 72 72 20 29 0d 09 09 7b |r == noE|rr )...{|
|00002d60| 0d 09 09 09 69 66 28 20 | 6e 6f 45 72 72 20 3d 3d |....if( |noErr ==|
|00002d70| 20 4f 70 65 6e 45 64 69 | 74 57 69 6e 64 6f 77 28 | OpenEdi|tWindow(|
|00002d80| 20 26 6d 79 46 53 53 2c | 20 6b 57 69 6e 64 6f 77 | &myFSS,| kWindow|
|00002d90| 4e 6f 72 6d 61 6c 2c 20 | 21 70 72 69 6e 74 20 29 |Normal, |!print )|
|00002da0| 20 29 09 09 2f 2f 4c 52 | 20 31 38 31 20 2d 2d 20 | )..//LR| 181 -- |
|00002db0| 73 68 6f 77 20 66 6f 72 | 6b 20 65 72 72 6f 72 73 |show for|k errors|
|00002dc0| 2c 20 65 74 63 2e 20 77 | 2f 64 72 61 67 20 26 20 |, etc. w|/drag & |
|00002dd0| 64 72 6f 70 20 6f 70 65 | 6e 20 28 62 75 74 20 6e |drop ope|n (but n|
|00002de0| 6f 74 20 70 72 69 6e 74 | 29 0d 09 09 09 7b 0d 09 |ot print|)....{..|
|00002df0| 09 09 09 69 66 28 20 70 | 72 69 6e 74 20 26 26 20 |...if( p|rint && |
|00002e00| 6b 48 65 78 45 64 69 74 | 57 69 6e 64 6f 77 54 61 |kHexEdit|WindowTa|
|00002e10| 67 20 3d 3d 20 47 65 74 | 57 69 6e 64 6f 77 4b 69 |g == Get|WindowKi|
|00002e20| 6e 64 28 20 46 72 6f 6e | 74 4e 6f 6e 46 6c 6f 61 |nd( Fron|tNonFloa|
|00002e30| 74 69 6e 67 57 69 6e 64 | 6f 77 28 29 20 29 20 29 |tingWind|ow() ) )|
|00002e40| 09 2f 2f 20 4c 52 3a 20 | 31 2e 37 20 2d 2d 20 61 |.// LR: |1.7 -- a|
|00002e50| 6c 6c 6f 77 20 70 72 69 | 6e 74 69 6e 67 20 64 6f |llow pri|nting do|
|00002e60| 63 75 6d 65 6e 74 73 0d | 09 09 09 09 7b 0d 09 09 |cuments.|....{...|
|00002e70| 09 09 09 50 72 69 6e 74 | 57 69 6e 64 6f 77 28 20 |...Print|Window( |
|00002e80| 28 45 64 69 74 57 69 6e | 64 6f 77 50 74 72 29 47 |(EditWin|dowPtr)G|
|00002e90| 65 74 57 52 65 66 43 6f | 6e 28 20 46 72 6f 6e 74 |etWRefCo|n( Front|
|00002ea0| 4e 6f 6e 46 6c 6f 61 74 | 69 6e 67 57 69 6e 64 6f |NonFloat|ingWindo|
|00002eb0| 77 28 29 20 29 20 29 3b | 0d 09 09 09 09 09 43 6c |w() ) );|......Cl|
|00002ec0| 6f 73 65 45 64 69 74 57 | 69 6e 64 6f 77 28 20 46 |oseEditW|indow( F|
|00002ed0| 72 6f 6e 74 4e 6f 6e 46 | 6c 6f 61 74 69 6e 67 57 |rontNonF|loatingW|
|00002ee0| 69 6e 64 6f 77 28 29 20 | 29 3b 0d 09 09 09 09 7d |indow() |);.....}|
|00002ef0| 0d 09 09 09 7d 0d 09 09 | 7d 0d 09 7d 0d 09 41 64 |....}...|}..}..Ad|
|00002f00| 6a 75 73 74 4d 65 6e 75 | 73 28 29 3b 09 2f 2f 4c |justMenu|s();.//L|
|00002f10| 52 3a 20 31 2e 37 20 2d | 2d 20 73 68 6f 77 20 63 |R: 1.7 -|- show c|
|00002f20| 68 61 6e 67 65 20 69 6e | 20 6d 65 6e 75 73 20 69 |hange in| menus i|
|00002f30| 66 20 72 65 71 75 69 72 | 65 64 0d 0d 09 2f 2f 20 |f requir|ed...// |
|00002f40| 65 76 65 6e 74 20 77 61 | 73 20 68 61 6e 64 6c 65 |event wa|s handle|
|00002f50| 64 20 73 75 63 63 65 73 | 73 66 75 6c 6c 79 0d 09 |d succes|sfully..|
|00002f60| 41 45 44 69 73 70 6f 73 | 65 44 65 73 63 28 20 26 |AEDispos|eDesc( &|
|00002f70| 74 68 65 4c 69 73 74 20 | 29 3b 0d 09 72 65 74 75 |theList |);..retu|
|00002f80| 72 6e 20 6e 6f 45 72 72 | 3b 0d 7d 0d 0d 2f 2a 2a |rn noErr|;.}../**|
|00002f90| 2a 20 43 4f 52 45 20 45 | 56 45 4e 54 20 48 41 4e |* CORE E|VENT HAN|
|00002fa0| 44 4c 45 52 20 2a 2a 2a | 2f 0d 73 74 61 74 69 63 |DLER ***|/.static|
|00002fb0| 20 70 61 73 63 61 6c 20 | 4f 53 45 72 72 20 5f 63 | pascal |OSErr _c|
|00002fc0| 6f 72 65 45 76 65 6e 74 | 48 61 6e 64 6c 65 72 28 |oreEvent|Handler(|
|00002fd0| 20 63 6f 6e 73 74 20 41 | 70 70 6c 65 45 76 65 6e | const A|ppleEven|
|00002fe0| 74 20 2a 74 68 65 45 76 | 65 6e 74 2c 20 41 70 70 |t *theEv|ent, App|
|00002ff0| 6c 65 45 76 65 6e 74 20 | 2a 72 65 70 6c 79 2c 20 |leEvent |*reply, |
|00003000| 6c 6f 6e 67 20 72 65 66 | 43 6f 6e 20 29 0d 7b 0d |long ref|Con ).{.|
|00003010| 09 23 70 72 61 67 6d 61 | 20 75 6e 75 73 65 64 28 |.#pragma| unused(|
|00003020| 20 72 65 70 6c 79 2c 20 | 72 65 66 43 6f 6e 20 29 | reply, |refCon )|
|00003030| 09 2f 2f 20 4c 52 0d 09 | 44 65 73 63 54 79 70 65 |.// LR..|DescType|
|00003040| 09 61 63 74 75 61 6c 54 | 79 70 65 3b 0d 09 53 69 |.actualT|ype;..Si|
|00003050| 7a 65 09 09 61 63 74 75 | 61 6c 53 69 7a 65 3b 0d |ze..actu|alSize;.|
|00003060| 09 44 65 73 63 54 79 70 | 65 09 65 76 65 6e 74 49 |.DescTyp|e.eventI|
|00003070| 44 3b 0d 09 4f 53 45 72 | 72 09 09 65 72 72 6f 72 |D;..OSEr|r..error|
|00003080| 3b 0d 0d 09 65 72 72 6f | 72 20 3d 20 41 45 47 65 |;...erro|r = AEGe|
|00003090| 74 41 74 74 72 69 62 75 | 74 65 50 74 72 28 20 09 |tAttribu|tePtr( .|
|000030a0| 28 20 41 70 70 6c 65 45 | 76 65 6e 74 2a 20 29 20 |( AppleE|vent* ) |
|000030b0| 74 68 65 45 76 65 6e 74 | 2c 20 6b 65 79 45 76 65 |theEvent|, keyEve|
|000030c0| 6e 74 49 44 41 74 74 72 | 2c 20 74 79 70 65 54 79 |ntIDAttr|, typeTy|
|000030d0| 70 65 2c 20 26 61 63 74 | 75 61 6c 54 79 70 65 2c |pe, &act|ualType,|
|000030e0| 20 28 50 74 72 29 20 26 | 65 76 65 6e 74 49 44 2c | (Ptr) &|eventID,|
|000030f0| 20 73 69 7a 65 6f 66 28 | 20 65 76 65 6e 74 49 44 | sizeof(| eventID|
|00003100| 20 29 2c 20 26 61 63 74 | 75 61 6c 53 69 7a 65 20 | ), &act|ualSize |
|00003110| 29 3b 0d 09 69 66 28 20 | 65 72 72 6f 72 20 29 0d |);..if( |error ).|
|00003120| 09 09 72 65 74 75 72 6e | 20 65 72 72 6f 72 3b 0d |..return| error;.|
|00003130| 09 09 09 09 09 09 09 09 | 0d 09 73 77 69 74 63 68 |........|..switch|
|00003140| 28 20 65 76 65 6e 74 49 | 44 20 29 0d 09 7b 0d 09 |( eventI|D )..{..|
|00003150| 09 63 61 73 65 20 6b 41 | 45 4f 70 65 6e 41 70 70 |.case kA|EOpenApp|
|00003160| 6c 69 63 61 74 69 6f 6e | 3a 0d 09 09 09 69 66 28 |lication|:....if(|
|00003170| 20 5f 67 6f 74 52 65 71 | 75 69 72 65 64 50 61 72 | _gotReq|uiredPar|
|00003180| 61 6d 73 28 20 74 68 65 | 45 76 65 6e 74 20 29 20 |ams( the|Event ) |
|00003190| 29 0d 09 09 09 7b 0d 09 | 09 09 09 69 66 28 20 21 |)....{..|...if( !|
|000031a0| 73 6b 69 70 4f 70 65 6e | 20 29 0d 09 09 09 09 09 |skipOpen| )......|
|000031b0| 41 73 6b 45 64 69 74 57 | 69 6e 64 6f 77 28 20 6b |AskEditW|indow( k|
|000031c0| 57 69 6e 64 6f 77 4e 6f | 72 6d 61 6c 20 29 3b 09 |WindowNo|rmal );.|
|000031d0| 2f 2f 20 4c 52 3a 20 2d | 2d 20 76 6f 6f 64 6f 6f |// LR: -|- voodoo|
|000031e0| 20 63 61 6e 27 74 20 68 | 61 76 65 20 74 68 69 73 | can't h|ave this|
|000031f0| 0d 09 09 09 7d 0d 09 09 | 09 62 72 65 61 6b 3b 0d |....}...|.break;.|
|00003200| 09 09 09 09 0d 09 09 63 | 61 73 65 20 6b 41 45 4f |.......c|ase kAEO|
|00003210| 70 65 6e 44 6f 63 75 6d | 65 6e 74 73 3a 0d 09 09 |penDocum|ents:...|
|00003220| 09 5f 64 6f 4f 70 65 6e | 41 70 70 6c 65 45 76 65 |._doOpen|AppleEve|
|00003230| 6e 74 28 20 74 68 65 45 | 76 65 6e 74 2c 20 66 61 |nt( theE|vent, fa|
|00003240| 6c 73 65 20 29 3b 0d 09 | 09 09 62 72 65 61 6b 3b |lse );..|..break;|
|00003250| 0d 09 09 09 09 0d 09 09 | 63 61 73 65 20 6b 41 45 |........|case kAE|
|00003260| 50 72 69 6e 74 44 6f 63 | 75 6d 65 6e 74 73 3a 0d |PrintDoc|uments:.|
|00003270| 09 09 09 5f 64 6f 4f 70 | 65 6e 41 70 70 6c 65 45 |..._doOp|enAppleE|
|00003280| 76 65 6e 74 28 20 74 68 | 65 45 76 65 6e 74 2c 20 |vent( th|eEvent, |
|00003290| 74 72 75 65 20 29 3b 0d | 09 09 09 62 72 65 61 6b |true );.|...break|
|000032a0| 3b 0d 09 09 09 0d 09 09 | 63 61 73 65 20 6b 41 45 |;.......|case kAE|
|000032b0| 51 75 69 74 41 70 70 6c | 69 63 61 74 69 6f 6e 3a |QuitAppl|ication:|
|000032c0| 0d 09 09 09 69 66 28 20 | 5f 67 6f 74 52 65 71 75 |....if( |_gotRequ|
|000032d0| 69 72 65 64 50 61 72 61 | 6d 73 28 20 74 68 65 45 |iredPara|ms( theE|
|000032e0| 76 65 6e 74 20 29 20 26 | 26 20 43 6c 6f 73 65 41 |vent ) &|& CloseA|
|000032f0| 6c 6c 45 64 69 74 57 69 | 6e 64 6f 77 73 28 29 29 |llEditWi|ndows())|
|00003300| 0d 09 09 09 09 67 2e 71 | 75 69 74 46 6c 61 67 20 |.....g.q|uitFlag |
|00003310| 3d 20 74 72 75 65 3b 0d | 09 09 09 62 72 65 61 6b |= true;.|...break|
|00003320| 3b 0d 09 7d 0d 09 72 65 | 74 75 72 6e 20 6e 6f 45 |;..}..re|turn noE|
|00003330| 72 72 3b 0d 7d 0d 0d 23 | 69 66 20 28 54 41 52 47 |rr;.}..#|if (TARG|
|00003340| 45 54 5f 41 50 49 5f 4d | 41 43 5f 43 41 52 42 4f |ET_API_M|AC_CARBO|
|00003350| 4e 29 0d 2f 2f 45 46 20 | 31 38 30 20 2d 2d 20 57 |N).//EF |180 -- W|
|00003360| 68 65 6e 20 77 65 20 67 | 65 74 61 20 6d 6f 75 73 |hen we g|eta mous|
|00003370| 65 20 77 68 65 65 6c 20 | 65 76 65 6e 74 20 6d 6f |e wheel |event mo|
|00003380| 76 65 20 74 68 65 20 63 | 72 6f 6c 6c 20 70 6f 73 |ve the c|roll pos|
|00003390| 69 74 69 6f 6e 0d 73 74 | 61 74 69 63 20 70 61 73 |ition.st|atic pas|
|000033a0| 63 61 6c 20 4f 53 53 74 | 61 74 75 73 20 5f 68 61 |cal OSSt|atus _ha|
|000033b0| 6e 64 6c 65 43 61 72 62 | 6f 6e 45 76 65 6e 74 28 |ndleCarb|onEvent(|
|000033c0| 45 76 65 6e 74 48 61 6e | 64 6c 65 72 43 61 6c 6c |EventHan|dlerCall|
|000033d0| 52 65 66 20 6d 79 48 61 | 6e 64 6c 65 72 2c 45 76 |Ref myHa|ndler,Ev|
|000033e0| 65 6e 74 52 65 66 20 74 | 68 65 45 76 65 6e 74 2c |entRef t|heEvent,|
|000033f0| 20 76 6f 69 64 2a 20 75 | 73 65 72 44 61 74 61 29 | void* u|serData)|
|00003400| 0d 7b 09 0d 09 23 70 72 | 61 67 6d 61 20 75 6e 75 |.{...#pr|agma unu|
|00003410| 73 65 64 20 28 6d 79 48 | 61 6e 64 6c 65 72 2c 75 |sed (myH|andler,u|
|00003420| 73 65 72 44 61 74 61 29 | 0d 09 0d 09 73 77 69 74 |serData)|....swit|
|00003430| 63 68 20 28 47 65 74 45 | 76 65 6e 74 43 6c 61 73 |ch (GetE|ventClas|
|00003440| 73 28 74 68 65 45 76 65 | 6e 74 29 29 0d 09 7b 0d |s(theEve|nt))..{.|
|00003450| 09 09 63 61 73 65 20 6b | 45 76 65 6e 74 43 6c 61 |..case k|EventCla|
|00003460| 73 73 4d 6f 75 73 65 3a | 0d 09 09 7b 0d 09 09 09 |ssMouse:|...{....|
|00003470| 73 77 69 74 63 68 20 28 | 47 65 74 45 76 65 6e 74 |switch (|GetEvent|
|00003480| 4b 69 6e 64 28 74 68 65 | 45 76 65 6e 74 29 29 0d |Kind(the|Event)).|
|00003490| 09 09 09 7b 0d 09 09 09 | 09 63 61 73 65 20 6b 45 |...{....|.case kE|
|000034a0| 76 65 6e 74 4d 6f 75 73 | 65 57 68 65 65 6c 4d 6f |ventMous|eWheelMo|
|000034b0| 76 65 64 3a 0d 09 09 09 | 09 7b 0d 09 09 09 09 09 |ved:....|.{......|
|000034c0| 57 69 6e 64 6f 77 50 74 | 72 20 74 68 65 57 69 6e |WindowPt|r theWin|
|000034d0| 64 6f 77 3b 0d 09 09 09 | 09 09 6c 6f 6e 67 20 63 |dow;....|..long c|
|000034e0| 75 72 50 6f 73 2c 6e 65 | 77 50 6f 73 3b 0d 09 09 |urPos,ne|wPos;...|
|000034f0| 09 09 09 73 68 6f 72 74 | 20 77 69 6e 64 6f 77 43 |...short| windowC|
|00003500| 6f 64 65 3b 0d 09 09 09 | 09 09 45 64 69 74 57 69 |ode;....|..EditWi|
|00003510| 6e 64 6f 77 50 74 72 20 | 64 57 69 6e 3b 0d 09 09 |ndowPtr |dWin;...|
|00003520| 09 09 09 50 6f 69 6e 74 | 20 74 68 65 4d 6f 75 73 |...Point| theMous|
|00003530| 65 50 6f 69 6e 74 3b 0d | 09 09 09 09 09 6c 6f 6e |ePoint;.|.....lon|
|00003540| 67 20 64 65 6c 74 61 3b | 0d 09 09 09 09 09 47 65 |g delta;|......Ge|
|00003550| 74 45 76 65 6e 74 50 61 | 72 61 6d 65 74 65 72 28 |tEventPa|rameter(|
|00003560| 74 68 65 45 76 65 6e 74 | 2c 6b 45 76 65 6e 74 50 |theEvent|,kEventP|
|00003570| 61 72 61 6d 4d 6f 75 73 | 65 4c 6f 63 61 74 69 6f |aramMous|eLocatio|
|00003580| 6e 2c 74 79 70 65 51 44 | 50 6f 69 6e 74 2c 4e 55 |n,typeQD|Point,NU|
|00003590| 4c 4c 2c 73 69 7a 65 6f | 66 28 74 68 65 4d 6f 75 |LL,sizeo|f(theMou|
|000035a0| 73 65 50 6f 69 6e 74 29 | 2c 4e 55 4c 4c 2c 26 74 |sePoint)|,NULL,&t|
|000035b0| 68 65 4d 6f 75 73 65 50 | 6f 69 6e 74 29 3b 0d 09 |heMouseP|oint);..|
|000035c0| 09 09 09 09 47 65 74 45 | 76 65 6e 74 50 61 72 61 |....GetE|ventPara|
|000035d0| 6d 65 74 65 72 28 74 68 | 65 45 76 65 6e 74 2c 6b |meter(th|eEvent,k|
|000035e0| 45 76 65 6e 74 50 61 72 | 61 6d 4d 6f 75 73 65 57 |EventPar|amMouseW|
|000035f0| 68 65 65 6c 44 65 6c 74 | 61 2c 74 79 70 65 4c 6f |heelDelt|a,typeLo|
|00003600| 6e 67 49 6e 74 65 67 65 | 72 2c 4e 55 4c 4c 2c 73 |ngIntege|r,NULL,s|
|00003610| 69 7a 65 6f 66 28 64 65 | 6c 74 61 29 2c 4e 55 4c |izeof(de|lta),NUL|
|00003620| 4c 2c 26 64 65 6c 74 61 | 29 3b 0d 09 09 09 09 09 |L,&delta|);......|
|00003630| 77 69 6e 64 6f 77 43 6f | 64 65 20 3d 20 46 69 6e |windowCo|de = Fin|
|00003640| 64 57 69 6e 64 6f 77 20 | 28 20 74 68 65 4d 6f 75 |dWindow |( theMou|
|00003650| 73 65 50 6f 69 6e 74 2c | 20 26 74 68 65 57 69 6e |sePoint,| &theWin|
|00003660| 64 6f 77 20 29 3b 0d 09 | 09 09 09 09 69 66 20 28 |dow );..|....if (|
|00003670| 77 69 6e 64 6f 77 43 6f | 64 65 20 3d 3d 20 69 6e |windowCo|de == in|
|00003680| 43 6f 6e 74 65 6e 74 29 | 0d 09 09 09 09 09 7b 0d |Content)|......{.|
|00003690| 09 09 09 09 09 09 69 66 | 20 28 47 65 74 57 69 6e |......if| (GetWin|
|000036a0| 64 6f 77 4b 69 6e 64 28 | 74 68 65 57 69 6e 64 6f |dowKind(|theWindo|
|000036b0| 77 29 20 3d 3d 20 6b 48 | 65 78 45 64 69 74 57 69 |w) == kH|exEditWi|
|000036c0| 6e 64 6f 77 54 61 67 29 | 0d 09 09 09 09 09 09 7b |ndowTag)|.......{|
|000036d0| 0d 09 09 09 09 09 09 09 | 64 57 69 6e 20 3d 20 28 |........|dWin = (|
|000036e0| 45 64 69 74 57 69 6e 64 | 6f 77 50 74 72 29 47 65 |EditWind|owPtr)Ge|
|000036f0| 74 57 52 65 66 43 6f 6e | 28 74 68 65 57 69 6e 64 |tWRefCon|(theWind|
|00003700| 6f 77 29 3b 0d 09 09 09 | 09 09 09 09 63 75 72 50 |ow);....|....curP|
|00003710| 6f 73 20 3d 20 64 57 69 | 6e 2d 3e 65 64 69 74 4f |os = dWi|n->editO|
|00003720| 66 66 73 65 74 3b 0d 09 | 09 09 09 09 09 09 6e 65 |ffset;..|......ne|
|00003730| 77 50 6f 73 20 3d 20 63 | 75 72 50 6f 73 3b 0d 09 |wPos = c|urPos;..|
|00003740| 09 09 09 09 09 09 6e 65 | 77 50 6f 73 20 2d 3d 20 |......ne|wPos -= |
|00003750| 28 6b 42 79 74 65 73 50 | 65 72 4c 69 6e 65 20 2a |(kBytesP|erLine *|
|00003760| 20 64 65 6c 74 61 29 3b | 0d 09 09 09 09 09 09 09 | delta);|........|
|00003770| 53 63 72 6f 6c 6c 54 6f | 50 6f 73 69 74 69 6f 6e |ScrollTo|Position|
|00003780| 28 20 64 57 69 6e 2c 20 | 6e 65 77 50 6f 73 20 29 |( dWin, |newPos )|
|00003790| 3b 09 0d 09 09 09 09 09 | 09 09 72 65 74 75 72 6e |;.......|..return|
|000037a0| 20 6e 6f 45 72 72 3b 0d | 09 09 09 09 09 09 7d 0d | noErr;.|......}.|
|000037b0| 09 09 09 09 09 7d 0d 09 | 09 09 09 09 62 72 65 61 |.....}..|....brea|
|000037c0| 6b 3b 0d 09 09 09 09 7d | 0d 09 09 09 09 0d 09 09 |k;.....}|........|
|000037d0| 09 7d 0d 09 09 7d 0d 09 | 7d 0d 09 72 65 74 75 72 |.}...}..|}..retur|
|000037e0| 6e 20 65 76 65 6e 74 4e | 6f 74 48 61 6e 64 6c 65 |n eventN|otHandle|
|000037f0| 64 45 72 72 3b 0d 7d 0d | 23 65 6e 64 69 66 20 2f |dErr;.}.|#endif /|
|00003800| 2f 54 41 52 47 45 54 5f | 41 50 49 5f 4d 41 43 5f |/TARGET_|API_MAC_|
|00003810| 43 41 52 42 4f 4e 0d 0d | 2f 2f 20 4c 52 20 2d 2d |CARBON..|// LR --|
|00003820| 2d 20 68 61 6e 64 6c 65 | 73 20 6f 6e 6c 79 20 74 |- handle|s only t|
|00003830| 68 65 20 56 4f 4f 44 4f | 4f 20 63 6f 6d 70 61 72 |he VOODO|O compar|
|00003840| 65 20 66 69 6c 65 73 20 | 41 45 0d 0d 2f 2a 2a 2a |e files |AE../***|
|00003850| 20 43 4f 4d 50 41 52 45 | 20 45 56 45 4e 54 20 48 | COMPARE| EVENT H|
|00003860| 41 4e 44 4c 45 52 20 2a | 2a 2a 2f 0d 73 74 61 74 |ANDLER *|**/.stat|
|00003870| 69 63 20 70 61 73 63 61 | 6c 20 4f 53 45 72 72 20 |ic pasca|l OSErr |
|00003880| 5f 63 6f 6d 70 61 72 65 | 45 76 65 6e 74 48 61 6e |_compare|EventHan|
|00003890| 64 6c 65 72 28 20 63 6f | 6e 73 74 20 41 70 70 6c |dler( co|nst Appl|
|000038a0| 65 45 76 65 6e 74 20 2a | 74 68 65 45 76 65 6e 74 |eEvent *|theEvent|
|000038b0| 2c 20 41 70 70 6c 65 45 | 76 65 6e 74 20 2a 72 65 |, AppleE|vent *re|
|000038c0| 70 6c 79 2c 20 6c 6f 6e | 67 20 72 65 66 43 6f 6e |ply, lon|g refCon|
|000038d0| 20 29 0d 7b 0d 09 23 70 | 72 61 67 6d 61 20 75 6e | ).{..#p|ragma un|
|000038e0| 75 73 65 64 28 20 72 65 | 70 6c 79 2c 20 72 65 66 |used( re|ply, ref|
|000038f0| 43 6f 6e 20 29 09 09 09 | 2f 2f 20 4c 52 0d 2f 2f |Con )...|// LR.//|
|00003900| 4c 52 20 31 37 37 09 65 | 78 74 65 72 6e 20 57 69 |LR 177.e|xtern Wi|
|00003910| 6e 64 6f 77 52 65 66 20 | 43 6f 6d 70 57 69 6e 64 |ndowRef |CompWind|
|00003920| 31 2c 20 43 6f 6d 70 57 | 69 6e 64 32 3b 09 2f 2f |1, CompW|ind2;.//|
|00003930| 20 73 65 74 20 69 6e 20 | 4f 70 65 6e 45 64 69 74 | set in |OpenEdit|
|00003940| 57 69 6e 64 6f 77 0d 0d | 09 44 65 73 63 54 79 70 |Window..|.DescTyp|
|00003950| 65 09 61 63 74 75 61 6c | 54 79 70 65 3b 0d 09 53 |e.actual|Type;..S|
|00003960| 69 7a 65 09 09 61 63 74 | 75 61 6c 53 69 7a 65 3b |ize..act|ualSize;|
|00003970| 0d 09 4f 53 45 72 72 09 | 09 65 72 72 6f 72 3b 0d |..OSErr.|.error;.|
|00003980| 09 46 53 53 70 65 63 09 | 6f 6c 64 53 70 65 63 2c |.FSSpec.|oldSpec,|
|00003990| 20 6e 65 77 53 70 65 63 | 3b 0d 09 42 6f 6f 6c 65 | newSpec|;..Boole|
|000039a0| 61 6e 20 72 65 73 75 6c | 74 3b 0d 0d 09 73 6b 69 |an resul|t;...ski|
|000039b0| 70 4f 70 65 6e 20 3d 20 | 74 72 75 65 3b 0d 0d 09 |pOpen = |true;...|
|000039c0| 2f 2f 20 63 6c 6f 73 65 | 20 70 72 65 76 69 6f 75 |// close| previou|
|000039d0| 73 20 66 69 6c 65 20 63 | 6f 6d 70 61 72 65 20 77 |s file c|ompare w|
|000039e0| 69 6e 64 6f 77 73 20 69 | 66 20 6f 70 65 6e 0d 0d |indows i|f open..|
|000039f0| 09 69 66 28 20 43 6f 6d | 70 57 69 6e 64 31 20 29 |.if( Com|pWind1 )|
|00003a00| 09 44 69 73 70 6f 73 65 | 45 64 69 74 57 69 6e 64 |.Dispose|EditWind|
|00003a10| 6f 77 28 20 43 6f 6d 70 | 57 69 6e 64 31 20 29 3b |ow( Comp|Wind1 );|
|00003a20| 0d 09 69 66 28 20 43 6f | 6d 70 57 69 6e 64 32 20 |..if( Co|mpWind2 |
|00003a30| 29 09 44 69 73 70 6f 73 | 65 45 64 69 74 57 69 6e |).Dispos|eEditWin|
|00003a40| 64 6f 77 28 20 43 6f 6d | 70 57 69 6e 64 32 20 29 |dow( Com|pWind2 )|
|00003a50| 3b 0d 09 43 6f 6d 70 57 | 69 6e 64 31 20 3d 20 43 |;..CompW|ind1 = C|
|00003a60| 6f 6d 70 57 69 6e 64 32 | 20 3d 20 4e 55 4c 4c 3b |ompWind2| = NULL;|
|00003a70| 0d 0d 09 65 72 72 6f 72 | 20 3d 20 41 45 47 65 74 |...error| = AEGet|
|00003a80| 50 61 72 61 6d 50 74 72 | 28 20 74 68 65 45 76 65 |ParamPtr|( theEve|
|00003a90| 6e 74 2c 20 6b 41 45 4e | 65 77 46 69 6c 65 50 61 |nt, kAEN|ewFilePa|
|00003aa0| 72 61 6d 2c 20 74 79 70 | 65 46 53 53 2c 20 26 61 |ram, typ|eFSS, &a|
|00003ab0| 63 74 75 61 6c 54 79 70 | 65 2c 20 26 6e 65 77 53 |ctualTyp|e, &newS|
|00003ac0| 70 65 63 2c 20 73 69 7a | 65 6f 66 28 20 6e 65 77 |pec, siz|eof( new|
|00003ad0| 53 70 65 63 20 29 2c 20 | 26 61 63 74 75 61 6c 53 |Spec ), |&actualS|
|00003ae0| 69 7a 65 20 29 3b 0d 09 | 69 66 28 20 65 72 72 6f |ize );..|if( erro|
|00003af0| 72 20 29 20 72 65 74 75 | 72 6e 20 65 72 72 6f 72 |r ) retu|rn error|
|00003b00| 3b 0d 0d 09 65 72 72 6f | 72 20 3d 20 41 45 47 65 |;...erro|r = AEGe|
|00003b10| 74 50 61 72 61 6d 50 74 | 72 28 20 74 68 65 45 76 |tParamPt|r( theEv|
|00003b20| 65 6e 74 2c 20 6b 41 45 | 4f 6c 64 46 69 6c 65 50 |ent, kAE|OldFileP|
|00003b30| 61 72 61 6d 2c 20 74 79 | 70 65 46 53 53 2c 20 26 |aram, ty|peFSS, &|
|00003b40| 61 63 74 75 61 6c 54 79 | 70 65 2c 20 26 6f 6c 64 |actualTy|pe, &old|
|00003b50| 53 70 65 63 2c 20 73 69 | 7a 65 6f 66 28 20 6f 6c |Spec, si|zeof( ol|
|00003b60| 64 53 70 65 63 20 29 2c | 20 26 61 63 74 75 61 6c |dSpec ),| &actual|
|00003b70| 53 69 7a 65 20 29 3b 0d | 09 69 66 28 20 65 72 72 |Size );.|.if( err|
|00003b80| 6f 72 20 29 20 72 65 74 | 75 72 6e 20 65 72 72 6f |or ) ret|urn erro|
|00003b90| 72 3b 0d 0d 2f 2f 4c 52 | 20 31 37 37 09 43 6f 6d |r;..//LR| 177.Com|
|00003ba0| 70 61 72 65 46 6c 61 67 | 20 3d 20 31 3b 0d 09 65 |pareFlag| = 1;..e|
|00003bb0| 72 72 6f 72 20 3d 20 4f | 70 65 6e 45 64 69 74 57 |rror = O|penEditW|
|00003bc0| 69 6e 64 6f 77 28 20 26 | 6e 65 77 53 70 65 63 2c |indow( &|newSpec,|
|00003bd0| 20 6b 57 69 6e 64 6f 77 | 43 6f 6d 70 61 72 65 54 | kWindow|CompareT|
|00003be0| 6f 70 2c 20 66 61 6c 73 | 65 20 29 3b 0d 09 69 66 |op, fals|e );..if|
|00003bf0| 28 20 21 65 72 72 6f 72 | 20 29 0d 09 7b 0d 2f 2f |( !error| )..{.//|
|00003c00| 4c 52 20 31 37 37 09 09 | 43 6f 6d 70 61 72 65 46 |LR 177..|CompareF|
|00003c10| 6c 61 67 20 3d 20 32 3b | 0d 09 09 65 72 72 6f 72 |lag = 2;|...error|
|00003c20| 20 3d 20 4f 70 65 6e 45 | 64 69 74 57 69 6e 64 6f | = OpenE|ditWindo|
|00003c30| 77 28 20 26 6f 6c 64 53 | 70 65 63 2c 20 6b 57 69 |w( &oldS|pec, kWi|
|00003c40| 6e 64 6f 77 43 6f 6d 70 | 61 72 65 42 74 6d 2c 20 |ndowComp|areBtm, |
|00003c50| 66 61 6c 73 65 20 29 3b | 0d 09 09 69 66 28 20 21 |false );|...if( !|
|00003c60| 65 72 72 6f 72 20 29 0d | 09 09 7b 0d 09 09 09 72 |error ).|..{....r|
|00003c70| 65 73 75 6c 74 20 3d 20 | 50 65 72 66 6f 72 6d 54 |esult = |PerformT|
|00003c80| 65 78 74 43 6f 6d 70 61 | 72 65 28 20 28 45 64 69 |extCompa|re( (Edi|
|00003c90| 74 57 69 6e 64 6f 77 50 | 74 72 29 20 47 65 74 57 |tWindowP|tr) GetW|
|00003ca0| 52 65 66 43 6f 6e 28 20 | 43 6f 6d 70 57 69 6e 64 |RefCon( |CompWind|
|00003cb0| 31 20 29 2c 20 28 45 64 | 69 74 57 69 6e 64 6f 77 |1 ), (Ed|itWindow|
|00003cc0| 50 74 72 29 20 47 65 74 | 57 52 65 66 43 6f 6e 28 |Ptr) Get|WRefCon(|
|00003cd0| 20 43 6f 6d 70 57 69 6e | 64 32 20 29 20 29 3b 0d | CompWin|d2 ) );.|
|00003ce0| 2f 2a 20 31 38 35 09 09 | 09 69 66 28 20 67 50 72 |/* 185..|.if( gPr|
|00003cf0| 65 66 73 2e 73 65 61 72 | 63 68 54 79 70 65 20 3d |efs.sear|chType =|
|00003d00| 3d 20 43 4d 5f 4d 61 74 | 63 68 20 29 0d 09 09 09 |= CM_Mat|ch )....|
|00003d10| 09 72 65 73 75 6c 74 20 | 3d 20 50 65 72 66 6f 72 |.result |= Perfor|
|00003d20| 6d 54 65 78 74 4d 61 74 | 63 68 43 6f 6d 70 61 72 |mTextMat|chCompar|
|00003d30| 65 28 20 28 45 64 69 74 | 57 69 6e 64 6f 77 50 74 |e( (Edit|WindowPt|
|00003d40| 72 29 20 47 65 74 57 52 | 65 66 43 6f 6e 28 20 43 |r) GetWR|efCon( C|
|00003d50| 6f 6d 70 57 69 6e 64 31 | 20 29 2c 20 28 45 64 69 |ompWind1| ), (Edi|
|00003d60| 74 57 69 6e 64 6f 77 50 | 74 72 29 20 47 65 74 57 |tWindowP|tr) GetW|
|00003d70| 52 65 66 43 6f 6e 28 20 | 43 6f 6d 70 57 69 6e 64 |RefCon( |CompWind|
|00003d80| 32 20 29 20 29 3b 0d 09 | 09 09 65 6c 73 65 0d 09 |2 ) );..|..else..|
|00003d90| 09 09 09 72 65 73 75 6c | 74 20 3d 20 50 65 72 66 |...resul|t = Perf|
|00003da0| 6f 72 6d 54 65 78 74 44 | 69 66 66 65 72 65 6e 63 |ormTextD|ifferenc|
|00003db0| 65 43 6f 6d 70 61 72 65 | 28 20 28 45 64 69 74 57 |eCompare|( (EditW|
|00003dc0| 69 6e 64 6f 77 50 74 72 | 29 20 47 65 74 57 52 65 |indowPtr|) GetWRe|
|00003dd0| 66 43 6f 6e 28 20 43 6f | 6d 70 57 69 6e 64 31 20 |fCon( Co|mpWind1 |
|00003de0| 29 2c 20 28 45 64 69 74 | 57 69 6e 64 6f 77 50 74 |), (Edit|WindowPt|
|00003df0| 72 29 20 47 65 74 57 52 | 65 66 43 6f 6e 28 20 43 |r) GetWR|efCon( C|
|00003e00| 6f 6d 70 57 69 6e 64 32 | 20 29 20 29 3b 0d 2a 2f |ompWind2| ) );.*/|
|00003e10| 0d 09 09 09 69 66 28 20 | 72 65 73 75 6c 74 20 29 |....if( |result )|
|00003e20| 0d 09 09 09 7b 0d 09 09 | 09 09 65 72 72 6f 72 20 |....{...|..error |
|00003e30| 3d 20 41 45 50 75 74 50 | 61 72 61 6d 50 74 72 28 |= AEPutP|aramPtr(|
|00003e40| 20 72 65 70 6c 79 2c 20 | 6b 65 79 44 69 72 65 63 | reply, |keyDirec|
|00003e50| 74 4f 62 6a 65 63 74 2c | 20 74 79 70 65 42 6f 6f |tObject,| typeBoo|
|00003e60| 6c 65 61 6e 2c 20 26 72 | 65 73 75 6c 74 2c 20 73 |lean, &r|esult, s|
|00003e70| 69 7a 65 6f 66 28 20 72 | 65 73 75 6c 74 20 29 20 |izeof( r|esult ) |
|00003e80| 29 3b 0d 09 09 09 09 72 | 65 74 75 72 6e 20 65 72 |);.....r|eturn er|
|00003e90| 72 6f 72 3b 0d 09 09 09 | 7d 0d 0d 09 09 09 69 66 |ror;....|}.....if|
|00003ea0| 28 20 43 6f 6d 70 57 69 | 6e 64 32 20 29 0d 09 09 |( CompWi|nd2 )...|
|00003eb0| 09 09 44 69 73 70 6f 73 | 65 45 64 69 74 57 69 6e |..Dispos|eEditWin|
|00003ec0| 64 6f 77 28 20 43 6f 6d | 70 57 69 6e 64 32 20 29 |dow( Com|pWind2 )|
|00003ed0| 3b 0d 09 09 7d 0d 09 09 | 69 66 28 20 43 6f 6d 70 |;...}...|if( Comp|
|00003ee0| 57 69 6e 64 31 20 29 0d | 09 09 09 44 69 73 70 6f |Wind1 ).|...Dispo|
|00003ef0| 73 65 45 64 69 74 57 69 | 6e 64 6f 77 28 20 43 6f |seEditWi|ndow( Co|
|00003f00| 6d 70 57 69 6e 64 31 20 | 29 3b 0d 09 7d 0d 0d 09 |mpWind1 |);..}...|
|00003f10| 43 6f 6d 70 57 69 6e 64 | 31 20 3d 20 43 6f 6d 70 |CompWind|1 = Comp|
|00003f20| 57 69 6e 64 32 20 3d 20 | 4e 55 4c 4c 3b 0d 09 72 |Wind2 = |NULL;..r|
|00003f30| 65 73 75 6c 74 20 3d 20 | 66 61 6c 73 65 3b 0d 09 |esult = |false;..|
|00003f40| 65 72 72 6f 72 20 3d 20 | 41 45 50 75 74 50 61 72 |error = |AEPutPar|
|00003f50| 61 6d 50 74 72 28 20 72 | 65 70 6c 79 2c 20 6b 65 |amPtr( r|eply, ke|
|00003f60| 79 44 69 72 65 63 74 4f | 62 6a 65 63 74 2c 20 74 |yDirectO|bject, t|
|00003f70| 79 70 65 42 6f 6f 6c 65 | 61 6e 2c 20 26 72 65 73 |ypeBoole|an, &res|
|00003f80| 75 6c 74 2c 20 73 69 7a | 65 6f 66 28 20 72 65 73 |ult, siz|eof( res|
|00003f90| 75 6c 74 20 29 20 29 3b | 0d 0d 09 72 65 74 75 72 |ult ) );|...retur|
|00003fa0| 6e 20 65 72 72 6f 72 3b | 0d 7d 0d 0d 2f 2a 2a 2a |n error;|.}../***|
|00003fb0| 20 49 4e 49 54 20 41 50 | 50 4c 45 20 45 56 45 4e | INIT AP|PLE EVEN|
|00003fc0| 54 53 20 2a 2a 2a 2f 0d | 73 74 61 74 69 63 20 4f |TS ***/.|static O|
|00003fd0| 53 53 74 61 74 75 73 20 | 5f 69 6e 69 74 41 70 70 |SStatus |_initApp|
|00003fe0| 6c 65 45 76 65 6e 74 73 | 28 20 76 6f 69 64 20 29 |leEvents|( void )|
|00003ff0| 0d 7b 0d 23 69 66 20 21 | 54 41 52 47 45 54 5f 41 |.{.#if !|TARGET_A|
|00004000| 50 49 5f 4d 41 43 5f 43 | 41 52 42 4f 4e 09 2f 2f |PI_MAC_C|ARBON.//|
|00004010| 20 4c 52 3a 20 76 31 2e | 37 20 28 6e 6f 20 6e 65 | LR: v1.|7 (no ne|
|00004020| 65 64 20 66 6f 72 20 73 | 65 70 65 72 61 74 65 20 |ed for s|eperate |
|00004030| 6e 6f 6e 2d 63 61 72 62 | 6f 6e 20 63 6f 64 65 29 |non-carb|on code)|
|00004040| 0d 09 69 66 28 20 67 2e | 73 79 73 37 46 6c 61 67 |..if( g.|sys7Flag|
|00004050| 20 29 0d 23 65 6e 64 69 | 66 0d 09 7b 0d 09 09 41 | ).#endi|f..{...A|
|00004060| 45 48 61 6e 64 6c 65 72 | 55 50 50 20 3d 20 4e 65 |EHandler|UPP = Ne|
|00004070| 77 41 45 45 76 65 6e 74 | 48 61 6e 64 6c 65 72 55 |wAEEvent|HandlerU|
|00004080| 50 50 28 20 5f 63 6f 72 | 65 45 76 65 6e 74 48 61 |PP( _cor|eEventHa|
|00004090| 6e 64 6c 65 72 20 29 3b | 0d 2f 2f 4c 52 3a 20 31 |ndler );|.//LR: 1|
|000040a0| 2e 37 20 2d 2d 20 43 61 | 72 62 6f 6e 20 72 65 71 |.7 -- Ca|rbon req|
|000040b0| 75 69 72 65 73 20 73 70 | 65 63 69 66 69 63 20 68 |uires sp|ecific h|
|000040c0| 61 6e 64 6c 65 72 73 21 | 09 09 41 45 49 6e 73 74 |andlers!|..AEInst|
|000040d0| 61 6c 6c 45 76 65 6e 74 | 48 61 6e 64 6c 65 72 28 |allEvent|Handler(|
|000040e0| 20 6b 43 6f 72 65 45 76 | 65 6e 74 43 6c 61 73 73 | kCoreEv|entClass|
|000040f0| 2c 20 74 79 70 65 57 69 | 6c 64 43 61 72 64 2c 20 |, typeWi|ldCard, |
|00004100| 41 45 48 61 6e 64 6c 65 | 72 55 50 50 2c 20 30 2c |AEHandle|rUPP, 0,|
|00004110| 20 66 61 6c 73 65 20 29 | 3b 0d 0d 09 09 41 45 49 | false )|;....AEI|
|00004120| 6e 73 74 61 6c 6c 45 76 | 65 6e 74 48 61 6e 64 6c |nstallEv|entHandl|
|00004130| 65 72 28 20 6b 43 6f 72 | 65 45 76 65 6e 74 43 6c |er( kCor|eEventCl|
|00004140| 61 73 73 2c 20 6b 41 45 | 4f 70 65 6e 41 70 70 6c |ass, kAE|OpenAppl|
|00004150| 69 63 61 74 69 6f 6e 2c | 20 41 45 48 61 6e 64 6c |ication,| AEHandl|
|00004160| 65 72 55 50 50 2c 20 30 | 2c 20 66 61 6c 73 65 20 |erUPP, 0|, false |
|00004170| 29 3b 0d 09 09 41 45 49 | 6e 73 74 61 6c 6c 45 76 |);...AEI|nstallEv|
|00004180| 65 6e 74 48 61 6e 64 6c | 65 72 28 20 6b 43 6f 72 |entHandl|er( kCor|
|00004190| 65 45 76 65 6e 74 43 6c | 61 73 73 2c 20 6b 41 45 |eEventCl|ass, kAE|
|000041a0| 4f 70 65 6e 44 6f 63 75 | 6d 65 6e 74 73 2c 20 41 |OpenDocu|ments, A|
|000041b0| 45 48 61 6e 64 6c 65 72 | 55 50 50 2c 20 30 2c 20 |EHandler|UPP, 0, |
|000041c0| 66 61 6c 73 65 20 29 3b | 0d 09 09 41 45 49 6e 73 |false );|...AEIns|
|000041d0| 74 61 6c 6c 45 76 65 6e | 74 48 61 6e 64 6c 65 72 |tallEven|tHandler|
|000041e0| 28 20 6b 43 6f 72 65 45 | 76 65 6e 74 43 6c 61 73 |( kCoreE|ventClas|
|000041f0| 73 2c 20 6b 41 45 50 72 | 69 6e 74 44 6f 63 75 6d |s, kAEPr|intDocum|
|00004200| 65 6e 74 73 2c 20 41 45 | 48 61 6e 64 6c 65 72 55 |ents, AE|HandlerU|
|00004210| 50 50 2c 20 30 2c 20 66 | 61 6c 73 65 20 29 3b 0d |PP, 0, f|alse );.|
|00004220| 09 09 41 45 49 6e 73 74 | 61 6c 6c 45 76 65 6e 74 |..AEInst|allEvent|
|00004230| 48 61 6e 64 6c 65 72 28 | 20 6b 43 6f 72 65 45 76 |Handler(| kCoreEv|
|00004240| 65 6e 74 43 6c 61 73 73 | 2c 20 6b 41 45 51 75 69 |entClass|, kAEQui|
|00004250| 74 41 70 70 6c 69 63 61 | 74 69 6f 6e 2c 20 41 45 |tApplica|tion, AE|
|00004260| 48 61 6e 64 6c 65 72 55 | 50 50 2c 20 30 2c 20 66 |HandlerU|PP, 0, f|
|00004270| 61 6c 73 65 20 29 3b 0d | 0d 09 09 41 45 43 6f 6d |alse );.|...AECom|
|00004280| 70 61 72 65 48 61 6e 64 | 6c 65 72 55 50 50 20 3d |pareHand|lerUPP =|
|00004290| 20 4e 65 77 41 45 45 76 | 65 6e 74 48 61 6e 64 6c | NewAEEv|entHandl|
|000042a0| 65 72 55 50 50 28 20 5f | 63 6f 6d 70 61 72 65 45 |erUPP( _|compareE|
|000042b0| 76 65 6e 74 48 61 6e 64 | 6c 65 72 20 29 3b 0d 09 |ventHand|ler );..|
|000042c0| 09 41 45 49 6e 73 74 61 | 6c 6c 45 76 65 6e 74 48 |.AEInsta|llEventH|
|000042d0| 61 6e 64 6c 65 72 28 20 | 6b 43 6f 6d 70 61 72 65 |andler( |kCompare|
|000042e0| 45 76 65 6e 74 43 6c 61 | 73 73 2c 20 6b 41 45 43 |EventCla|ss, kAEC|
|000042f0| 6f 6d 70 61 72 65 45 76 | 65 6e 74 2c 20 41 45 43 |ompareEv|ent, AEC|
|00004300| 6f 6d 70 61 72 65 48 61 | 6e 64 6c 65 72 55 50 50 |ompareHa|ndlerUPP|
|00004310| 2c 20 30 2c 20 66 61 6c | 73 65 20 29 3b 0d 09 7d |, 0, fal|se );..}|
|00004320| 0d 09 72 65 74 75 72 6e | 20 6e 6f 45 72 72 3b 0d |..return| noErr;.|
|00004330| 7d 0d 0d 23 69 66 20 54 | 41 52 47 45 54 5f 41 50 |}..#if T|ARGET_AP|
|00004340| 49 5f 4d 41 43 5f 43 41 | 52 42 4f 4e 0d 0d 2f 2a |I_MAC_CA|RBON../*|
|00004350| 2a 2a 20 49 4e 49 54 20 | 43 41 52 42 4f 4e 20 45 |** INIT |CARBON E|
|00004360| 56 45 4e 54 53 20 2a 2a | 2a 2f 0d 2f 2f 45 46 20 |VENTS **|*/.//EF |
|00004370| 31 38 30 20 2d 2d 20 68 | 61 6e 64 6c 65 20 6d 6f |180 -- h|andle mo|
|00004380| 75 73 65 20 77 68 65 65 | 6e 20 65 76 65 6e 74 73 |use whee|n events|
|00004390| 20 76 69 61 20 63 61 72 | 62 6f 6e 0d 73 74 61 74 | via car|bon.stat|
|000043a0| 69 63 20 4f 53 53 74 61 | 74 75 73 20 5f 69 6e 69 |ic OSSta|tus _ini|
|000043b0| 74 43 61 72 62 6f 6e 45 | 76 65 6e 74 73 28 20 76 |tCarbonE|vents( v|
|000043c0| 6f 69 64 20 29 0d 7b 0d | 09 6c 6f 6e 67 20 6e 75 |oid ).{.|.long nu|
|000043d0| 6d 54 79 70 65 73 20 3d | 20 30 3b 0d 09 4f 53 45 |mTypes =| 0;..OSE|
|000043e0| 72 72 20 65 72 72 3b 0d | 09 45 76 65 6e 74 54 79 |rr err;.|.EventTy|
|000043f0| 70 65 53 70 65 63 20 20 | 65 76 65 6e 74 54 79 70 |peSpec |eventTyp|
|00004400| 65 5b 31 35 5d 3b 0d 09 | 45 76 65 6e 74 48 61 6e |e[15];..|EventHan|
|00004410| 64 6c 65 72 55 50 50 20 | 74 68 65 45 76 65 6e 74 |dlerUPP |theEvent|
|00004420| 48 61 6e 64 6c 65 72 20 | 3d 20 4e 65 77 45 76 65 |Handler |= NewEve|
|00004430| 6e 74 48 61 6e 64 6c 65 | 72 55 50 50 28 5f 68 61 |ntHandle|rUPP(_ha|
|00004440| 6e 64 6c 65 43 61 72 62 | 6f 6e 45 76 65 6e 74 29 |ndleCarb|onEvent)|
|00004450| 3b 0d 09 0d 09 2f 2a 20 | 73 70 65 63 69 66 79 20 |;..../* |specify |
|00004460| 77 68 69 63 68 20 65 76 | 65 6e 74 73 20 77 65 20 |which ev|ents we |
|00004470| 77 61 6e 74 20 74 6f 20 | 72 65 63 65 69 76 65 20 |want to |receive |
|00004480| 2a 2f 0d 09 65 76 65 6e | 74 54 79 70 65 5b 6e 75 |*/..even|tType[nu|
|00004490| 6d 54 79 70 65 73 5d 2e | 65 76 65 6e 74 43 6c 61 |mTypes].|eventCla|
|000044a0| 73 73 20 3d 20 6b 45 76 | 65 6e 74 43 6c 61 73 73 |ss = kEv|entClass|
|000044b0| 4d 6f 75 73 65 3b 0d 09 | 65 76 65 6e 74 54 79 70 |Mouse;..|eventTyp|
|000044c0| 65 5b 6e 75 6d 54 79 70 | 65 73 5d 2e 65 76 65 6e |e[numTyp|es].even|
|000044d0| 74 4b 69 6e 64 20 3d 20 | 6b 45 76 65 6e 74 4d 6f |tKind = |kEventMo|
|000044e0| 75 73 65 57 68 65 65 6c | 4d 6f 76 65 64 3b 0d 09 |useWheel|Moved;..|
|000044f0| 6e 75 6d 54 79 70 65 73 | 2b 2b 3b 0d 09 65 72 72 |numTypes|++;..err|
|00004500| 20 3d 20 49 6e 73 74 61 | 6c 6c 41 70 70 6c 69 63 | = Insta|llApplic|
|00004510| 61 74 69 6f 6e 45 76 65 | 6e 74 48 61 6e 64 6c 65 |ationEve|ntHandle|
|00004520| 72 28 74 68 65 45 76 65 | 6e 74 48 61 6e 64 6c 65 |r(theEve|ntHandle|
|00004530| 72 2c 6e 75 6d 54 79 70 | 65 73 2c 26 65 76 65 6e |r,numTyp|es,&even|
|00004540| 74 54 79 70 65 5b 30 5d | 2c 4e 55 4c 4c 2c 4e 55 |tType[0]|,NULL,NU|
|00004550| 4c 4c 29 3b 0d 09 72 65 | 74 75 72 6e 20 65 72 72 |LL);..re|turn err|
|00004560| 3b 0d 7d 0d 23 65 6e 64 | 69 66 0d 0d 2f 2a 2a 2a |;.}.#end|if../***|
|00004570| 20 43 48 45 43 4b 20 45 | 4e 56 49 52 4f 4e 4d 45 | CHECK E|NVIRONME|
|00004580| 4e 54 20 2a 2a 2a 2f 0d | 73 74 61 74 69 63 20 4f |NT ***/.|static O|
|00004590| 53 53 74 61 74 75 73 20 | 5f 63 68 65 63 6b 45 6e |SStatus |_checkEn|
|000045a0| 76 69 72 6f 6e 6d 65 6e | 74 28 20 76 6f 69 64 20 |vironmen|t( void |
|000045b0| 29 0d 7b 0d 09 4f 53 53 | 74 61 74 75 73 09 65 72 |).{..OSS|tatus.er|
|000045c0| 72 6f 72 3b 0d 0d 09 2f | 2f 20 67 65 74 20 73 79 |ror;.../|/ get sy|
|000045d0| 73 74 65 6d 20 76 65 72 | 73 69 6f 6e 09 2f 2f 20 |stem ver|sion.// |
|000045e0| 4e 53 20 31 2e 37 2e 31 | 0d 09 65 72 72 6f 72 20 |NS 1.7.1|..error |
|000045f0| 3d 20 47 65 73 74 61 6c | 74 28 20 67 65 73 74 61 |= Gestal|t( gesta|
|00004600| 6c 74 53 79 73 74 65 6d | 56 65 72 73 69 6f 6e 2c |ltSystem|Version,|
|00004610| 20 26 67 2e 73 79 73 74 | 65 6d 56 65 72 73 69 6f | &g.syst|emVersio|
|00004620| 6e 20 29 3b 09 09 2f 2f | 20 74 68 69 73 20 6c 6f |n );..//| this lo|
|00004630| 61 64 73 20 48 49 54 6f | 6f 6c 62 6f 78 2e 66 72 |ads HITo|olbox.fr|
|00004640| 61 6d 65 77 6f 72 6b 20 | 6f 6e 20 4f 53 20 58 0d |amework |on OS X.|
|00004650| 0d 23 69 66 20 21 54 41 | 52 47 45 54 5f 41 50 49 |.#if !TA|RGET_API|
|00004660| 5f 4d 41 43 5f 43 41 52 | 42 4f 4e 09 2f 2f 20 4c |_MAC_CAR|BON.// L|
|00004670| 52 3a 20 76 31 2e 36 0d | 09 69 66 28 20 21 65 72 |R: v1.6.|.if( !er|
|00004680| 72 6f 72 20 29 0d 09 7b | 0d 09 09 53 79 73 45 6e |ror )..{|...SysEn|
|00004690| 76 52 65 63 09 73 45 6e | 76 3b 0d 0d 09 09 65 72 |vRec.sEn|v;....er|
|000046a0| 72 6f 72 20 3d 20 53 79 | 73 45 6e 76 69 72 6f 6e |ror = Sy|sEnviron|
|000046b0| 73 28 20 31 2c 20 26 73 | 45 6e 76 20 29 3b 0d 09 |s( 1, &s|Env );..|
|000046c0| 09 67 2e 63 6f 6c 6f 72 | 51 44 46 6c 61 67 20 3d |.g.color|QDFlag =|
|000046d0| 20 73 45 6e 76 2e 68 61 | 73 43 6f 6c 6f 72 51 44 | sEnv.ha|sColorQD|
|000046e0| 3b 0d 09 09 67 2e 73 79 | 73 37 46 6c 61 67 20 3d |;...g.sy|s7Flag =|
|000046f0| 20 73 45 6e 76 2e 73 79 | 73 74 65 6d 56 65 72 73 | sEnv.sy|stemVers|
|00004700| 69 6f 6e 20 3e 3d 20 30 | 78 30 37 30 30 3b 0d 09 |ion >= 0|x0700;..|
|00004710| 7d 0d 23 65 6e 64 69 66 | 0d 0d 09 72 65 74 75 72 |}.#endif|...retur|
|00004720| 6e 20 65 72 72 6f 72 3b | 0d 7d 0d 0d 2f 2a 2a 2a |n error;|.}../***|
|00004730| 20 49 4e 49 54 20 54 4f | 4f 4c 42 4f 58 20 2a 2a | INIT TO|OLBOX **|
|00004740| 2a 2f 0d 73 74 61 74 69 | 63 20 4f 53 53 74 61 74 |*/.stati|c OSStat|
|00004750| 75 73 20 5f 69 6e 69 74 | 54 6f 6f 6c 62 6f 78 28 |us _init|Toolbox(|
|00004760| 20 76 6f 69 64 20 29 0d | 7b 0d 23 69 66 20 21 54 | void ).|{.#if !T|
|00004770| 41 52 47 45 54 5f 41 50 | 49 5f 4d 41 43 5f 43 41 |ARGET_AP|I_MAC_CA|
|00004780| 52 42 4f 4e 09 2f 2f 20 | 4c 52 3a 20 76 31 2e 36 |RBON.// |LR: v1.6|
|00004790| 0d 09 4d 61 78 41 70 70 | 6c 5a 6f 6e 65 28 29 3b |..MaxApp|lZone();|
|000047a0| 0d 09 49 6e 69 74 47 72 | 61 66 28 20 26 71 64 2e |..InitGr|af( &qd.|
|000047b0| 74 68 65 50 6f 72 74 20 | 29 3b 0d 09 49 6e 69 74 |thePort |);..Init|
|000047c0| 46 6f 6e 74 73 28 29 3b | 0d 09 46 6c 75 73 68 45 |Fonts();|..FlushE|
|000047d0| 76 65 6e 74 73 28 20 65 | 76 65 72 79 45 76 65 6e |vents( e|veryEven|
|000047e0| 74 2c 20 30 20 29 3b 0d | 09 49 6e 69 74 57 69 6e |t, 0 );.|.InitWin|
|000047f0| 64 6f 77 73 28 29 3b 0d | 09 49 6e 69 74 4d 65 6e |dows();.|.InitMen|
|00004800| 75 73 28 29 3b 0d 09 54 | 45 49 6e 69 74 28 29 3b |us();..T|EInit();|
|00004810| 0d 09 49 6e 69 74 44 69 | 61 6c 6f 67 73 28 20 30 |..InitDi|alogs( 0|
|00004820| 4c 20 29 3b 0d 23 65 6e | 64 69 66 0d 0d 09 6d 65 |L );.#en|dif...me|
|00004830| 6d 73 65 74 28 20 26 67 | 2c 20 30 2c 20 73 69 7a |mset( &g|, 0, siz|
|00004840| 65 6f 66 28 67 29 20 29 | 3b 09 2f 2f 20 6d 61 6b |eof(g) )|;.// mak|
|00004850| 65 20 73 75 72 65 20 77 | 65 20 68 61 76 65 20 61 |e sure w|e have a|
|00004860| 20 6b 6e 6f 77 6e 20 73 | 74 61 72 74 69 6e 67 20 | known s|tarting |
|00004870| 73 74 61 74 65 21 0d 0d | 09 63 61 72 65 74 54 69 |state!..|.caretTi|
|00004880| 6d 65 20 3d 20 28 47 65 | 74 43 61 72 65 74 54 69 |me = (Ge|tCaretTi|
|00004890| 6d 65 28 29 2f 33 29 2a | 32 3b 0d 09 72 65 74 75 |me()/3)*|2;..retu|
|000048a0| 72 6e 20 6e 6f 45 72 72 | 3b 0d 7d 0d 0d 2f 2f 20 |rn noErr|;.}..// |
|000048b0| 43 68 65 63 6b 20 69 66 | 20 57 61 69 74 4e 65 78 |Check if| WaitNex|
|000048c0| 74 45 76 65 6e 74 20 28 | 20 4d 75 6c 74 69 66 69 |tEvent (| Multifi|
|000048d0| 6e 64 65 72 20 29 20 69 | 73 20 69 6d 70 6c 65 6d |nder ) i|s implem|
|000048e0| 65 6e 74 65 64 20 6f 6e | 20 74 68 69 73 20 4d 61 |ented on| this Ma|
|000048f0| 63 69 6e 74 6f 73 68 0d | 23 69 66 20 21 54 41 52 |cintosh.|#if !TAR|
|00004900| 47 45 54 5f 41 50 49 5f | 4d 41 43 5f 43 41 52 42 |GET_API_|MAC_CARB|
|00004910| 4f 4e 09 2f 2f 20 4c 52 | 3a 20 76 31 2e 36 0d 73 |ON.// LR|: v1.6.s|
|00004920| 74 61 74 69 63 20 4f 53 | 53 74 61 74 75 73 20 5f |tatic OS|Status _|
|00004930| 69 6e 69 74 4d 75 6c 74 | 69 66 69 6e 64 65 72 28 |initMult|ifinder(|
|00004940| 20 76 6f 69 64 20 29 0d | 7b 0d 09 67 2e 57 4e 45 | void ).|{..g.WNE|
|00004950| 49 6d 70 6c 65 6d 65 6e | 74 65 64 20 3d 20 28 20 |Implemen|ted = ( |
|00004960| 4e 47 65 74 54 72 61 70 | 41 64 64 72 65 73 73 28 |NGetTrap|Address(|
|00004970| 5f 57 61 69 74 4e 65 78 | 74 45 76 65 6e 74 2c 20 |_WaitNex|tEvent, |
|00004980| 54 6f 6f 6c 54 72 61 70 | 29 20 21 3d 20 4e 47 65 |ToolTrap|) != NGe|
|00004990| 74 54 72 61 70 41 64 64 | 72 65 73 73 28 5f 55 6e |tTrapAdd|ress(_Un|
|000049a0| 69 6d 70 6c 65 6d 65 6e | 74 65 64 2c 20 54 6f 6f |implemen|ted, Too|
|000049b0| 6c 54 72 61 70 29 20 29 | 3b 0d 09 72 65 74 75 72 |lTrap) )|;..retur|
|000049c0| 6e 20 6e 6f 45 72 72 3b | 0d 7d 0d 23 65 6e 64 69 |n noErr;|.}.#endi|
|000049d0| 66 0d 0d 2f 2a 2a 2a 20 | 49 4e 49 54 20 47 4c 4f |f../*** |INIT GLO|
|000049e0| 42 41 4c 53 20 2a 2a 2a | 2f 0d 73 74 61 74 69 63 |BALS ***|/.static|
|000049f0| 20 4f 53 53 74 61 74 75 | 73 20 5f 69 6e 69 74 47 | OSStatu|s _initG|
|00004a00| 6c 6f 62 61 6c 73 28 20 | 76 6f 69 64 20 29 0d 7b |lobals( |void ).{|
|00004a10| 0d 09 2f 2f 20 63 68 65 | 63 6b 20 66 6f 72 20 64 |..// che|ck for d|
|00004a20| 72 61 67 20 6d 61 6e 61 | 67 65 72 20 70 72 65 73 |rag mana|ger pres|
|00004a30| 65 6e 63 65 2f 61 74 74 | 72 69 62 75 74 65 73 0d |ence/att|ributes.|
|00004a40| 09 53 49 6e 74 33 32 20 | 72 65 73 75 6c 74 20 3d |.SInt32 |result =|
|00004a50| 20 30 3b 0d 09 4f 53 53 | 74 61 74 75 73 20 65 72 | 0;..OSS|tatus er|
|00004a60| 72 6f 72 3b 0d 0d 09 65 | 72 72 6f 72 20 3d 20 47 |ror;...e|rror = G|
|00004a70| 65 73 74 61 6c 74 28 20 | 67 65 73 74 61 6c 74 44 |estalt( |gestaltD|
|00004a80| 72 61 67 4d 67 72 41 74 | 74 72 2c 20 26 72 65 73 |ragMgrAt|tr, &res|
|00004a90| 75 6c 74 20 29 3b 0d 09 | 67 2e 64 72 61 67 41 76 |ult );..|g.dragAv|
|00004aa0| 61 69 6c 61 62 6c 65 20 | 3d 20 28 42 6f 6f 6c 65 |ailable |= (Boole|
|00004ab0| 61 6e 29 20 28 72 65 73 | 75 6c 74 20 26 20 28 31 |an) (res|ult & (1|
|00004ac0| 20 3c 3c 20 67 65 73 74 | 61 6c 74 44 72 61 67 4d | << gest|altDragM|
|00004ad0| 67 72 50 72 65 73 65 6e | 74 29 29 3b 0d 09 67 2e |grPresen|t));..g.|
|00004ae0| 74 72 61 6e 73 6c 75 63 | 65 6e 74 44 72 61 67 20 |transluc|entDrag |
|00004af0| 3d 20 28 42 6f 6f 6c 65 | 61 6e 29 20 28 72 65 73 |= (Boole|an) (res|
|00004b00| 75 6c 74 20 26 20 28 31 | 20 3c 3c 20 67 65 73 74 |ult & (1| << gest|
|00004b10| 61 6c 74 44 72 61 67 4d | 67 72 48 61 73 49 6d 61 |altDragM|grHasIma|
|00004b20| 67 65 53 75 70 70 6f 72 | 74 29 29 3b 0d 09 0d 09 |geSuppor|t));....|
|00004b30| 2f 2f 20 63 68 65 63 6b | 20 61 70 70 65 61 72 61 |// check| appeara|
|00004b40| 6e 63 65 20 61 76 61 69 | 6c 61 62 6c 69 6c 74 79 |nce avai|lablilty|
|00004b50| 0d 09 2f 2f 20 30 35 2f | 31 30 2f 30 31 20 2d 20 |..// 05/|10/01 - |
|00004b60| 47 41 42 3a 20 72 65 73 | 75 6c 74 20 69 73 20 61 |GAB: res|ult is a|
|00004b70| 6e 20 69 6e 74 2c 20 6e | 6f 74 20 61 20 70 6f 69 |n int, n|ot a poi|
|00004b80| 6e 74 65 72 0d 09 72 65 | 73 75 6c 74 20 3d 20 30 |nter..re|sult = 0|
|00004b90| 3b 0d 09 65 72 72 6f 72 | 20 3d 20 47 65 73 74 61 |;..error| = Gesta|
|00004ba0| 6c 74 28 20 67 65 73 74 | 61 6c 74 41 70 70 65 61 |lt( gest|altAppea|
|00004bb0| 72 61 6e 63 65 41 74 74 | 72 2c 20 26 72 65 73 75 |ranceAtt|r, &resu|
|00004bc0| 6c 74 20 29 3b 0d 09 67 | 2e 61 70 70 65 61 72 61 |lt );..g|.appeara|
|00004bd0| 6e 63 65 41 76 61 69 6c | 61 62 6c 65 20 3d 20 28 |nceAvail|able = (|
|00004be0| 42 6f 6f 6c 65 61 6e 29 | 20 28 72 65 73 75 6c 74 |Boolean)| (result|
|00004bf0| 20 26 20 28 31 20 3c 3c | 20 67 65 73 74 61 6c 74 | & (1 <<| gestalt|
|00004c00| 41 70 70 65 61 72 61 6e | 63 65 45 78 69 73 74 73 |Appearan|ceExists|
|00004c10| 29 29 3b 0d 0d 09 69 66 | 28 20 67 2e 61 70 70 65 |));...if|( g.appe|
|00004c20| 61 72 61 6e 63 65 41 76 | 61 69 6c 61 62 6c 65 20 |aranceAv|ailable |
|00004c30| 29 0d 09 7b 0d 09 09 72 | 65 73 75 6c 74 20 3d 20 |)..{...r|esult = |
|00004c40| 30 3b 0d 09 09 65 72 72 | 6f 72 20 3d 20 47 65 73 |0;...err|or = Ges|
|00004c50| 74 61 6c 74 28 20 67 65 | 73 74 61 6c 74 41 70 70 |talt( ge|staltApp|
|00004c60| 65 61 72 61 6e 63 65 56 | 65 72 73 69 6f 6e 2c 20 |earanceV|ersion, |
|00004c70| 26 72 65 73 75 6c 74 20 | 29 3b 09 2f 2f 4c 52 20 |&result |);.//LR |
|00004c80| 31 38 31 20 2d 2d 20 6f | 6e 6c 79 20 75 73 65 20 |181 -- o|nly use |
|00004c90| 61 70 70 65 61 72 61 6e | 63 65 20 76 31 2e 31 20 |appearan|ce v1.1 |
|00004ca0| 6f 72 20 6c 61 74 65 72 | 21 0d 09 09 67 2e 75 73 |or later|!...g.us|
|00004cb0| 65 41 70 70 65 61 72 61 | 6e 63 65 20 3d 20 28 72 |eAppeara|nce = (r|
|00004cc0| 65 73 75 6c 74 20 3e 3d | 20 30 78 31 31 30 29 3b |esult >=| 0x110);|
|00004cd0| 0d 09 7d 0d 09 65 6c 73 | 65 0d 09 09 67 2e 75 73 |..}..els|e...g.us|
|00004ce0| 65 41 70 70 65 61 72 61 | 6e 63 65 20 3d 20 66 61 |eAppeara|nce = fa|
|00004cf0| 6c 73 65 3b 0d 0d 09 69 | 66 28 20 67 2e 75 73 65 |lse;...i|f( g.use|
|00004d00| 41 70 70 65 61 72 61 6e | 63 65 20 29 0d 09 09 52 |Appearan|ce )...R|
|00004d10| 65 67 69 73 74 65 72 41 | 70 70 65 61 72 61 6e 63 |egisterA|ppearanc|
|00004d20| 65 43 6c 69 65 6e 74 28 | 29 3b 0d 09 0d 09 2f 2f |eClient(|);....//|
|00004d30| 20 63 68 65 63 6b 20 6e | 61 76 20 73 65 72 76 69 | check n|av servi|
|00004d40| 63 65 73 20 61 76 61 69 | 6c 61 62 6c 69 6c 74 79 |ces avai|lablilty|
|00004d50| 0d 09 2f 2f 20 30 35 2f | 31 30 2f 30 31 20 2d 20 |..// 05/|10/01 - |
|00004d60| 47 41 42 3a 20 4d 50 57 | 20 65 6e 76 69 72 6f 6e |GAB: MPW| environ|
|00004d70| 6d 65 6e 74 20 73 75 70 | 70 6f 72 74 0d 23 69 66 |ment sup|port.#if|
|00004d80| 20 21 64 65 66 69 6e 65 | 64 28 5f 5f 4d 43 36 38 | !define|d(__MC68|
|00004d90| 4b 5f 5f 29 20 26 26 20 | 21 64 65 66 69 6e 65 64 |K__) && |!defined|
|00004da0| 28 5f 5f 53 43 5f 5f 29 | 0d 09 67 2e 6e 61 76 41 |(__SC__)|..g.navA|
|00004db0| 76 61 69 6c 61 62 6c 65 | 20 3d 20 28 42 6f 6f 6c |vailable| = (Bool|
|00004dc0| 65 61 6e 29 20 4e 61 76 | 53 65 72 76 69 63 65 73 |ean) Nav|Services|
|00004dd0| 41 76 61 69 6c 61 62 6c | 65 28 29 3b 0d 09 2f 2f |Availabl|e();..//|
|00004de0| 20 42 42 3a 20 63 68 65 | 63 6b 20 66 6f 72 20 4e | BB: che|ck for N|
|00004df0| 61 76 6c 69 62 20 76 65 | 72 73 69 6f 6e 2c 20 6f |avlib ve|rsion, o|
|00004e00| 6c 64 65 72 20 76 65 72 | 73 69 6f 6e 73 20 77 65 |lder ver|sions we|
|00004e10| 72 65 20 76 65 72 79 20 | 62 75 67 67 79 20 0d 09 |re very |buggy ..|
|00004e20| 67 2e 75 73 65 4e 61 76 | 53 65 72 76 69 63 65 73 |g.useNav|Services|
|00004e30| 20 3d 20 28 28 67 2e 6e | 61 76 41 76 61 69 6c 61 | = ((g.n|avAvaila|
|00004e40| 62 6c 65 29 20 26 26 20 | 28 4e 61 76 4c 69 62 72 |ble) && |(NavLibr|
|00004e50| 61 72 79 56 65 72 73 69 | 6f 6e 28 29 20 3e 3d 20 |aryVersi|on() >= |
|00004e60| 30 78 30 31 31 30 29 29 | 3b 0d 0d 09 69 66 28 20 |0x0110))|;...if( |
|00004e70| 67 2e 75 73 65 4e 61 76 | 53 65 72 76 69 63 65 73 |g.useNav|Services|
|00004e80| 20 29 0d 09 7b 0d 09 20 | 20 69 66 20 28 20 4e 61 | )..{.. | if ( Na|
|00004e90| 76 4c 6f 61 64 28 29 20 | 21 3d 20 6e 6f 45 72 72 |vLoad() |!= noErr|
|00004ea0| 20 29 20 2f 2f 20 42 42 | 3a 20 6d 61 6b 65 20 73 | ) // BB|: make s|
|00004eb0| 75 72 65 20 4e 61 76 4c | 6f 61 64 20 72 65 74 75 |ure NavL|oad retu|
|00004ec0| 72 6e 73 20 6e 6f 45 72 | 72 0d 09 20 20 20 20 67 |rns noEr|r.. g|
|00004ed0| 2e 75 73 65 4e 61 76 53 | 65 72 76 69 63 65 73 20 |.useNavS|ervices |
|00004ee0| 3d 20 66 61 6c 73 65 3b | 0d 09 7d 20 20 20 20 0d |= false;|..} .|
|00004ef0| 0d 09 2f 2f 20 53 74 61 | 72 74 75 70 20 49 6e 74 |..// Sta|rtup Int|
|00004f00| 65 72 6e 65 74 43 6f 6e | 66 69 67 20 28 73 68 6f |ernetCon|fig (sho|
|00004f10| 75 6c 64 20 6f 6e 6c 79 | 20 62 65 20 64 6f 6e 65 |uld only| be done|
|00004f20| 20 6f 6e 63 65 21 29 0d | 09 69 66 28 20 49 43 53 | once!).|.if( ICS|
|00004f30| 74 61 72 74 20 29 0d 09 | 7b 0d 09 09 65 72 72 6f |tart )..|{...erro|
|00004f40| 72 20 3d 20 49 43 53 74 | 61 72 74 28 20 26 67 2e |r = ICSt|art( &g.|
|00004f50| 69 63 52 65 66 2c 20 6b | 41 70 70 43 72 65 61 74 |icRef, k|AppCreat|
|00004f60| 6f 72 20 29 3b 09 09 09 | 2f 2f 20 73 74 61 72 74 |or );...|// start|
|00004f70| 20 49 43 20 75 70 0d 09 | 09 69 66 28 20 21 65 72 | IC up..|.if( !er|
|00004f80| 72 6f 72 20 29 0d 09 09 | 7b 0d 23 69 66 20 21 54 |ror )...|{.#if !T|
|00004f90| 41 52 47 45 54 5f 41 50 | 49 5f 4d 41 43 5f 43 41 |ARGET_AP|I_MAC_CA|
|00004fa0| 52 42 4f 4e 0d 09 09 09 | 69 66 28 20 49 43 46 69 |RBON....|if( ICFi|
|00004fb0| 6e 64 43 6f 6e 66 69 67 | 46 69 6c 65 20 29 0d 09 |ndConfig|File )..|
|00004fc0| 09 09 09 65 72 72 6f 72 | 20 3d 20 49 43 46 69 6e |...error| = ICFin|
|00004fd0| 64 43 6f 6e 66 69 67 46 | 69 6c 65 28 20 67 2e 69 |dConfigF|ile( g.i|
|00004fe0| 63 52 65 66 2c 20 30 2c | 20 4e 55 4c 4c 20 29 3b |cRef, 0,| NULL );|
|00004ff0| 09 2f 2f 20 63 6f 6e 66 | 69 67 75 72 65 20 49 43 |.// conf|igure IC|
|00005000| 0d 23 65 6e 64 69 66 0d | 09 09 7d 0d 09 7d 0d 23 |.#endif.|..}..}.#|
|00005010| 65 6e 64 69 66 0d 0d 09 | 2f 2f 20 61 70 70 6c 69 |endif...|// appli|
|00005020| 63 61 74 69 6f 6e 20 67 | 6c 6f 62 61 6c 20 69 6e |cation g|lobal in|
|00005030| 69 74 61 6c 69 73 61 74 | 69 6f 6e 0d 09 67 2e 66 |italisat|ion..g.f|
|00005040| 6f 72 6b 4d 6f 64 65 20 | 3d 20 46 4d 5f 53 6d 61 |orkMode |= FM_Sma|
|00005050| 72 74 3b 0d 09 67 2e 68 | 69 67 68 43 68 61 72 20 |rt;..g.h|ighChar |
|00005060| 3d 20 30 78 37 46 3b 0d | 09 67 2e 77 61 74 63 68 |= 0x7F;.|.g.watch|
|00005070| 20 3d 20 47 65 74 43 75 | 72 73 6f 72 28 20 77 61 | = GetCu|rsor( wa|
|00005080| 74 63 68 43 75 72 73 6f | 72 20 29 3b 0d 09 67 2e |tchCurso|r );..g.|
|00005090| 69 42 65 61 6d 20 3d 20 | 47 65 74 43 75 72 73 6f |iBeam = |GetCurso|
|000050a0| 72 28 20 69 42 65 61 6d | 43 75 72 73 6f 72 20 29 |r( iBeam|Cursor )|
|000050b0| 3b 0d 09 67 2e 73 65 61 | 72 63 68 42 75 66 66 65 |;..g.sea|rchBuffe|
|000050c0| 72 5b 30 5d 20 3d 20 67 | 2e 73 65 61 72 63 68 54 |r[0] = g|.searchT|
|000050d0| 65 78 74 5b 30 5d 20 3d | 20 67 2e 67 6f 74 6f 54 |ext[0] =| g.gotoT|
|000050e0| 65 78 74 5b 30 5d 20 3d | 20 30 3b 0d 09 67 2e 73 |ext[0] =| 0;..g.s|
|000050f0| 65 61 72 63 68 44 69 73 | 61 62 6c 65 64 20 3d 20 |earchDis|abled = |
|00005100| 66 61 6c 73 65 3b 0d 09 | 67 2e 73 65 61 72 63 68 |false;..|g.search|
|00005110| 44 6c 67 20 3d 20 4e 55 | 4c 4c 3b 0d 09 67 2e 67 |Dlg = NU|LL;..g.g|
|00005120| 6f 74 6f 44 6c 67 20 3d | 20 4e 55 4c 4c 3b 0d 0d |otoDlg =| NULL;..|
|00005130| 09 2f 2f 4c 52 3a 20 31 | 2e 36 36 20 2d 20 63 6c |.//LR: 1|.66 - cl|
|00005140| 65 61 72 20 75 6e 64 6f | 2f 72 65 64 6f 20 72 65 |ear undo|/redo re|
|00005150| 63 6f 72 64 73 0d 09 6d | 65 6d 73 65 74 28 20 26 |cords..m|emset( &|
|00005160| 67 55 6e 64 6f 2c 20 73 | 69 7a 65 6f 66 28 55 6e |gUndo, s|izeof(Un|
|00005170| 64 6f 52 65 63 6f 72 64 | 29 2c 20 30 20 29 3b 0d |doRecord|), 0 );.|
|00005180| 09 6d 65 6d 73 65 74 28 | 20 26 67 52 65 64 6f 2c |.memset(| &gRedo,|
|00005190| 20 73 69 7a 65 6f 66 28 | 55 6e 64 6f 52 65 63 6f | sizeof(|UndoReco|
|000051a0| 72 64 29 2c 20 30 20 29 | 3b 0d 0d 09 72 65 74 75 |rd), 0 )|;...retu|
|000051b0| 72 6e 28 20 6e 6f 45 72 | 72 20 29 3b 0d 7d 0d 0d |rn( noEr|r );.}..|
|000051c0| 2f 2a 2a 2a 20 4d 41 49 | 4e 20 2a 2a 2a 2f 0d 69 |/*** MAI|N ***/.i|
|000051d0| 6e 74 20 6d 61 69 6e 28 | 69 6e 74 20 61 72 67 63 |nt main(|int argc|
|000051e0| 2c 20 63 68 61 72 20 2a | 61 72 67 76 5b 5d 29 09 |, char *|argv[]).|
|000051f0| 2f 2f 4c 52 20 31 37 35 | 0d 7b 0d 23 70 72 61 67 |//LR 175|.{.#prag|
|00005200| 6d 61 20 75 6e 75 73 65 | 64 28 61 72 67 63 2c 61 |ma unuse|d(argc,a|
|00005210| 72 67 76 29 0d 09 2f 2f | 20 53 74 61 6e 64 61 72 |rgv)..//| Standar|
|00005220| 64 20 4d 61 63 20 49 6e | 69 74 69 61 6c 69 7a 61 |d Mac In|itializa|
|00005230| 74 69 6f 6e 0d 09 5f 69 | 6e 69 74 54 6f 6f 6c 62 |tion.._i|nitToolb|
|00005240| 6f 78 28 29 3b 0d 0d 23 | 69 66 20 21 54 41 52 47 |ox();..#|if !TARG|
|00005250| 45 54 5f 41 50 49 5f 4d | 41 43 5f 43 41 52 42 4f |ET_API_M|AC_CARBO|
|00005260| 4e 09 2f 2f 20 4c 52 3a | 20 76 31 2e 36 0d 09 2f |N.// LR:| v1.6../|
|00005270| 2f 20 43 68 65 63 6b 20 | 69 66 20 4d 75 6c 74 69 |/ Check |if Multi|
|00005280| 66 69 6e 64 65 72 20 28 | 20 57 61 69 74 4e 65 78 |finder (| WaitNex|
|00005290| 74 45 76 65 6e 74 20 29 | 20 69 73 20 69 6d 70 6c |tEvent )| is impl|
|000052a0| 65 6d 65 6e 74 65 64 0d | 09 5f 69 6e 69 74 4d 75 |emented.|._initMu|
|000052b0| 6c 74 69 66 69 6e 64 65 | 72 28 29 3b 0d 23 65 6e |ltifinde|r();.#en|
|000052c0| 64 69 66 0d 0d 09 2f 2f | 20 43 68 65 63 6b 20 72 |dif...//| Check r|
|000052d0| 75 6e 6e 69 6e 67 20 65 | 6e 76 69 72 6f 6e 6d 65 |unning e|nvironme|
|000052e0| 6e 74 0d 09 5f 63 68 65 | 63 6b 45 6e 76 69 72 6f |nt.._che|ckEnviro|
|000052f0| 6e 6d 65 6e 74 28 29 3b | 0d 0d 09 5f 69 6e 69 74 |nment();|..._init|
|00005300| 47 6c 6f 62 61 6c 73 28 | 29 3b 0d 09 5f 69 6e 69 |Globals(|);.._ini|
|00005310| 74 41 70 70 6c 65 45 76 | 65 6e 74 73 28 29 3b 0d |tAppleEv|ents();.|
|00005320| 09 49 6e 69 74 4d 65 6e | 75 62 61 72 28 29 3b 0d |.InitMen|ubar();.|
|00005330| 0d 09 50 72 65 66 73 4c | 6f 61 64 28 29 3b 0d 09 |..PrefsL|oad();..|
|00005340| 49 6e 69 74 69 61 6c 69 | 7a 65 45 64 69 74 6f 72 |Initiali|zeEditor|
|00005350| 28 29 3b 0d 09 41 64 6a | 75 73 74 4d 65 6e 75 73 |();..Adj|ustMenus|
|00005360| 28 29 3b 0d 0d 23 69 66 | 20 54 41 52 47 45 54 5f |();..#if| TARGET_|
|00005370| 41 50 49 5f 4d 41 43 5f | 43 41 52 42 4f 4e 0d 09 |API_MAC_|CARBON..|
|00005380| 5f 69 6e 69 74 43 61 72 | 62 6f 6e 45 76 65 6e 74 |_initCar|bonEvent|
|00005390| 73 28 29 3b 09 2f 2f 45 | 46 20 31 38 30 20 2d 2d |s();.//E|F 180 --|
|000053a0| 20 68 61 6e 64 6c 65 20 | 63 61 72 62 6f 6e 20 65 | handle |carbon e|
|000053b0| 76 65 6e 74 73 0d 23 65 | 6c 73 65 0d 09 69 66 28 |vents.#e|lse..if(|
|000053c0| 20 21 67 2e 73 79 73 37 | 46 6c 61 67 20 29 0d 09 | !g.sys7|Flag )..|
|000053d0| 09 41 73 6b 45 64 69 74 | 57 69 6e 64 6f 77 28 20 |.AskEdit|Window( |
|000053e0| 6b 57 69 6e 64 6f 77 4e | 6f 72 6d 61 6c 20 29 3b |kWindowN|ormal );|
|000053f0| 0d 23 65 6e 64 69 66 0d | 0d 09 49 6e 69 74 43 75 |.#endif.|..InitCu|
|00005400| 72 73 6f 72 28 29 3b 09 | 2f 2f 20 4e 53 3a 20 76 |rsor();.|// NS: v|
|00005410| 31 2e 36 2e 36 2c 20 6d | 6f 76 65 64 20 68 65 72 |1.6.6, m|oved her|
|00005420| 65 20 66 72 6f 6d 20 5f | 69 6e 69 74 54 6f 6f 6c |e from _|initTool|
|00005430| 62 6f 78 28 29 0d 09 0d | 23 69 66 20 54 41 52 47 |box()...|#if TARG|
|00005440| 45 54 5f 41 50 49 5f 4d | 41 43 5f 43 41 52 42 4f |ET_API_M|AC_CARBO|
|00005450| 4e 20 20 2f 2f 20 53 45 | 4c 3a 20 31 2e 37 20 2d |N // SE|L: 1.7 -|
|00005460| 20 63 61 72 62 6f 6e 20 | 73 65 73 73 69 6f 6e 20 | carbon |session |
|00005470| 62 61 73 65 64 20 70 72 | 69 6e 74 69 6e 67 0d 09 |based pr|inting..|
|00005480| 67 2e 70 61 67 65 46 6f | 72 6d 61 74 20 3d 20 6b |g.pageFo|rmat = k|
|00005490| 50 4d 4e 6f 50 61 67 65 | 46 6f 72 6d 61 74 3b 0d |PMNoPage|Format;.|
|000054a0| 09 67 2e 70 72 69 6e 74 | 53 65 74 74 69 6e 67 73 |.g.print|Settings|
|000054b0| 20 3d 20 6b 50 4d 4e 6f | 50 72 69 6e 74 53 65 74 | = kPMNo|PrintSet|
|000054c0| 74 69 6e 67 73 3b 0d 23 | 65 6e 64 69 66 0d 0d 09 |tings;.#|endif...|
|000054d0| 2f 2f 20 6d 61 69 6e 20 | 65 76 65 6e 74 20 6c 6f |// main |event lo|
|000054e0| 6f 70 0d 09 77 68 69 6c | 65 28 20 21 67 2e 71 75 |op..whil|e( !g.qu|
|000054f0| 69 74 46 6c 61 67 20 29 | 0d 09 09 48 61 6e 64 6c |itFlag )|...Handl|
|00005500| 65 45 76 65 6e 74 28 29 | 3b 0d 0d 09 43 6c 65 61 |eEvent()|;...Clea|
|00005510| 6e 75 70 45 64 69 74 6f | 72 28 29 3b 0d 0d 23 69 |nupEdito|r();..#i|
|00005520| 66 20 21 64 65 66 69 6e | 65 64 28 5f 5f 4d 43 36 |f !defin|ed(__MC6|
|00005530| 38 4b 5f 5f 29 20 26 26 | 20 21 64 65 66 69 6e 65 |8K__) &&| !define|
|00005540| 64 28 5f 5f 53 43 5f 5f | 29 09 09 2f 2f 4c 52 20 |d(__SC__|)..//LR |
|00005550| 31 2e 37 33 20 2d 2d 20 | 6e 6f 74 20 61 76 61 69 |1.73 -- |not avai|
|00005560| 6c 61 62 6c 65 20 66 6f | 72 20 36 38 4b 20 28 77 |lable fo|r 68K (w|
|00005570| 6f 6e 27 74 20 65 76 65 | 6e 20 6c 69 6e 6b 21 29 |on't eve|n link!)|
|00005580| 0d 09 2f 2f 20 42 42 3a | 20 55 6e 6c 6f 61 64 20 |..// BB:| Unload |
|00005590| 4e 61 76 53 65 72 76 69 | 63 65 73 0d 09 69 66 28 |NavServi|ces..if(|
|000055a0| 20 67 2e 75 73 65 4e 61 | 76 53 65 72 76 69 63 65 | g.useNa|vService|
|000055b0| 73 20 29 0d 09 09 4e 61 | 76 55 6e 6c 6f 61 64 28 |s )...Na|vUnload(|
|000055c0| 29 3b 0d 23 65 6e 64 69 | 66 0d 0d 2f 2f 20 30 35 |);.#endi|f..// 05|
|000055d0| 2f 31 30 2f 30 31 20 2d | 20 47 41 42 3a 20 4d 50 |/10/01 -| GAB: MP|
|000055e0| 57 20 65 6e 76 69 72 6f | 6e 6d 65 6e 74 20 73 75 |W enviro|nment su|
|000055f0| 70 70 6f 72 74 0d 23 69 | 66 20 21 64 65 66 69 6e |pport.#i|f !defin|
|00005600| 65 64 28 5f 5f 4d 43 36 | 38 4b 5f 5f 29 20 26 26 |ed(__MC6|8K__) &&|
|00005610| 20 21 64 65 66 69 6e 65 | 64 28 5f 5f 53 43 5f 5f | !define|d(__SC__|
|00005620| 29 0d 09 69 66 28 20 49 | 43 53 74 6f 70 20 29 0d |)..if( I|CStop ).|
|00005630| 09 7b 0d 09 09 49 43 53 | 74 6f 70 28 20 67 2e 69 |.{...ICS|top( g.i|
|00005640| 63 52 65 66 20 29 3b 09 | 2f 2f 20 73 68 75 74 64 |cRef );.|// shutd|
|00005650| 6f 77 6e 20 49 43 0d 09 | 7d 0d 23 65 6e 64 69 66 |own IC..|}.#endif|
|00005660| 0d 09 72 65 74 75 72 6e | 28 20 30 20 29 3b 0d 7d |..return|( 0 );.}|
|00005670| 0d 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005680| 00 00 01 00 00 00 01 99 | 00 00 00 99 00 00 00 69 |........|.......i|
|00005690| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000056a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000056b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000056c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000056d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000056e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000056f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005700| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005710| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005720| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005730| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005740| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005750| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005770| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005780| 00 00 00 41 16 95 da 47 | 3f e5 32 30 00 04 00 00 |...A...G|?.20....|
|00005790| 00 01 00 00 00 00 b9 e7 | 4c dc b9 e7 4c dc 00 00 |........|L...L...|
|000057a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 06 72 |........|.......r|
|000057b0| 61 76 69 6e 67 00 00 00 | 06 4d 61 69 6e 2e 63 00 |aving...|.Main.c.|
|000057c0| 00 00 00 00 00 00 00 00 | 04 00 01 00 01 00 00 00 |........|........|
|000057d0| 48 00 09 4d 6f 6e 61 63 | 6f 00 00 00 00 00 00 00 |H..Monac|o.......|
|000057e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000057f0| 00 00 00 00 02 00 04 00 | 2e 00 0a 01 ff 02 e5 00 |........|........|
|00005800| 2e 00 0a 01 ff 02 e5 b9 | e7 5c 37 00 00 4c 00 00 |........|.\7..L..|
|00005810| 00 4c 03 00 00 49 8f 01 | 00 00 00 01 00 00 00 01 |.L...I..|........|
|00005820| 99 00 00 00 99 00 00 00 | 69 53 4f 52 54 03 26 00 |........|iSORT.&.|
|00005830| 80 00 1c 00 5a 00 02 4d | 50 53 52 00 00 00 1a 4d |....Z..M|PSR....M|
|00005840| 57 42 42 00 00 00 26 63 | 6b 69 64 00 00 00 32 03 |WBB...&c|kid...2.|
|00005850| ed ff ff 00 00 00 4d 00 | 00 00 00 03 f0 ff ff 00 |......M.|........|
|00005860| 00 00 45 00 00 00 00 00 | 80 00 00 00 00 00 00 00 |..E.....|........|
|00005870| 00 00 00 0e 50 72 6f 6a | 65 63 74 6f 72 20 44 61 |....Proj|ector Da|
|00005880| 74 61 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |ta......|........|
|00005890| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000058a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000058b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000058c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000058d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000058e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000058f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+