home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 16 / IOPROG_16.ISO / soft / macaxsdk / macsdk.hqx / ActiveX DR3 SDK / ActiveX SDK / Sample Containers / SimpleContainer / Callbacks.c < prev    next >
MacBinary  |  1997-09-17  |  12.9 KB  |  [TEXT/CWIE]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


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

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Wed Sep 17 19:20:39 1997, modified Wed Sep 17 19:20:39 1997, creator 'CWIE', type ASCII, 12473 bytes "Callbacks.c" , at 0x3139 474 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[CWIE]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0b 43 61 6c 6c 62 61 | 63 6b 73 2e 63 00 00 00 |..Callba|cks.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 00 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 30 b9 00 | 00 01 da b0 46 16 47 b0 |.....0..|....F.G.|
|00000060| 46 16 47 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |F.G.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 05 6f 00 00 |........|.....o..|
|00000080| 2f 2f 0d 2f 2f 09 43 61 | 6c 6c 62 61 63 6b 73 2e |//.//.Ca|llbacks.|
|00000090| 63 0d 2f 2f 0d 2f 2f 20 | 3e 3e 3e 20 a9 20 31 39 |c.//.// |>>> . 19|
|000000a0| 39 36 2d 31 39 39 37 20 | 4d 69 63 72 6f 73 6f 66 |96-1997 |Microsof|
|000000b0| 74 20 43 6f 72 70 6f 72 | 61 74 69 6f 6e 2e 20 20 |t Corpor|ation. |
|000000c0| 41 6c 6c 20 72 69 67 68 | 74 73 20 72 65 73 65 72 |All righ|ts reser|
|000000d0| 76 65 64 2e 20 3c 3c 3c | 0d 2f 2f 0d 0d 23 69 6e |ved. <<<|.//..#in|
|000000e0| 63 6c 75 64 65 20 22 41 | 63 74 69 76 65 58 41 50 |clude "A|ctiveXAP|
|000000f0| 49 2e 68 22 0d 23 69 6e | 63 6c 75 64 65 20 3c 49 |I.h".#in|clude <I|
|00000100| 49 6e 74 65 72 6e 65 74 | 45 78 70 6c 6f 72 65 72 |Internet|Explorer|
|00000110| 2e 68 3e 0d 23 69 6e 63 | 6c 75 64 65 20 22 44 6f |.h>.#inc|lude "Do|
|00000120| 63 75 6d 65 6e 74 2e 68 | 22 0d 23 69 6e 63 6c 75 |cument.h|".#inclu|
|00000130| 64 65 20 22 46 69 67 75 | 72 65 2e 68 22 0d 23 69 |de "Figu|re.h".#i|
|00000140| 6e 63 6c 75 64 65 20 22 | 41 70 70 2e 68 22 0d 23 |nclude "|App.h".#|
|00000150| 69 6e 63 6c 75 64 65 20 | 22 43 61 6c 6c 62 61 63 |include |"Callbac|
|00000160| 6b 73 2e 68 22 0d 0d 73 | 74 61 74 69 63 20 76 6f |ks.h"..s|tatic vo|
|00000170| 69 64 20 53 61 76 65 50 | 6f 72 74 53 74 61 74 65 |id SaveP|ortState|
|00000180| 28 41 58 50 6c 61 74 66 | 6f 72 6d 50 6f 72 74 2a |(AXPlatf|ormPort*|
|00000190| 20 50 6f 72 74 29 3b 0d | 73 74 61 74 69 63 20 76 | Port);.|static v|
|000001a0| 6f 69 64 20 52 65 73 74 | 6f 72 65 50 6f 72 74 53 |oid Rest|orePortS|
|000001b0| 74 61 74 65 28 76 6f 69 | 64 29 3b 0d 0d 74 79 70 |tate(voi|d);..typ|
|000001c0| 65 64 65 66 20 73 74 72 | 75 63 74 0d 7b 0d 09 47 |edef str|uct.{..G|
|000001d0| 72 61 66 50 74 72 09 09 | 09 09 50 6f 72 74 3b 0d |rafPtr..|..Port;.|
|000001e0| 09 52 67 6e 48 61 6e 64 | 6c 65 20 09 09 09 43 6c |.RgnHand|le ...Cl|
|000001f0| 69 70 52 67 6e 3b 0d 09 | 52 65 63 74 20 09 09 09 |ipRgn;..|Rect ...|
|00000200| 09 50 6f 72 74 52 65 63 | 74 3b 0d 09 50 65 6e 53 |.PortRec|t;..PenS|
|00000210| 74 61 74 65 09 09 09 50 | 65 6e 53 74 61 74 65 3b |tate...P|enState;|
|00000220| 0d 09 49 6e 74 31 36 09 | 09 09 09 54 65 78 74 46 |..Int16.|...TextF|
|00000230| 6f 6e 74 3b 0d 09 49 6e | 74 31 36 09 09 09 09 54 |ont;..In|t16....T|
|00000240| 65 78 74 4d 6f 64 65 3b | 0d 09 49 6e 74 31 36 09 |extMode;|..Int16.|
|00000250| 09 09 09 54 65 78 74 53 | 69 7a 65 3b 0d 09 49 6e |...TextS|ize;..In|
|00000260| 74 31 36 09 09 09 09 54 | 65 78 74 46 61 63 65 3b |t16....T|extFace;|
|00000270| 0d 09 52 47 42 43 6f 6c | 6f 72 09 09 09 46 6f 72 |..RGBCol|or...For|
|00000280| 65 43 6f 6c 6f 72 3b 0d | 09 52 47 42 43 6f 6c 6f |eColor;.|.RGBColo|
|00000290| 72 09 09 09 42 61 63 6b | 43 6f 6c 6f 72 3b 0d 7d |r...Back|Color;.}|
|000002a0| 0d 50 6f 72 74 53 74 61 | 74 65 3b 0d 0d 0d 23 70 |.PortSta|te;...#p|
|000002b0| 72 61 67 6d 61 20 6d 61 | 72 6b 20 3d 3d 3d 3d 3d |ragma ma|rk =====|
|000002c0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 20 53 69 74 65 43 61 |========|= SiteCa|
|000002d0| 6c 6c 62 61 63 6b 73 20 | 49 6e 74 65 72 66 61 63 |llbacks |Interfac|
|000002e0| 65 20 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |e ======|========|
|000002f0| 3d 3d 3d 3d 3d 0d 0d 2f | 2f 0d 2f 2f 20 20 53 69 |=====../|/.// Si|
|00000300| 74 65 5f 52 65 71 75 65 | 73 74 46 6f 63 75 73 0d |te_Reque|stFocus.|
|00000310| 2f 2f 0d 2f 2f 20 20 61 | 72 62 69 74 72 61 74 65 |//.// a|rbitrate|
|00000320| 20 66 6f 63 69 2c 20 72 | 69 67 68 74 20 6e 6f 77 | foci, r|ight now|
|00000330| 20 61 20 73 69 6e 67 6c | 65 20 63 6f 6e 74 72 6f | a singl|e contro|
|00000340| 6c 20 6f 77 6e 73 20 41 | 4c 4c 20 66 6f 63 69 0d |l owns A|LL foci.|
|00000350| 2f 2f 0d 0d 41 58 45 72 | 72 6f 72 43 6f 64 65 20 |//..AXEr|rorCode |
|00000360| 53 69 74 65 5f 52 65 71 | 75 65 73 74 46 6f 63 75 |Site_Req|uestFocu|
|00000370| 73 20 28 41 58 52 65 66 | 49 44 20 69 6e 43 6c 69 |s (AXRef|ID inCli|
|00000380| 65 6e 74 53 69 74 65 49 | 44 2c 20 42 6f 6f 6c 65 |entSiteI|D, Boole|
|00000390| 61 6e 38 20 69 6e 41 63 | 71 75 69 72 65 2c 20 41 |an8 inAc|quire, A|
|000003a0| 58 46 6f 63 75 73 53 65 | 74 20 69 6e 46 6f 63 75 |XFocusSe|t inFocu|
|000003b0| 73 29 0d 7b 0d 23 70 72 | 61 67 6d 61 20 75 6e 75 |s).{.#pr|agma unu|
|000003c0| 73 65 64 28 69 6e 46 6f | 63 75 73 29 0d 09 46 69 |sed(inFo|cus)..Fi|
|000003d0| 67 75 72 65 44 61 74 61 | 50 74 72 09 57 68 69 63 |gureData|Ptr.Whic|
|000003e0| 68 46 69 67 75 72 65 20 | 3d 20 28 46 69 67 75 72 |hFigure |= (Figur|
|000003f0| 65 44 61 74 61 50 74 72 | 29 20 69 6e 43 6c 69 65 |eDataPtr|) inClie|
|00000400| 6e 74 53 69 74 65 49 44 | 3b 0d 09 41 58 45 72 72 |ntSiteID|;..AXErr|
|00000410| 6f 72 43 6f 64 65 09 09 | 52 65 74 75 72 6e 56 61 |orCode..|ReturnVa|
|00000420| 6c 75 65 20 3d 20 6b 41 | 58 46 61 69 6c 45 72 72 |lue = kA|XFailErr|
|00000430| 3b 0d 0d 09 69 66 20 28 | 69 6e 41 63 71 75 69 72 |;...if (|inAcquir|
|00000440| 65 29 09 2f 2f 09 64 6f | 69 6e 67 20 61 6e 20 61 |e).//.do|ing an a|
|00000450| 63 71 75 69 72 65 0d 09 | 7b 0d 09 09 69 66 20 28 |cquire..|{...if (|
|00000460| 67 41 70 70 44 61 74 61 | 2e 46 6f 63 75 73 46 69 |gAppData|.FocusFi|
|00000470| 67 75 72 65 20 26 26 20 | 67 41 70 70 44 61 74 61 |gure && |gAppData|
|00000480| 2e 46 6f 63 75 73 46 69 | 67 75 72 65 20 21 3d 20 |.FocusFi|gure != |
|00000490| 57 68 69 63 68 46 69 67 | 75 72 65 29 0d 09 09 7b |WhichFig|ure)...{|
|000004a0| 0d 09 09 09 41 58 5f 53 | 65 74 46 6f 63 75 73 28 |....AX_S|etFocus(|
|000004b0| 67 41 70 70 44 61 74 61 | 2e 46 6f 63 75 73 46 69 |gAppData|.FocusFi|
|000004c0| 67 75 72 65 2d 3e 53 69 | 74 65 2c 20 6b 41 58 52 |gure->Si|te, kAXR|
|000004d0| 65 6c 65 61 73 65 43 6f | 6d 6d 61 6e 64 2c 20 6b |eleaseCo|mmand, k|
|000004e0| 41 58 4b 65 79 62 6f 61 | 72 64 46 6f 63 75 73 29 |AXKeyboa|rdFocus)|
|000004f0| 3b 0d 09 09 09 53 65 74 | 46 6f 63 75 73 46 69 67 |;....Set|FocusFig|
|00000500| 75 72 65 28 4e 55 4c 4c | 29 3b 0d 09 09 7d 0d 0d |ure(NULL|);...}..|
|00000510| 09 09 69 66 20 28 67 41 | 70 70 44 61 74 61 2e 46 |..if (gA|ppData.F|
|00000520| 6f 63 75 73 46 69 67 75 | 72 65 20 3d 3d 20 4e 55 |ocusFigu|re == NU|
|00000530| 4c 4c 29 0d 09 09 09 53 | 65 74 46 6f 63 75 73 46 |LL)....S|etFocusF|
|00000540| 69 67 75 72 65 28 57 68 | 69 63 68 46 69 67 75 72 |igure(Wh|ichFigur|
|00000550| 65 29 3b 0d 0d 09 09 69 | 66 20 28 67 41 70 70 44 |e);....i|f (gAppD|
|00000560| 61 74 61 2e 46 6f 63 75 | 73 46 69 67 75 72 65 20 |ata.Focu|sFigure |
|00000570| 3d 3d 20 57 68 69 63 68 | 46 69 67 75 72 65 29 0d |== Which|Figure).|
|00000580| 09 09 09 52 65 74 75 72 | 6e 56 61 6c 75 65 20 3d |...Retur|nValue =|
|00000590| 20 53 5f 4f 4b 3b 0d 09 | 7d 0d 09 65 6c 73 65 09 | S_OK;..|}..else.|
|000005a0| 2f 2f 09 64 6f 69 6e 67 | 20 61 20 72 65 6c 65 61 |//.doing| a relea|
|000005b0| 73 65 0d 09 7b 0d 09 09 | 69 66 20 28 67 41 70 70 |se..{...|if (gApp|
|000005c0| 44 61 74 61 2e 46 6f 63 | 75 73 46 69 67 75 72 65 |Data.Foc|usFigure|
|000005d0| 20 3d 3d 20 57 68 69 63 | 68 46 69 67 75 72 65 29 | == Whic|hFigure)|
|000005e0| 0d 09 09 7b 0d 09 09 09 | 53 65 74 46 6f 63 75 73 |...{....|SetFocus|
|000005f0| 46 69 67 75 72 65 28 4e | 55 4c 4c 29 3b 0d 09 09 |Figure(N|ULL);...|
|00000600| 09 52 65 74 75 72 6e 56 | 61 6c 75 65 20 3d 20 53 |.ReturnV|alue = S|
|00000610| 5f 4f 4b 3b 0d 09 09 7d | 0d 09 7d 0d 0d 09 72 65 |_OK;...}|..}...re|
|00000620| 74 75 72 6e 20 52 65 74 | 75 72 6e 56 61 6c 75 65 |turn Ret|urnValue|
|00000630| 3b 0d 7d 0d 0d 0d 2f 2f | 0d 2f 2f 20 20 53 69 74 |;.}...//|.// Sit|
|00000640| 65 5f 52 65 71 75 65 73 | 74 53 69 7a 65 43 68 61 |e_Reques|tSizeCha|
|00000650| 6e 67 65 0d 2f 2f 0d 2f | 2f 20 20 68 6f 77 20 74 |nge.//./|/ how t|
|00000660| 6f 20 63 68 61 6e 67 65 | 20 74 68 65 20 63 6f 6e |o change| the con|
|00000670| 74 72 6f 6c 73 20 73 69 | 7a 65 0d 2f 2f 0d 0d 41 |trols si|ze.//..A|
|00000680| 58 45 72 72 6f 72 43 6f | 64 65 20 53 69 74 65 5f |XErrorCo|de Site_|
|00000690| 52 65 71 75 65 73 74 53 | 69 7a 65 43 68 61 6e 67 |RequestS|izeChang|
|000006a0| 65 20 28 20 41 58 52 65 | 66 49 44 20 69 6e 43 6c |e ( AXRe|fID inCl|
|000006b0| 69 65 6e 74 53 69 74 65 | 49 44 2c 20 41 58 50 6c |ientSite|ID, AXPl|
|000006c0| 61 74 66 6f 72 6d 50 6f | 69 6e 74 2a 20 69 6f 53 |atformPo|int* ioS|
|000006d0| 69 7a 65 20 29 0d 7b 0d | 09 46 69 67 75 72 65 44 |ize ).{.|.FigureD|
|000006e0| 61 74 61 50 74 72 09 57 | 68 69 63 68 46 69 67 75 |ataPtr.W|hichFigu|
|000006f0| 72 65 20 3d 20 28 46 69 | 67 75 72 65 44 61 74 61 |re = (Fi|gureData|
|00000700| 50 74 72 29 20 69 6e 43 | 6c 69 65 6e 74 53 69 74 |Ptr) inC|lientSit|
|00000710| 65 49 44 3b 0d 09 41 58 | 45 72 72 6f 72 43 6f 64 |eID;..AX|ErrorCod|
|00000720| 65 09 09 52 65 73 75 6c | 74 20 3d 20 6b 41 58 4e |e..Resul|t = kAXN|
|00000730| 6f 45 72 72 3b 0d 09 44 | 6f 63 44 61 74 61 50 74 |oErr;..D|ocDataPt|
|00000740| 72 09 09 57 68 69 63 68 | 44 6f 63 75 6d 65 6e 74 |r..Which|Document|
|00000750| 3b 0d 09 50 6f 69 6e 74 | 09 09 09 42 65 67 69 6e |;..Point|...Begin|
|00000760| 53 69 7a 65 3b 0d 09 50 | 6f 69 6e 74 09 09 09 4d |Size;..P|oint...M|
|00000770| 61 78 53 69 7a 65 3b 0d | 09 52 65 63 74 09 09 09 |axSize;.|.Rect...|
|00000780| 42 65 67 69 6e 52 65 63 | 74 3b 0d 0d 09 57 68 69 |BeginRec|t;...Whi|
|00000790| 63 68 44 6f 63 75 6d 65 | 6e 74 20 3d 20 57 68 69 |chDocume|nt = Whi|
|000007a0| 63 68 46 69 67 75 72 65 | 2d 3e 44 6f 63 75 6d 65 |chFigure|->Docume|
|000007b0| 6e 74 3b 0d 0d 09 69 66 | 20 28 21 57 68 69 63 68 |nt;...if| (!Which|
|000007c0| 44 6f 63 75 6d 65 6e 74 | 29 0d 09 09 44 65 62 75 |Document|)...Debu|
|000007d0| 67 53 74 72 28 22 5c 70 | 43 6f 6e 74 72 6f 6c 20 |gStr("\p|Control |
|000007e0| 4c 6f 73 74 20 44 6f 63 | 75 6d 65 6e 74 21 20 52 |Lost Doc|ument! R|
|000007f0| 65 71 75 65 73 74 53 69 | 7a 65 43 68 61 6e 67 65 |equestSi|zeChange|
|00000800| 22 29 3b 0d 0d 09 42 65 | 67 69 6e 52 65 63 74 20 |");...Be|ginRect |
|00000810| 3d 20 57 68 69 63 68 46 | 69 67 75 72 65 2d 3e 43 |= WhichF|igure->C|
|00000820| 6f 6e 74 72 6f 6c 52 65 | 63 74 3b 0d 0d 09 42 65 |ontrolRe|ct;...Be|
|00000830| 67 69 6e 53 69 7a 65 2e | 68 20 3d 20 42 65 67 69 |ginSize.|h = Begi|
|00000840| 6e 52 65 63 74 2e 72 69 | 67 68 74 20 2d 20 42 65 |nRect.ri|ght - Be|
|00000850| 67 69 6e 52 65 63 74 2e | 6c 65 66 74 3b 0d 09 42 |ginRect.|left;..B|
|00000860| 65 67 69 6e 53 69 7a 65 | 2e 76 20 3d 20 42 65 67 |eginSize|.v = Beg|
|00000870| 69 6e 52 65 63 74 2e 62 | 6f 74 74 6f 6d 20 2d 20 |inRect.b|ottom - |
|00000880| 42 65 67 69 6e 52 65 63 | 74 2e 74 6f 70 3b 0d 0d |BeginRec|t.top;..|
|00000890| 09 4d 61 78 53 69 7a 65 | 2e 68 20 3d 20 28 57 68 |.MaxSize|.h = (Wh|
|000008a0| 69 63 68 44 6f 63 75 6d | 65 6e 74 2d 3e 57 69 6e |ichDocum|ent->Win|
|000008b0| 64 6f 77 2d 3e 70 6f 72 | 74 52 65 63 74 2e 72 69 |dow->por|tRect.ri|
|000008c0| 67 68 74 20 2d 0d 09 09 | 09 09 09 57 68 69 63 68 |ght -...|...Which|
|000008d0| 44 6f 63 75 6d 65 6e 74 | 2d 3e 57 69 6e 64 6f 77 |Document|->Window|
|000008e0| 2d 3e 70 6f 72 74 52 65 | 63 74 2e 6c 65 66 74 29 |->portRe|ct.left)|
|000008f0| 20 2d 20 42 65 67 69 6e | 52 65 63 74 2e 6c 65 66 | - Begin|Rect.lef|
|00000900| 74 20 2d 20 31 30 3b 0d | 09 4d 61 78 53 69 7a 65 |t - 10;.|.MaxSize|
|00000910| 2e 76 20 3d 20 28 57 68 | 69 63 68 44 6f 63 75 6d |.v = (Wh|ichDocum|
|00000920| 65 6e 74 2d 3e 57 69 6e | 64 6f 77 2d 3e 70 6f 72 |ent->Win|dow->por|
|00000930| 74 52 65 63 74 2e 62 6f | 74 74 6f 6d 20 2d 0d 09 |tRect.bo|ttom -..|
|00000940| 09 09 09 09 57 68 69 63 | 68 44 6f 63 75 6d 65 6e |....Whic|hDocumen|
|00000950| 74 2d 3e 57 69 6e 64 6f | 77 2d 3e 70 6f 72 74 52 |t->Windo|w->portR|
|00000960| 65 63 74 2e 74 6f 70 29 | 20 2d 20 42 65 67 69 6e |ect.top)| - Begin|
|00000970| 52 65 63 74 2e 74 6f 70 | 20 2d 20 31 30 3b 0d 0d |Rect.top| - 10;..|
|00000980| 09 69 66 20 28 69 6f 53 | 69 7a 65 2d 3e 76 20 3e |.if (ioS|ize->v >|
|00000990| 20 4d 61 78 53 69 7a 65 | 2e 76 29 0d 09 7b 0d 09 | MaxSize|.v)..{..|
|000009a0| 09 69 6f 53 69 7a 65 2d | 3e 76 20 3d 20 4d 61 78 |.ioSize-|>v = Max|
|000009b0| 53 69 7a 65 2e 76 3b 0d | 09 09 52 65 73 75 6c 74 |Size.v;.|..Result|
|000009c0| 20 3d 20 6b 41 58 46 61 | 69 6c 45 72 72 3b 0d 09 | = kAXFa|ilErr;..|
|000009d0| 7d 0d 0d 09 69 66 20 28 | 69 6f 53 69 7a 65 2d 3e |}...if (|ioSize->|
|000009e0| 68 20 3e 20 4d 61 78 53 | 69 7a 65 2e 68 29 0d 09 |h > MaxS|ize.h)..|
|000009f0| 7b 0d 09 09 69 6f 53 69 | 7a 65 2d 3e 68 20 3d 20 |{...ioSi|ze->h = |
|00000a00| 4d 61 78 53 69 7a 65 2e | 68 3b 0d 09 09 52 65 73 |MaxSize.|h;...Res|
|00000a10| 75 6c 74 20 3d 20 6b 41 | 58 46 61 69 6c 45 72 72 |ult = kA|XFailErr|
|00000a20| 3b 0d 09 7d 0d 0d 09 57 | 68 69 63 68 46 69 67 75 |;..}...W|hichFigu|
|00000a30| 72 65 2d 3e 43 6f 6e 74 | 72 6f 6c 52 65 63 74 2e |re->Cont|rolRect.|
|00000a40| 62 6f 74 74 6f 6d 20 3d | 20 57 68 69 63 68 46 69 |bottom =| WhichFi|
|00000a50| 67 75 72 65 2d 3e 43 6f | 6e 74 72 6f 6c 52 65 63 |gure->Co|ntrolRec|
|00000a60| 74 2e 74 6f 70 20 2b 20 | 69 6f 53 69 7a 65 2d 3e |t.top + |ioSize->|
|00000a70| 76 3b 0d 09 57 68 69 63 | 68 46 69 67 75 72 65 2d |v;..Whic|hFigure-|
|00000a80| 3e 43 6f 6e 74 72 6f 6c | 52 65 63 74 2e 72 69 67 |>Control|Rect.rig|
|00000a90| 68 74 20 3d 20 57 68 69 | 63 68 46 69 67 75 72 65 |ht = Whi|chFigure|
|00000aa0| 2d 3e 43 6f 6e 74 72 6f | 6c 52 65 63 74 2e 6c 65 |->Contro|lRect.le|
|00000ab0| 66 74 20 2b 20 69 6f 53 | 69 7a 65 2d 3e 68 3b 0d |ft + ioS|ize->h;.|
|00000ac0| 0d 09 69 66 20 28 69 6f | 53 69 7a 65 2d 3e 68 20 |..if (io|Size->h |
|00000ad0| 21 3d 20 42 65 67 69 6e | 53 69 7a 65 2e 68 20 7c |!= Begin|Size.h ||
|00000ae0| 7c 20 69 6f 53 69 7a 65 | 2d 3e 76 20 21 3d 20 42 || ioSize|->v != B|
|00000af0| 65 67 69 6e 53 69 7a 65 | 2e 76 29 0d 09 7b 0d 09 |eginSize|.v)..{..|
|00000b00| 09 47 72 61 66 50 74 72 | 09 09 09 53 74 61 72 74 |.GrafPtr|...Start|
|00000b10| 50 6f 72 74 3b 0d 09 09 | 47 65 74 50 6f 72 74 28 |Port;...|GetPort(|
|00000b20| 26 53 74 61 72 74 50 6f | 72 74 29 3b 0d 09 09 53 |&StartPo|rt);...S|
|00000b30| 65 74 50 6f 72 74 28 57 | 68 69 63 68 44 6f 63 75 |etPort(W|hichDocu|
|00000b40| 6d 65 6e 74 2d 3e 57 69 | 6e 64 6f 77 29 3b 0d 09 |ment->Wi|ndow);..|
|00000b50| 09 49 6e 73 65 74 52 65 | 63 74 28 26 42 65 67 69 |.InsetRe|ct(&Begi|
|00000b60| 6e 52 65 63 74 2c 20 42 | 6f 72 64 65 72 57 69 64 |nRect, B|orderWid|
|00000b70| 74 68 2c 20 42 6f 72 64 | 65 72 57 69 64 74 68 29 |th, Bord|erWidth)|
|00000b80| 3b 0d 09 09 49 6e 76 61 | 6c 52 65 63 74 28 26 42 |;...Inva|lRect(&B|
|00000b90| 65 67 69 6e 52 65 63 74 | 29 3b 0d 09 09 53 65 74 |eginRect|);...Set|
|00000ba0| 50 6f 72 74 28 53 74 61 | 72 74 50 6f 72 74 29 3b |Port(Sta|rtPort);|
|00000bb0| 0d 09 7d 0d 0d 09 72 65 | 74 75 72 6e 20 52 65 73 |..}...re|turn Res|
|00000bc0| 75 6c 74 3b 0d 7d 0d 0d | 2f 2f 0d 2f 2f 20 20 53 |ult;.}..|//.// S|
|00000bd0| 69 74 65 5f 4f 6e 43 68 | 61 6e 67 65 0d 2f 2f 0d |ite_OnCh|ange.//.|
|00000be0| 2f 2f 20 20 68 6f 77 20 | 63 6f 6e 74 72 6f 6c 73 |// how |controls|
|00000bf0| 20 74 65 6c 6c 20 75 73 | 20 74 68 61 74 20 74 68 | tell us| that th|
|00000c00| 65 79 20 63 68 61 6e 67 | 65 64 20 73 6f 6d 65 74 |ey chang|ed somet|
|00000c10| 68 69 6e 67 0d 2f 2f 0d | 0d 41 58 45 72 72 6f 72 |hing.//.|.AXError|
|00000c20| 43 6f 64 65 20 53 69 74 | 65 5f 4f 6e 43 68 61 6e |Code Sit|e_OnChan|
|00000c30| 67 65 28 41 58 52 65 66 | 49 44 20 69 6e 43 6c 69 |ge(AXRef|ID inCli|
|00000c40| 65 6e 74 53 69 74 65 49 | 44 2c 20 41 58 43 68 61 |entSiteI|D, AXCha|
|00000c50| 6e 67 65 54 79 70 65 20 | 69 6e 43 68 61 6e 67 65 |ngeType |inChange|
|00000c60| 54 79 70 65 29 0d 7b 0d | 09 46 69 67 75 72 65 44 |Type).{.|.FigureD|
|00000c70| 61 74 61 50 74 72 09 57 | 68 69 63 68 46 69 67 75 |ataPtr.W|hichFigu|
|00000c80| 72 65 20 3d 20 28 46 69 | 67 75 72 65 44 61 74 61 |re = (Fi|gureData|
|00000c90| 50 74 72 29 20 69 6e 43 | 6c 69 65 6e 74 53 69 74 |Ptr) inC|lientSit|
|00000ca0| 65 49 44 3b 0d 0d 09 69 | 66 20 28 21 57 68 69 63 |eID;...i|f (!Whic|
|00000cb0| 68 46 69 67 75 72 65 2d | 3e 44 6f 63 75 6d 65 6e |hFigure-|>Documen|
|00000cc0| 74 29 0d 09 09 44 65 62 | 75 67 53 74 72 28 22 5c |t)...Deb|ugStr("\|
|00000cd0| 70 43 6f 6e 74 72 6f 6c | 20 4c 6f 73 74 20 44 6f |pControl| Lost Do|
|00000ce0| 63 75 6d 65 6e 74 21 20 | 4f 6e 43 68 61 6e 67 65 |cument! |OnChange|
|00000cf0| 22 29 3b 0d 0d 23 69 66 | 64 65 66 20 55 53 45 5f |");..#if|def USE_|
|00000d00| 4f 46 46 53 43 52 45 45 | 4e 0d 09 69 66 20 28 69 |OFFSCREE|N..if (i|
|00000d10| 6e 43 68 61 6e 67 65 54 | 79 70 65 20 3d 3d 20 56 |nChangeT|ype == V|
|00000d20| 69 65 77 43 68 61 6e 67 | 65 29 0d 09 7b 0d 09 09 |iewChang|e)..{...|
|00000d30| 52 65 63 74 09 09 44 65 | 73 74 52 65 63 74 20 3d |Rect..De|stRect =|
|00000d40| 20 7b 20 30 2c 20 33 30 | 30 2c 20 32 39 30 2c 20 | { 0, 30|0, 290, |
|00000d50| 34 39 36 7d 3b 0d 0d 09 | 09 2f 2f 09 62 6c 69 74 |496};...|.//.blit|
|00000d60| 20 74 6f 20 74 68 65 20 | 73 63 72 65 65 6e 0d 09 | to the |screen..|
|00000d70| 09 46 6f 72 65 43 6f 6c | 6f 72 28 62 6c 61 63 6b |.ForeCol|or(black|
|00000d80| 43 6f 6c 6f 72 29 3b 0d | 09 09 42 61 63 6b 43 6f |Color);.|..BackCo|
|00000d90| 6c 6f 72 28 77 68 69 74 | 65 43 6f 6c 6f 72 29 3b |lor(whit|eColor);|
|00000da0| 0d 09 09 43 6f 70 79 42 | 69 74 73 28 28 42 69 74 |...CopyB|its((Bit|
|00000db0| 4d 61 70 2a 29 28 2a 28 | 57 68 69 63 68 46 69 67 |Map*)(*(|WhichFig|
|00000dc0| 75 72 65 2d 3e 44 6f 63 | 75 6d 65 6e 74 2d 3e 4f |ure->Doc|ument->O|
|00000dd0| 66 66 73 63 72 65 65 6e | 2d 3e 70 6f 72 74 50 69 |ffscreen|->portPi|
|00000de0| 78 4d 61 70 29 29 2c 0d | 09 09 09 09 26 28 28 47 |xMap)),.|....&((G|
|00000df0| 72 61 66 50 74 72 29 41 | 70 70 44 61 74 61 50 74 |rafPtr)A|ppDataPt|
|00000e00| 72 2d 3e 57 69 6e 64 6f | 77 29 2d 3e 70 6f 72 74 |r->Windo|w)->port|
|00000e10| 42 69 74 73 2c 20 26 67 | 43 6f 6e 74 72 6f 6c 52 |Bits, &g|ControlR|
|00000e20| 65 63 74 2c 20 26 44 65 | 73 74 52 65 63 74 2c 20 |ect, &De|stRect, |
|00000e30| 73 72 63 43 6f 70 79 2c | 20 4e 55 4c 4c 29 3b 0d |srcCopy,| NULL);.|
|00000e40| 09 7d 0d 23 65 6c 73 65 | 20 2f 2f 20 55 53 45 5f |.}.#else| // USE_|
|00000e50| 4f 46 46 53 43 52 45 45 | 4e 0d 09 23 70 72 61 67 |OFFSCREE|N..#prag|
|00000e60| 6d 61 20 75 6e 75 73 65 | 64 28 69 6e 43 68 61 6e |ma unuse|d(inChan|
|00000e70| 67 65 54 79 70 65 29 0d | 23 65 6e 64 69 66 0d 09 |geType).|#endif..|
|00000e80| 72 65 74 75 72 6e 20 6b | 41 58 4e 6f 45 72 72 3b |return k|AXNoErr;|
|00000e90| 0d 7d 0d 0d 0d 2f 2f 0d | 2f 2f 20 20 53 69 74 65 |.}...//.|// Site|
|00000ea0| 5f 41 63 71 75 69 72 65 | 43 6f 6e 74 65 78 74 0d |_Acquire|Context.|
|00000eb0| 2f 2f 0d 0d 41 58 45 72 | 72 6f 72 43 6f 64 65 20 |//..AXEr|rorCode |
|00000ec0| 53 69 74 65 5f 41 63 71 | 75 69 72 65 43 6f 6e 74 |Site_Acq|uireCont|
|00000ed0| 65 78 74 28 41 58 52 65 | 66 49 44 20 69 6e 43 6c |ext(AXRe|fID inCl|
|00000ee0| 69 65 6e 74 53 69 74 65 | 49 44 2c 20 55 69 6e 74 |ientSite|ID, Uint|
|00000ef0| 33 32 20 69 6e 43 6f 6e | 74 65 78 74 49 44 2c 20 |32 inCon|textID, |
|00000f00| 41 58 44 72 61 77 43 6f | 6e 74 65 78 74 2a 20 6f |AXDrawCo|ntext* o|
|00000f10| 75 74 43 6f 6e 74 65 78 | 74 29 0d 7b 0d 09 46 69 |utContex|t).{..Fi|
|00000f20| 67 75 72 65 44 61 74 61 | 50 74 72 09 57 68 69 63 |gureData|Ptr.Whic|
|00000f30| 68 46 69 67 75 72 65 20 | 3d 20 28 46 69 67 75 72 |hFigure |= (Figur|
|00000f40| 65 44 61 74 61 50 74 72 | 29 20 69 6e 43 6c 69 65 |eDataPtr|) inClie|
|00000f50| 6e 74 53 69 74 65 49 44 | 3b 0d 09 41 58 45 72 72 |ntSiteID|;..AXErr|
|00000f60| 6f 72 43 6f 64 65 09 09 | 52 65 73 75 6c 74 20 3d |orCode..|Result =|
|00000f70| 20 6e 6f 45 72 72 3b 0d | 09 44 6f 63 44 61 74 61 | noErr;.|.DocData|
|00000f80| 50 74 72 09 09 57 68 69 | 63 68 44 6f 63 75 6d 65 |Ptr..Whi|chDocume|
|00000f90| 6e 74 3b 0d 0d 09 57 68 | 69 63 68 44 6f 63 75 6d |nt;...Wh|ichDocum|
|00000fa0| 65 6e 74 20 3d 20 57 68 | 69 63 68 46 69 67 75 72 |ent = Wh|ichFigur|
|00000fb0| 65 2d 3e 44 6f 63 75 6d | 65 6e 74 3b 0d 09 69 66 |e->Docum|ent;..if|
|00000fc0| 20 28 21 57 68 69 63 68 | 44 6f 63 75 6d 65 6e 74 | (!Which|Document|
|00000fd0| 29 0d 09 09 44 65 62 75 | 67 53 74 72 28 22 5c 70 |)...Debu|gStr("\p|
|00000fe0| 43 6f 6e 74 72 6f 6c 20 | 4c 6f 73 74 20 44 6f 63 |Control |Lost Doc|
|00000ff0| 75 6d 65 6e 74 21 20 41 | 63 71 75 69 72 65 43 6f |ument! A|cquireCo|
|00001000| 6e 74 65 78 74 22 29 3b | 0d 0d 09 2f 2f 20 53 65 |ntext");|...// Se|
|00001010| 74 20 75 70 20 74 68 65 | 20 63 6f 6e 74 65 78 74 |t up the| context|
|00001020| 0d 09 73 77 69 74 63 68 | 20 28 69 6e 43 6f 6e 74 |..switch| (inCont|
|00001030| 65 78 74 49 44 29 0d 09 | 7b 0d 09 09 63 61 73 65 |extID)..|{...case|
|00001040| 20 57 69 6e 64 6f 77 43 | 6f 6e 74 65 78 74 49 44 | WindowC|ontextID|
|00001050| 3a 0d 09 09 09 2f 2f 20 | 53 61 76 65 20 6f 66 66 |:....// |Save off|
|00001060| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 70 6f 72 | the cur|rent por|
|00001070| 74 20 73 74 61 74 65 0d | 09 09 09 69 66 20 28 57 |t state.|...if (W|
|00001080| 68 69 63 68 44 6f 63 75 | 6d 65 6e 74 2d 3e 57 69 |hichDocu|ment->Wi|
|00001090| 6e 64 6f 77 29 0d 09 09 | 09 7b 0d 09 09 09 09 53 |ndow)...|.{.....S|
|000010a0| 61 76 65 50 6f 72 74 53 | 74 61 74 65 28 28 47 72 |avePortS|tate((Gr|
|000010b0| 61 66 50 74 72 29 20 57 | 68 69 63 68 44 6f 63 75 |afPtr) W|hichDocu|
|000010c0| 6d 65 6e 74 2d 3e 57 69 | 6e 64 6f 77 29 3b 0d 09 |ment->Wi|ndow);..|
|000010d0| 09 09 09 6f 75 74 43 6f | 6e 74 65 78 74 2d 3e 50 |...outCo|ntext->P|
|000010e0| 6f 72 74 20 3d 20 57 68 | 69 63 68 44 6f 63 75 6d |ort = Wh|ichDocum|
|000010f0| 65 6e 74 2d 3e 57 69 6e | 64 6f 77 3b 0d 09 09 09 |ent->Win|dow;....|
|00001100| 09 6f 75 74 43 6f 6e 74 | 65 78 74 2d 3e 50 6f 72 |.outCont|ext->Por|
|00001110| 74 54 79 70 65 20 3d 20 | 6b 41 58 51 44 57 69 6e |tType = |kAXQDWin|
|00001120| 64 6f 77 50 6f 72 74 54 | 79 70 65 3b 0d 09 09 09 |dowPortT|ype;....|
|00001130| 7d 0d 09 09 09 65 6c 73 | 65 0d 09 09 09 09 52 65 |}....els|e.....Re|
|00001140| 73 75 6c 74 20 3d 20 20 | 6b 41 58 46 61 69 6c 45 |sult = |kAXFailE|
|00001150| 72 72 3b 0d 09 09 09 62 | 72 65 61 6b 3b 0d 09 09 |rr;....b|reak;...|
|00001160| 63 61 73 65 20 50 72 69 | 6e 74 43 6f 6e 74 65 78 |case Pri|ntContex|
|00001170| 74 49 44 3a 0d 09 09 09 | 2f 2f 20 53 61 76 65 20 |tID:....|// Save |
|00001180| 6f 66 66 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 |off the |current |
|00001190| 70 6f 72 74 20 73 74 61 | 74 65 0d 09 09 09 69 66 |port sta|te....if|
|000011a0| 20 28 57 68 69 63 68 44 | 6f 63 75 6d 65 6e 74 2d | (WhichD|ocument-|
|000011b0| 3e 50 72 69 6e 74 50 6f | 72 74 29 0d 09 09 09 7b |>PrintPo|rt)....{|
|000011c0| 0d 09 09 09 09 53 61 76 | 65 50 6f 72 74 53 74 61 |.....Sav|ePortSta|
|000011d0| 74 65 28 28 47 72 61 66 | 50 74 72 29 20 57 68 69 |te((Graf|Ptr) Whi|
|000011e0| 63 68 44 6f 63 75 6d 65 | 6e 74 2d 3e 50 72 69 6e |chDocume|nt->Prin|
|000011f0| 74 50 6f 72 74 29 3b 0d | 09 09 09 09 6f 75 74 43 |tPort);.|....outC|
|00001200| 6f 6e 74 65 78 74 2d 3e | 50 6f 72 74 20 3d 20 28 |ontext->|Port = (|
|00001210| 47 72 61 66 50 74 72 29 | 20 57 68 69 63 68 44 6f |GrafPtr)| WhichDo|
|00001220| 63 75 6d 65 6e 74 2d 3e | 50 72 69 6e 74 50 6f 72 |cument->|PrintPor|
|00001230| 74 3b 0d 09 09 09 09 6f | 75 74 43 6f 6e 74 65 78 |t;.....o|utContex|
|00001240| 74 2d 3e 50 6f 72 74 54 | 79 70 65 20 3d 20 6b 41 |t->PortT|ype = kA|
|00001250| 58 51 44 50 72 69 6e 74 | 50 6f 72 74 54 79 70 65 |XQDPrint|PortType|
|00001260| 3b 0d 09 09 09 7d 0d 09 | 09 09 65 6c 73 65 0d 09 |;....}..|..else..|
|00001270| 09 09 09 52 65 73 75 6c | 74 20 3d 20 20 6b 41 58 |...Resul|t = kAX|
|00001280| 46 61 69 6c 45 72 72 3b | 0d 09 09 09 62 72 65 61 |FailErr;|....brea|
|00001290| 6b 3b 0d 23 69 66 64 65 | 66 20 55 53 45 5f 4f 46 |k;.#ifde|f USE_OF|
|000012a0| 46 53 43 52 45 45 4e 0d | 09 09 63 61 73 65 20 4f |FSCREEN.|..case O|
|000012b0| 66 66 73 63 72 65 65 6e | 43 6f 6e 74 65 78 74 49 |ffscreen|ContextI|
|000012c0| 44 3a 0d 09 09 09 69 66 | 20 28 57 68 69 63 68 44 |D:....if| (WhichD|
|000012d0| 6f 63 75 6d 65 6e 74 2d | 3e 4f 66 66 73 63 72 65 |ocument-|>Offscre|
|000012e0| 65 6e 29 0d 09 09 09 7b | 0d 09 09 09 09 47 65 74 |en)....{|.....Get|
|000012f0| 50 6f 72 74 28 26 6d 53 | 61 76 65 50 6f 72 74 29 |Port(&mS|avePort)|
|00001300| 3b 0d 09 09 09 09 53 65 | 74 47 57 6f 72 6c 64 28 |;.....Se|tGWorld(|
|00001310| 57 68 69 63 68 44 6f 63 | 75 6d 65 6e 74 2d 3e 4f |WhichDoc|ument->O|
|00001320| 66 66 73 63 72 65 65 6e | 2c 20 4e 55 4c 4c 29 3b |ffscreen|, NULL);|
|00001330| 0d 09 09 09 09 6d 4f 6c | 64 50 6f 72 74 53 74 61 |.....mOl|dPortSta|
|00001340| 74 65 2e 50 6f 72 74 52 | 65 63 74 20 3d 20 57 68 |te.PortR|ect = Wh|
|00001350| 69 63 68 44 6f 63 75 6d | 65 6e 74 2d 3e 4f 66 66 |ichDocum|ent->Off|
|00001360| 73 63 72 65 65 6e 2d 3e | 70 6f 72 74 52 65 63 74 |screen->|portRect|
|00001370| 3b 0d 09 09 09 09 6d 4f | 6c 64 50 6f 72 74 53 74 |;.....mO|ldPortSt|
|00001380| 61 74 65 2e 43 6c 69 70 | 52 67 6e 20 3d 20 4e 65 |ate.Clip|Rgn = Ne|
|00001390| 77 52 67 6e 28 29 3b 0d | 09 09 09 20 20 20 20 47 |wRgn();.|... G|
|000013a0| 65 74 43 6c 69 70 28 6d | 4f 6c 64 50 6f 72 74 53 |etClip(m|OldPortS|
|000013b0| 74 61 74 65 2e 43 6c 69 | 70 52 67 6e 29 3b 0d 09 |tate.Cli|pRgn);..|
|000013c0| 09 09 09 0d 09 09 09 09 | 2f 2f 20 53 61 76 65 20 |........|// Save |
|000013d0| 6f 66 66 20 74 68 65 20 | 70 65 6e 20 73 74 61 74 |off the |pen stat|
|000013e0| 65 0d 09 09 09 09 47 65 | 74 50 65 6e 53 74 61 74 |e.....Ge|tPenStat|
|000013f0| 65 28 26 6d 4f 6c 64 50 | 6f 72 74 53 74 61 74 65 |e(&mOldP|ortState|
|00001400| 2e 50 65 6e 53 74 61 74 | 65 29 3b 0d 09 09 09 09 |.PenStat|e);.....|
|00001410| 6d 4f 6c 64 50 6f 72 74 | 53 74 61 74 65 2e 54 65 |mOldPort|State.Te|
|00001420| 78 74 46 6f 6e 74 20 3d | 20 57 68 69 63 68 44 6f |xtFont =| WhichDo|
|00001430| 63 75 6d 65 6e 74 2d 3e | 4f 66 66 73 63 72 65 65 |cument->|Offscree|
|00001440| 6e 2d 3e 74 78 46 6f 6e | 74 3b 0d 09 09 09 09 6d |n->txFon|t;.....m|
|00001450| 4f 6c 64 50 6f 72 74 53 | 74 61 74 65 2e 54 65 78 |OldPortS|tate.Tex|
|00001460| 74 4d 6f 64 65 20 3d 20 | 57 68 69 63 68 44 6f 63 |tMode = |WhichDoc|
|00001470| 75 6d 65 6e 74 2d 3e 4f | 66 66 73 63 72 65 65 6e |ument->O|ffscreen|
|00001480| 2d 3e 74 78 4d 6f 64 65 | 3b 0d 09 09 09 09 6d 4f |->txMode|;.....mO|
|00001490| 6c 64 50 6f 72 74 53 74 | 61 74 65 2e 54 65 78 74 |ldPortSt|ate.Text|
|000014a0| 53 69 7a 65 20 3d 20 57 | 68 69 63 68 44 6f 63 75 |Size = W|hichDocu|
|000014b0| 6d 65 6e 74 2d 3e 4f 66 | 66 73 63 72 65 65 6e 2d |ment->Of|fscreen-|
|000014c0| 3e 74 78 53 69 7a 65 3b | 0d 09 09 09 09 6d 4f 6c |>txSize;|.....mOl|
|000014d0| 64 50 6f 72 74 53 74 61 | 74 65 2e 54 65 78 74 46 |dPortSta|te.TextF|
|000014e0| 61 63 65 20 3d 20 57 68 | 69 63 68 44 6f 63 75 6d |ace = Wh|ichDocum|
|000014f0| 65 6e 74 2d 3e 4f 66 66 | 73 63 72 65 65 6e 2d 3e |ent->Off|screen->|
|00001500| 74 78 46 61 63 65 3b 0d | 09 09 09 09 47 65 74 46 |txFace;.|....GetF|
|00001510| 6f 72 65 43 6f 6c 6f 72 | 28 26 6d 4f 6c 64 50 6f |oreColor|(&mOldPo|
|00001520| 72 74 53 74 61 74 65 2e | 46 6f 72 65 43 6f 6c 6f |rtState.|ForeColo|
|00001530| 72 29 3b 0d 09 09 09 09 | 47 65 74 42 61 63 6b 43 |r);.....|GetBackC|
|00001540| 6f 6c 6f 72 28 26 6d 4f | 6c 64 50 6f 72 74 53 74 |olor(&mO|ldPortSt|
|00001550| 61 74 65 2e 42 61 63 6b | 43 6f 6c 6f 72 29 3b 0d |ate.Back|Color);.|
|00001560| 09 09 09 09 6f 75 74 43 | 6f 6e 74 65 78 74 2d 3e |....outC|ontext->|
|00001570| 50 6f 72 74 20 3d 20 28 | 47 72 61 66 50 74 72 29 |Port = (|GrafPtr)|
|00001580| 20 57 68 69 63 68 44 6f | 63 75 6d 65 6e 74 2d 3e | WhichDo|cument->|
|00001590| 4f 66 66 73 63 72 65 65 | 6e 3b 0d 09 09 09 09 6f |Offscree|n;.....o|
|000015a0| 75 74 43 6f 6e 74 65 78 | 74 2d 3e 50 6f 72 74 54 |utContex|t->PortT|
|000015b0| 79 70 65 20 3d 20 6b 41 | 58 51 44 4f 66 66 73 63 |ype = kA|XQDOffsc|
|000015c0| 72 65 65 6e 50 6f 72 74 | 54 79 70 65 3b 0d 09 09 |reenPort|Type;...|
|000015d0| 09 7d 0d 09 09 09 65 6c | 73 65 0d 09 09 09 09 52 |.}....el|se.....R|
|000015e0| 65 73 75 6c 74 20 3d 20 | 20 6b 41 58 46 61 69 6c |esult = | kAXFail|
|000015f0| 45 72 72 3b 0d 09 09 09 | 62 72 65 61 6b 3b 0d 23 |Err;....|break;.#|
|00001600| 65 6e 64 69 66 20 2f 2f | 20 55 53 45 5f 4f 46 46 |endif //| USE_OFF|
|00001610| 53 43 52 45 45 4e 0d 09 | 09 64 65 66 61 75 6c 74 |SCREEN..|.default|
|00001620| 3a 0d 09 09 09 52 65 73 | 75 6c 74 20 3d 20 20 6b |:....Res|ult = k|
|00001630| 41 58 46 61 69 6c 45 72 | 72 3b 0d 09 09 09 62 72 |AXFailEr|r;....br|
|00001640| 65 61 6b 3b 0d 09 7d 0d | 0d 09 69 66 20 28 52 65 |eak;..}.|..if (Re|
|00001650| 73 75 6c 74 20 3d 3d 20 | 6b 41 58 4e 6f 45 72 72 |sult == |kAXNoErr|
|00001660| 29 0d 09 7b 0d 09 09 2f | 2f 20 66 69 67 75 72 65 |)..{.../|/ figure|
|00001670| 20 74 68 65 20 63 6c 69 | 70 70 69 6e 67 20 66 6f | the cli|pping fo|
|00001680| 72 20 74 68 65 20 63 6f | 6e 74 72 6f 6c 0d 09 09 |r the co|ntrol...|
|00001690| 52 65 63 74 09 09 43 6f | 6e 74 65 6e 74 52 65 63 |Rect..Co|ntentRec|
|000016a0| 74 20 3d 20 6f 75 74 43 | 6f 6e 74 65 78 74 2d 3e |t = outC|ontext->|
|000016b0| 50 6f 72 74 2d 3e 70 6f | 72 74 52 65 63 74 3b 0d |Port->po|rtRect;.|
|000016c0| 09 09 52 65 63 74 09 09 | 46 69 67 75 72 65 52 65 |..Rect..|FigureRe|
|000016d0| 63 74 20 3d 20 57 68 69 | 63 68 46 69 67 75 72 65 |ct = Whi|chFigure|
|000016e0| 2d 3e 43 6f 6e 74 72 6f | 6c 52 65 63 74 3b 0d 09 |->Contro|lRect;..|
|000016f0| 09 52 67 6e 48 61 6e 64 | 6c 65 09 52 67 6e 43 6c |.RgnHand|le.RgnCl|
|00001700| 69 70 20 3d 20 4e 65 77 | 52 67 6e 28 29 3b 0d 0d |ip = New|Rgn();..|
|00001710| 09 09 2f 2f 20 68 6f 77 | 20 6d 75 63 68 20 6f 66 |..// how| much of|
|00001720| 20 74 68 65 20 66 69 67 | 75 72 65 20 69 73 20 69 | the fig|ure is i|
|00001730| 6e 20 74 68 65 20 64 69 | 73 70 6c 61 79 20 61 72 |n the di|splay ar|
|00001740| 65 61 20 6f 66 20 74 68 | 65 20 77 69 6e 64 6f 77 |ea of th|e window|
|00001750| 3f 0d 09 09 43 6f 6e 74 | 65 6e 74 52 65 63 74 2e |?...Cont|entRect.|
|00001760| 72 69 67 68 74 20 2d 3d | 20 53 63 72 6f 6c 6c 57 |right -=| ScrollW|
|00001770| 69 64 74 68 3b 0d 09 09 | 43 6f 6e 74 65 6e 74 52 |idth;...|ContentR|
|00001780| 65 63 74 2e 62 6f 74 74 | 6f 6d 20 2d 3d 20 53 63 |ect.bott|om -= Sc|
|00001790| 72 6f 6c 6c 57 69 64 74 | 68 3b 0d 09 09 53 65 63 |rollWidt|h;...Sec|
|000017a0| 74 52 65 63 74 28 26 46 | 69 67 75 72 65 52 65 63 |tRect(&F|igureRec|
|000017b0| 74 2c 20 26 43 6f 6e 74 | 65 6e 74 52 65 63 74 2c |t, &Cont|entRect,|
|000017c0| 20 26 46 69 67 75 72 65 | 52 65 63 74 29 3b 0d 0d | &Figure|Rect);..|
|000017d0| 09 09 2f 2f 20 68 6f 77 | 20 6d 75 63 68 20 6f 66 |..// how| much of|
|000017e0| 20 74 68 65 20 66 69 67 | 75 72 65 20 69 73 6e 27 | the fig|ure isn'|
|000017f0| 74 20 63 6f 76 65 72 65 | 64 20 62 79 20 6f 74 68 |t covere|d by oth|
|00001800| 65 72 20 66 69 67 75 72 | 65 73 0d 09 09 52 65 63 |er figur|es...Rec|
|00001810| 74 52 67 6e 28 52 67 6e | 43 6c 69 70 2c 20 26 46 |tRgn(Rgn|Clip, &F|
|00001820| 69 67 75 72 65 52 65 63 | 74 29 3b 0d 09 09 46 69 |igureRec|t);...Fi|
|00001830| 67 75 72 65 43 6c 69 70 | 52 67 6e 28 57 68 69 63 |gureClip|Rgn(Whic|
|00001840| 68 46 69 67 75 72 65 2c | 20 52 67 6e 43 6c 69 70 |hFigure,| RgnClip|
|00001850| 29 3b 0d 09 09 4f 66 66 | 73 65 74 52 67 6e 28 52 |);...Off|setRgn(R|
|00001860| 67 6e 43 6c 69 70 2c 20 | 2d 28 57 68 69 63 68 46 |gnClip, |-(WhichF|
|00001870| 69 67 75 72 65 2d 3e 43 | 6f 6e 74 72 6f 6c 52 65 |igure->C|ontrolRe|
|00001880| 63 74 2e 6c 65 66 74 29 | 2c 20 2d 28 57 68 69 63 |ct.left)|, -(Whic|
|00001890| 68 46 69 67 75 72 65 2d | 3e 43 6f 6e 74 72 6f 6c |hFigure-|>Control|
|000018a0| 52 65 63 74 2e 74 6f 70 | 29 29 3b 0d 09 09 53 65 |Rect.top|));...Se|
|000018b0| 74 43 6c 69 70 28 52 67 | 6e 43 6c 69 70 29 3b 0d |tClip(Rg|nClip);.|
|000018c0| 09 09 44 69 73 70 6f 73 | 65 52 67 6e 28 52 67 6e |..Dispos|eRgn(Rgn|
|000018d0| 43 6c 69 70 29 3b 0d 0d | 09 09 2f 2f 20 73 65 74 |Clip);..|..// set|
|000018e0| 20 74 68 65 20 6f 72 69 | 67 69 6e 20 74 6f 20 74 | the ori|gin to t|
|000018f0| 68 65 20 74 6f 70 20 6c | 65 66 74 20 6f 66 20 74 |he top l|eft of t|
|00001900| 68 65 20 63 6f 6e 74 72 | 6f 6c 20 61 72 65 61 0d |he contr|ol area.|
|00001910| 09 09 53 65 74 4f 72 69 | 67 69 6e 28 2d 28 57 68 |..SetOri|gin(-(Wh|
|00001920| 69 63 68 46 69 67 75 72 | 65 2d 3e 43 6f 6e 74 72 |ichFigur|e->Contr|
|00001930| 6f 6c 52 65 63 74 2e 6c | 65 66 74 29 2c 20 2d 28 |olRect.l|eft), -(|
|00001940| 57 68 69 63 68 46 69 67 | 75 72 65 2d 3e 43 6f 6e |WhichFig|ure->Con|
|00001950| 74 72 6f 6c 52 65 63 74 | 2e 74 6f 70 29 29 3b 0d |trolRect|.top));.|
|00001960| 0d 09 09 2f 2f 20 73 65 | 74 20 75 70 20 74 68 65 |...// se|t up the|
|00001970| 20 63 6f 6e 74 65 78 74 | 0d 09 09 6f 75 74 43 6f | context|...outCo|
|00001980| 6e 74 65 78 74 2d 3e 43 | 6f 6e 74 65 78 74 49 44 |ntext->C|ontextID|
|00001990| 20 3d 20 69 6e 43 6f 6e | 74 65 78 74 49 44 3b 09 | = inCon|textID;.|
|000019a0| 09 2f 2f 20 6f 6b 61 79 | 2c 20 73 69 6e 63 65 20 |.// okay|, since |
|000019b0| 77 65 20 61 6c 6c 6f 77 | 20 6f 6e 6c 79 20 6f 6e |we allow| only on|
|000019c0| 65 20 63 6f 6e 74 65 78 | 74 20 61 62 6f 76 65 0d |e contex|t above.|
|000019d0| 09 09 6f 75 74 43 6f 6e | 74 65 78 74 2d 3e 43 6f |..outCon|text->Co|
|000019e0| 6e 74 61 69 6e 65 72 52 | 65 66 20 3d 20 30 3b 09 |ntainerR|ef = 0;.|
|000019f0| 09 09 09 2f 2f 20 77 65 | 20 64 6f 6e 27 74 20 75 |...// we| don't u|
|00001a00| 73 65 20 74 68 69 73 0d | 0d 09 09 2f 2f 20 4c 6f |se this.|...// Lo|
|00001a10| 63 61 74 69 6f 6e 20 6f | 66 20 74 68 65 20 63 6f |cation o|f the co|
|00001a20| 6e 74 72 6f 6c 0d 09 09 | 6f 75 74 43 6f 6e 74 65 |ntrol...|outConte|
|00001a30| 78 74 2d 3e 4c 6f 63 61 | 74 69 6f 6e 2e 6c 65 66 |xt->Loca|tion.lef|
|00001a40| 74 20 3d 20 30 3b 0d 09 | 09 6f 75 74 43 6f 6e 74 |t = 0;..|.outCont|
|00001a50| 65 78 74 2d 3e 4c 6f 63 | 61 74 69 6f 6e 2e 72 69 |ext->Loc|ation.ri|
|00001a60| 67 68 74 20 3d 20 57 68 | 69 63 68 46 69 67 75 72 |ght = Wh|ichFigur|
|00001a70| 65 2d 3e 43 6f 6e 74 72 | 6f 6c 52 65 63 74 2e 72 |e->Contr|olRect.r|
|00001a80| 69 67 68 74 20 2d 20 57 | 68 69 63 68 46 69 67 75 |ight - W|hichFigu|
|00001a90| 72 65 2d 3e 43 6f 6e 74 | 72 6f 6c 52 65 63 74 2e |re->Cont|rolRect.|
|00001aa0| 6c 65 66 74 3b 0d 09 09 | 6f 75 74 43 6f 6e 74 65 |left;...|outConte|
|00001ab0| 78 74 2d 3e 4c 6f 63 61 | 74 69 6f 6e 2e 74 6f 70 |xt->Loca|tion.top|
|00001ac0| 20 3d 20 30 3b 0d 09 09 | 6f 75 74 43 6f 6e 74 65 | = 0;...|outConte|
|00001ad0| 78 74 2d 3e 4c 6f 63 61 | 74 69 6f 6e 2e 62 6f 74 |xt->Loca|tion.bot|
|00001ae0| 74 6f 6d 20 3d 20 57 68 | 69 63 68 46 69 67 75 72 |tom = Wh|ichFigur|
|00001af0| 65 2d 3e 43 6f 6e 74 72 | 6f 6c 52 65 63 74 2e 62 |e->Contr|olRect.b|
|00001b00| 6f 74 74 6f 6d 20 2d 20 | 57 68 69 63 68 46 69 67 |ottom - |WhichFig|
|00001b10| 75 72 65 2d 3e 43 6f 6e | 74 72 6f 6c 52 65 63 74 |ure->Con|trolRect|
|00001b20| 2e 74 6f 70 3b 0d 0d 09 | 7d 0d 09 65 6c 73 65 0d |.top;...|}..else.|
|00001b30| 09 09 6f 75 74 43 6f 6e | 74 65 78 74 2d 3e 50 6f |..outCon|text->Po|
|00001b40| 72 74 20 3d 20 4e 55 4c | 4c 3b 0d 0d 09 72 65 74 |rt = NUL|L;...ret|
|00001b50| 75 72 6e 20 52 65 73 75 | 6c 74 3b 0d 7d 0d 0d 0d |urn Resu|lt;.}...|
|00001b60| 2f 2f 0d 2f 2f 20 20 53 | 69 74 65 5f 52 65 6c 65 |//.// S|ite_Rele|
|00001b70| 61 73 65 43 6f 6e 74 65 | 78 74 0d 2f 2f 0d 0d 41 |aseConte|xt.//..A|
|00001b80| 58 45 72 72 6f 72 43 6f | 64 65 20 53 69 74 65 5f |XErrorCo|de Site_|
|00001b90| 52 65 6c 65 61 73 65 43 | 6f 6e 74 65 78 74 28 41 |ReleaseC|ontext(A|
|00001ba0| 58 52 65 66 49 44 20 69 | 6e 43 6c 69 65 6e 74 53 |XRefID i|nClientS|
|00001bb0| 69 74 65 49 44 2c 20 41 | 58 44 72 61 77 43 6f 6e |iteID, A|XDrawCon|
|00001bc0| 74 65 78 74 2a 20 69 6e | 43 6f 6e 74 65 78 74 29 |text* in|Context)|
|00001bd0| 0d 7b 0d 23 70 72 61 67 | 6d 61 20 75 6e 75 73 65 |.{.#prag|ma unuse|
|00001be0| 64 28 69 6e 43 6c 69 65 | 6e 74 53 69 74 65 49 44 |d(inClie|ntSiteID|
|00001bf0| 2c 20 69 6e 43 6f 6e 74 | 65 78 74 29 0d 0d 09 52 |, inCont|ext)...R|
|00001c00| 65 73 74 6f 72 65 50 6f | 72 74 53 74 61 74 65 28 |estorePo|rtState(|
|00001c10| 29 3b 0d 09 0d 09 72 65 | 74 75 72 6e 20 6b 41 58 |);....re|turn kAX|
|00001c20| 4e 6f 45 72 72 3b 0d 7d | 0d 0d 0d 23 70 72 61 67 |NoErr;.}|...#prag|
|00001c30| 6d 61 20 6d 61 72 6b 20 | 3d 3d 3d 3d 3d 3d 3d 3d |ma mark |========|
|00001c40| 3d 3d 3d 3d 3d 3d 20 45 | 78 70 6c 6f 72 65 72 42 |====== E|xplorerB|
|00001c50| 61 73 69 63 20 49 6e 74 | 65 72 66 61 63 65 20 3d |asic Int|erface =|
|00001c60| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00001c70| 3d 3d 0d 0d 2f 2f 0d 2f | 2f 20 20 49 45 42 61 73 |==..//./|/ IEBas|
|00001c80| 69 63 5f 49 45 47 6f 74 | 6f 4e 65 77 55 52 4c 0d |ic_IEGot|oNewURL.|
|00001c90| 2f 2f 0d 0d 41 58 45 72 | 72 6f 72 43 6f 64 65 20 |//..AXEr|rorCode |
|00001ca0| 49 45 42 61 73 69 63 5f | 49 45 47 6f 74 6f 4e 65 |IEBasic_|IEGotoNe|
|00001cb0| 77 55 52 4c 28 41 58 52 | 65 66 49 44 20 69 6e 43 |wURL(AXR|efID inC|
|00001cc0| 6c 69 65 6e 74 53 69 74 | 65 49 44 2c 20 52 65 63 |lientSit|eID, Rec|
|00001cd0| 74 20 2a 42 6f 75 6e 64 | 73 2c 20 43 68 61 72 38 |t *Bound|s, Char8|
|00001ce0| 20 2a 55 52 4c 2c 20 43 | 68 61 72 38 20 2a 52 65 | *URL, C|har8 *Re|
|00001cf0| 66 65 72 65 72 2c 20 43 | 68 61 72 38 20 2a 4e 61 |ferer, C|har8 *Na|
|00001d00| 6d 65 2c 0d 09 09 09 09 | 09 43 68 61 72 38 20 2a |me,.....|.Char8 *|
|00001d10| 50 6f 73 74 44 61 74 61 | 2c 20 42 6f 6f 6c 65 61 |PostData|, Boolea|
|00001d20| 6e 20 44 6f 6e 74 55 73 | 65 44 6f 63 43 61 63 68 |n DontUs|eDocCach|
|00001d30| 65 2c 20 42 6f 6f 6c 65 | 61 6e 20 44 6f 6e 74 55 |e, Boole|an DontU|
|00001d40| 73 65 49 6d 61 67 65 43 | 61 63 68 65 29 0d 7b 0d |seImageC|ache).{.|
|00001d50| 23 70 72 61 67 6d 61 20 | 75 6e 75 73 65 64 28 69 |#pragma |unused(i|
|00001d60| 6e 43 6c 69 65 6e 74 53 | 69 74 65 49 44 2c 20 42 |nClientS|iteID, B|
|00001d70| 6f 75 6e 64 73 2c 20 55 | 52 4c 2c 20 52 65 66 65 |ounds, U|RL, Refe|
|00001d80| 72 65 72 2c 20 4e 61 6d | 65 2c 20 50 6f 73 74 44 |rer, Nam|e, PostD|
|00001d90| 61 74 61 2c 20 44 6f 6e | 74 55 73 65 44 6f 63 43 |ata, Don|tUseDocC|
|00001da0| 61 63 68 65 2c 20 44 6f | 6e 74 55 73 65 49 6d 61 |ache, Do|ntUseIma|
|00001db0| 67 65 43 61 63 68 65 29 | 0d 0d 09 2f 2f 09 6d 61 |geCache)|...//.ma|
|00001dc0| 6b 65 20 61 20 6e 6f 74 | 65 20 74 6f 3a 0d 09 2f |ke a not|e to:../|
|00001dd0| 2f 09 63 72 65 61 74 65 | 20 61 20 6e 65 77 20 77 |/.create| a new w|
|00001de0| 69 6e 64 6f 77 20 61 6e | 64 20 70 75 74 20 74 68 |indow an|d put th|
|00001df0| 65 20 49 45 20 63 6f 6e | 74 72 6f 6c 20 69 6e 74 |e IE con|trol int|
|00001e00| 6f 20 69 74 0d 0d 09 72 | 65 74 75 72 6e 20 6b 41 |o it...r|eturn kA|
|00001e10| 58 4e 6f 45 72 72 3b 0d | 7d 0d 0d 0d 2f 2f 0d 2f |XNoErr;.|}...//./|
|00001e20| 2f 20 20 49 45 42 61 73 | 69 63 5f 49 45 4c 6f 61 |/ IEBas|ic_IELoa|
|00001e30| 64 69 6e 67 53 74 61 72 | 74 65 64 0d 2f 2f 0d 0d |dingStar|ted.//..|
|00001e40| 41 58 45 72 72 6f 72 43 | 6f 64 65 20 49 45 42 61 |AXErrorC|ode IEBa|
|00001e50| 73 69 63 5f 49 45 4c 6f | 61 64 69 6e 67 53 74 61 |sic_IELo|adingSta|
|00001e60| 72 74 65 64 28 41 58 52 | 65 66 49 44 20 69 6e 43 |rted(AXR|efID inC|
|00001e70| 6c 69 65 6e 74 53 69 74 | 65 49 44 29 0d 7b 0d 23 |lientSit|eID).{.#|
|00001e80| 70 72 61 67 6d 61 20 75 | 6e 75 73 65 64 28 69 6e |pragma u|nused(in|
|00001e90| 43 6c 69 65 6e 74 53 69 | 74 65 49 44 29 0d 0d 09 |ClientSi|teID)...|
|00001ea0| 2f 2f 09 6d 61 6b 65 20 | 61 20 6e 6f 74 65 20 74 |//.make |a note t|
|00001eb0| 6f 3a 0d 09 2f 2f 09 67 | 69 76 65 20 74 68 65 20 |o:..//.g|ive the |
|00001ec0| 75 73 65 72 20 66 65 65 | 64 62 61 63 6b 20 74 68 |user fee|dback th|
|00001ed0| 61 74 20 77 65 20 61 72 | 65 20 64 6f 77 6e 6c 6f |at we ar|e downlo|
|00001ee0| 61 64 69 6e 67 0d 0d 09 | 72 65 74 75 72 6e 20 6b |ading...|return k|
|00001ef0| 41 58 4e 6f 45 72 72 3b | 0d 7d 0d 0d 0d 2f 2f 0d |AXNoErr;|.}...//.|
|00001f00| 2f 2f 20 20 49 45 42 61 | 73 69 63 5f 49 45 4c 6f |// IEBa|sic_IELo|
|00001f10| 61 64 69 6e 67 46 69 6e | 69 73 68 65 64 0d 2f 2f |adingFin|ished.//|
|00001f20| 0d 0d 41 58 45 72 72 6f | 72 43 6f 64 65 20 49 45 |..AXErro|rCode IE|
|00001f30| 42 61 73 69 63 5f 49 45 | 4c 6f 61 64 69 6e 67 46 |Basic_IE|LoadingF|
|00001f40| 69 6e 69 73 68 65 64 28 | 41 58 52 65 66 49 44 20 |inished(|AXRefID |
|00001f50| 69 6e 43 6c 69 65 6e 74 | 53 69 74 65 49 44 29 0d |inClient|SiteID).|
|00001f60| 7b 0d 23 70 72 61 67 6d | 61 20 75 6e 75 73 65 64 |{.#pragm|a unused|
|00001f70| 28 69 6e 43 6c 69 65 6e | 74 53 69 74 65 49 44 29 |(inClien|tSiteID)|
|00001f80| 0d 0d 09 2f 2f 09 6d 61 | 6b 65 20 61 20 6e 6f 74 |...//.ma|ke a not|
|00001f90| 65 20 74 6f 3a 0d 09 2f | 2f 09 67 69 76 65 20 74 |e to:../|/.give t|
|00001fa0| 68 65 20 75 73 65 72 20 | 66 65 65 64 62 61 63 6b |he user |feedback|
|00001fb0| 20 74 68 61 74 20 77 65 | 20 61 72 65 20 64 6f 6e | that we| are don|
|00001fc0| 65 20 64 6f 77 6e 6c 6f | 61 64 69 6e 67 0d 0d 09 |e downlo|ading...|
|00001fd0| 72 65 74 75 72 6e 20 6b | 41 58 4e 6f 45 72 72 3b |return k|AXNoErr;|
|00001fe0| 0d 7d 0d 0d 0d 2f 2f 0d | 2f 2f 20 20 49 45 42 61 |.}...//.|// IEBa|
|00001ff0| 73 69 63 5f 49 45 54 69 | 74 6c 65 43 68 61 6e 67 |sic_IETi|tleChang|
|00002000| 65 64 0d 2f 2f 0d 0d 41 | 58 45 72 72 6f 72 43 6f |ed.//..A|XErrorCo|
|00002010| 64 65 20 49 45 42 61 73 | 69 63 5f 49 45 54 69 74 |de IEBas|ic_IETit|
|00002020| 6c 65 43 68 61 6e 67 65 | 64 28 41 58 52 65 66 49 |leChange|d(AXRefI|
|00002030| 44 20 69 6e 43 6c 69 65 | 6e 74 53 69 74 65 49 44 |D inClie|ntSiteID|
|00002040| 2c 20 43 68 61 72 38 20 | 2a 54 69 74 6c 65 29 0d |, Char8 |*Title).|
|00002050| 7b 0d 23 70 72 61 67 6d | 61 20 75 6e 75 73 65 64 |{.#pragm|a unused|
|00002060| 28 69 6e 43 6c 69 65 6e | 74 53 69 74 65 49 44 2c |(inClien|tSiteID,|
|00002070| 20 54 69 74 6c 65 29 0d | 0d 09 2f 2f 09 6d 61 6b | Title).|..//.mak|
|00002080| 65 20 61 20 6e 6f 74 65 | 20 74 6f 3a 0d 09 2f 2f |e a note| to:..//|
|00002090| 09 67 69 76 65 20 74 68 | 65 20 75 73 65 72 20 66 |.give th|e user f|
|000020a0| 65 65 64 62 61 63 6b 20 | 74 68 61 74 20 74 68 65 |eedback |that the|
|000020b0| 20 74 69 74 6c 65 20 68 | 61 73 20 63 68 61 6e 67 | title h|as chang|
|000020c0| 65 64 0d 0d 09 72 65 74 | 75 72 6e 20 6b 41 58 4e |ed...ret|urn kAXN|
|000020d0| 6f 45 72 72 3b 0d 7d 0d | 0d 0d 2f 2f 0d 2f 2f 20 |oErr;.}.|..//.// |
|000020e0| 20 49 45 42 61 73 69 63 | 5f 49 45 44 6f 63 75 6d | IEBasic|_IEDocum|
|000020f0| 65 6e 74 43 68 61 6e 67 | 65 64 0d 2f 2f 0d 0d 41 |entChang|ed.//..A|
|00002100| 58 45 72 72 6f 72 43 6f | 64 65 09 49 45 42 61 73 |XErrorCo|de.IEBas|
|00002110| 69 63 5f 49 45 44 6f 63 | 75 6d 65 6e 74 43 68 61 |ic_IEDoc|umentCha|
|00002120| 6e 67 65 64 28 41 58 52 | 65 66 49 44 20 69 6e 43 |nged(AXR|efID inC|
|00002130| 6c 69 65 6e 74 53 69 74 | 65 49 44 29 0d 7b 0d 23 |lientSit|eID).{.#|
|00002140| 70 72 61 67 6d 61 20 75 | 6e 75 73 65 64 28 69 6e |pragma u|nused(in|
|00002150| 43 6c 69 65 6e 74 53 69 | 74 65 49 44 29 0d 0d 09 |ClientSi|teID)...|
|00002160| 2f 2f 09 6d 61 6b 65 20 | 61 20 6e 6f 74 65 20 74 |//.make |a note t|
|00002170| 6f 3a 0d 09 2f 2f 09 67 | 69 76 65 20 74 68 65 20 |o:..//.g|ive the |
|00002180| 75 73 65 72 20 66 65 65 | 64 62 61 63 6b 20 74 68 |user fee|dback th|
|00002190| 61 74 20 74 68 65 20 64 | 6f 63 75 6d 65 6e 74 20 |at the d|ocument |
|000021a0| 68 61 73 20 63 68 61 6e | 67 65 64 0d 0d 09 72 65 |has chan|ged...re|
|000021b0| 74 75 72 6e 20 6b 41 58 | 4e 6f 45 72 72 3b 0d 7d |turn kAX|NoErr;.}|
|000021c0| 0d 0d 0d 2f 2f 0d 2f 2f | 20 20 49 45 42 61 73 69 |...//.//| IEBasi|
|000021d0| 63 5f 49 45 48 61 6e 64 | 6c 65 55 52 4c 0d 2f 2f |c_IEHand|leURL.//|
|000021e0| 0d 0d 41 58 45 72 72 6f | 72 43 6f 64 65 09 49 45 |..AXErro|rCode.IE|
|000021f0| 42 61 73 69 63 5f 49 45 | 48 61 6e 64 6c 65 55 52 |Basic_IE|HandleUR|
|00002200| 4c 28 41 58 52 65 66 49 | 44 20 69 6e 43 6c 69 65 |L(AXRefI|D inClie|
|00002210| 6e 74 53 69 74 65 49 44 | 2c 20 43 68 61 72 38 20 |ntSiteID|, Char8 |
|00002220| 2a 55 52 4c 2c 20 43 68 | 61 72 38 20 2a 52 65 66 |*URL, Ch|ar8 *Ref|
|00002230| 65 72 65 72 2c 20 43 68 | 61 72 38 20 2a 54 61 72 |erer, Ch|ar8 *Tar|
|00002240| 67 65 74 2c 0d 09 09 09 | 09 09 09 43 68 61 72 38 |get,....|...Char8|
|00002250| 20 2a 50 6f 73 74 44 61 | 74 61 2c 20 42 6f 6f 6c | *PostDa|ta, Bool|
|00002260| 65 61 6e 20 44 6f 6e 74 | 55 73 65 44 6f 63 43 61 |ean Dont|UseDocCa|
|00002270| 63 68 65 2c 20 42 6f 6f | 6c 65 61 6e 20 44 6f 6e |che, Boo|lean Don|
|00002280| 74 55 73 65 49 6d 61 67 | 65 43 61 63 68 65 29 0d |tUseImag|eCache).|
|00002290| 7b 0d 23 70 72 61 67 6d | 61 20 75 6e 75 73 65 64 |{.#pragm|a unused|
|000022a0| 28 69 6e 43 6c 69 65 6e | 74 53 69 74 65 49 44 2c |(inClien|tSiteID,|
|000022b0| 20 55 52 4c 2c 20 52 65 | 66 65 72 65 72 2c 20 54 | URL, Re|ferer, T|
|000022c0| 61 72 67 65 74 2c 20 50 | 6f 73 74 44 61 74 61 2c |arget, P|ostData,|
|000022d0| 20 44 6f 6e 74 55 73 65 | 44 6f 63 43 61 63 68 65 | DontUse|DocCache|
|000022e0| 2c 20 44 6f 6e 74 55 73 | 65 49 6d 61 67 65 43 61 |, DontUs|eImageCa|
|000022f0| 63 68 65 29 0d 0d 09 2f | 2f 09 74 65 6c 6c 20 74 |che).../|/.tell t|
|00002300| 68 65 20 63 6f 6e 74 72 | 6f 6c 20 74 6f 20 67 6f |he contr|ol to go|
|00002310| 20 77 68 65 72 65 76 65 | 72 20 69 74 20 77 61 6e | whereve|r it wan|
|00002320| 74 73 20 2d 20 72 65 74 | 75 72 6e 20 45 5f 46 41 |ts - ret|urn E_FA|
|00002330| 49 4c 20 6f 74 68 65 72 | 77 69 73 65 0d 0d 09 72 |IL other|wise...r|
|00002340| 65 74 75 72 6e 20 6b 41 | 58 4e 6f 45 72 72 3b 0d |eturn kA|XNoErr;.|
|00002350| 7d 0d 0d 0d 23 70 72 61 | 67 6d 61 20 6d 61 72 6b |}...#pra|gma mark|
|00002360| 20 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 20 | =======|======= |
|00002370| 55 52 4c 53 74 72 65 61 | 6d 20 49 6e 74 65 72 66 |URLStrea|m Interf|
|00002380| 61 63 65 20 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |ace ====|========|
|00002390| 3d 3d 3d 3d 3d 3d 3d 0d | 0d 0d 2f 2f 20 63 6c 75 |=======.|..// clu|
|000023a0| 64 67 65 20 66 6f 72 20 | 74 65 73 74 20 63 6f 64 |dge for |test cod|
|000023b0| 65 2c 20 66 6f 72 20 72 | 65 61 6c 20 69 6d 70 6c |e, for r|eal impl|
|000023c0| 65 6d 65 6e 74 61 74 69 | 6f 6e 20 73 68 6f 75 6c |ementati|on shoul|
|000023d0| 64 20 62 65 20 68 75 6e | 67 20 6f 66 66 20 74 68 |d be hun|g off th|
|000023e0| 65 20 73 69 74 65 2f 66 | 69 67 75 72 65 0d 73 74 |e site/f|igure.st|
|000023f0| 61 74 69 63 20 73 68 6f | 72 74 20 46 69 6c 65 52 |atic sho|rt FileR|
|00002400| 65 66 3b 0d 73 74 61 74 | 69 63 20 6c 6f 6e 67 20 |ef;.stat|ic long |
|00002410| 46 69 6c 65 4c 65 6e 67 | 74 68 3b 0d 0d 0d 2f 2f |FileLeng|th;...//|
|00002420| 0d 2f 2f 20 20 55 52 4c | 53 74 72 65 61 6d 5f 4f |.// URL|Stream_O|
|00002430| 70 65 6e 53 74 72 65 61 | 6d 55 52 4c 0d 2f 2f 0d |penStrea|mURL.//.|
|00002440| 0d 55 69 6e 74 33 32 09 | 55 52 4c 53 74 72 65 61 |.Uint32.|URLStrea|
|00002450| 6d 5f 4f 70 65 6e 53 74 | 72 65 61 6d 28 41 58 52 |m_OpenSt|ream(AXR|
|00002460| 65 66 49 44 20 69 6e 43 | 6c 69 65 6e 74 53 69 74 |efID inC|lientSit|
|00002470| 65 49 44 2c 20 43 68 61 | 72 38 2a 20 53 74 72 65 |eID, Cha|r8* Stre|
|00002480| 61 6d 55 52 4c 29 0d 7b | 0d 23 70 72 61 67 6d 61 |amURL).{|.#pragma|
|00002490| 20 75 6e 75 73 65 64 28 | 69 6e 43 6c 69 65 6e 74 | unused(|inClient|
|000024a0| 53 69 74 65 49 44 2c 20 | 53 74 72 65 61 6d 55 52 |SiteID, |StreamUR|
|000024b0| 4c 29 0d 09 46 69 67 75 | 72 65 44 61 74 61 50 74 |L)..Figu|reDataPt|
|000024c0| 72 09 57 68 69 63 68 46 | 69 67 75 72 65 20 3d 20 |r.WhichF|igure = |
|000024d0| 28 46 69 67 75 72 65 44 | 61 74 61 50 74 72 29 20 |(FigureD|ataPtr) |
|000024e0| 69 6e 43 6c 69 65 6e 74 | 53 69 74 65 49 44 3b 0d |inClient|SiteID;.|
|000024f0| 09 4f 53 45 72 72 09 69 | 45 72 72 3b 0d 09 46 53 |.OSErr.i|Err;..FS|
|00002500| 53 70 65 63 09 46 69 6c | 65 53 70 65 63 3b 0d 0d |Spec.Fil|eSpec;..|
|00002510| 09 69 45 72 72 20 3d 20 | 46 53 4d 61 6b 65 46 53 |.iErr = |FSMakeFS|
|00002520| 53 70 65 63 28 2d 31 2c | 20 30 2c 20 22 5c 70 4a |Spec(-1,| 0, "\pJ|
|00002530| 50 45 47 46 69 6c 65 2e | 6a 70 67 22 2c 20 26 46 |PEGFile.|jpg", &F|
|00002540| 69 6c 65 53 70 65 63 29 | 3b 0d 09 69 45 72 72 20 |ileSpec)|;..iErr |
|00002550| 3d 20 46 53 70 4f 70 65 | 6e 44 46 28 26 46 69 6c |= FSpOpe|nDF(&Fil|
|00002560| 65 53 70 65 63 2c 20 66 | 73 43 75 72 50 65 72 6d |eSpec, f|sCurPerm|
|00002570| 2c 20 26 46 69 6c 65 52 | 65 66 29 3b 0d 09 69 66 |, &FileR|ef);..if|
|00002580| 28 69 45 72 72 20 3d 3d | 20 6e 6f 45 72 72 29 0d |(iErr ==| noErr).|
|00002590| 09 7b 0d 09 09 69 45 72 | 72 20 3d 20 47 65 74 45 |.{...iEr|r = GetE|
|000025a0| 4f 46 28 46 69 6c 65 52 | 65 66 2c 20 26 46 69 6c |OF(FileR|ef, &Fil|
|000025b0| 65 4c 65 6e 67 74 68 29 | 3b 0d 09 09 72 65 74 75 |eLength)|;...retu|
|000025c0| 72 6e 20 31 3b 0d 09 7d | 0d 09 72 65 74 75 72 6e |rn 1;..}|..return|
|000025d0| 20 30 3b 0d 7d 0d 0d 0d | 2f 2f 0d 2f 2f 20 20 55 | 0;.}...|//.// U|
|000025e0| 52 4c 53 74 72 65 61 6d | 5f 52 65 61 64 43 6f 6e |RLStream|_ReadCon|
|000025f0| 74 65 6e 74 54 79 70 65 | 0d 2f 2f 0d 0d 76 6f 69 |tentType|.//..voi|
|00002600| 64 09 55 52 4c 53 74 72 | 65 61 6d 5f 52 65 61 64 |d.URLStr|eam_Read|
|00002610| 43 6f 6e 74 65 6e 74 54 | 79 70 65 28 41 58 52 65 |ContentT|ype(AXRe|
|00002620| 66 49 44 20 69 6e 43 6c | 69 65 6e 74 53 69 74 65 |fID inCl|ientSite|
|00002630| 49 44 2c 20 55 69 6e 74 | 33 32 20 53 74 72 65 61 |ID, Uint|32 Strea|
|00002640| 6d 49 44 2c 20 43 68 61 | 72 38 2a 20 42 75 66 66 |mID, Cha|r8* Buff|
|00002650| 65 72 2c 20 49 6e 74 31 | 36 20 4c 65 6e 67 74 68 |er, Int1|6 Length|
|00002660| 29 0d 7b 0d 23 70 72 61 | 67 6d 61 20 75 6e 75 73 |).{.#pra|gma unus|
|00002670| 65 64 28 69 6e 43 6c 69 | 65 6e 74 53 69 74 65 49 |ed(inCli|entSiteI|
|00002680| 44 2c 20 53 74 72 65 61 | 6d 49 44 2c 20 42 75 66 |D, Strea|mID, Buf|
|00002690| 66 65 72 2c 20 4c 65 6e | 67 74 68 29 0d 09 63 68 |fer, Len|gth)..ch|
|000026a0| 61 72 2a 09 4d 69 6d 65 | 20 3d 20 4e 55 4c 4c 3b |ar*.Mime| = NULL;|
|000026b0| 0d 09 0d 09 69 66 28 53 | 74 72 65 61 6d 49 44 20 |....if(S|treamID |
|000026c0| 3d 3d 20 31 29 0d 09 7b | 0d 09 09 69 66 28 42 75 |== 1)..{|...if(Bu|
|000026d0| 66 66 65 72 20 26 26 20 | 73 74 72 6c 65 6e 28 22 |ffer && |strlen("|
|000026e0| 69 6d 61 67 65 2f 6a 70 | 65 67 22 29 20 3c 3d 20 |image/jp|eg") <= |
|000026f0| 4c 65 6e 67 74 68 29 0d | 09 09 09 73 74 72 63 70 |Length).|...strcp|
|00002700| 79 28 42 75 66 66 65 72 | 2c 20 22 69 6d 61 67 65 |y(Buffer|, "image|
|00002710| 2f 6a 70 65 67 22 29 3b | 0d 09 7d 0d 7d 0d 0d 0d |/jpeg");|..}.}...|
|00002720| 2f 2f 0d 2f 2f 20 20 55 | 52 4c 53 74 72 65 61 6d |//.// U|RLStream|
|00002730| 5f 52 65 61 64 44 61 74 | 61 0d 2f 2f 0d 0d 41 58 |_ReadDat|a.//..AX|
|00002740| 45 72 72 6f 72 43 6f 64 | 65 09 55 52 4c 53 74 72 |ErrorCod|e.URLStr|
|00002750| 65 61 6d 5f 52 65 61 64 | 44 61 74 61 28 41 58 52 |eam_Read|Data(AXR|
|00002760| 65 66 49 44 20 69 6e 43 | 6c 69 65 6e 74 53 69 74 |efID inC|lientSit|
|00002770| 65 49 44 2c 20 55 69 6e | 74 33 32 20 53 74 72 65 |eID, Uin|t32 Stre|
|00002780| 61 6d 49 44 2c 20 43 68 | 61 72 38 2a 20 42 75 66 |amID, Ch|ar8* Buf|
|00002790| 66 65 72 2c 20 49 6e 74 | 33 32 2a 20 4c 65 6e 67 |fer, Int|32* Leng|
|000027a0| 74 68 29 0d 7b 0d 23 70 | 72 61 67 6d 61 20 75 6e |th).{.#p|ragma un|
|000027b0| 75 73 65 64 28 69 6e 43 | 6c 69 65 6e 74 53 69 74 |used(inC|lientSit|
|000027c0| 65 49 44 2c 20 53 74 72 | 65 61 6d 49 44 2c 20 42 |eID, Str|eamID, B|
|000027d0| 75 66 66 65 72 2c 20 4c | 65 6e 67 74 68 29 0d 09 |uffer, L|ength)..|
|000027e0| 4f 53 45 72 72 09 69 45 | 72 72 20 3d 20 2d 31 3b |OSErr.iE|rr = -1;|
|000027f0| 0d 09 0d 09 69 66 28 53 | 74 72 65 61 6d 49 44 20 |....if(S|treamID |
|00002800| 3d 3d 20 31 29 0d 09 7b | 0d 09 09 69 66 28 46 69 |== 1)..{|...if(Fi|
|00002810| 6c 65 4c 65 6e 67 74 68 | 20 3e 20 30 29 0d 09 09 |leLength| > 0)...|
|00002820| 7b 0d 09 09 09 6c 6f 6e | 67 09 43 6f 70 79 4c 65 |{....lon|g.CopyLe|
|00002830| 6e 67 74 68 20 3d 20 2a | 4c 65 6e 67 74 68 20 3e |ngth = *|Length >|
|00002840| 20 46 69 6c 65 4c 65 6e | 67 74 68 20 3f 20 46 69 | FileLen|gth ? Fi|
|00002850| 6c 65 4c 65 6e 67 74 68 | 20 3a 20 2a 4c 65 6e 67 |leLength| : *Leng|
|00002860| 74 68 3b 0d 09 09 09 0d | 09 09 09 69 45 72 72 20 |th;.....|...iErr |
|00002870| 3d 20 46 53 52 65 61 64 | 28 46 69 6c 65 52 65 66 |= FSRead|(FileRef|
|00002880| 2c 20 26 43 6f 70 79 4c | 65 6e 67 74 68 2c 20 42 |, &CopyL|ength, B|
|00002890| 75 66 66 65 72 29 3b 0d | 09 09 09 2a 4c 65 6e 67 |uffer);.|...*Leng|
|000028a0| 74 68 20 3d 20 43 6f 70 | 79 4c 65 6e 67 74 68 3b |th = Cop|yLength;|
|000028b0| 0d 09 09 7d 0d 09 09 65 | 6c 73 65 0d 09 09 09 69 |...}...e|lse....i|
|000028c0| 45 72 72 20 3d 20 65 6f | 66 45 72 72 3b 0d 09 7d |Err = eo|fErr;..}|
|000028d0| 0d 09 72 65 74 75 72 6e | 20 69 45 72 72 3b 0d 7d |..return| iErr;.}|
|000028e0| 0d 0d 0d 2f 2f 0d 2f 2f | 20 20 55 52 4c 53 74 72 |...//.//| URLStr|
|000028f0| 65 61 6d 5f 43 6c 6f 73 | 65 53 74 72 65 61 6d 0d |eam_Clos|eStream.|
|00002900| 2f 2f 0d 0d 41 58 45 72 | 72 6f 72 43 6f 64 65 09 |//..AXEr|rorCode.|
|00002910| 55 52 4c 53 74 72 65 61 | 6d 5f 43 6c 6f 73 65 53 |URLStrea|m_CloseS|
|00002920| 74 72 65 61 6d 28 41 58 | 52 65 66 49 44 20 69 6e |tream(AX|RefID in|
|00002930| 43 6c 69 65 6e 74 53 69 | 74 65 49 44 2c 20 55 69 |ClientSi|teID, Ui|
|00002940| 6e 74 33 32 20 53 74 72 | 65 61 6d 49 44 29 0d 7b |nt32 Str|eamID).{|
|00002950| 0d 23 70 72 61 67 6d 61 | 20 75 6e 75 73 65 64 28 |.#pragma| unused(|
|00002960| 69 6e 43 6c 69 65 6e 74 | 53 69 74 65 49 44 29 0d |inClient|SiteID).|
|00002970| 09 69 66 28 53 74 72 65 | 61 6d 49 44 20 3d 3d 20 |.if(Stre|amID == |
|00002980| 31 29 0d 09 7b 0d 09 09 | 46 53 43 6c 6f 73 65 28 |1)..{...|FSClose(|
|00002990| 46 69 6c 65 52 65 66 29 | 3b 0d 09 09 72 65 74 75 |FileRef)|;...retu|
|000029a0| 72 6e 20 53 5f 4f 4b 3b | 0d 09 7d 0d 09 0d 09 72 |rn S_OK;|..}....r|
|000029b0| 65 74 75 72 6e 20 45 5f | 46 41 49 4c 3b 0d 7d 0d |eturn E_|FAIL;.}.|
|000029c0| 0d 0d 2f 2f 0d 2f 2f 20 | 20 55 52 4c 53 74 72 65 |..//.// | URLStre|
|000029d0| 61 6d 5f 4d 61 70 55 52 | 4c 0d 2f 2f 0d 0d 41 58 |am_MapUR|L.//..AX|
|000029e0| 45 72 72 6f 72 43 6f 64 | 65 09 55 52 4c 53 74 72 |ErrorCod|e.URLStr|
|000029f0| 65 61 6d 5f 4d 61 70 55 | 52 4c 28 41 58 52 65 66 |eam_MapU|RL(AXRef|
|00002a00| 49 44 20 69 6e 43 6c 69 | 65 6e 74 53 69 74 65 49 |ID inCli|entSiteI|
|00002a10| 44 2c 20 43 68 61 72 38 | 2a 20 4f 6c 64 55 52 4c |D, Char8|* OldURL|
|00002a20| 2c 20 43 68 61 72 38 2a | 20 42 75 66 66 65 72 2c |, Char8*| Buffer,|
|00002a30| 20 49 6e 74 31 36 20 4c | 65 6e 67 74 68 29 0d 7b | Int16 L|ength).{|
|00002a40| 0d 23 70 72 61 67 6d 61 | 20 75 6e 75 73 65 64 28 |.#pragma| unused(|
|00002a50| 69 6e 43 6c 69 65 6e 74 | 53 69 74 65 49 44 29 0d |inClient|SiteID).|
|00002a60| 09 63 68 61 72 2a 09 4e | 65 77 55 52 4c 20 3d 20 |.char*.N|ewURL = |
|00002a70| 4e 55 4c 4c 3b 0d 09 0d | 09 69 66 28 73 74 72 63 |NULL;...|.if(strc|
|00002a80| 6d 70 28 4f 6c 64 55 52 | 4c 20 2c 20 22 66 69 6c |mp(OldUR|L , "fil|
|00002a90| 65 3a 2f 2f 2f 54 65 73 | 74 2e 68 74 6d 6c 22 29 |e:///Tes|t.html")|
|00002aa0| 20 3d 3d 20 30 29 0d 09 | 7b 0d 09 09 49 6e 74 31 | == 0)..|{...Int1|
|00002ab0| 36 09 55 52 4c 4c 65 6e | 67 74 68 20 3d 20 73 74 |6.URLLen|gth = st|
|00002ac0| 72 6c 65 6e 28 22 73 74 | 72 65 61 6d 3a 2f 2f 4a |rlen("st|ream://J|
|00002ad0| 50 45 47 46 69 6c 65 2e | 6a 70 67 22 29 3b 0d 09 |PEGFile.|jpg");..|
|00002ae0| 09 0d 09 09 69 66 28 42 | 75 66 66 65 72 20 26 26 |....if(B|uffer &&|
|00002af0| 20 28 4c 65 6e 67 74 68 | 20 3e 3d 20 55 52 4c 4c | (Length| >= URLL|
|00002b00| 65 6e 67 74 68 29 29 0d | 09 09 09 73 74 72 63 70 |ength)).|...strcp|
|00002b10| 79 28 42 75 66 66 65 72 | 2c 20 22 73 74 72 65 61 |y(Buffer|, "strea|
|00002b20| 6d 3a 2f 2f 4a 50 45 47 | 46 69 6c 65 2e 6a 70 67 |m://JPEG|File.jpg|
|00002b30| 22 29 3b 0d 09 7d 0d 09 | 0d 09 72 65 74 75 72 6e |");..}..|..return|
|00002b40| 20 53 5f 4f 4b 3b 0d 7d | 0d 0d 0d 0d 23 70 72 61 | S_OK;.}|....#pra|
|00002b50| 67 6d 61 20 6d 61 72 6b | 20 3d 3d 3d 3d 3d 3d 3d |gma mark| =======|
|00002b60| 3d 3d 3d 3d 20 49 6e 74 | 65 72 6e 61 6c 20 52 6f |==== Int|ernal Ro|
|00002b70| 75 74 69 6e 65 73 20 3d | 3d 3d 3d 3d 3d 3d 3d 3d |utines =|========|
|00002b80| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 0d 0d 0d 0d 2f 2f |========|==....//|
|00002b90| 0d 2f 2f 09 53 61 76 65 | 50 6f 72 74 53 74 61 74 |.//.Save|PortStat|
|00002ba0| 65 0d 2f 2f 0d 73 74 61 | 74 69 63 20 47 72 61 66 |e.//.sta|tic Graf|
|00002bb0| 50 74 72 20 73 53 61 76 | 65 50 6f 72 74 20 3d 20 |Ptr sSav|ePort = |
|00002bc0| 6e 69 6c 3b 0d 73 74 61 | 74 69 63 20 50 6f 72 74 |nil;.sta|tic Port|
|00002bd0| 53 74 61 74 65 20 73 4f | 6c 64 50 6f 72 74 53 74 |State sO|ldPortSt|
|00002be0| 61 74 65 3b 0d 0d 76 6f | 69 64 20 53 61 76 65 50 |ate;..vo|id SaveP|
|00002bf0| 6f 72 74 53 74 61 74 65 | 28 41 58 50 6c 61 74 66 |ortState|(AXPlatf|
|00002c00| 6f 72 6d 50 6f 72 74 2a | 20 50 6f 72 74 29 0d 7b |ormPort*| Port).{|
|00002c10| 0d 09 2f 2f 20 53 61 76 | 65 20 6f 66 66 20 74 68 |..// Sav|e off th|
|00002c20| 65 20 63 75 72 72 65 6e | 74 20 70 6f 72 74 0d 09 |e curren|t port..|
|00002c30| 47 65 74 50 6f 72 74 28 | 26 73 53 61 76 65 50 6f |GetPort(|&sSavePo|
|00002c40| 72 74 29 3b 0d 09 0d 09 | 2f 2f 20 53 65 74 20 74 |rt);....|// Set t|
|00002c50| 68 65 20 63 75 72 72 65 | 6e 74 20 70 6f 72 74 20 |he curre|nt port |
|00002c60| 74 6f 20 74 68 65 20 6f | 6e 65 20 72 65 71 75 65 |to the o|ne reque|
|00002c70| 73 74 65 64 0d 09 53 65 | 74 50 6f 72 74 28 50 6f |sted..Se|tPort(Po|
|00002c80| 72 74 29 3b 0d 09 0d 09 | 2f 2f 20 53 61 76 65 20 |rt);....|// Save |
|00002c90| 6f 66 66 20 74 68 65 20 | 70 6f 72 74 20 72 65 63 |off the |port rec|
|00002ca0| 74 20 61 6e 64 20 63 6c | 69 70 0d 09 73 4f 6c 64 |t and cl|ip..sOld|
|00002cb0| 50 6f 72 74 53 74 61 74 | 65 2e 50 6f 72 74 20 3d |PortStat|e.Port =|
|00002cc0| 20 50 6f 72 74 3b 0d 09 | 73 4f 6c 64 50 6f 72 74 | Port;..|sOldPort|
|00002cd0| 53 74 61 74 65 2e 50 6f | 72 74 52 65 63 74 20 3d |State.Po|rtRect =|
|00002ce0| 20 50 6f 72 74 2d 3e 70 | 6f 72 74 52 65 63 74 3b | Port->p|ortRect;|
|00002cf0| 0d 09 73 4f 6c 64 50 6f | 72 74 53 74 61 74 65 2e |..sOldPo|rtState.|
|00002d00| 43 6c 69 70 52 67 6e 20 | 3d 20 4e 65 77 52 67 6e |ClipRgn |= NewRgn|
|00002d10| 28 29 3b 0d 20 20 20 20 | 47 65 74 43 6c 69 70 28 |();. |GetClip(|
|00002d20| 73 4f 6c 64 50 6f 72 74 | 53 74 61 74 65 2e 43 6c |sOldPort|State.Cl|
|00002d30| 69 70 52 67 6e 29 3b 0d | 09 0d 09 2f 2f 20 53 61 |ipRgn);.|...// Sa|
|00002d40| 76 65 20 6f 66 66 20 74 | 68 65 20 70 65 6e 20 73 |ve off t|he pen s|
|00002d50| 74 61 74 65 0d 09 47 65 | 74 50 65 6e 53 74 61 74 |tate..Ge|tPenStat|
|00002d60| 65 28 26 73 4f 6c 64 50 | 6f 72 74 53 74 61 74 65 |e(&sOldP|ortState|
|00002d70| 2e 50 65 6e 53 74 61 74 | 65 29 3b 0d 09 73 4f 6c |.PenStat|e);..sOl|
|00002d80| 64 50 6f 72 74 53 74 61 | 74 65 2e 54 65 78 74 46 |dPortSta|te.TextF|
|00002d90| 6f 6e 74 20 3d 20 50 6f | 72 74 2d 3e 74 78 46 6f |ont = Po|rt->txFo|
|00002da0| 6e 74 3b 0d 09 73 4f 6c | 64 50 6f 72 74 53 74 61 |nt;..sOl|dPortSta|
|00002db0| 74 65 2e 54 65 78 74 4d | 6f 64 65 20 3d 20 50 6f |te.TextM|ode = Po|
|00002dc0| 72 74 2d 3e 74 78 4d 6f | 64 65 3b 0d 09 73 4f 6c |rt->txMo|de;..sOl|
|00002dd0| 64 50 6f 72 74 53 74 61 | 74 65 2e 54 65 78 74 53 |dPortSta|te.TextS|
|00002de0| 69 7a 65 20 3d 20 50 6f | 72 74 2d 3e 74 78 53 69 |ize = Po|rt->txSi|
|00002df0| 7a 65 3b 0d 09 73 4f 6c | 64 50 6f 72 74 53 74 61 |ze;..sOl|dPortSta|
|00002e00| 74 65 2e 54 65 78 74 46 | 61 63 65 20 3d 20 50 6f |te.TextF|ace = Po|
|00002e10| 72 74 2d 3e 74 78 46 61 | 63 65 3b 0d 09 47 65 74 |rt->txFa|ce;..Get|
|00002e20| 46 6f 72 65 43 6f 6c 6f | 72 28 26 73 4f 6c 64 50 |ForeColo|r(&sOldP|
|00002e30| 6f 72 74 53 74 61 74 65 | 2e 46 6f 72 65 43 6f 6c |ortState|.ForeCol|
|00002e40| 6f 72 29 3b 0d 09 47 65 | 74 42 61 63 6b 43 6f 6c |or);..Ge|tBackCol|
|00002e50| 6f 72 28 26 73 4f 6c 64 | 50 6f 72 74 53 74 61 74 |or(&sOld|PortStat|
|00002e60| 65 2e 42 61 63 6b 43 6f | 6c 6f 72 29 3b 0d 7d 0d |e.BackCo|lor);.}.|
|00002e70| 0d 0d 2f 2f 0d 2f 2f 20 | 20 52 65 73 74 6f 72 65 |..//.// | Restore|
|00002e80| 50 6f 72 74 53 74 61 74 | 65 0d 2f 2f 0d 0d 76 6f |PortStat|e.//..vo|
|00002e90| 69 64 20 52 65 73 74 6f | 72 65 50 6f 72 74 53 74 |id Resto|rePortSt|
|00002ea0| 61 74 65 28 76 6f 69 64 | 29 0d 7b 0d 09 2f 2f 20 |ate(void|).{..// |
|00002eb0| 20 55 6e 64 6f 20 65 76 | 65 72 79 74 68 69 6e 67 | Undo ev|erything|
|00002ec0| 20 77 65 20 64 69 64 20 | 74 6f 20 74 68 65 20 70 | we did |to the p|
|00002ed0| 6f 72 74 20 69 6e 20 53 | 61 76 65 50 6f 72 74 53 |ort in S|avePortS|
|00002ee0| 74 61 74 65 2e 0d 09 53 | 65 74 50 6f 72 74 28 73 |tate...S|etPort(s|
|00002ef0| 4f 6c 64 50 6f 72 74 53 | 74 61 74 65 2e 50 6f 72 |OldPortS|tate.Por|
|00002f00| 74 29 3b 0d 09 53 65 74 | 4f 72 69 67 69 6e 28 73 |t);..Set|Origin(s|
|00002f10| 4f 6c 64 50 6f 72 74 53 | 74 61 74 65 2e 50 6f 72 |OldPortS|tate.Por|
|00002f20| 74 52 65 63 74 2e 6c 65 | 66 74 2c 20 73 4f 6c 64 |tRect.le|ft, sOld|
|00002f30| 50 6f 72 74 53 74 61 74 | 65 2e 50 6f 72 74 52 65 |PortStat|e.PortRe|
|00002f40| 63 74 2e 74 6f 70 29 3b | 0d 09 69 66 20 28 73 4f |ct.top);|..if (sO|
|00002f50| 6c 64 50 6f 72 74 53 74 | 61 74 65 2e 43 6c 69 70 |ldPortSt|ate.Clip|
|00002f60| 52 67 6e 29 0d 09 7b 0d | 09 09 53 65 74 43 6c 69 |Rgn)..{.|..SetCli|
|00002f70| 70 28 73 4f 6c 64 50 6f | 72 74 53 74 61 74 65 2e |p(sOldPo|rtState.|
|00002f80| 43 6c 69 70 52 67 6e 29 | 3b 0d 09 09 44 69 73 70 |ClipRgn)|;...Disp|
|00002f90| 6f 73 65 52 67 6e 28 73 | 4f 6c 64 50 6f 72 74 53 |oseRgn(s|OldPortS|
|00002fa0| 74 61 74 65 2e 43 6c 69 | 70 52 67 6e 29 3b 0d 09 |tate.Cli|pRgn);..|
|00002fb0| 09 73 4f 6c 64 50 6f 72 | 74 53 74 61 74 65 2e 43 |.sOldPor|tState.C|
|00002fc0| 6c 69 70 52 67 6e 20 3d | 20 4e 55 4c 4c 3b 0d 09 |lipRgn =| NULL;..|
|00002fd0| 7d 0d 0d 09 2f 2f 20 52 | 65 73 74 6f 72 65 20 74 |}...// R|estore t|
|00002fe0| 68 65 20 63 75 72 72 65 | 6e 74 20 73 74 61 74 65 |he curre|nt state|
|00002ff0| 20 6f 66 20 74 68 69 6e | 67 73 0d 09 53 65 74 50 | of thin|gs..SetP|
|00003000| 65 6e 53 74 61 74 65 28 | 26 73 4f 6c 64 50 6f 72 |enState(|&sOldPor|
|00003010| 74 53 74 61 74 65 2e 50 | 65 6e 53 74 61 74 65 29 |tState.P|enState)|
|00003020| 3b 0d 09 54 65 78 74 46 | 6f 6e 74 28 73 4f 6c 64 |;..TextF|ont(sOld|
|00003030| 50 6f 72 74 53 74 61 74 | 65 2e 54 65 78 74 46 6f |PortStat|e.TextFo|
|00003040| 6e 74 29 3b 0d 09 54 65 | 78 74 46 61 63 65 28 73 |nt);..Te|xtFace(s|
|00003050| 4f 6c 64 50 6f 72 74 53 | 74 61 74 65 2e 54 65 78 |OldPortS|tate.Tex|
|00003060| 74 46 61 63 65 29 3b 0d | 09 54 65 78 74 4d 6f 64 |tFace);.|.TextMod|
|00003070| 65 28 73 4f 6c 64 50 6f | 72 74 53 74 61 74 65 2e |e(sOldPo|rtState.|
|00003080| 54 65 78 74 4d 6f 64 65 | 29 3b 0d 09 54 65 78 74 |TextMode|);..Text|
|00003090| 53 69 7a 65 28 73 4f 6c | 64 50 6f 72 74 53 74 61 |Size(sOl|dPortSta|
|000030a0| 74 65 2e 54 65 78 74 53 | 69 7a 65 29 3b 0d 09 52 |te.TextS|ize);..R|
|000030b0| 47 42 46 6f 72 65 43 6f | 6c 6f 72 28 26 73 4f 6c |GBForeCo|lor(&sOl|
|000030c0| 64 50 6f 72 74 53 74 61 | 74 65 2e 46 6f 72 65 43 |dPortSta|te.ForeC|
|000030d0| 6f 6c 6f 72 29 3b 0d 09 | 52 47 42 42 61 63 6b 43 |olor);..|RGBBackC|
|000030e0| 6f 6c 6f 72 28 26 73 4f | 6c 64 50 6f 72 74 53 74 |olor(&sO|ldPortSt|
|000030f0| 61 74 65 2e 42 61 63 6b | 43 6f 6c 6f 72 29 3b 0d |ate.Back|Color);.|
|00003100| 0d 09 2f 2f 20 53 65 74 | 20 62 61 63 6b 20 74 6f |..// Set| back to|
|00003110| 20 6f 72 69 67 69 6e 61 | 6c 20 70 6f 72 74 0d 09 | origina|l port..|
|00003120| 53 65 74 50 6f 72 74 28 | 73 53 61 76 65 50 6f 72 |SetPort(|sSavePor|
|00003130| 74 29 3b 0d 0d 7d 0d 0d | 0d 00 00 00 00 00 00 00 |t);..}..|........|
|00003140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003180| 00 00 01 00 00 00 01 7c | 00 00 00 7c 00 00 00 5e |.......||...|...^|
|00003190| 00 00 00 00 00 00 01 00 | 00 0b d9 00 00 03 00 00 |........|........|
|000031a0| 1e 00 00 00 00 00 00 00 | 00 00 00 00 00 0b da 00 |........|........|
|000031b0| 0b 43 61 6c 6c 62 61 63 | 6b 73 2e 63 02 00 00 00 |.Callbac|ks.c....|
|000031c0| 50 61 72 74 53 49 54 21 | 00 00 00 00 00 00 00 00 |PartSIT!|........|
|000031d0| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|000031e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000031f0| 00 00 b0 56 8e 35 00 00 | 00 00 00 00 01 da de 00 |...V.5..|........|
|00003200| 00 00 00 00 0c 00 01 00 | 00 00 00 00 00 00 01 00 |........|........|
|00003210| 00 0b df 00 00 00 00 00 | 01 00 00 00 00 00 00 00 |........|........|
|00003220| 00 00 00 00 00 0b e0 00 | 00 00 00 00 04 00 00 00 |........|........|
|00003230| 00 00 00 00 00 00 00 00 | 03 00 00 00 00 00 4a 00 |........|......J.|
|00003240| 01 00 09 06 4d 6f 6e 61 | 63 6f 00 00 00 00 00 00 |....Mona|co......|
|00003250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003260| 00 00 00 00 00 00 04 00 | 28 00 0a 01 c2 02 80 00 |........|(.......|
|00003270| 28 00 0a 01 c2 02 80 00 | 00 00 00 00 00 00 00 00 |(.......|........|
|00003280| 00 00 00 1e 00 a2 01 cb | 03 54 04 f1 00 a2 01 cb |........|.T......|
|00003290| 03 54 04 f1 00 00 00 75 | 00 00 00 00 00 00 00 00 |.T.....u|........|
|000032a0| 00 00 00 00 00 48 00 09 | 4d 6f 6e 61 63 6f 00 00 |.....H..|Monaco..|
|000032b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000032c0| 00 00 00 00 00 00 00 00 | 00 02 00 04 00 21 05 12 |........|.....!..|
|000032d0| 03 4b 08 f4 00 21 05 12 | 03 4b 08 f4 b0 45 de 08 |.K...!..|.K...E..|
|000032e0| 00 00 18 2b 00 00 18 2b | 00 00 14 0a 01 00 00 00 |...+...+|........|
|000032f0| 00 02 00 00 00 00 00 04 | 00 01 00 01 00 00 01 00 |........|........|
|00003300| 00 00 01 7c 00 00 00 7c | 00 00 00 5e 04 8d 2f 08 |...|...||...^../.|
|00003310| 2a 9a 00 00 00 1c 00 5e | 00 01 4d 50 53 52 00 02 |*......^|..MPSR..|
|00003320| 00 12 4d 57 42 42 00 00 | 00 36 03 f0 ff ff 00 00 |..MWBB..|.6......|
|00003330| 00 00 00 00 00 00 03 ed | ff ff 00 00 00 22 00 00 |........|....."..|
|00003340| 00 00 03 ef ff ff 00 00 | 00 6e 00 00 00 00 03 f0 |........|.n......|
|00003350| ff ff 00 00 00 74 00 00 | 00 00 00 00 00 00 00 00 |.....t..|........|
|00003360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+