forked from Oomph/TMSliderControl
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathTMSliderControl.h
More file actions
72 lines (51 loc) · 1.77 KB
/
TMSliderControl.h
File metadata and controls
72 lines (51 loc) · 1.77 KB
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
//
// TMSliderControl.h
// TMSliderControl
//
// Created by Rick Fillion on 01/02/09.
// All code is provided under the New BSD license.
//
#import <Cocoa/Cocoa.h>
typedef NS_ENUM(unsigned int, TMSliderControlState)
{
kTMSliderControlState_Inactive = 0,
kTMSliderControlState_Active = 1
};
@class TMSliderControlHandle;
@interface TMSliderControl : NSView {
// drawing
CGRect handleControlRectOn;
CGRect handleControlRectOff;
CGPoint mouseDownPosition;
// state
BOOL hasDragged;
id observedObjectForState;
NSString *observedKeyPathForState;
id observedObjectForEnabled;
NSString *observedKeyPathForEnabled;
}
- (void)updateUI;
// events
- (void)mouseDown:(NSEvent*)theEvent;
- (void)mouseDragged:(NSEvent*)theEvent;
- (void)mouseUp:(NSEvent*)theEvent;
- (IBAction)moveLeft:(id)sender;
- (IBAction)moveRight:(id)sender;
- (void)layoutHandle;
@property (nonatomic, readonly) CGFloat disabledOpacity;
@property (nonatomic, strong) CALayer *sliderWell;
@property (nonatomic, strong) CALayer *overlayMask;
@property (nonatomic, strong) NSImage *sliderHandleImage;
@property (nonatomic, strong) NSImage *sliderHandleDownImage;
@property (nonatomic, strong) CALayer *sliderHandle;
@property (nonatomic, assign) BOOL enabled;
@property (nonatomic, assign) BOOL state;
@property (nonatomic, unsafe_unretained) id target;
@property (nonatomic, assign) SEL action;
@property (nonatomic, strong) id observedObjectForState;
@property (nonatomic, copy) NSString *observedKeyPathForState;
@property (nonatomic, strong) id observedObjectForEnabled;
@property (nonatomic, copy) NSString *observedKeyPathForEnabled;
@property (nonatomic, strong) NSString *purposeDescription;
@property (nonatomic, strong) NSString *accessibilityText;
@end