forked from davidcann/deepDropUpload
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DCProgressIndicator.j
42 lines (29 loc) · 974 Bytes
/
DCProgressIndicator.j
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
@import <AppKit/CPProgressIndicator.j>
@implementation DCProgressIndicator : CPProgressIndicator {
}
@end
@implementation CPProgressIndicator (CPCoding)
- (id)initWithCoder:(CPCoder)aCoder {
self = [super initWithCoder:aCoder];
if (self) {
_minValue = 0.0;
_maxValue = 100.0;
_doubleValue = 0.0;
_style = CPProgressIndicatorHUDBarStyle;
_isDisplayedWhenStoppedSet = NO;
_controlSize = CPRegularControlSize;
[self updateBackgroundColor];
[self drawBar];
[self setMinValue:[aCoder decodeObjectForKey:@"minValue"]];
[self setMaxValue:[aCoder decodeObjectForKey:@"maxValue"]];
[self setNeedsLayout];
[self setNeedsDisplay:YES];
}
return self;
}
- (void)encodeWithCoder:(CPCoder)aCoder {
[super encodeWithCoder:aCoder];
[aCoder encodeObject:[self minValue] forKey:@"minValue"];
[aCoder encodeObject:[self maxValue] forKey:@"maxValue"];
}
@end