home *** CD-ROM | disk | FTP | other *** search
/ Mac Power 1997 January / macpower199701.bin / AMUG / Programming_10 / ICPAppSource+ICprogKit / ICAppSourceKit 1.3.sit / ICAppSourceKit1.3 / ICRGBColourWhats.p < prev    next >
MacBinary  |  1996-07-20  |  4.3 KB  |  [TEXT/CWIE]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

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

You can browse this item here: ICRGBColourWhats.p

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert ZX81 Sinclair BASIC (image/sinclairBASIC) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Applause Picture (image/applausePicture) ext Unsupported
1% dexvert bsdiff patch (other/bsdiffPatch) ext Unsupported
1% dexvert imgdiff patch (other/imgdiffPatch) ext Unsupported
1% dexvert MATLAB p-code (other/matlabPCode) ext Unsupported
1% dexvert WSUS Patch Storage File (other/wsusPatchStorageFile) ext Unsupported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Sat Jul 20 14:50:39 1996, modified Sat Jul 20 14:50:39 1996, creator 'CWIE', type ASCII, 3666 bytes "ICRGBColourWhats.p" , at 0xed2 410 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 12 49 43 52 47 42 43 | 6f 6c 6f 75 72 57 68 61 |..ICRGBC|olourWha|
|00000010| 74 73 2e 70 00 00 00 00 | 00 00 00 00 00 00 00 00 |ts.p....|........|
|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 0e 52 00 | 00 01 9a ae 16 da ff ae |......R.|........|
|00000060| 16 da ff 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 73 79 00 00 |........|....sy..|
|00000080| 75 6e 69 74 20 49 43 52 | 47 42 43 6f 6c 6f 75 72 |unit ICR|GBColour|
|00000090| 57 68 61 74 73 3b 0d 0d | 69 6e 74 65 72 66 61 63 |Whats;..|interfac|
|000000a0| 65 0d 0d 09 75 73 65 73 | 0d 09 09 49 43 57 69 6e |e...uses|...ICWin|
|000000b0| 64 6f 77 47 6c 6f 62 61 | 6c 73 3b 0d 0d 09 66 75 |dowGloba|ls;...fu|
|000000c0| 6e 63 74 69 6f 6e 20 57 | 68 61 74 4f 70 65 6e 52 |nction W|hatOpenR|
|000000d0| 47 42 43 6f 6c 6f 75 72 | 20 28 77 74 3a 20 57 69 |GBColour| (wt: Wi|
|000000e0| 6e 64 6f 77 54 79 70 65 | 3b 20 69 74 65 6d 3a 20 |ndowType|; item: |
|000000f0| 69 6e 74 65 67 65 72 29 | 3a 20 4f 53 45 72 72 3b |integer)|: OSErr;|
|00000100| 0d 09 66 75 6e 63 74 69 | 6f 6e 20 57 68 61 74 43 |..functi|on WhatC|
|00000110| 6c 69 63 6b 52 47 42 43 | 6f 6c 6f 75 72 20 28 77 |lickRGBC|olour (w|
|00000120| 74 3a 20 57 69 6e 64 6f | 77 54 79 70 65 3b 20 69 |t: Windo|wType; i|
|00000130| 74 65 6d 3a 20 69 6e 74 | 65 67 65 72 3b 20 65 72 |tem: int|eger; er|
|00000140| 3a 20 65 76 65 6e 74 52 | 65 63 6f 72 64 29 3a 20 |: eventR|ecord): |
|00000150| 4f 53 45 72 72 3b 0d 09 | 66 75 6e 63 74 69 6f 6e |OSErr;..|function|
|00000160| 20 57 68 61 74 46 6c 75 | 73 68 52 47 42 43 6f 6c | WhatFlu|shRGBCol|
|00000170| 6f 75 72 20 28 77 74 3a | 20 57 69 6e 64 6f 77 54 |our (wt:| WindowT|
|00000180| 79 70 65 3b 20 69 74 65 | 6d 3a 20 69 6e 74 65 67 |ype; ite|m: integ|
|00000190| 65 72 29 3a 20 4f 53 45 | 72 72 3b 0d 09 66 75 6e |er): OSE|rr;..fun|
|000001a0| 63 74 69 6f 6e 20 57 68 | 61 74 43 6c 6f 73 65 52 |ction Wh|atCloseR|
|000001b0| 47 42 43 6f 6c 6f 75 72 | 20 28 77 74 3a 20 57 69 |GBColour| (wt: Wi|
|000001c0| 6e 64 6f 77 54 79 70 65 | 3b 20 69 74 65 6d 3a 20 |ndowType|; item: |
|000001d0| 69 6e 74 65 67 65 72 29 | 3a 20 4f 53 45 72 72 3b |integer)|: OSErr;|
|000001e0| 0d 0d 69 6d 70 6c 65 6d | 65 6e 74 61 74 69 6f 6e |..implem|entation|
|000001f0| 0d 0d 09 75 73 65 73 0d | 09 09 43 6f 6c 6f 72 50 |...uses.|..ColorP|
|00000200| 69 63 6b 65 72 2c 0d 09 | 09 0d 09 09 49 43 41 50 |icker,..|....ICAP|
|00000210| 49 2c 0d 09 09 49 43 53 | 75 62 73 2c 0d 09 09 49 |I,...ICS|ubs,...I|
|00000220| 43 44 69 61 6c 6f 67 73 | 2c 0d 09 09 49 43 44 6f |CDialogs|,...ICDo|
|00000230| 63 75 6d 65 6e 74 2c 0d | 09 09 49 43 4d 69 73 63 |cument,.|..ICMisc|
|00000240| 53 75 62 73 2c 0d 09 09 | 49 43 47 6c 6f 62 61 6c |Subs,...|ICGlobal|
|00000250| 73 3b 0d 0d 09 70 72 6f | 63 65 64 75 72 65 20 44 |s;...pro|cedure D|
|00000260| 72 61 77 52 47 42 53 61 | 6d 70 6c 65 50 72 6f 63 |rawRGBSa|mpleProc|
|00000270| 20 28 77 69 6e 64 6f 77 | 3a 20 44 69 61 6c 6f 67 | (window|: Dialog|
|00000280| 50 74 72 3b 20 69 74 65 | 6d 3a 20 69 6e 74 65 67 |Ptr; ite|m: integ|
|00000290| 65 72 29 3b 0d 09 09 76 | 61 72 0d 09 09 09 63 6f |er);...v|ar....co|
|000002a0| 6c 6f 75 72 5f 70 74 72 | 20 3a 20 52 47 42 43 6f |lour_ptr| : RGBCo|
|000002b0| 6c 6f 72 50 74 72 3b 0d | 09 09 09 6f 6c 64 5f 63 |lorPtr;.|...old_c|
|000002c0| 6f 6c 6f 75 72 20 3a 20 | 52 47 42 43 6f 6c 6f 72 |olour : |RGBColor|
|000002d0| 3b 0d 09 09 09 6f 6c 64 | 5f 70 73 20 3a 20 50 65 |;....old|_ps : Pe|
|000002e0| 6e 53 74 61 74 65 3b 0d | 09 09 09 72 20 3a 20 52 |nState;.|...r : R|
|000002f0| 65 63 74 3b 0d 09 09 09 | 77 74 20 3a 20 57 69 6e |ect;....|wt : Win|
|00000300| 64 6f 77 54 79 70 65 3b | 0d 09 62 65 67 69 6e 0d |dowType;|..begin.|
|00000310| 09 09 77 74 20 3a 3d 20 | 47 65 74 57 69 6e 64 6f |..wt := |GetWindo|
|00000320| 77 54 79 70 65 28 77 69 | 6e 64 6f 77 29 3b 0d 09 |wType(wi|ndow);..|
|00000330| 09 47 65 74 50 65 6e 53 | 74 61 74 65 28 6f 6c 64 |.GetPenS|tate(old|
|00000340| 5f 70 73 29 3b 0d 09 09 | 50 65 6e 4e 6f 72 6d 61 |_ps);...|PenNorma|
|00000350| 6c 3b 0d 09 09 47 65 74 | 44 49 74 65 6d 52 65 63 |l;...Get|DItemRec|
|00000360| 74 28 77 69 6e 64 6f 77 | 2c 20 69 74 65 6d 2c 20 |t(window|, item, |
|00000370| 72 29 3b 0d 09 09 46 72 | 61 6d 65 52 65 63 74 28 |r);...Fr|ameRect(|
|00000380| 72 29 3b 0d 09 09 63 6f | 6c 6f 75 72 5f 70 74 72 |r);...co|lour_ptr|
|00000390| 20 3a 3d 20 52 47 42 43 | 6f 6c 6f 72 50 74 72 28 | := RGBC|olorPtr(|
|000003a0| 77 69 6e 64 6f 77 69 6e | 66 6f 5b 77 74 5d 2e 69 |windowin|fo[wt].i|
|000003b0| 74 65 6d 73 5b 69 74 65 | 6d 20 2b 20 31 5d 5e 2e |tems[ite|m + 1]^.|
|000003c0| 64 61 74 61 29 3b 0d 09 | 09 69 66 20 63 6f 6c 6f |data);..|.if colo|
|000003d0| 75 72 5f 70 74 72 20 3c | 3e 20 6e 69 6c 20 74 68 |ur_ptr <|> nil th|
|000003e0| 65 6e 20 62 65 67 69 6e | 0d 09 09 09 47 65 74 46 |en begin|....GetF|
|000003f0| 6f 72 65 43 6f 6c 6f 72 | 28 6f 6c 64 5f 63 6f 6c |oreColor|(old_col|
|00000400| 6f 75 72 29 3b 0d 09 09 | 09 52 47 42 46 6f 72 65 |our);...|.RGBFore|
|00000410| 43 6f 6c 6f 72 28 63 6f | 6c 6f 75 72 5f 70 74 72 |Color(co|lour_ptr|
|00000420| 5e 29 3b 0d 09 09 09 49 | 6e 73 65 74 52 65 63 74 |^);....I|nsetRect|
|00000430| 28 72 2c 20 33 2c 20 33 | 29 3b 0d 09 09 09 50 61 |(r, 3, 3|);....Pa|
|00000440| 69 6e 74 52 65 63 74 28 | 72 29 3b 0d 09 09 09 52 |intRect(|r);....R|
|00000450| 47 42 46 6f 72 65 43 6f | 6c 6f 72 28 6f 6c 64 5f |GBForeCo|lor(old_|
|00000460| 63 6f 6c 6f 75 72 29 3b | 0d 09 09 65 6e 64 3b 20 |colour);|...end; |
|00000470| 28 2a 20 69 66 20 2a 29 | 0d 09 09 53 65 74 50 65 |(* if *)|...SetPe|
|00000480| 6e 53 74 61 74 65 28 6f | 6c 64 5f 70 73 29 0d 09 |nState(o|ld_ps)..|
|00000490| 65 6e 64 3b 20 28 2a 20 | 44 72 61 77 52 47 42 53 |end; (* |DrawRGBS|
|000004a0| 61 6d 70 6c 65 50 72 6f | 63 20 2a 29 0d 0d 09 66 |amplePro|c *)...f|
|000004b0| 75 6e 63 74 69 6f 6e 20 | 57 68 61 74 4f 70 65 6e |unction |WhatOpen|
|000004c0| 52 47 42 43 6f 6c 6f 75 | 72 20 28 77 74 3a 20 57 |RGBColou|r (wt: W|
|000004d0| 69 6e 64 6f 77 54 79 70 | 65 3b 20 69 74 65 6d 3a |indowTyp|e; item:|
|000004e0| 20 69 6e 74 65 67 65 72 | 29 3a 20 4f 53 45 72 72 | integer|): OSErr|
|000004f0| 3b 0d 09 09 76 61 72 0d | 09 09 09 63 6f 6c 6f 75 |;...var.|...colou|
|00000500| 72 20 3a 20 52 47 42 43 | 6f 6c 6f 72 3b 0d 09 09 |r : RGBC|olor;...|
|00000510| 09 61 74 74 72 20 3a 20 | 49 43 41 74 74 72 3b 0d |.attr : |ICAttr;.|
|00000520| 09 09 09 73 69 7a 65 20 | 3a 20 6c 6f 6e 67 69 6e |...size |: longin|
|00000530| 74 3b 0d 09 62 65 67 69 | 6e 0d 09 09 53 65 74 44 |t;..begi|n...SetD|
|00000540| 49 74 65 6d 48 61 6e 64 | 6c 65 28 77 69 6e 64 6f |ItemHand|le(windo|
|00000550| 77 69 6e 66 6f 5b 77 74 | 5d 2e 77 69 6e 64 6f 77 |winfo[wt|].window|
|00000560| 2c 20 69 74 65 6d 20 2d | 20 31 2c 20 40 44 72 61 |, item -| 1, @Dra|
|00000570| 77 52 47 42 53 61 6d 70 | 6c 65 50 72 6f 63 29 3b |wRGBSamp|leProc);|
|00000580| 0d 0d 09 09 73 69 7a 65 | 20 3a 3d 20 73 69 7a 65 |....size| := size|
|00000590| 6f 66 28 52 47 42 43 6f | 6c 6f 72 29 3b 0d 09 09 |of(RGBCo|lor);...|
|000005a0| 69 66 20 49 43 47 65 74 | 50 72 65 66 28 47 65 74 |if ICGet|Pref(Get|
|000005b0| 49 6e 73 74 61 6e 63 65 | 2c 20 77 69 6e 64 6f 77 |Instance|, window|
|000005c0| 69 6e 66 6f 5b 77 74 5d | 2e 69 74 65 6d 73 5b 69 |info[wt]|.items[i|
|000005d0| 74 65 6d 5d 5e 2e 6b 65 | 79 2c 20 61 74 74 72 2c |tem]^.ke|y, attr,|
|000005e0| 20 40 63 6f 6c 6f 75 72 | 2c 20 73 69 7a 65 29 20 | @colour|, size) |
|000005f0| 3c 3e 20 6e 6f 45 72 72 | 20 74 68 65 6e 20 62 65 |<> noErr| then be|
|00000600| 67 69 6e 0d 09 09 09 63 | 6f 6c 6f 75 72 2e 72 65 |gin....c|olour.re|
|00000610| 64 20 3a 3d 20 2d 31 3b | 09 09 09 28 2a 20 50 61 |d := -1;|...(* Pa|
|00000620| 73 63 61 6c 20 64 65 66 | 69 6e 65 73 20 52 47 42 |scal def|ines RGB|
|00000630| 43 6f 6c 6f 72 20 75 73 | 69 6e 67 20 73 69 67 6e |Color us|ing sign|
|00000640| 65 64 20 66 69 65 6c 64 | 73 2c 20 64 75 68 21 2c |ed field|s, duh!,|
|00000650| 20 73 6f 20 2d 31 20 3d | 20 24 46 46 46 46 20 3d | so -1 =| $FFFF =|
|00000660| 20 77 68 69 74 65 20 2a | 29 0d 09 09 09 63 6f 6c | white *|)....col|
|00000670| 6f 75 72 2e 67 72 65 65 | 6e 20 3a 3d 20 2d 31 3b |our.gree|n := -1;|
|00000680| 0d 09 09 09 63 6f 6c 6f | 75 72 2e 62 6c 75 65 20 |....colo|ur.blue |
|00000690| 3a 3d 20 2d 31 3b 0d 09 | 09 65 6e 64 3b 20 28 2a |:= -1;..|.end; (*|
|000006a0| 20 69 66 20 2a 29 0d 09 | 09 50 72 6f 63 65 73 73 | if *)..|.Process|
|000006b0| 41 74 74 72 69 62 75 74 | 65 73 28 77 74 2c 20 69 |Attribut|es(wt, i|
|000006c0| 74 65 6d 2c 20 61 74 74 | 72 29 3b 0d 09 09 0d 09 |tem, att|r);.....|
|000006d0| 09 69 66 20 68 61 73 5f | 63 6f 6c 6f 72 51 44 20 |.if has_|colorQD |
|000006e0| 74 68 65 6e 20 62 65 67 | 69 6e 0d 09 09 09 77 69 |then beg|in....wi|
|000006f0| 6e 64 6f 77 69 6e 66 6f | 5b 77 74 5d 2e 69 74 65 |ndowinfo|[wt].ite|
|00000700| 6d 73 5b 69 74 65 6d 5d | 5e 2e 64 61 74 61 20 3a |ms[item]|^.data :|
|00000710| 3d 20 4e 65 77 50 74 72 | 28 73 69 7a 65 6f 66 28 |= NewPtr|(sizeof(|
|00000720| 52 47 42 43 6f 6c 6f 72 | 29 29 3b 0d 09 09 09 69 |RGBColor|));....i|
|00000730| 66 20 77 69 6e 64 6f 77 | 69 6e 66 6f 5b 77 74 5d |f window|info[wt]|
|00000740| 2e 69 74 65 6d 73 5b 69 | 74 65 6d 5d 5e 2e 64 61 |.items[i|tem]^.da|
|00000750| 74 61 20 3c 3e 20 6e 69 | 6c 20 74 68 65 6e 20 62 |ta <> ni|l then b|
|00000760| 65 67 69 6e 0d 09 09 09 | 09 52 47 42 43 6f 6c 6f |egin....|.RGBColo|
|00000770| 72 50 74 72 28 77 69 6e | 64 6f 77 69 6e 66 6f 5b |rPtr(win|dowinfo[|
|00000780| 77 74 5d 2e 69 74 65 6d | 73 5b 69 74 65 6d 5d 5e |wt].item|s[item]^|
|00000790| 2e 64 61 74 61 29 5e 20 | 3a 3d 20 63 6f 6c 6f 75 |.data)^ |:= colou|
|000007a0| 72 3b 0d 09 09 09 65 6e | 64 3b 20 28 2a 20 69 66 |r;....en|d; (* if|
|000007b0| 20 2a 29 0d 09 09 65 6e | 64 20 65 6c 73 65 20 62 | *)...en|d else b|
|000007c0| 65 67 69 6e 0d 09 09 09 | 77 69 6e 64 6f 77 69 6e |egin....|windowin|
|000007d0| 66 6f 5b 77 74 5d 2e 69 | 74 65 6d 73 5b 69 74 65 |fo[wt].i|tems[ite|
|000007e0| 6d 5d 5e 2e 64 61 74 61 | 20 3a 3d 20 6e 69 6c 3b |m]^.data| := nil;|
|000007f0| 0d 09 09 09 53 65 74 44 | 43 74 6c 45 6e 61 62 6c |....SetD|CtlEnabl|
|00000800| 65 28 77 69 6e 64 6f 77 | 69 6e 66 6f 5b 77 74 5d |e(window|info[wt]|
|00000810| 2e 77 69 6e 64 6f 77 2c | 20 69 74 65 6d 2c 20 66 |.window,| item, f|
|00000820| 61 6c 73 65 29 3b 0d 09 | 09 65 6e 64 3b 20 28 2a |alse);..|.end; (*|
|00000830| 20 69 66 20 2a 29 0d 09 | 09 0d 09 09 69 66 20 49 | if *)..|....if I|
|00000840| 73 4c 6f 63 6b 65 64 28 | 77 74 2c 20 69 74 65 6d |sLocked(|wt, item|
|00000850| 29 20 74 68 65 6e 20 62 | 65 67 69 6e 0d 09 09 09 |) then b|egin....|
|00000860| 53 65 74 44 43 74 6c 45 | 6e 61 62 6c 65 28 77 69 |SetDCtlE|nable(wi|
|00000870| 6e 64 6f 77 69 6e 66 6f | 5b 77 74 5d 2e 77 69 6e |ndowinfo|[wt].win|
|00000880| 64 6f 77 2c 20 69 74 65 | 6d 2c 20 66 61 6c 73 65 |dow, ite|m, false|
|00000890| 29 3b 0d 09 09 65 6e 64 | 3b 20 28 2a 20 69 66 20 |);...end|; (* if |
|000008a0| 2a 29 0d 09 09 0d 09 09 | 77 69 6e 64 6f 77 69 6e |*)......|windowin|
|000008b0| 66 6f 5b 77 74 5d 2e 69 | 74 65 6d 73 5b 69 74 65 |fo[wt].i|tems[ite|
|000008c0| 6d 5d 5e 2e 6d 6f 64 69 | 66 69 65 64 20 3a 3d 20 |m]^.modi|fied := |
|000008d0| 66 61 6c 73 65 3b 0d 09 | 09 0d 09 09 57 68 61 74 |false;..|....What|
|000008e0| 4f 70 65 6e 52 47 42 43 | 6f 6c 6f 75 72 20 3a 3d |OpenRGBC|olour :=|
|000008f0| 20 6e 6f 45 72 72 3b 0d | 09 65 6e 64 3b 20 28 2a | noErr;.|.end; (*|
|00000900| 20 57 68 61 74 4f 70 65 | 6e 52 47 42 43 6f 6c 6f | WhatOpe|nRGBColo|
|00000910| 75 72 20 2a 29 0d 09 0d | 09 66 75 6e 63 74 69 6f |ur *)...|.functio|
|00000920| 6e 20 57 68 61 74 43 6c | 69 63 6b 52 47 42 43 6f |n WhatCl|ickRGBCo|
|00000930| 6c 6f 75 72 20 28 77 74 | 3a 20 57 69 6e 64 6f 77 |lour (wt|: Window|
|00000940| 54 79 70 65 3b 20 69 74 | 65 6d 3a 20 69 6e 74 65 |Type; it|em: inte|
|00000950| 67 65 72 3b 20 65 72 3a | 20 65 76 65 6e 74 52 65 |ger; er:| eventRe|
|00000960| 63 6f 72 64 29 3a 20 4f | 53 45 72 72 3b 0d 09 09 |cord): O|SErr;...|
|00000970| 76 61 72 0d 09 09 09 63 | 6f 6c 6f 75 72 5f 70 74 |var....c|olour_pt|
|00000980| 72 20 3a 20 52 47 42 43 | 6f 6c 6f 72 50 74 72 3b |r : RGBC|olorPtr;|
|00000990| 0d 09 09 09 6e 65 77 5f | 63 6f 6c 6f 75 72 20 3a |....new_|colour :|
|000009a0| 20 52 47 42 43 6f 6c 6f | 72 3b 0d 09 62 65 67 69 | RGBColo|r;..begi|
|000009b0| 6e 0d 09 09 7b 24 75 6e | 75 73 65 64 20 65 72 7d |n...{$un|used er}|
|000009c0| 0d 09 09 63 6f 6c 6f 75 | 72 5f 70 74 72 20 3a 3d |...colou|r_ptr :=|
|000009d0| 20 52 47 42 43 6f 6c 6f | 72 50 74 72 28 77 69 6e | RGBColo|rPtr(win|
|000009e0| 64 6f 77 69 6e 66 6f 5b | 77 74 5d 2e 69 74 65 6d |dowinfo[|wt].item|
|000009f0| 73 5b 69 74 65 6d 5d 5e | 2e 64 61 74 61 29 3b 0d |s[item]^|.data);.|
|00000a00| 09 09 69 66 20 63 6f 6c | 6f 75 72 5f 70 74 72 20 |..if col|our_ptr |
|00000a10| 3c 3e 20 6e 69 6c 20 74 | 68 65 6e 20 62 65 67 69 |<> nil t|hen begi|
|00000a20| 6e 0d 09 09 09 69 66 20 | 47 65 74 43 6f 6c 6f 72 |n....if |GetColor|
|00000a30| 28 50 6f 69 6e 74 28 30 | 29 2c 20 47 65 74 41 53 |(Point(0|), GetAS|
|00000a40| 74 72 69 6e 67 28 31 32 | 38 2c 20 32 37 29 2c 20 |tring(12|8, 27), |
|00000a50| 63 6f 6c 6f 75 72 5f 70 | 74 72 5e 2c 20 6e 65 77 |colour_p|tr^, new|
|00000a60| 5f 63 6f 6c 6f 75 72 29 | 20 74 68 65 6e 20 62 65 |_colour)| then be|
|00000a70| 67 69 6e 0d 09 09 09 09 | 63 6f 6c 6f 75 72 5f 70 |gin.....|colour_p|
|00000a80| 74 72 5e 20 3a 3d 20 6e | 65 77 5f 63 6f 6c 6f 75 |tr^ := n|ew_colou|
|00000a90| 72 3b 0d 09 09 09 09 49 | 6e 76 61 6c 44 49 74 65 |r;.....I|nvalDIte|
|00000aa0| 6d 28 77 69 6e 64 6f 77 | 69 6e 66 6f 5b 77 74 5d |m(window|info[wt]|
|00000ab0| 2e 77 69 6e 64 6f 77 2c | 20 69 74 65 6d 20 2d 20 |.window,| item - |
|00000ac0| 31 29 3b 0d 09 09 09 09 | 77 69 6e 64 6f 77 69 6e |1);.....|windowin|
|00000ad0| 66 6f 5b 77 74 5d 2e 69 | 74 65 6d 73 5b 69 74 65 |fo[wt].i|tems[ite|
|00000ae0| 6d 5d 5e 2e 6d 6f 64 69 | 66 69 65 64 20 3a 3d 20 |m]^.modi|fied := |
|00000af0| 74 72 75 65 3b 0d 09 09 | 09 09 44 69 72 74 79 44 |true;...|..DirtyD|
|00000b00| 6f 63 75 6d 65 6e 74 3b | 0d 09 09 09 65 6e 64 3b |ocument;|....end;|
|00000b10| 20 28 2a 20 69 66 20 2a | 29 0d 09 09 65 6e 64 3b | (* if *|)...end;|
|00000b20| 20 28 2a 20 69 66 20 2a | 29 0d 09 09 57 68 61 74 | (* if *|)...What|
|00000b30| 43 6c 69 63 6b 52 47 42 | 43 6f 6c 6f 75 72 20 3a |ClickRGB|Colour :|
|00000b40| 3d 20 6e 6f 45 72 72 3b | 0d 09 65 6e 64 3b 20 28 |= noErr;|..end; (|
|00000b50| 2a 20 57 68 61 74 43 6c | 69 63 6b 52 47 42 43 6f |* WhatCl|ickRGBCo|
|00000b60| 6c 6f 75 72 20 2a 29 0d | 09 0d 09 66 75 6e 63 74 |lour *).|...funct|
|00000b70| 69 6f 6e 20 57 68 61 74 | 46 6c 75 73 68 52 47 42 |ion What|FlushRGB|
|00000b80| 43 6f 6c 6f 75 72 20 28 | 77 74 3a 20 57 69 6e 64 |Colour (|wt: Wind|
|00000b90| 6f 77 54 79 70 65 3b 20 | 69 74 65 6d 3a 20 69 6e |owType; |item: in|
|00000ba0| 74 65 67 65 72 29 3a 20 | 4f 53 45 72 72 3b 0d 09 |teger): |OSErr;..|
|00000bb0| 09 76 61 72 0d 09 09 09 | 65 72 72 20 3a 20 4f 53 |.var....|err : OS|
|00000bc0| 45 72 72 3b 0d 09 09 09 | 63 6f 6c 6f 75 72 5f 70 |Err;....|colour_p|
|00000bd0| 74 72 20 3a 20 52 47 42 | 43 6f 6c 6f 72 50 74 72 |tr : RGB|ColorPtr|
|00000be0| 3b 0d 09 62 65 67 69 6e | 0d 09 09 65 72 72 20 3a |;..begin|...err :|
|00000bf0| 3d 20 6e 6f 45 72 72 3b | 0d 09 09 63 6f 6c 6f 75 |= noErr;|...colou|
|00000c00| 72 5f 70 74 72 20 3a 3d | 20 52 47 42 43 6f 6c 6f |r_ptr :=| RGBColo|
|00000c10| 72 50 74 72 28 77 69 6e | 64 6f 77 69 6e 66 6f 5b |rPtr(win|dowinfo[|
|00000c20| 77 74 5d 2e 69 74 65 6d | 73 5b 69 74 65 6d 5d 5e |wt].item|s[item]^|
|00000c30| 2e 64 61 74 61 29 3b 0d | 09 09 69 66 20 28 63 6f |.data);.|..if (co|
|00000c40| 6c 6f 75 72 5f 70 74 72 | 20 3c 3e 20 6e 69 6c 29 |lour_ptr| <> nil)|
|00000c50| 20 26 20 28 77 69 6e 64 | 6f 77 69 6e 66 6f 5b 77 | & (wind|owinfo[w|
|00000c60| 74 5d 2e 69 74 65 6d 73 | 5b 69 74 65 6d 5d 5e 2e |t].items|[item]^.|
|00000c70| 6d 6f 64 69 66 69 65 64 | 29 20 74 68 65 6e 20 62 |modified|) then b|
|00000c80| 65 67 69 6e 0d 09 09 09 | 65 72 72 20 3a 3d 20 49 |egin....|err := I|
|00000c90| 43 4d 61 70 45 72 72 28 | 49 43 53 65 74 50 72 65 |CMapErr(|ICSetPre|
|00000ca0| 66 28 47 65 74 49 6e 73 | 74 61 6e 63 65 2c 20 77 |f(GetIns|tance, w|
|00000cb0| 69 6e 64 6f 77 69 6e 66 | 6f 5b 77 74 5d 2e 69 74 |indowinf|o[wt].it|
|00000cc0| 65 6d 73 5b 69 74 65 6d | 5d 5e 2e 6b 65 79 2c 20 |ems[item|]^.key, |
|00000cd0| 49 43 61 74 74 72 5f 6e | 6f 5f 63 68 61 6e 67 65 |ICattr_n|o_change|
|00000ce0| 2c 20 50 74 72 28 63 6f | 6c 6f 75 72 5f 70 74 72 |, Ptr(co|lour_ptr|
|00000cf0| 29 2c 20 73 69 7a 65 6f | 66 28 52 47 42 43 6f 6c |), sizeo|f(RGBCol|
|00000d00| 6f 72 29 29 29 3b 0d 09 | 09 09 77 69 6e 64 6f 77 |or)));..|..window|
|00000d10| 69 6e 66 6f 5b 77 74 5d | 2e 69 74 65 6d 73 5b 69 |info[wt]|.items[i|
|00000d20| 74 65 6d 5d 5e 2e 6d 6f | 64 69 66 69 65 64 20 3a |tem]^.mo|dified :|
|00000d30| 3d 20 66 61 6c 73 65 3b | 0d 09 09 65 6e 64 3b 20 |= false;|...end; |
|00000d40| 28 2a 20 69 66 20 2a 29 | 0d 09 09 57 68 61 74 46 |(* if *)|...WhatF|
|00000d50| 6c 75 73 68 52 47 42 43 | 6f 6c 6f 75 72 20 3a 3d |lushRGBC|olour :=|
|00000d60| 20 65 72 72 3b 0d 09 65 | 6e 64 3b 20 28 2a 20 57 | err;..e|nd; (* W|
|00000d70| 68 61 74 46 6c 75 73 68 | 52 47 42 43 6f 6c 6f 75 |hatFlush|RGBColou|
|00000d80| 72 20 2a 29 0d 0d 09 66 | 75 6e 63 74 69 6f 6e 20 |r *)...f|unction |
|00000d90| 57 68 61 74 43 6c 6f 73 | 65 52 47 42 43 6f 6c 6f |WhatClos|eRGBColo|
|00000da0| 75 72 20 28 77 74 3a 20 | 57 69 6e 64 6f 77 54 79 |ur (wt: |WindowTy|
|00000db0| 70 65 3b 20 69 74 65 6d | 3a 20 69 6e 74 65 67 65 |pe; item|: intege|
|00000dc0| 72 29 3a 20 4f 53 45 72 | 72 3b 0d 09 62 65 67 69 |r): OSEr|r;..begi|
|00000dd0| 6e 0d 09 09 69 66 20 77 | 69 6e 64 6f 77 69 6e 66 |n...if w|indowinf|
|00000de0| 6f 5b 77 74 5d 2e 69 74 | 65 6d 73 5b 69 74 65 6d |o[wt].it|ems[item|
|00000df0| 5d 5e 2e 64 61 74 61 20 | 3c 3e 20 6e 69 6c 20 74 |]^.data |<> nil t|
|00000e00| 68 65 6e 20 62 65 67 69 | 6e 0d 09 09 09 44 69 73 |hen begi|n....Dis|
|00000e10| 70 6f 73 65 50 74 72 28 | 77 69 6e 64 6f 77 69 6e |posePtr(|windowin|
|00000e20| 66 6f 5b 77 74 5d 2e 69 | 74 65 6d 73 5b 69 74 65 |fo[wt].i|tems[ite|
|00000e30| 6d 5d 5e 2e 64 61 74 61 | 29 3b 0d 09 09 09 77 69 |m]^.data|);....wi|
|00000e40| 6e 64 6f 77 69 6e 66 6f | 5b 77 74 5d 2e 69 74 65 |ndowinfo|[wt].ite|
|00000e50| 6d 73 5b 69 74 65 6d 5d | 5e 2e 64 61 74 61 20 3a |ms[item]|^.data :|
|00000e60| 3d 20 6e 69 6c 3b 0d 09 | 09 65 6e 64 3b 20 28 2a |= nil;..|.end; (*|
|00000e70| 20 69 66 20 2a 29 0d 09 | 09 57 68 61 74 43 6c 6f | if *)..|.WhatClo|
|00000e80| 73 65 52 47 42 43 6f 6c | 6f 75 72 20 3a 3d 20 6e |seRGBCol|our := n|
|00000e90| 6f 45 72 72 3b 0d 09 65 | 6e 64 3b 20 28 2a 20 57 |oErr;..e|nd; (* W|
|00000ea0| 68 61 74 43 6c 6f 73 65 | 52 47 42 43 6f 6c 6f 75 |hatClose|RGBColou|
|00000eb0| 72 20 2a 29 0d 0d 65 6e | 64 2e 20 28 2a 20 49 43 |r *)..en|d. (* IC|
|00000ec0| 52 47 42 43 6f 6c 6f 75 | 72 57 68 61 74 73 20 2a |RGBColou|rWhats *|
|00000ed0| 29 0d 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |).......|........|
|00000ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f00| 00 00 01 00 00 00 01 54 | 00 00 00 54 00 00 00 46 |.......T|...T...F|
|00000f10| 67 69 6e 0d 09 09 09 09 | 65 72 72 20 3a 3d 20 65 |gin.....|err := e|
|00000f20| 72 72 32 3b 0d 09 09 09 | 65 6e 64 3b 20 28 2a 20 |rr2;....|end; (* |
|00000f30| 12 49 43 52 47 42 43 6f | 6c 6f 75 72 57 68 61 74 |.ICRGBCo|lourWhat|
|00000f40| 73 2e 70 42 02 00 00 00 | 54 45 58 54 43 57 49 45 |s.pB....|TEXTCWIE|
|00000f50| 00 00 54 45 58 54 43 57 | 49 45 00 00 ff ff ff ff |..TEXTCW|IE......|
|00000f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f70| 00 00 ae 0e d0 64 00 00 | 0e 52 00 00 01 9a 6f 6e |.....d..|.R....on|
|00000f80| 20 53 61 76 65 49 43 43 | 6f 6d 70 6f 6e 65 6e 74 | SaveICC|omponent|
|00000f90| 3a 20 4f 53 45 72 72 3b | 0d 09 09 76 61 72 0d 09 |: OSErr;|...var..|
|00000fa0| 09 09 65 72 72 3a 20 4f | 53 45 72 72 3b 0d 09 09 |..err: O|SErr;...|
|00000fb0| 09 66 73 73 3a 20 46 53 | 53 70 65 63 3b 0d 09 62 |.fss: FS|Spec;..b|
|00000fc0| 65 67 69 6e 0d 09 09 65 | 72 72 20 3a 3d 20 49 43 |egin...e|rr := IC|
|00000fd0| 53 74 61 6e 64 61 72 64 | 50 75 74 46 69 6c 65 28 |Standard|PutFile(|
|00000fe0| 47 65 74 41 53 74 72 69 | 6e 67 28 31 32 38 2c 20 |GetAStri|ng(128, |
|00000ff0| 31 33 29 2c 20 47 65 74 | 41 53 74 72 69 6e 67 28 |13), Get|AString(|
|00001000| 00 00 00 48 00 09 47 65 | 6e 65 76 61 00 00 00 00 |...H..Ge|neva....|
|00001010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001020| 00 00 00 00 00 00 00 03 | 00 02 00 40 00 04 01 cd |........|...@....|
|00001030| 02 63 00 40 00 04 01 cd | 02 63 ae 16 a5 92 00 00 |.c.@....|.c......|
|00001040| 07 ba 00 00 08 23 00 00 | 06 4f 01 00 00 00 00 04 |.....#..|.O......|
|00001050| 00 01 00 01 00 00 01 00 | 00 00 01 54 00 00 00 54 |........|...T...T|
|00001060| 00 00 00 46 00 5c be d4 | 13 78 00 00 00 1c 00 46 |...F.\..|.x.....F|
|00001070| 00 01 4d 50 53 52 00 00 | 00 12 4d 57 42 42 00 00 |..MPSR..|..MWBB..|
|00001080| 00 1e 03 ed ff ff 00 00 | 00 00 00 00 00 00 03 f0 |........|........|
|00001090| ff ff 00 00 00 4c 00 00 | 00 00 00 00 00 00 00 00 |.....L..|........|
|000010a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+