forked from gnachman/iTerm2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ContextMenuActionPrefsController.h
59 lines (45 loc) · 1.73 KB
/
ContextMenuActionPrefsController.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
//
// ContextMenuActionPrefsController.h
// iTerm
//
// Created by George Nachman on 11/18/11.
// Copyright 2011 Georgetech. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import "FutureMethods.h"
@class VT100RemoteHost;
typedef enum {
kOpenFileContextMenuAction,
kOpenUrlContextMenuAction,
kRunCommandContextMenuAction,
kRunCoprocessContextMenuAction,
kSendTextContextMenuAction
} ContextMenuActions;
@protocol ContextMenuActionPrefsDelegate
- (void)contextMenuActionsChanged:(NSArray *)newActions;
@end
@interface ContextMenuActionPrefsController : NSWindowController <NSWindowDelegate, NSTableViewDelegate, NSTableViewDataSource> {
IBOutlet NSTableView *tableView_;
IBOutlet NSTableColumn *titleColumn_;
IBOutlet NSTableColumn *actionColumn_;
IBOutlet NSTableColumn *parameterColumn_;
NSMutableArray *model_;
NSObject<ContextMenuActionPrefsDelegate> *delegate_;
BOOL hasSelection_;
}
@property (nonatomic, assign) NSObject<ContextMenuActionPrefsDelegate> *delegate;
@property (nonatomic, assign) BOOL hasSelection;
+ (ContextMenuActions)actionForActionDict:(NSDictionary *)dict;
+ (NSString *)titleForActionDict:(NSDictionary *)dict
withCaptureComponents:(NSArray *)components
workingDirectory:(NSString *)workingDirectory
remoteHost:(VT100RemoteHost *)remoteHost;
+ (NSString *)parameterForActionDict:(NSDictionary *)dict
withCaptureComponents:(NSArray *)components
workingDirectory:(NSString *)workingDirectory
remoteHost:(VT100RemoteHost *)remoteHost;
- (IBAction)ok:(id)sender;
- (void)setActions:(NSArray *)newActions;
- (IBAction)add:(id)sender;
- (IBAction)remove:(id)sender;
@end