Chameleon Applications

Chameleon Applications Commit Details

Date:2010-01-31 00:38:35 (11 years 1 month ago)
Author:DieBuche
Commit:86
Parents: 85
Message:Smaller window, moved smbios part from advanced.
Changes:
D/branches/diebuche/ChameleonPrefPane/CTGradient.h
D/branches/diebuche/ChameleonPrefPane/CTGradient.m
D/branches/diebuche/ChameleonPrefPane/Sources/RoundedBox_Prefix.pch
M/branches/diebuche/ChameleonPrefPane/English.lproj/Chameleon.xib
M/branches/diebuche/ChameleonPrefPane/CREDITS
M/branches/diebuche/ChameleonPrefPane/ChameleonPrefPane.xcodeproj/project.pbxproj

File differences

branches/diebuche/ChameleonPrefPane/CTGradient.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
//
// CTGradient.m
//
// Created by Chad Weider on 2/14/07.
// Copyright (c) 2007 Chad Weider.
// Some rights reserved: <http://creativecommons.org/licenses/by/2.5/>
//
// Version: 1.6
#import "CTGradient.h"
@interface CTGradient (Private)
- (void)_commonInit;
- (void)setBlendingMode:(CTGradientBlendingMode)mode;
- (void)addElement:(CTGradientElement*)newElement;
- (CTGradientElement *)elementAtIndex:(unsigned)index;
- (CTGradientElement)removeElementAtIndex:(unsigned)index;
- (CTGradientElement)removeElementAtPosition:(float)position;
@end
//C Fuctions for color blending
static void linearEvaluation (void *info, const float *in, float *out);
static void chromaticEvaluation(void *info, const float *in, float *out);
static void inverseChromaticEvaluation(void *info, const float *in, float *out);
static void transformRGB_HSV(float *components);
static void transformHSV_RGB(float *components);
static void resolveHSV(float *color1, float *color2);
@implementation CTGradient
/////////////////////////////////////Initialization Type Stuff
- (id)init
{
self = [super init];
if (self != nil)
{
[self _commonInit];
[self setBlendingMode:CTLinearBlendingMode];
}
return self;
}
- (void)_commonInit
{
elementList = nil;
}
- (void)dealloc
{
CGFunctionRelease(gradientFunction);
CTGradientElement *elementToRemove = elementList;
while(elementList != nil)
{
elementToRemove = elementList;
elementList = elementList->nextElement;
free(elementToRemove);
}
[super dealloc];
}
- (id)copyWithZone:(NSZone *)zone
{
CTGradient *copy = [[[self class] allocWithZone:zone] init];
//now just copy my elementlist
CTGradientElement *currentElement = elementList;
while(currentElement != nil)
{
[copy addElement:currentElement];
currentElement = currentElement->nextElement;
}
[copy setBlendingMode:blendingMode];
return copy;
}
- (void)encodeWithCoder:(NSCoder *)coder
{
if([coder allowsKeyedCoding])
{
unsigned count = 0;
CTGradientElement *currentElement = elementList;
while(currentElement != nil)
{
[coder encodeValueOfObjCType:@encode(float) at:&(currentElement->red)];
[coder encodeValueOfObjCType:@encode(float) at:&(currentElement->green)];
[coder encodeValueOfObjCType:@encode(float) at:&(currentElement->blue)];
[coder encodeValueOfObjCType:@encode(float) at:&(currentElement->alpha)];
[coder encodeValueOfObjCType:@encode(float) at:&(currentElement->position)];
count++;
currentElement = currentElement->nextElement;
}
[coder encodeInt:count forKey:@"CTGradientElementCount"];
[coder encodeInt:blendingMode forKey:@"CTGradientBlendingMode"];
}
else
[NSException raise:NSInvalidArchiveOperationException format:@"Only supports NSKeyedArchiver coders"];
}
- (id)initWithCoder:(NSCoder *)coder
{
[self _commonInit];
[self setBlendingMode:[coder decodeIntForKey:@"CTGradientBlendingMode"]];
unsigned count = [coder decodeIntForKey:@"CTGradientElementCount"];
while(count != 0)
{
CTGradientElement newElement;
[coder decodeValueOfObjCType:@encode(float) at:&(newElement.red)];
[coder decodeValueOfObjCType:@encode(float) at:&(newElement.green)];
[coder decodeValueOfObjCType:@encode(float) at:&(newElement.blue)];
[coder decodeValueOfObjCType:@encode(float) at:&(newElement.alpha)];
[coder decodeValueOfObjCType:@encode(float) at:&(newElement.position)];
count--;
[self addElement:&newElement];
}
return self;
}
#pragma mark -
#pragma mark Creation
+ (id)gradientWithBeginningColor:(NSColor *)begin endingColor:(NSColor *)end
{
id newInstance = [[[self class] alloc] init];
CTGradientElement color1;
CTGradientElement color2;
[[begin colorUsingColorSpaceName:NSCalibratedRGBColorSpace] getRed:&color1.red
green:&color1.green
blue:&color1.blue
alpha:&color1.alpha];
[[end colorUsingColorSpaceName:NSCalibratedRGBColorSpace] getRed:&color2.red
green:&color2.green
blue:&color2.blue
alpha:&color2.alpha];
color1.position = 0;
color2.position = 1;
[newInstance addElement:&color1];
[newInstance addElement:&color2];
return [newInstance autorelease];
}
+ (id)dividerGradient
{
id newInstance = [[[self class] alloc] init];
CTGradientElement color1;
color1.red = color1.green = color1.blue = 0.84;
color1.alpha = 1.00;
color1.position = 0;
CTGradientElement color2;
color2.red = color2.green = color2.blue = 0.90;
color2.alpha = 1.00;
color2.position = 0.5;
CTGradientElement color3;
color3.red = color3.green = color3.blue = 0.84;
color3.alpha = 1.00;
color3.position = 1.0;
[newInstance addElement:&color1];
[newInstance addElement:&color2];
[newInstance addElement:&color3];
return [newInstance autorelease];
}
+ (id)statusBarGradient
{
id newInstance = [[[self class] alloc] init];
CTGradientElement color1;
color1.red = color1.green = color1.blue = 0.872;
color1.alpha = 1.00;
color1.position = 0;
CTGradientElement color2;
color2.red = color2.green = color2.blue = 0.77;
color2.alpha = 1.00;
color2.position = 0.618;
CTGradientElement color3;
color3.red = color3.green = color3.blue = 0.74;
color3.alpha = 1.00;
color3.position = 1.0;
[newInstance addElement:&color1];
[newInstance addElement:&color2];
[newInstance addElement:&color3];
return [newInstance autorelease];
}
+ (id)aquaSelectedGradient
{
id newInstance = [[[self class] alloc] init];
CTGradientElement color1;
color1.red = 0.58;
color1.green = 0.86;
color1.blue = 0.98;
color1.alpha = 1.00;
color1.position = 0;
CTGradientElement color2;
color2.red = 0.42;
color2.green = 0.68;
color2.blue = 0.90;
color2.alpha = 1.00;
color2.position = 11.5/23;
CTGradientElement color3;
color3.red = 0.64;
color3.green = 0.80;
color3.blue = 0.94;
color3.alpha = 1.00;
color3.position = 11.5/23;
CTGradientElement color4;
color4.red = 0.56;
color4.green = 0.70;
color4.blue = 0.90;
color4.alpha = 1.00;
color4.position = 1;
[newInstance addElement:&color1];
[newInstance addElement:&color2];
[newInstance addElement:&color3];
[newInstance addElement:&color4];
return [newInstance autorelease];
}
+ (id)aquaNormalGradient
{
id newInstance = [[[self class] alloc] init];
CTGradientElement color1;
color1.red = color1.green = color1.blue = 0.95;
color1.alpha = 1.00;
color1.position = 0;
CTGradientElement color2;
color2.red = color2.green = color2.blue = 0.83;
color2.alpha = 1.00;
color2.position = 11.5/23;
CTGradientElement color3;
color3.red = color3.green = color3.blue = 0.95;
color3.alpha = 1.00;
color3.position = 11.5/23;
CTGradientElement color4;
color4.red = color4.green = color4.blue = 0.92;
color4.alpha = 1.00;
color4.position = 1;
[newInstance addElement:&color1];
[newInstance addElement:&color2];
[newInstance addElement:&color3];
[newInstance addElement:&color4];
return [newInstance autorelease];
}
+ (id)aquaPressedGradient
{
id newInstance = [[[self class] alloc] init];
CTGradientElement color1;
color1.red = color1.green = color1.blue = 0.80;
color1.alpha = 1.00;
color1.position = 0;
CTGradientElement color2;
color2.red = color2.green = color2.blue = 0.64;
color2.alpha = 1.00;
color2.position = 11.5/23;
CTGradientElement color3;
color3.red = color3.green = color3.blue = 0.80;
color3.alpha = 1.00;
color3.position = 11.5/23;
CTGradientElement color4;
color4.red = color4.green = color4.blue = 0.77;
color4.alpha = 1.00;
color4.position = 1;
[newInstance addElement:&color1];
[newInstance addElement:&color2];
[newInstance addElement:&color3];
[newInstance addElement:&color4];
return [newInstance autorelease];
}
+ (id)unifiedSelectedGradient
{
id newInstance = [[[self class] alloc] init];
CTGradientElement color1;
color1.red = color1.green = color1.blue = 0.85;
color1.alpha = 1.00;
color1.position = 0;
CTGradientElement color2;
color2.red = color2.green = color2.blue = 0.95;
color2.alpha = 1.00;
color2.position = 1;
[newInstance addElement:&color1];
[newInstance addElement:&color2];
return [newInstance autorelease];
}
+ (id)unifiedNormalGradient
{
id newInstance = [[[self class] alloc] init];
CTGradientElement color1;
color1.red = color1.green = color1.blue = 0.75;
color1.alpha = 1.00;
color1.position = 0;
CTGradientElement color2;
color2.red = color2.green = color2.blue = 0.90;
color2.alpha = 1.00;
color2.position = 1;
[newInstance addElement:&color1];
[newInstance addElement:&color2];
return [newInstance autorelease];
}
+ (id)unifiedPressedGradient
{
id newInstance = [[[self class] alloc] init];
CTGradientElement color1;
color1.red = color1.green = color1.blue = 0.60;
color1.alpha = 1.00;
color1.position = 0;
CTGradientElement color2;
color2.red = color2.green = color2.blue = 0.75;
color2.alpha = 1.00;
color2.position = 1;
[newInstance addElement:&color1];
[newInstance addElement:&color2];
return [newInstance autorelease];
}
+ (id)unifiedDarkGradient
{
id newInstance = [[[self class] alloc] init];
CTGradientElement color1;
color1.red = color1.green = color1.blue = 0.68;
color1.alpha = 1.00;
color1.position = 0;
CTGradientElement color2;
color2.red = color2.green = color2.blue = 0.83;
color2.alpha = 1.00;
color2.position = 1;
[newInstance addElement:&color1];
[newInstance addElement:&color2];
return [newInstance autorelease];
}
+ (id)sourceListSelectedGradient
{
id newInstance = [[[self class] alloc] init];
CTGradientElement color1;
color1.red = 0.06;
color1.green = 0.37;
color1.blue = 0.85;
color1.alpha = 1.00;
color1.position = 0;
CTGradientElement color2;
color2.red = 0.30;
color2.green = 0.60;
color2.blue = 0.92;
color2.alpha = 1.00;
color2.position = 1;
[newInstance addElement:&color1];
[newInstance addElement:&color2];
return [newInstance autorelease];
}
+ (id)sourceListUnselectedGradient
{
id newInstance = [[[self class] alloc] init];
CTGradientElement color1;
color1.red = 0.43;
color1.green = 0.43;
color1.blue = 0.43;
color1.alpha = 1.00;
color1.position = 0;
CTGradientElement color2;
color2.red = 0.60;
color2.green = 0.60;
color2.blue = 0.60;
color2.alpha = 1.00;
color2.position = 1;
[newInstance addElement:&color1];
[newInstance addElement:&color2];
return [newInstance autorelease];
}
+ (id)rainbowGradient
{
id newInstance = [[[self class] alloc] init];
CTGradientElement color1;
color1.red = 1.00;
color1.green = 0.00;
color1.blue = 0.00;
color1.alpha = 1.00;
color1.position = 0.0;
CTGradientElement color2;
color2.red = 0.54;
color2.green = 0.00;
color2.blue = 1.00;
color2.alpha = 1.00;
color2.position = 1.0;
[newInstance addElement:&color1];
[newInstance addElement:&color2];
[newInstance setBlendingMode:CTChromaticBlendingMode];
return [newInstance autorelease];
}
+ (id)hydrogenSpectrumGradient
{
id newInstance = [[[self class] alloc] init];
struct {float hue; float position; float width;} colorBands[4];
colorBands[0].hue = 22;
colorBands[0].position = .145;
colorBands[0].width = .01;
colorBands[1].hue = 200;
colorBands[1].position = .71;
colorBands[1].width = .008;
colorBands[2].hue = 253;
colorBands[2].position = .885;
colorBands[2].width = .005;
colorBands[3].hue = 275;
colorBands[3].position = .965;
colorBands[3].width = .003;
int i;
/////////////////////////////
for(i = 0; i < 4; i++)
{
float color[4];
color[0] = colorBands[i].hue - 180*colorBands[i].width;
color[1] = 1;
color[2] = 0.001;
color[3] = 1;
transformHSV_RGB(color);
CTGradientElement fadeIn;
fadeIn.red = color[0];
fadeIn.green = color[1];
fadeIn.blue = color[2];
fadeIn.alpha = color[3];
fadeIn.position = colorBands[i].position - colorBands[i].width;
color[0] = colorBands[i].hue;
color[1] = 1;
color[2] = 1;
color[3] = 1;
transformHSV_RGB(color);
CTGradientElement band;
band.red = color[0];
band.green = color[1];
band.blue = color[2];
band.alpha = color[3];
band.position = colorBands[i].position;
color[0] = colorBands[i].hue + 180*colorBands[i].width;
color[1] = 1;
color[2] = 0.001;
color[3] = 1;
transformHSV_RGB(color);
CTGradientElement fadeOut;
fadeOut.red = color[0];
fadeOut.green = color[1];
fadeOut.blue = color[2];
fadeOut.alpha = color[3];
fadeOut.position = colorBands[i].position + colorBands[i].width;
[newInstance addElement:&fadeIn];
[newInstance addElement:&band];
[newInstance addElement:&fadeOut];
}
[newInstance setBlendingMode:CTChromaticBlendingMode];
return [newInstance autorelease];
}
#pragma mark -
#pragma mark Modification
- (CTGradient *)gradientWithAlphaComponent:(float)alpha
{
id newInstance = [[[self class] alloc] init];
CTGradientElement *curElement = elementList;
CTGradientElement tempElement;
while(curElement != nil)
{
tempElement = *curElement;
tempElement.alpha = alpha;
[newInstance addElement:&tempElement];
curElement = curElement->nextElement;
}
return [newInstance autorelease];
}
- (CTGradient *)gradientWithBlendingMode:(CTGradientBlendingMode)mode
{
CTGradient *newGradient = [self copy];
[newGradient setBlendingMode:mode];
return [newGradient autorelease];
}
//Adds a color stop with <color> at <position> in elementList
//(if two elements are at the same position then added imediatly after the one that was there already)
- (CTGradient *)addColorStop:(NSColor *)color atPosition:(float)position
{
CTGradient *newGradient = [self copy];
CTGradientElement newGradientElement;
//put the components of color into the newGradientElement - must make sure it is a RGB color (not Gray or CMYK)
[[color colorUsingColorSpaceName:NSCalibratedRGBColorSpace] getRed:&newGradientElement.red
green:&newGradientElement.green
blue:&newGradientElement.blue
alpha:&newGradientElement.alpha];
newGradientElement.position = position;
//Pass it off to addElement to take care of adding it to the elementList
[newGradient addElement:&newGradientElement];
return [newGradient autorelease];
}
//Removes the color stop at <position> from elementList
- (CTGradient *)removeColorStopAtPosition:(float)position
{
CTGradient *newGradient = [self copy];
CTGradientElement removedElement = [newGradient removeElementAtPosition:position];
if(isnan(removedElement.position))
[NSException raise:NSRangeException format:@"-[%@ removeColorStopAtPosition:]: no such colorStop at position (%f)", [self class], position];
return [newGradient autorelease];
}
- (CTGradient *)removeColorStopAtIndex:(unsigned)index
{
CTGradient *newGradient = [self copy];
CTGradientElement removedElement = [newGradient removeElementAtIndex:index];
if(isnan(removedElement.position))
[NSException raise:NSRangeException format:@"-[%@ removeColorStopAtIndex:]: index (%i) beyond bounds", [self class], index];
return [newGradient autorelease];
}
#pragma mark -
#pragma mark Information
- (CTGradientBlendingMode)blendingMode
{
return blendingMode;
}
//Returns color at <position> in gradient
- (NSColor *)colorStopAtIndex:(unsigned)index
{
CTGradientElement *element = [self elementAtIndex:index];
if(element != nil)
return [NSColor colorWithCalibratedRed:element->red
green:element->green
blue:element->blue
alpha:element->alpha];
[NSException raise:NSRangeException format:@"-[%@ removeColorStopAtIndex:]: index (%i) beyond bounds", [self class], index];
return nil;
}
- (NSColor *)colorAtPosition:(float)position
{
float components[4];
switch(blendingMode)
{
case CTLinearBlendingMode:
linearEvaluation(&elementList, &position, components);break;
case CTChromaticBlendingMode:
chromaticEvaluation(&elementList, &position, components);break;
case CTInverseChromaticBlendingMode:
inverseChromaticEvaluation(&elementList, &position, components);break;
}
return [NSColor colorWithCalibratedRed:components[0]
green:components[1]
blue:components[2]
alpha:components[3]];
}
#pragma mark -
#pragma mark Drawing
- (void)drawSwatchInRect:(NSRect)rect
{
[self fillRect:rect angle:45];
}
- (void)fillRect:(NSRect)rect angle:(float)angle
{
//First Calculate where the beginning and ending points should be
CGPoint startPoint;
CGPoint endPoint;
if(angle == 0)//screw the calculations - we know the answer
{
startPoint = CGPointMake(NSMinX(rect), NSMinY(rect));//right of rect
endPoint = CGPointMake(NSMaxX(rect), NSMinY(rect));//left of rect
}
else if(angle == 90)//same as above
{
startPoint = CGPointMake(NSMinX(rect), NSMinY(rect));//bottom of rect
endPoint = CGPointMake(NSMinX(rect), NSMaxY(rect));//top of rect
}
else//ok, we'll do the calculations now
{
float x,y;
float sina, cosa, tana;
float length;
float deltax,
deltay;
float rangle = angle * pi/180;//convert the angle to radians
if(fabsf(tan(rangle))<=1)//for range [-45,45], [135,225]
{
x = NSWidth(rect);
y = NSHeight(rect);
sina = sin(rangle);
cosa = cos(rangle);
tana = tan(rangle);
length = x/fabsf(cosa)+(y-x*fabsf(tana))*fabsf(sina);
deltax = length*cosa/2;
deltay = length*sina/2;
}
else//for range [45,135], [225,315]
{
x = NSHeight(rect);
y = NSWidth(rect);
sina = sin(rangle - 90*pi/180);
cosa = cos(rangle - 90*pi/180);
tana = tan(rangle - 90*pi/180);
length = x/fabsf(cosa)+(y-x*fabsf(tana))*fabsf(sina);
deltax =-length*sina/2;
deltay = length*cosa/2;
}
startPoint = CGPointMake(NSMidX(rect)-deltax, NSMidY(rect)-deltay);
endPoint = CGPointMake(NSMidX(rect)+deltax, NSMidY(rect)+deltay);
}
//Calls to CoreGraphics
CGContextRef currentContext = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];
CGContextSaveGState(currentContext);
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
CGColorSpaceRef colorspace = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB);
#else
CGColorSpaceRef colorspace = CGColorSpaceCreateDeviceRGB();
#endif
CGShadingRef myCGShading = CGShadingCreateAxial(colorspace, startPoint, endPoint, gradientFunction, false, false);
CGContextClipToRect (currentContext, *(CGRect *)&rect);//This is where the action happens
CGContextDrawShading(currentContext, myCGShading);
CGShadingRelease(myCGShading);
CGColorSpaceRelease(colorspace );
CGContextRestoreGState(currentContext);
}
- (void)radialFillRect:(NSRect)rect
{
CGPoint startPoint , endPoint;
float startRadius, endRadius;
float scalex, scaley, transx, transy;
startPoint = endPoint = CGPointMake(NSMidX(rect), NSMidY(rect));
startRadius = -1;
if(NSHeight(rect)>NSWidth(rect))
{
scalex = NSWidth(rect)/NSHeight(rect);
transx = (NSHeight(rect)-NSWidth(rect))/2;
scaley = 1;
transy = 1;
endRadius = NSHeight(rect)/2;
}
else
{
scalex = 1;
transx = 1;
scaley = NSHeight(rect)/NSWidth(rect);
transy = (NSWidth(rect)-NSHeight(rect))/2;
endRadius = NSWidth(rect)/2;
}
//Calls to CoreGraphics
CGContextRef currentContext = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];
CGContextSaveGState(currentContext);
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
CGColorSpaceRef colorspace = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB);
#else
CGColorSpaceRef colorspace = CGColorSpaceCreateDeviceRGB();
#endif
CGShadingRef myCGShading = CGShadingCreateRadial(colorspace, startPoint, startRadius, endPoint, endRadius, gradientFunction, true, true);
CGContextClipToRect (currentContext, *(CGRect *)&rect);
CGContextScaleCTM (currentContext, scalex, scaley);
CGContextTranslateCTM(currentContext, transx, transy);
CGContextDrawShading (currentContext, myCGShading);//This is where the action happens
CGShadingRelease(myCGShading);
CGColorSpaceRelease(colorspace);
CGContextRestoreGState(currentContext);
}
- (void)fillBezierPath:(NSBezierPath *)path angle:(float)angle
{
NSGraphicsContext *currentContext = [NSGraphicsContext currentContext];
[currentContext saveGraphicsState];
NSAffineTransform *transform = [[NSAffineTransform alloc] init];
[transform rotateByDegrees:-angle];
[path transformUsingAffineTransform:transform];
[transform invert];
[transform concat];
[path addClip];
[self fillRect:[path bounds] angle:0];
[path transformUsingAffineTransform:transform];
[transform release];
[currentContext restoreGraphicsState];
}
- (void)radialFillBezierPath:(NSBezierPath *)path
{
NSGraphicsContext *currentContext = [NSGraphicsContext currentContext];
[currentContext saveGraphicsState];
[path addClip];
[self radialFillRect:[path bounds]];
[currentContext restoreGraphicsState];
}
#pragma mark -
#pragma mark Private Methods
- (void)setBlendingMode:(CTGradientBlendingMode)mode;
{
blendingMode = mode;
//Choose what blending function to use
void *evaluationFunction;
switch(blendingMode)
{
case CTLinearBlendingMode:
evaluationFunction = &linearEvaluation;break;
case CTChromaticBlendingMode:
evaluationFunction = &chromaticEvaluation;break;
case CTInverseChromaticBlendingMode:
evaluationFunction = &inverseChromaticEvaluation;break;
}
//replace the current CoreGraphics Function with new one
if(gradientFunction != NULL)
CGFunctionRelease(gradientFunction);
CGFunctionCallbacks evaluationCallbackInfo = {0 , evaluationFunction, NULL};//Version, evaluator function, cleanup function
static const float input_value_range [2] = { 0, 1 };//range for the evaluator input
static const float output_value_ranges [8] = { 0, 1, 0, 1, 0, 1, 0, 1 };//ranges for the evaluator output (4 returned values)
gradientFunction = CGFunctionCreate(&elementList,//the two transition colors
1, input_value_range ,//number of inputs (just fraction of progression)
4, output_value_ranges,//number of outputs (4 - RGBa)
&evaluationCallbackInfo);//info for using the evaluator function
}
- (void)addElement:(CTGradientElement *)newElement
{
if(elementList == nil || newElement->position < elementList->position)//inserting at beginning of list
{
CTGradientElement *tmpNext = elementList;
elementList = malloc(sizeof(CTGradientElement));
*elementList = *newElement;
elementList->nextElement = tmpNext;
}
else//inserting somewhere inside list
{
CTGradientElement *curElement = elementList;
while(curElement->nextElement != nil && !((curElement->position <= newElement->position) && (newElement->position < curElement->nextElement->position)))
{
curElement = curElement->nextElement;
}
CTGradientElement *tmpNext = curElement->nextElement;
curElement->nextElement = malloc(sizeof(CTGradientElement));
*(curElement->nextElement) = *newElement;
curElement->nextElement->nextElement = tmpNext;
}
}
- (CTGradientElement)removeElementAtIndex:(unsigned)index
{
CTGradientElement removedElement;
if(elementList != nil)
{
if(index == 0)
{
CTGradientElement *tmpNext = elementList;
elementList = elementList->nextElement;
removedElement = *tmpNext;
free(tmpNext);
return removedElement;
}
unsigned count = 1;//we want to start one ahead
CTGradientElement *currentElement = elementList;
while(currentElement->nextElement != nil)
{
if(count == index)
{
CTGradientElement *tmpNext = currentElement->nextElement;
currentElement->nextElement = currentElement->nextElement->nextElement;
removedElement = *tmpNext;
free(tmpNext);
return removedElement;
}
count++;
currentElement = currentElement->nextElement;
}
}
//element is not found, return empty element
removedElement.red = 0.0;
removedElement.green = 0.0;
removedElement.blue = 0.0;
removedElement.alpha = 0.0;
removedElement.position = NAN;
removedElement.nextElement = nil;
return removedElement;
}
- (CTGradientElement)removeElementAtPosition:(float)position
{
CTGradientElement removedElement;
if(elementList != nil)
{
if(elementList->position == position)
{
CTGradientElement *tmpNext = elementList;
elementList = elementList->nextElement;
removedElement = *tmpNext;
free(tmpNext);
return removedElement;
}
else
{
CTGradientElement *curElement = elementList;
while(curElement->nextElement != nil)
{
if(curElement->nextElement->position == position)
{
CTGradientElement *tmpNext = curElement->nextElement;
curElement->nextElement = curElement->nextElement->nextElement;
removedElement = *tmpNext;
free(tmpNext);
return removedElement;
}
}
}
}
//element is not found, return empty element
removedElement.red = 0.0;
removedElement.green = 0.0;
removedElement.blue = 0.0;
removedElement.alpha = 0.0;
removedElement.position = NAN;
removedElement.nextElement = nil;
return removedElement;
}
- (CTGradientElement *)elementAtIndex:(unsigned)index;
{
unsigned count = 0;
CTGradientElement *currentElement = elementList;
while(currentElement != nil)
{
if(count == index)
return currentElement;
count++;
currentElement = currentElement->nextElement;
}
return nil;
}
#pragma mark -
#pragma mark Core Graphics
//////////////////////////////////////Blending Functions/////////////////////////////////////
void linearEvaluation (void *info, const float *in, float *out)
{
float position = *in;
if(*(CTGradientElement **)info == nil)//if elementList is empty return clear color
{
out[0] = out[1] = out[2] = out[3] = 1;
return;
}
//This grabs the first two colors in the sequence
CTGradientElement *color1 = *(CTGradientElement **)info;
CTGradientElement *color2 = color1->nextElement;
//make sure first color and second color are on other sides of position
while(color2 != nil && color2->position < position)
{
color1 = color2;
color2 = color1->nextElement;
}
//if we don't have another color then make next color the same color
if(color2 == nil)
{
color2 = color1;
}
//----------FailSafe settings----------
//color1->red = 1; color2->red = 0;
//color1->green = 1; color2->green = 0;
//color1->blue = 1; color2->blue = 0;
//color1->alpha = 1; color2->alpha = 1;
//color1->position = .5;
//color2->position = .5;
//-------------------------------------
if(position <= color1->position)//Make all below color color1's position equal to color1
{
out[0] = color1->red;
out[1] = color1->green;
out[2] = color1->blue;
out[3] = color1->alpha;
}
else if (position >= color2->position)//Make all above color color2's position equal to color2
{
out[0] = color2->red;
out[1] = color2->green;
out[2] = color2->blue;
out[3] = color2->alpha;
}
else//Interpolate color at postions between color1 and color1
{
//adjust position so that it goes from 0 to 1 in the range from color 1 & 2's position
position = (position-color1->position)/(color2->position - color1->position);
out[0] = (color2->red - color1->red )*position + color1->red;
out[1] = (color2->green - color1->green)*position + color1->green;
out[2] = (color2->blue - color1->blue )*position + color1->blue;
out[3] = (color2->alpha - color1->alpha)*position + color1->alpha;
}
}
//Chromatic Evaluation -
//This blends colors by their Hue, Saturation, and Value(Brightness) right now I just
//transform the RGB values stored in the CTGradientElements to HSB, in the future I may
//streamline it to avoid transforming in and out of HSB colorspace *for later*
//
//For the chromatic blend we shift the hue of color1 to meet the hue of color2. To do
//this we will add to the hue's angle (if we subtract we'll be doing the inverse
//chromatic...scroll down more for that). All we need to do is keep adding to the hue
// until we wrap around the colorwheel and get to color2.
void chromaticEvaluation(void *info, const float *in, float *out)
{
float position = *in;
if(*(CTGradientElement **)info == nil)//if elementList is empty return clear color
{
out[0] = out[1] = out[2] = out[3] = 1;
return;
}
//This grabs the first two colors in the sequence
CTGradientElement *color1 = *(CTGradientElement **)info;
CTGradientElement *color2 = color1->nextElement;
float c1[4];
float c2[4];
//make sure first color and second color are on other sides of position
while(color2 != nil && color2->position < position)
{
color1 = color2;
color2 = color1->nextElement;
}
//if we don't have another color then make next color the same color
if(color2 == nil)
{
color2 = color1;
}
c1[0] = color1->red;
c1[1] = color1->green;
c1[2] = color1->blue;
c1[3] = color1->alpha;
c2[0] = color2->red;
c2[1] = color2->green;
c2[2] = color2->blue;
c2[3] = color2->alpha;
transformRGB_HSV(c1);
transformRGB_HSV(c2);
resolveHSV(c1,c2);
if(c1[0] > c2[0]) //if color1's hue is higher than color2's hue then
c2[0] += 360;//we need to move c2 one revolution around the wheel
if(position <= color1->position)//Make all below color color1's position equal to color1
{
out[0] = c1[0];
out[1] = c1[1];
out[2] = c1[2];
out[3] = c1[3];
}
else if (position >= color2->position)//Make all above color color2's position equal to color2
{
out[0] = c2[0];
out[1] = c2[1];
out[2] = c2[2];
out[3] = c2[3];
}
else//Interpolate color at postions between color1 and color1
{
//adjust position so that it goes from 0 to 1 in the range from color 1 & 2's position
position = (position-color1->position)/(color2->position - color1->position);
out[0] = (c2[0] - c1[0])*position + c1[0];
out[1] = (c2[1] - c1[1])*position + c1[1];
out[2] = (c2[2] - c1[2])*position + c1[2];
out[3] = (c2[3] - c1[3])*position + c1[3];
}
transformHSV_RGB(out);
}
//Inverse Chromatic Evaluation -
//Inverse Chromatic is about the same story as Chromatic Blend, but here the Hue
//is strictly decreasing, that is we need to get from color1 to color2 by decreasing
void inverseChromaticEvaluation(void *info, const float *in, float *out)
{
float position = *in;
if(*(CTGradientElement **)info == nil)//if elementList is empty return clear color
{
out[0] = out[1] = out[2] = out[3] = 1;
return;
}
//This grabs the first two colors in the sequence
CTGradientElement *color1 = *(CTGradientElement **)info;
CTGradientElement *color2 = color1->nextElement;
float c1[4];
float c2[4];
//make sure first color and second color are on other sides of position
while(color2 != nil && color2->position < position)
{
color1 = color2;
color2 = color1->nextElement;
}
//if we don't have another color then make next color the same color
if(color2 == nil)
{
color2 = color1;
}
c1[0] = color1->red;
c1[1] = color1->green;
c1[2] = color1->blue;
c1[3] = color1->alpha;
c2[0] = color2->red;
c2[1] = color2->green;
c2[2] = color2->blue;
c2[3] = color2->alpha;
transformRGB_HSV(c1);
transformRGB_HSV(c2);
resolveHSV(c1,c2);
if(c1[0] < c2[0]) //if color1's hue is higher than color2's hue then
c1[0] += 360;//we need to move c2 one revolution back on the wheel
if(position <= color1->position)//Make all below color color1's position equal to color1
{
out[0] = c1[0];
out[1] = c1[1];
out[2] = c1[2];
out[3] = c1[3];
}
else if (position >= color2->position)//Make all above color color2's position equal to color2
{
out[0] = c2[0];
out[1] = c2[1];
out[2] = c2[2];
out[3] = c2[3];
}
else//Interpolate color at postions between color1 and color1
{
//adjust position so that it goes from 0 to 1 in the range from color 1 & 2's position
position = (position-color1->position)/(color2->position - color1->position);
out[0] = (c2[0] - c1[0])*position + c1[0];
out[1] = (c2[1] - c1[1])*position + c1[1];
out[2] = (c2[2] - c1[2])*position + c1[2];
out[3] = (c2[3] - c1[3])*position + c1[3];
}
transformHSV_RGB(out);
}
void transformRGB_HSV(float *components) //H,S,B -> R,G,B
{
float H, S, V;
float R = components[0],
G = components[1],
B = components[2];
float MAX = R > G ? (R > B ? R : B) : (G > B ? G : B),
MIN = R < G ? (R < B ? R : B) : (G < B ? G : B);
if(MAX == MIN)
H = NAN;
else if(MAX == R)
if(G >= B)
H = 60*(G-B)/(MAX-MIN)+0;
else
H = 60*(G-B)/(MAX-MIN)+360;
else if(MAX == G)
H = 60*(B-R)/(MAX-MIN)+120;
else if(MAX == B)
H = 60*(R-G)/(MAX-MIN)+240;
S = MAX == 0 ? 0 : 1 - MIN/MAX;
V = MAX;
components[0] = H;
components[1] = S;
components[2] = V;
}
void transformHSV_RGB(float *components) //H,S,B -> R,G,B
{
float R, G, B;
float H = fmodf(components[0],359),//map to [0,360)
S = components[1],
V = components[2];
int Hi = (int)floorf(H/60.) % 6;
float f = H/60-Hi,
p = V*(1-S),
q = V*(1-f*S),
t = V*(1-(1-f)*S);
switch (Hi)
{
case 0:R=V;G=t;B=p;break;
case 1:R=q;G=V;B=p;break;
case 2:R=p;G=V;B=t;break;
case 3:R=p;G=q;B=V;break;
case 4:R=t;G=p;B=V;break;
case 5:R=V;G=p;B=q;break;
}
components[0] = R;
components[1] = G;
components[2] = B;
}
void resolveHSV(float *color1, float *color2)//H value may be undefined (i.e. graycale color)
{//we want to fill it with a sensible value
if(isnan(color1[0]) && isnan(color2[0]))
color1[0] = color2[0] = 0;
else if(isnan(color1[0]))
color1[0] = color2[0];
else if(isnan(color2[0]))
color2[0] = color1[0];
}
@end
branches/diebuche/ChameleonPrefPane/CTGradient.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
//
// CTGradient.h
//
// Created by Chad Weider on 2/14/07.
// Copyright (c) 2007 Chad Weider.
// Some rights reserved: <http://creativecommons.org/licenses/by/2.5/>
//
// Version: 1.6
#import <Cocoa/Cocoa.h>
typedef struct _CTGradientElement
{
float red, green, blue, alpha;
float position;
struct _CTGradientElement *nextElement;
} CTGradientElement;
typedef enum _CTBlendingMode
{
CTLinearBlendingMode,
CTChromaticBlendingMode,
CTInverseChromaticBlendingMode
} CTGradientBlendingMode;
@interface CTGradient : NSObject <NSCopying, NSCoding>
{
CTGradientElement* elementList;
CTGradientBlendingMode blendingMode;
CGFunctionRef gradientFunction;
}
+ (id)gradientWithBeginningColor:(NSColor *)begin endingColor:(NSColor *)end;
+ (id)aquaSelectedGradient;
+ (id)aquaNormalGradient;
+ (id)aquaPressedGradient;
+ (id)unifiedSelectedGradient;
+ (id)unifiedNormalGradient;
+ (id)unifiedPressedGradient;
+ (id)unifiedDarkGradient;
+ (id)sourceListSelectedGradient;
+ (id)sourceListUnselectedGradient;
+ (id)rainbowGradient;
+ (id)hydrogenSpectrumGradient;
- (CTGradient *)gradientWithAlphaComponent:(float)alpha;
- (CTGradient *)addColorStop:(NSColor *)color atPosition:(float)position;//positions given relative to [0,1]
- (CTGradient *)removeColorStopAtIndex:(unsigned)index;
- (CTGradient *)removeColorStopAtPosition:(float)position;
- (CTGradientBlendingMode)blendingMode;
- (NSColor *)colorStopAtIndex:(unsigned)index;
- (NSColor *)colorAtPosition:(float)position;
- (void)drawSwatchInRect:(NSRect)rect;
- (void)fillRect:(NSRect)rect angle:(float)angle;//fills rect with axial gradient
//angle in degrees
- (void)radialFillRect:(NSRect)rect;//fills rect with radial gradient
// gradient from center outwards
- (void)fillBezierPath:(NSBezierPath *)path angle:(float)angle;
- (void)radialFillBezierPath:(NSBezierPath *)path;
@end
branches/diebuche/ChameleonPrefPane/Sources/RoundedBox_Prefix.pch
1
2
3
4
5
6
7
//
// Prefix header for all source files of the 'RoundedBox' target in the 'RoundedBox' project
//
#ifdef __OBJC__
#import <Cocoa/Cocoa.h>
#endif
branches/diebuche/ChameleonPrefPane/ChameleonPrefPane.xcodeproj/project.pbxproj
6666
6767
6868
69
7069
7170
7271
......
136135
137136
138137
139
140138
141139
142140
......
320318
321319
322320
323
324321
325322
326323
......
352349
353350
354351
355
356352
357353
358354
B3981E4411132AEC009E2520 /* background.png in Resources */ = {isa = PBXBuildFile; fileRef = B3981E4311132AEC009E2520 /* background.png */; };
B3981F48111332FB009E2520 /* name.png in Resources */ = {isa = PBXBuildFile; fileRef = B3981F47111332FB009E2520 /* name.png */; };
B3981F7D1113376C009E2520 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B3981F7C1113376C009E2520 /* QuartzCore.framework */; };
B398220C111349F5009E2520 /* RoundedBox_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = B3982209111349F5009E2520 /* RoundedBox_Prefix.pch */; };
B398220D111349F5009E2520 /* RoundedBox.h in Headers */ = {isa = PBXBuildFile; fileRef = B398220A111349F5009E2520 /* RoundedBox.h */; };
B39822E911134F8B009E2520 /* RoundedBox.m in Sources */ = {isa = PBXBuildFile; fileRef = B398220B111349F5009E2520 /* RoundedBox.m */; };
B3F8855D11146A460022CA5D /* TableViewsController.h in Headers */ = {isa = PBXBuildFile; fileRef = B3F8855B11146A460022CA5D /* TableViewsController.h */; };
B3981E4311132AEC009E2520 /* background.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = background.png; path = Resources/background.png; sourceTree = "<group>"; };
B3981F47111332FB009E2520 /* name.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = name.png; path = Resources/name.png; sourceTree = "<group>"; };
B3981F7C1113376C009E2520 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = /System/Library/Frameworks/QuartzCore.framework; sourceTree = "<absolute>"; };
B3982209111349F5009E2520 /* RoundedBox_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RoundedBox_Prefix.pch; path = Sources/RoundedBox_Prefix.pch; sourceTree = "<group>"; };
B398220A111349F5009E2520 /* RoundedBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RoundedBox.h; path = Sources/RoundedBox.h; sourceTree = "<group>"; };
B398220B111349F5009E2520 /* RoundedBox.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RoundedBox.m; path = Sources/RoundedBox.m; sourceTree = "<group>"; };
B3F8855B11146A460022CA5D /* TableViewsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TableViewsController.h; path = Sources/TableViewsController.h; sourceTree = "<group>"; };
B3981F2E11132ED5009E2520 /* RoundedBox */ = {
isa = PBXGroup;
children = (
B3982209111349F5009E2520 /* RoundedBox_Prefix.pch */,
B398220A111349F5009E2520 /* RoundedBox.h */,
B398220B111349F5009E2520 /* RoundedBox.m */,
);
01A25D4A111108C80024EA7E /* SmbiosController.h in Headers */,
B3981D401113292A009E2520 /* CustomTableView.h in Headers */,
B3981D8411132A13009E2520 /* string_util.h in Headers */,
B398220C111349F5009E2520 /* RoundedBox_Prefix.pch in Headers */,
B398220D111349F5009E2520 /* RoundedBox.h in Headers */,
B3F8855D11146A460022CA5D /* TableViewsController.h in Headers */,
);
branches/diebuche/ChameleonPrefPane/CREDITS
1
2
3
4
1
2
3
54
6
7
8
5
6
7
98
10
11
12
9
10
11
1312
14
15
16
17
18
13
14
15
16
17
Initial Conception & Design:
---------------------------
Rekursor
Initial Conception & Design:
---------------------------
Rekursor
Crew Members
----------
Rekursor, DieBuche
Crew Members
----------
Rekursor, DieBuche
Contributors & Testers:
---------------------
BlackOSX, MasterChief, digital_dreamer, smith@@, scrax
Contributors & Testers:
---------------------
BlackOSX, MasterChief, digital_dreamer, smith@@, scrax
Chameleon also reuses:
---------------------
Courtesy of Ronan (Lizard) :
Existing scripts and gfxutil tool from Lizard available at:
http://code.google.com/p/lizard-app/
Chameleon also reuses:
---------------------
Courtesy of Ronan (Lizard):
Existing scripts and gfxutil tool from Lizard available at:
http://code.google.com/p/lizard-app/
branches/diebuche/ChameleonPrefPane/English.lproj/Chameleon.xib
1212
1313
1414
15
15
1616
1717
1818
......
4141
4242
4343
44
44
4545
4646
4747
......
7070
7171
7272
73
73
7474
7575
7676
......
105105
106106
107107
108
108
109109
110110
111111
......
197197
198198
199199
200
200
201201
202202
203203
......
230230
231231
232232
233
233
234234
235235
236236
......
247247
248248
249249
250
250
251251
252252
253253
......
255255
256256
257257
258
258
259259
260260
261261
......
272272
273273
274274
275
275
276276
277277
278278
......
309309
310310
311311
312
312
313313
314314
315315
......
334334
335335
336336
337
337
338338
339339
340340
......
355355
356356
357357
358
358
359359
360360
361361
......
917917
918918
919919
920
920
921921
922922
923923
......
939939
940940
941941
942
942
943
943944
944945
945946
......
954955
955956
956957
957
958
958959
959960
960961
......
971972
972973
973974
974
975
975976
976977
977978
......
11461147
11471148
11481149
1149
1150
11501151
11511152
11521153
......
13151316
13161317
13171318
1318
1319
13191320
13201321
13211322
......
13381339
13391340
13401341
1341
1342
1342
13431343
13441344
13451345
......
13661366
13671367
13681368
1369
1369
13701370
13711371
13721372
......
18111811
18121812
18131813
1814
1814
18151815
18161816
18171817
......
19171917
19181918
19191919
1920
1920
19211921
19221922
19231923
......
19391939
19401940
19411941
1942
1942
19431943
19441944
19451945
......
19661966
19671967
19681968
1969
1969
19701970
19711971
19721972
......
22522252
22532253
22542254
2255
2255
22562256
22572257
22582258
......
23582358
23592359
23602360
2361
2361
23622362
23632363
23642364
......
24822482
24832483
24842484
2485
2485
24862486
24872487
24882488
......
25042504
25052505
25062506
2507
2507
25082508
25092509
25102510
......
25312531
25322532
25332533
2534
2534
25352535
25362536
25372537
......
32793279
32803280
32813281
3282
3282
32833283
32843284
32853285
......
33003300
33013301
33023302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
34683303
34693304
34703305
......
35683403
35693404
35703405
3571
3406
35723407
35733408
35743409
......
35903425
35913426
35923427
3593
3428
35943429
35953430
35963431
......
36173452
36183453
36193454
3620
3455
36213456
36223457
36233458
......
36793514
36803515
36813516
3682
3517
36833518
36843519
36853520
......
36893524
36903525
36913526
3692
3693
3527
3528
36943529
36953530
36963531
......
37753610
37763611
37773612
3778
3613
37793614
37803615
37813616
......
37973632
37983633
37993634
3800
3635
38013636
38023637
38033638
......
38243659
38253660
38263661
3827
3662
38283663
38293664
38303665
......
38503685
38513686
38523687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
38533853
38543854
38553855
3856
3856
38573857
38583858
38593859
......
38743874
38753875
38763876
3877
3877
38783878
38793879
38803880
......
38893889
38903890
38913891
3892
3892
38933893
38943894
38953895
......
39163916
39173917
39183918
3919
3919
39203920
39213921
39223922
......
39453945
39463946
39473947
3948
3948
39493949
39503950
39513951
......
39693969
39703970
39713971
3972
3972
39733973
39743974
39753975
......
40054005
40064006
40074007
4008
4008
40094009
40104010
40114011
......
40384038
40394039
40404040
4041
4041
40424042
40434043
40444044
......
40564056
40574057
40584058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
41014059
4102
4060
41034061
41044062
41054063
......
41074065
41084066
41094067
4110
4068
41114069
41124070
41134071
......
41184076
41194077
41204078
4121
4079
41224080
41234081
41244082
......
41644122
41654123
41664124
4167
4125
41684126
41694127
41704128
......
57115669
57125670
57135671
5714
57155672
5673
57165674
57175675
57185676
......
59115869
59125870
59135871
5914
59155872
59165873
59175874
5875
59185876
59195877
59205878
......
64076365
64086366
64096367
6410
64116368
64126369
64136370
......
64396396
64406397
64416398
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
64566399
64576400
64586401
......
65216464
65226465
65236466
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
66086467
66096468
66106469
......
71136972
71146973
71156974
7116
71176975
6976
71186977
71196978
71206979
71216980
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
71966981
71976982
71986983
......
72006985
72016986
72026987
6988
72036989
72046990
72056991
......
72367022
72377023
72387024
7239
7240
72417025
72427026
72437027
7244
72457028
7029
72467030
72477031
72487032
72497033
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
72777034
72787035
72797036
......
73167073
73177074
73187075
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
73347076
73357077
73367078
......
74717213
74727214
74737215
7474
7475
7216
7217
74767218
74777219
7478
74797220
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
74907221
74917222
74927223
74937224
74947225
7226
7227
7228
74957229
74967230
74977231
74987232
74997233
7234
7235
7236
75007237
75017238
75027239
75037240
75047241
7242
7243
7244
75057245
75067246
75077247
......
75157255
75167256
75177257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
75187457
75197458
75207459
......
75297468
75307469
75317470
7532
7533
7534
7471
7472
7473
7474
7475
7476
7477
75357478
75367479
7537
7538
7539
7480
7481
7482
75407483
75417484
75427485
......
78607803
78617804
78627805
7863
7864
7865
7866
78677806
78687807
78697808
......
79177856
79187857
79197858
7920
7859
79217860
79227861
7923
7862
79247863
79257864
79267865
......
86718610
86728611
86738612
8674
8675
8676
8677
86788613
86798614
86808615
......
87228657
87238658
87248659
8725
8660
87268661
87278662
87288663
......
98449779
98459780
98469781
9847
9782
98489783
98499784
98509785
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="6"/>
<integer value="99"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSWindowTemplate" id="660800786">
<int key="NSWindowStyleMask">7</int>
<int key="NSWindowBacking">2</int>
<string key="NSWindowRect">{{176, 523}, {668, 560}}</string>
<string key="NSWindowRect">{{176, 644}, {668, 439}}</string>
<int key="NSWTFlags">1081606144</int>
<string key="NSWindowTitle">&lt;&lt; do not localize &gt;&gt;</string>
<string key="NSWindowClass">NSWindow</string>
<string>NeXT TIFF v4.0 pasteboard type</string>
</object>
</object>
<string key="NSFrame">{{0, 34}, {126, 526}}</string>
<string key="NSFrame">{{0, 31}, {126, 408}}</string>
<reference key="NSSuperview" ref="1037298196"/>
<bool key="NSViewIsLayerTreeHost">YES</bool>
<object class="CIDarkenBlendMode" key="NSViewCompositeFilter">
<object class="NSTableView" id="964566138">
<reference key="NSNextResponder" ref="317600712"/>
<int key="NSvFlags">4352</int>
<string key="NSFrameSize">{126, 526}</string>
<string key="NSFrameSize">{126, 408}</string>
<reference key="NSSuperview" ref="317600712"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<bool key="NSEnabled">YES</bool>
<int key="NSTableViewDraggingDestinationStyle">1</int>
</object>
</object>
<string key="NSFrameSize">{126, 526}</string>
<string key="NSFrameSize">{126, 408}</string>
<reference key="NSSuperview" ref="329022978"/>
<reference key="NSNextKeyView" ref="964566138"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<double key="NSPercent">0.99047619104385376</double>
</object>
</object>
<string key="NSFrame">{{0, 34}, {126, 526}}</string>
<string key="NSFrame">{{0, 31}, {126, 408}}</string>
<reference key="NSSuperview" ref="1037298196"/>
<reference key="NSNextKeyView" ref="317600712"/>
<bool key="NSViewIsLayerTreeHost">YES</bool>
<object class="NSTabView" id="869599070">
<reference key="NSNextResponder" ref="1037298196"/>
<int key="NSvFlags">12</int>
<string key="NSFrame">{{127, 34}, {541, 526}}</string>
<string key="NSFrame">{{127, 31}, {541, 408}}</string>
<reference key="NSSuperview" ref="1037298196"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<object class="NSMutableArray" key="NSTabViewItems">
<object class="NSTabViewItem" id="210384195">
<string key="NSIdentifier">1</string>
<object class="NSView" key="NSView" id="389526238">
<nil key="NSNextResponder"/>
<reference key="NSNextResponder" ref="869599070"/>
<int key="NSvFlags">292</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
</object>
</object>
<string key="NSFrame">{{-32, -21}, {605, 568}}</string>
<string key="NSFrame">{{-32, -139}, {605, 568}}</string>
<reference key="NSSuperview" ref="389526238"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<string key="NSOffsets">{0, 0}</string>
<object class="NSButton" id="1064169092">
<reference key="NSNextResponder" ref="389526238"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{108, 7}, {80, 25}}</string>
<string key="NSFrame">{{108, 8}, {80, 25}}</string>
<reference key="NSSuperview" ref="389526238"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<bool key="NSEnabled">YES</bool>
<object class="NSButton" id="1032245036">
<reference key="NSNextResponder" ref="389526238"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{363, 7}, {158, 25}}</string>
<string key="NSFrame">{{363, 8}, {158, 25}}</string>
<reference key="NSSuperview" ref="389526238"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<bool key="NSEnabled">YES</bool>
<object class="NSButton" id="158463244">
<reference key="NSNextResponder" ref="389526238"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{20, 7}, {80, 25}}</string>
<string key="NSFrame">{{20, 8}, {80, 25}}</string>
<reference key="NSSuperview" ref="389526238"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<bool key="NSEnabled">YES</bool>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
</object>
</object>
<string key="NSFrame">{{13, 224}, {511, 282}}</string>
<string key="NSFrame">{{13, 106}, {511, 282}}</string>
<reference key="NSSuperview" ref="389526238"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<string key="NSOffsets">{0, 0}</string>
<bool key="NSTransparent">NO</bool>
</object>
</object>
<string key="NSFrameSize">{541, 526}</string>
<string key="NSFrameSize">{541, 408}</string>
<reference key="NSSuperview" ref="869599070"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
</object>
<string key="NSLabel">Boot From ...</string>
<object class="NSTabViewItem" id="1039429426">
<string key="NSIdentifier">2</string>
<object class="NSView" key="NSView" id="451295758">
<reference key="NSNextResponder" ref="869599070"/>
<nil key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
</object>
</object>
<string key="NSFrame">{{-32, -21}, {605, 568}}</string>
<string key="NSFrame">{{-32, -139}, {605, 568}}</string>
<reference key="NSSuperview" ref="451295758"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<string key="NSOffsets">{0, 0}</string>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
</object>
</object>
<string key="NSFrame">{{13, 376}, {511, 130}}</string>
<string key="NSFrame">{{13, 258}, {511, 130}}</string>
<reference key="NSSuperview" ref="451295758"/>
<bool key="NSViewIsLayerTreeHost">YES</bool>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
</object>
</object>
<string key="NSFrame">{{13, 215}, {511, 144}}</string>
<string key="NSFrame">{{13, 97}, {511, 144}}</string>
<reference key="NSSuperview" ref="451295758"/>
<bool key="NSViewIsLayerTreeHost">YES</bool>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<bool key="NSTransparent">NO</bool>
</object>
</object>
<string key="NSFrameSize">{541, 526}</string>
<reference key="NSSuperview" ref="869599070"/>
<string key="NSFrameSize">{541, 408}</string>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
</object>
<string key="NSLabel">Boot Setup</string>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
</object>
</object>
<string key="NSFrame">{{-32, -21}, {605, 568}}</string>
<string key="NSFrame">{{-32, -139}, {605, 568}}</string>
<reference key="NSSuperview" ref="798772941"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<string key="NSOffsets">{0, 0}</string>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
</object>
</object>
<string key="NSFrame">{{13, 346}, {511, 160}}</string>
<string key="NSFrame">{{13, 228}, {511, 160}}</string>
<reference key="NSSuperview" ref="798772941"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<string key="NSOffsets">{0, 0}</string>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
</object>
</object>
<string key="NSFrame">{{13, 264}, {511, 68}}</string>
<string key="NSFrame">{{13, 146}, {511, 68}}</string>
<reference key="NSSuperview" ref="798772941"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<string key="NSOffsets">{0, 0}</string>
<bool key="NSTransparent">NO</bool>
</object>
</object>
<string key="NSFrameSize">{539, 526}</string>
<string key="NSFrameSize">{541, 408}</string>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
</object>
<string key="NSLabel">Boot Flags</string>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
</object>
</object>
<string key="NSFrame">{{-32, -21}, {605, 568}}</string>
<string key="NSFrame">{{-32, -139}, {605, 568}}</string>
<reference key="NSSuperview" ref="495127110"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<string key="NSOffsets">{0, 0}</string>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
</object>
</object>
<string key="NSFrame">{{13, 369}, {511, 137}}</string>
<string key="NSFrame">{{13, 251}, {511, 137}}</string>
<reference key="NSSuperview" ref="495127110"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<string key="NSOffsets">{0, 0}</string>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
</object>
</object>
<string key="NSFrame">{{11, 295}, {511, 60}}</string>
<string key="NSFrame">{{11, 177}, {511, 60}}</string>
<reference key="NSSuperview" ref="495127110"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<string key="NSOffsets">{0, 0}</string>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
</object>
</object>
<string key="NSFrame">{{13, 222}, {511, 59}}</string>
<string key="NSFrame">{{13, 104}, {511, 59}}</string>
<reference key="NSSuperview" ref="495127110"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<string key="NSOffsets">{0, 0}</string>
<bool key="NSTransparent">NO</bool>
</object>
</object>
<string key="NSFrameSize">{539, 526}</string>
<string key="NSFrameSize">{541, 408}</string>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
</object>
<string key="NSLabel">Peripherals</string>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
</object>
</object>
<string key="NSFrame">{{-32, -21}, {605, 568}}</string>
<string key="NSFrame">{{-32, -139}, {605, 568}}</string>
<reference key="NSSuperview" ref="241622967"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<string key="NSOffsets">{0, 0}</string>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
</object>
</object>
<string key="NSFrame">{{13, 260}, {511, 246}}</string>
<string key="NSFrame">{{13, 142}, {511, 246}}</string>
<reference key="NSSuperview" ref="241622967"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<string key="NSOffsets">{0, 0}</string>
<int key="NSTitlePosition">2</int>
<bool key="NSTransparent">NO</bool>
</object>
<object class="NSBox" id="460924763">
<reference key="NSNextResponder" ref="241622967"/>
<int key="NSvFlags">12</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSView" id="240971186">
<reference key="NSNextResponder" ref="460924763"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSButton" id="969759846">
<reference key="NSNextResponder" ref="240971186"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{16, 53}, {81, 23}}</string>
<reference key="NSSuperview" ref="240971186"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="888136050">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">0</int>
<string key="NSContents">DSDT file</string>
<reference key="NSSupport" ref="930899267"/>
<reference key="NSControlView" ref="969759846"/>
<int key="NSButtonFlags">1211912703</int>
<int key="NSButtonFlags2">2</int>
<reference key="NSNormalImage" ref="459398604"/>
<reference key="NSAlternateImage" ref="731537593"/>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">200</int>
<int key="NSPeriodicInterval">25</int>
</object>
</object>
<object class="NSButton" id="787406084">
<reference key="NSNextResponder" ref="240971186"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{345, 53}, {126, 22}}</string>
<reference key="NSSuperview" ref="240971186"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="76108256">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">0</int>
<string key="NSContents">Drop</string>
<reference key="NSSupport" ref="930899267"/>
<reference key="NSControlView" ref="787406084"/>
<int key="NSButtonFlags">1211912703</int>
<int key="NSButtonFlags2">2</int>
<reference key="NSNormalImage" ref="459398604"/>
<reference key="NSAlternateImage" ref="731537593"/>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">200</int>
<int key="NSPeriodicInterval">25</int>
</object>
</object>
<object class="NSTextField" id="659879104">
<reference key="NSNextResponder" ref="240971186"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{121, 55}, {197, 22}}</string>
<reference key="NSSuperview" ref="240971186"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="713061103">
<int key="NSCellFlags">611450433</int>
<int key="NSCellFlags2">272630784</int>
<string key="NSContents"/>
<reference key="NSSupport" ref="930899267"/>
<reference key="NSControlView" ref="659879104"/>
<bool key="NSDrawsBackground">YES</bool>
<reference key="NSBackgroundColor" ref="501125233"/>
<reference key="NSTextColor" ref="866655721"/>
</object>
</object>
<object class="NSTextField" id="343027692">
<reference key="NSNextResponder" ref="240971186"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{121, 14}, {197, 22}}</string>
<reference key="NSSuperview" ref="240971186"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="304443862">
<int key="NSCellFlags">611450433</int>
<int key="NSCellFlags2">272630784</int>
<string key="NSContents"/>
<reference key="NSSupport" ref="930899267"/>
<reference key="NSControlView" ref="343027692"/>
<bool key="NSDrawsBackground">YES</bool>
<reference key="NSBackgroundColor" ref="501125233"/>
<reference key="NSTextColor" ref="866655721"/>
</object>
</object>
<object class="NSButton" id="100027946">
<reference key="NSNextResponder" ref="240971186"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{345, 13}, {80, 23}}</string>
<reference key="NSSuperview" ref="240971186"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="464024891">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">0</int>
<string key="NSContents">Defaults</string>
<reference key="NSSupport" ref="930899267"/>
<reference key="NSControlView" ref="100027946"/>
<int key="NSButtonFlags">1211912703</int>
<int key="NSButtonFlags2">2</int>
<reference key="NSNormalImage" ref="459398604"/>
<reference key="NSAlternateImage" ref="731537593"/>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">200</int>
<int key="NSPeriodicInterval">25</int>
</object>
</object>
<object class="NSButton" id="478279075">
<reference key="NSNextResponder" ref="240971186"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{16, 15}, {92, 23}}</string>
<reference key="NSSuperview" ref="240971186"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="508286846">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">0</int>
<string key="NSContents">SMBIOS file</string>
<reference key="NSSupport" ref="930899267"/>
<reference key="NSControlView" ref="478279075"/>
<int key="NSButtonFlags">1211912703</int>
<int key="NSButtonFlags2">2</int>
<reference key="NSNormalImage" ref="459398604"/>
<reference key="NSAlternateImage" ref="731537593"/>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">200</int>
<int key="NSPeriodicInterval">25</int>
</object>
</object>
</object>
<string key="NSFrame">{{1, 1}, {509, 87}}</string>
<reference key="NSSuperview" ref="460924763"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
</object>
</object>
<string key="NSFrame">{{13, 35}, {511, 103}}</string>
<reference key="NSSuperview" ref="241622967"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">0</int>
<string key="NSContents">DSDT &amp; SMBIOS</string>
<reference key="NSSupport" ref="26"/>
<reference key="NSBackgroundColor" ref="501125233"/>
<object class="NSColor" key="NSTextColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MCAwLjgwMDAwMDAxAA</bytes>
</object>
</object>
<reference key="NSContentView" ref="240971186"/>
<int key="NSBorderType">1</int>
<int key="NSBoxType">0</int>
<int key="NSTitlePosition">2</int>
<bool key="NSTransparent">NO</bool>
</object>
<object class="NSBox" id="965868050">
<reference key="NSNextResponder" ref="241622967"/>
<int key="NSvFlags">36</int>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
</object>
</object>
<string key="NSFrame">{{13, 152}, {511, 94}}</string>
<string key="NSFrame">{{13, 34}, {511, 94}}</string>
<reference key="NSSuperview" ref="241622967"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<string key="NSOffsets">{0, 0}</string>
<bool key="NSTransparent">NO</bool>
</object>
</object>
<string key="NSFrameSize">{541, 526}</string>
<string key="NSFrameSize">{541, 408}</string>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
</object>
<string key="NSLabel">Advanced</string>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
</object>
</object>
<string key="NSFrame">{{-33, -21}, {605, 568}}</string>
<string key="NSFrame">{{-33, -139}, {605, 568}}</string>
<reference key="NSSuperview" ref="488215260"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<string key="NSOffsets">{0, 0}</string>
<object class="NSButton" id="87714271">
<reference key="NSNextResponder" ref="1047727871"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{356, 307}, {141, 27}}</string>
<string key="NSFrame">{{341, 309}, {156, 25}}</string>
<reference key="NSSuperview" ref="1047727871"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<bool key="NSEnabled">YES</bool>
<string key="NSContents">Current Gfx Injection</string>
<reference key="NSSupport" ref="930899267"/>
<reference key="NSControlView" ref="87714271"/>
<int key="NSButtonFlags">-2033434369</int>
<int key="NSButtonFlags2">162</int>
<int key="NSButtonFlags">-2038152961</int>
<int key="NSButtonFlags2">163</int>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">400</int>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
</object>
</object>
<string key="NSFrame">{{13, 142}, {511, 364}}</string>
<string key="NSFrame">{{13, 24}, {511, 364}}</string>
<reference key="NSSuperview" ref="488215260"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<string key="NSOffsets">{0, 0}</string>
<bool key="NSTransparent">NO</bool>
</object>
</object>
<string key="NSFrameSize">{541, 526}</string>
<string key="NSFrameSize">{541, 408}</string>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
</object>
<string key="NSLabel">EFI Inject</string>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
</object>
</object>
<string key="NSFrame">{{-33, -21}, {605, 568}}</string>
<string key="NSFrame">{{-33, -139}, {605, 568}}</string>
<reference key="NSSuperview" ref="1010390976"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<string key="NSOffsets">{0, 0}</string>
<bytes key="NSWhite">MC42OTcwODAyOTIAA</bytes>
</object>
</object>
<object class="NSBox" id="460924763">
<reference key="NSNextResponder" ref="1010390976"/>
<int key="NSvFlags">12</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSView" id="240971186">
<reference key="NSNextResponder" ref="460924763"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSButton" id="969759846">
<reference key="NSNextResponder" ref="240971186"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{16, 53}, {81, 23}}</string>
<reference key="NSSuperview" ref="240971186"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="888136050">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">0</int>
<string key="NSContents">DSDT file</string>
<reference key="NSSupport" ref="930899267"/>
<reference key="NSControlView" ref="969759846"/>
<int key="NSButtonFlags">1211912703</int>
<int key="NSButtonFlags2">2</int>
<reference key="NSNormalImage" ref="459398604"/>
<reference key="NSAlternateImage" ref="731537593"/>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">200</int>
<int key="NSPeriodicInterval">25</int>
</object>
</object>
<object class="NSButton" id="787406084">
<reference key="NSNextResponder" ref="240971186"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{345, 53}, {126, 22}}</string>
<reference key="NSSuperview" ref="240971186"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="76108256">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">0</int>
<string key="NSContents">Drop</string>
<reference key="NSSupport" ref="930899267"/>
<reference key="NSControlView" ref="787406084"/>
<int key="NSButtonFlags">1211912703</int>
<int key="NSButtonFlags2">2</int>
<reference key="NSNormalImage" ref="459398604"/>
<reference key="NSAlternateImage" ref="731537593"/>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">200</int>
<int key="NSPeriodicInterval">25</int>
</object>
</object>
<object class="NSTextField" id="659879104">
<reference key="NSNextResponder" ref="240971186"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{121, 55}, {197, 22}}</string>
<reference key="NSSuperview" ref="240971186"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="713061103">
<int key="NSCellFlags">611450433</int>
<int key="NSCellFlags2">272630784</int>
<string key="NSContents"/>
<reference key="NSSupport" ref="930899267"/>
<reference key="NSControlView" ref="659879104"/>
<bool key="NSDrawsBackground">YES</bool>
<reference key="NSBackgroundColor" ref="501125233"/>
<reference key="NSTextColor" ref="866655721"/>
</object>
</object>
<object class="NSTextField" id="343027692">
<reference key="NSNextResponder" ref="240971186"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{121, 14}, {197, 22}}</string>
<reference key="NSSuperview" ref="240971186"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="304443862">
<int key="NSCellFlags">611450433</int>
<int key="NSCellFlags2">272630784</int>
<string key="NSContents"/>
<reference key="NSSupport" ref="930899267"/>
<reference key="NSControlView" ref="343027692"/>
<bool key="NSDrawsBackground">YES</bool>
<reference key="NSBackgroundColor" ref="501125233"/>
<reference key="NSTextColor" ref="866655721"/>
</object>
</object>
<object class="NSButton" id="100027946">
<reference key="NSNextResponder" ref="240971186"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{345, 13}, {80, 23}}</string>
<reference key="NSSuperview" ref="240971186"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="464024891">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">0</int>
<string key="NSContents">Defaults</string>
<reference key="NSSupport" ref="930899267"/>
<reference key="NSControlView" ref="100027946"/>
<int key="NSButtonFlags">1211912703</int>
<int key="NSButtonFlags2">2</int>
<reference key="NSNormalImage" ref="459398604"/>
<reference key="NSAlternateImage" ref="731537593"/>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">200</int>
<int key="NSPeriodicInterval">25</int>
</object>
</object>
<object class="NSButton" id="478279075">
<reference key="NSNextResponder" ref="240971186"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{16, 15}, {92, 23}}</string>
<reference key="NSSuperview" ref="240971186"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="508286846">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">0</int>
<string key="NSContents">SMBIOS file</string>
<reference key="NSSupport" ref="930899267"/>
<reference key="NSControlView" ref="478279075"/>
<int key="NSButtonFlags">1211912703</int>
<int key="NSButtonFlags2">2</int>
<reference key="NSNormalImage" ref="459398604"/>
<reference key="NSAlternateImage" ref="731537593"/>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">200</int>
<int key="NSPeriodicInterval">25</int>
</object>
</object>
</object>
<string key="NSFrame">{{1, 1}, {509, 87}}</string>
<reference key="NSSuperview" ref="460924763"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
</object>
</object>
<string key="NSFrame">{{13, 285}, {511, 103}}</string>
<reference key="NSSuperview" ref="1010390976"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">0</int>
<string key="NSContents">DSDT &amp; SMBIOS</string>
<reference key="NSSupport" ref="26"/>
<reference key="NSBackgroundColor" ref="501125233"/>
<object class="NSColor" key="NSTextColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MCAwLjgwMDAwMDAxAA</bytes>
</object>
</object>
<reference key="NSContentView" ref="240971186"/>
<int key="NSBorderType">1</int>
<int key="NSBoxType">0</int>
<int key="NSTitlePosition">2</int>
<bool key="NSTransparent">NO</bool>
</object>
<object class="NSButton" id="274013770">
<reference key="NSNextResponder" ref="1010390976"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{373, 10}, {155, 25}}</string>
<string key="NSFrame">{{373, 13}, {155, 25}}</string>
<reference key="NSSuperview" ref="1010390976"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<bool key="NSEnabled">YES</bool>
<object class="NSTextField" id="266750855">
<reference key="NSNextResponder" ref="1010390976"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{30, 396}, {501, 17}}</string>
<string key="NSFrame">{{30, 265}, {501, 17}}</string>
<reference key="NSSuperview" ref="1010390976"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<bool key="NSEnabled">YES</bool>
</object>
</object>
</object>
<string key="NSFrameSize">{541, 526}</string>
<string key="NSFrameSize">{541, 408}</string>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
</object>
<string key="NSLabel">SMBIOS</string>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
</object>
</object>
<string key="NSFrame">{{-33, -21}, {605, 568}}</string>
<string key="NSFrame">{{-33, -139}, {605, 568}}</string>
<reference key="NSSuperview" ref="786891136"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextField" id="49279634">
<reference key="NSNextResponder" ref="786891136"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{16, 61}, {505, 291}}</string>
<string key="NSFrame">{{18, 14}, {513, 261}}</string>
<reference key="NSSuperview" ref="786891136"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<bool key="NSEnabled">YES</bool>
<object class="NSTextField" id="161129514">
<reference key="NSNextResponder" ref="786891136"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{186, 436}, {172, 17}}</string>
<string key="NSFrame">{{186, 338}, {172, 17}}</string>
<reference key="NSSuperview" ref="786891136"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<bool key="NSEnabled">YES</bool>
<string>NeXT TIFF v4.0 pasteboard type</string>
</object>
</object>
<string key="NSFrame">{{222, 328}, {100, 100}}</string>
<string key="NSFrame">{{222, 244}, {100, 100}}</string>
<reference key="NSSuperview" ref="786891136"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<bool key="NSEnabled">YES</bool>
<string>NeXT TIFF v4.0 pasteboard type</string>
</object>
</object>
<string key="NSFrame">{{141, 461}, {262, 45}}</string>
<string key="NSFrame">{{141, 358}, {262, 45}}</string>
<reference key="NSSuperview" ref="786891136"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<bool key="NSEnabled">YES</bool>
</object>
<bool key="NSEditable">YES</bool>
</object>
<object class="NSButton" id="262969164">
<reference key="NSNextResponder" ref="786891136"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{388, 7}, {140, 25}}</string>
<reference key="NSSuperview" ref="786891136"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="32736262">
<int key="NSCellFlags">-2080244224</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">Check for Updates ?</string>
<reference key="NSSupport" ref="930899267"/>
<reference key="NSControlView" ref="262969164"/>
<int key="NSButtonFlags">-2038152961</int>
<int key="NSButtonFlags2">163</int>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">400</int>
<int key="NSPeriodicInterval">75</int>
</object>
</object>
<object class="NSButton" id="172306923">
<reference key="NSNextResponder" ref="786891136"/>
<int key="NSvFlags">268</int>