Shadowless StatusWindow graphics, as well as an ITImageView which casts a shadow.
[ITKit.git] / ITImageView.m
1 #import "ITImageView.h"
2 #import "ITImageCell.h"
3
4
5 @implementation ITImageView
6
7
8 + (void)initialize
9 {
10     if ( self == [ITImageView class] ) {
11         [self setCellClass:[ITImageCell class]];
12     }
13 }
14
15 + (Class)cellClass
16 {
17     return [ITImageCell class];
18 }
19
20 - (id)initWithFrame:(NSRect)rect
21 {
22     if ( (self = [super initWithFrame:rect]) ) {
23         [self setScalesSmoothly:YES];
24     }
25     
26     return self;
27 }
28
29 - (BOOL)scalesSmoothly
30 {
31     return [[self cell] scalesSmoothly];
32 }
33
34 - (void)setScalesSmoothly:(BOOL)flag
35 {
36     [[self cell] setScalesSmoothly:flag];
37 }
38
39 - (BOOL)castsShadow;
40 {
41     return [[self cell] castsShadow];
42 }
43
44 - (void)setCastsShadow:(BOOL)newSetting;
45 {
46     [[self cell] setCastsShadow:newSetting];
47 }
48
49 - (float)shadowElevation;
50 {
51     return [[self cell] shadowElevation];
52 }
53
54 - (void)setShadowElevation:(float)newElevation;
55 {
56     [[self cell] setShadowElevation:newElevation];
57 }
58
59 - (float)shadowAzimuth;
60 {
61     return [[self cell] shadowAzimuth];
62 }
63
64 - (void)setShadowAzimuth:(float)newAzimuth;
65 {
66     [[self cell] setShadowAzimuth:newAzimuth];
67 }
68
69 - (float)shadowAmbient;
70 {
71     return [[self cell] shadowAmbient];
72 }
73
74 - (void)setShadowAmbient:(float)newAmbient;
75 {
76     [[self cell] setShadowAmbient:newAmbient];
77 }
78
79 - (float)shadowHeight;
80 {
81     return [[self cell] shadowHeight];
82 }
83
84 - (void)setShadowHeight:(float)newHeight;
85 {
86     [[self cell] setShadowHeight:newHeight];
87 }
88
89 - (float)shadowRadius;
90 {
91     return [[self cell] shadowRadius];
92 }
93
94 - (void)setShadowRadius:(float)newRadius;
95 {
96     [[self cell] setShadowRadius:newRadius];
97 }
98
99 - (float)shadowSaturation;
100 {
101     return [[self cell] shadowSaturation];
102 }
103
104 - (void)setShadowSaturation:(float)newSaturation;
105 {
106     [[self cell] setShadowSaturation:newSaturation];
107 }
108
109
110 @end