-
Notifications
You must be signed in to change notification settings - Fork 1
/
DualField.h
executable file
·50 lines (33 loc) · 1.18 KB
/
DualField.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
/* DualField */
#import <Cocoa/Cocoa.h>
enum { BUTTON_HIDDEN, BUTTON_NORMAL, BUTTON_PRESSED };
@interface DualFieldCell : NSTextFieldCell {
int clearButtonState, snapbackButtonState;
}
- (BOOL)snapbackButtonIsVisible;
- (void)setShowsSnapbackButton:(BOOL)shouldShow;
- (BOOL)clearButtonIsVisible;
- (void)setShowsClearButton:(BOOL)shouldShow;
- (NSRect)clearButtonRectForBounds:(NSRect)rect;
- (NSRect)snapbackButtonRectForBounds:(NSRect)rect;
- (NSRect)textAreaForBounds:(NSRect)rect;
- (BOOL)handleMouseDown:(NSEvent *)theEvent;
@end
@interface DualField : NSTextField {
IBOutlet NSTableView *notesTable;
unsigned int lastLengthReplaced;
NSString *snapbackString, *swappedOriginalString;
NSToolTipTag docIconTag, textAreaTag, clearButtonTag;
NSTrackingRectTag docIconRectTag;
BOOL showsDocumentIcon;
}
- (void)setTrackingRect;
- (void)setShowsDocumentIcon:(BOOL)showsIcon;
- (BOOL)showsDocumentIcon;
- (void)setSnapbackString:(NSString*)string;
- (NSString*)snapbackString;
+ (NSImage*)snapbackImageWithString:(NSString*)string;
- (void)deselectAll:(id)sender;
- (unsigned int)lastLengthReplaced;
+ (NSBezierPath*)bezierPathWithRoundRectInRect:(NSRect)aRect radius:(float)radius;
@end