-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSKProgressIndicator.h
72 lines (55 loc) · 1.67 KB
/
SKProgressIndicator.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
//
// SKProgressIndicator.h
// Skreenics
//
// Created by naixn on 19/09/09.
// Copyright 2009 Thibault Martin-Lagardette. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@protocol SKProgressAnimatorDelegate
- (void)setProgressValue:(double)value;
@end
#pragma mark -
@interface SKProgressAnimator : NSAnimation
{
double originalProgress;
double finalProgress;
}
- (id)initWithDelegate:(id <SKProgressAnimatorDelegate>)delegate from:(double)from to:(double)to;
@end
#pragma mark -
typedef struct s_gradiant_components
{
CGFloat red;
CGFloat green;
CGFloat blue;
CGFloat alpha;
} NXGradiantComponents;
typedef enum _SKProgressIndicatorThickness
{
SKProgressIndicatorPreferredThickness = 14,
SKProgressIndicatorPreferredSmallThickness = 10,
SKProgressIndicatorPreferredLargeThickness = 18
} SKProgressIndicatorThickness;
#define kSKProgressIndicatorError -42.0
@interface SKProgressIndicator : NSView <SKProgressAnimatorDelegate>
{
SKProgressAnimator* progressAnimation;
double progressValue;
double maxProgressValue;
}
@property double maxProgressValue;
// Progress value
- (double)progressValue;
- (void)setProgressValue:(double)value;
- (void)setAnimatedProgressValue:(double)value;
// Progress Indicator Delegate
- (void)animationDidEnd:(NSAnimation *)animation;
// Draw related
- (NXGradiantComponents)gradiantHolderComponents;
- (NXGradiantComponents)redGradiantComponents;
- (NXGradiantComponents)greenGradiantComponents;
- (NXGradiantComponents)blueGradiantComponents;
- (NSGradient *)gradiantWithColors:(NXGradiantComponents)c;
- (void)drawRect:(NSRect)dirtyRect;
@end