-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.h
109 lines (90 loc) · 3.14 KB
/
ui.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#import "SVNwrapper.h"
#import <Cocoa/Cocoa.h>
//------------------------------------------------------------------------------
// SVNWindowController
//------------------------------------------------------------------------------
@interface SVNWindowController : NSWindowController <SVNdelegate>
-(NSMenu*)openWithFor:(NSString*)path;
-(void)chooseApplication:(void(^)(NSURL *app))handler;
-(void)setLogo;
@end
//------------------------------------------------------------------------------
// Criterion
//------------------------------------------------------------------------------
@interface Criterion : NSObject {
@public
NSString *name;
NSMutableArray *children;
}
@property(readwrite, copy) NSString *name;
+(id)criterion;
+(id)criterionWithName:(NSString*)name;
+(id)criterionWithName:(NSString*)name children:(id)children, ... NS_REQUIRES_NIL_TERMINATION;
+(id)boolCriterion;
-(void)addChild:(id)child;
-(NSUInteger)numberOfChildren;
-(id)childAtIndex:(NSUInteger)index;
-(id)displayValue:(id)data;
-(NSString*)output:(id)display after:(NSString*)input last:(bool)last;
-(bool)isComposite;
-(NSString*)matches:(NSString*)input;
@end
@interface SeparatorCriterion : Criterion
+(id)shared;
@end
@interface CompositeCriterion : Criterion {
@public
NSString *separators;
}
-(id)withSeparators:(NSString*)s;
@end
@interface TextFieldCriterion : Criterion
+(id)shared;
-(id)displayValue:(NSString*)input withWidth:(float)width;
@end
@interface MatchCriterion : Criterion
@end
@interface TokenFieldCriterion : TextFieldCriterion {
float width;
NSString *separators;
}
+(id)criterionWithName:(NSString*)name separators:(NSString*)separators width:(float)width children:(id)children, ... NS_REQUIRES_NIL_TERMINATION;
-(id)withWidth:(float)w;
-(id)withSeparators:(NSString*)s;
@end
//------------------------------------------------------------------------------
// MyRuleEditor
//------------------------------------------------------------------------------
@interface MyRuleEditor : NSRuleEditor
-(int)getNewChildRow:(int)parent;
-(void)parse:(NSString*)value withCriteria:(Criterion*)criteria toParent:(NSInteger)parent;
-(NSString*)deparseRow:(int)row;
@end
@protocol MyRuleEditorDelegate <NSRuleEditorDelegate>
-(void)ruleEditor:(NSRuleEditor*)ruleeditor setParentRow:(NSInteger)parentRow;
@optional
-(void)ruleEditor:(NSRuleEditor*)ruleeditor removeRows:(NSIndexSet*)rowIndexes;
@end
//------------------------------------------------------------------------------
// Misc. Custom Controls
//------------------------------------------------------------------------------
@interface PathCell : NSTextFieldCell
@end
@interface IconTextCell : PathCell {
NSImage *icon;
}
@property(retain) NSImage *icon;
@end
@interface LabelledTextCell : NSTextFieldCell {
NSCell *label;
}
-(void)setLabel:(NSString*)s;
@end
@interface LabelledTextField : NSTextField
-(void)setLabel:(NSString*)s;
@end
//------------------------------------------------------------------------------
// Alerts
//------------------------------------------------------------------------------
void SVNErrorAlert(NSWindow *window, svn_error_t *err);
void SVNErrorAlertMainThread(NSWindow *window, svn_error_t *err);