-
Notifications
You must be signed in to change notification settings - Fork 421
/
Copy pathSquirrelPanel.hh
59 lines (54 loc) · 2.46 KB
/
SquirrelPanel.hh
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
#import <Cocoa/Cocoa.h>
#import "SquirrelInputController.hh"
@class SquirrelConfig;
@class SquirrelOptionSwitcher;
@interface SquirrelPanel : NSPanel <NSWindowDelegate>
// Show preedit text inline.
@property(nonatomic, readonly, direct) BOOL inlinePreedit;
// Show primary candidate inline
@property(nonatomic, readonly, direct) BOOL inlineCandidate;
// Vertical text orientation, as opposed to horizontal text orientation.
@property(nonatomic, readonly, direct) BOOL vertical;
// Linear candidate list layout, as opposed to stacked candidate list layout.
@property(nonatomic, readonly, direct) BOOL linear;
// Tabular candidate list layout, initializes as tab-aligned linear layout,
// expandable to stack 5 (3 for vertical) pages/sections of candidates
@property(nonatomic, readonly, direct) BOOL tabular;
@property(nonatomic, readonly, direct) BOOL locked;
@property(nonatomic, readonly, direct) BOOL firstLine;
@property(nonatomic, direct) BOOL expanded;
@property(nonatomic, direct) NSUInteger sectionNum;
// position of the text input I-beam cursor on screen.
@property(nonatomic, direct) NSRect IbeamRect;
@property(nonatomic, strong, readonly, nullable) NSScreen* screen;
// Status message before pop-up is displayed; nil before normal panel is
// displayed
@property(nonatomic, strong, readonly, nullable, direct)
NSString* statusMessage;
// Store switch options that change style (color theme) settings
@property(nonatomic, strong, nonnull, direct)
SquirrelOptionSwitcher* optionSwitcher;
// query
- (NSUInteger)candidateIndexOnDirection:(SquirrelIndex)arrowKey
__attribute__((objc_direct));
// status message
- (void)updateStatusLong:(NSString* _Nullable)messageLong
statusShort:(NSString* _Nullable)messageShort
__attribute__((objc_direct));
// display
- (void)showPreedit:(NSString* _Nullable)preeditString
selRange:(NSRange)selRange
caretPos:(NSUInteger)caretPos
candidateIndices:(NSRange)indexRange
highlightedIndex:(NSUInteger)highlightedIndex
pageNum:(NSUInteger)pageNum
finalPage:(BOOL)finalPage
didCompose:(BOOL)didCompose __attribute__((objc_direct));
- (void)hide __attribute__((objc_direct));
// settings
- (void)loadConfig:(SquirrelConfig* _Nonnull)config
__attribute__((objc_direct));
- (void)loadLabelConfig:(SquirrelConfig* _Nonnull)config
directUpdate:(BOOL)update __attribute__((objc_direct));
- (void)updateScriptVariant __attribute__((objc_direct));
@end // SquirrelPanel