forked from gnachman/iTerm2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
iTermMinimalComposerViewController.h
90 lines (81 loc) · 4.21 KB
/
iTermMinimalComposerViewController.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
//
// iTermMinimalComposerViewController.h
// iTerm2
//
// Created by George Nachman on 3/31/20.
//
#import <Cocoa/Cocoa.h>
NS_ASSUME_NONNULL_BEGIN
@class TmuxController;
@protocol VT100RemoteHostReading;
@class iTermMinimalComposerViewController;
@class iTermSuggestionRequest;
@protocol iTermSyntaxHighlighting;
@class iTermVariableScope;
@protocol VT100RemoteHostReading;
@protocol iTermMinimalComposerViewControllerDelegate<NSObject>
- (void)minimalComposer:(iTermMinimalComposerViewController *)composer
sendCommand:(NSString *)command
addNewline:(BOOL)addNewlin
dismiss:(BOOL)dismiss;
- (void)minimalComposer:(iTermMinimalComposerViewController *)composer
enqueueCommand:(NSString *)command
dismiss:(BOOL)dismiss;
- (void)minimalComposer:(iTermMinimalComposerViewController *)composer
sendControl:(NSString *)control;
- (void)minimalComposer:(iTermMinimalComposerViewController *)composer
sendToAdvancedPaste:(NSString *)content;
- (NSRect)minimalComposer:(iTermMinimalComposerViewController *)composer
frameForHeight:(CGFloat)desiredHeight;
- (CGFloat)minimalComposerMaximumHeight:(iTermMinimalComposerViewController *)composer;
- (void)minimalComposer:(iTermMinimalComposerViewController *)composer
frameDidChangeTo:(NSRect)newFrame;
- (CGFloat)minimalComposerLineHeight:(iTermMinimalComposerViewController *)composer;
- (void)minimalComposerOpenHistory:(iTermMinimalComposerViewController *)composer
prefix:(NSString *)prefix
forSearch:(BOOL)forSearch;
- (void)minimalComposerShowCompletions:(NSArray<NSString *> *)completions;
- (BOOL)minimalComposer:(iTermMinimalComposerViewController *)composer wantsKeyEquivalent:(NSEvent *)event;
- (void)minimalComposer:(iTermMinimalComposerViewController *)composer performFindPanelAction:(id)sender;
- (void)minimalComposer:(iTermMinimalComposerViewController *)composer
desiredHeightDidChange:(CGFloat)desiredHeight;
- (void)minimalComposerAutoComposerTextDidChange:(iTermMinimalComposerViewController *)composer;
- (void)minimalComposerClear:(iTermMinimalComposerViewController *)composer;
- (id<iTermSyntaxHighlighting>)minimalComposer:(iTermMinimalComposerViewController *)composer
syntaxHighlighterForAttributedString:(NSMutableAttributedString *)attributedString;
- (void)minimalComposerDidBecomeFirstResponder:(iTermMinimalComposerViewController *)composer;
- (BOOL)minimalComposerShouldFetchSuggestions:(iTermMinimalComposerViewController *)composer
forHost:(id<VT100RemoteHostReading>)remoteHost
tmuxController:(TmuxController *)tmuxController;
- (void)minimalComposer:(iTermMinimalComposerViewController *)composer
fetchSuggestions:(iTermSuggestionRequest *)request;
- (BOOL)minimalComposerHandleKeyDown:(NSEvent *)event;
- (NSResponder *)minimalComposerNextResponder;
- (BOOL)minimalComposerShouldForwardCopy:(iTermMinimalComposerViewController *)composer;
- (void)minimalComposerForwardMenuItem:(NSMenuItem *)menuItem;
- (NSString * _Nullable)minimalComposer:(iTermMinimalComposerViewController *)composer
valueOfEnvironmentVariable:(NSString *)name;
@end
@interface iTermMinimalComposerViewController : NSViewController
@property (nonatomic, weak) id<iTermMinimalComposerViewControllerDelegate> delegate;
@property (nonatomic, copy) NSString *stringValue;
@property (nonatomic) BOOL isAutoComposer;
@property (nonatomic, readonly) CGFloat desiredHeight;
@property (nonatomic) BOOL isSeparatorVisible;
@property (nonatomic, strong) NSColor *separatorColor;
@property (nonatomic, readonly) NSRect cursorFrameInScreenCoordinates;
- (void)updateFrame;
- (void)makeFirstResponder;
- (void)setHost:(id<VT100RemoteHostReading>)host
workingDirectory:(NSString *)pwd
scope:(iTermVariableScope *)scope
tmuxController:(TmuxController *)tmuxController;
- (void)setFont:(NSFont *)font;
- (void)setTextColor:(NSColor *)textColor cursorColor:(NSColor *)cursorColor;
- (void)setPrefix:(NSMutableAttributedString * _Nullable)prefix;
- (BOOL)composerIsFirstResponder;
- (void)insertText:(NSString *)text;
- (void)paste:(id)sender;
- (void)deleteLastCharacter;
@end
NS_ASSUME_NONNULL_END