forked from atg/Ingredients
-
Notifications
You must be signed in to change notification settings - Fork 2
/
IGKWindowController.h
231 lines (161 loc) · 6.11 KB
/
IGKWindowController.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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
//
// IGKWindowController.h
// Ingredients
//
// Created by Alex Gordon on 23/01/2010.
// Written in 2010 by Fileability.
//
#import <Cocoa/Cocoa.h>
#import <WebKit/WebKit.h>
#import "IGKHTMLGenerator.h"
#import "IGKTableOfContentsView.h"
@class BWSplitView;
@class IGKApplicationDelegate;
@class IGKSourceListWallpaperView;
@class IGKArrayController;
@class IGKBackForwardManager;
@class IGKPredicateEditor;
typedef enum {
CHDocumentationBrowserUIMode_BrowserOnly = 0,
CHDocumentationBrowserUIMode_TwoUp = 1,
CHDocumentationBrowserUIMode_AdvancedSearch = 2,
CHDocumentationBrowserUIMode_NeedsSetup = 20
} CHDocumentationBrowserUIMode;
typedef enum {
CHDocumentationBrowserFilterGroupByTasks = 0,
CHDocumentationBrowserFilterGroupByName = 1,
CHDocumentationBrowserFilterGroupByKind = 2
} CHDocumentationBrowserFilterGroupByMode;
@interface IGKWindowController : NSWindowController<IGKTableOfContentsDelegate>
{
IGKApplicationDelegate *appDelegate;
//*** Basic Structure ***
IBOutlet NSView *contentView;
IBOutlet NSView *twoPaneView;
IBOutlet BWSplitView *twoPaneSplitView;
//IBOutlet BWSplitView *twoPaneContentsSplitView;
IBOutlet NSView *twoPaneContentsTopView;
//*** Browser View ***
IBOutlet NSSegmentedControl *backForwardButton;
IBOutlet IGKBackForwardManager *backForwardManager;
IBOutlet NSView *browserSplitViewContainer;
IBOutlet NSSplitView *browserSplitView;
IBOutlet NSView *browserView;
IBOutlet NSTextField *browserViewTitle;
IBOutlet NSTextField *browserViewPath;
IBOutlet NSView *browserWebViewContainer;
IBOutlet WebView *browserWebView;
IBOutlet NSTextField *urlField;
IBOutlet NSView *browserTopbar;
IBOutlet NSView *browserToolbar;
//*** Filter Bar ***
BOOL isNonFilterBarType;
NSMutableArray *rightFilterBarTaskGroupedItems;
NSArray *rightFilterBarNameGroupedItems;
NSMutableArray *rightFilterBarKindGroupedItems;
NSMutableArray *rightFilterBarItems;
IBOutlet NSView *rightFilterBarView;
IBOutlet NSSearchField *rightFilterBarSearchField;
IBOutlet NSPopUpButton *rightFilterBarGroupByMenu;
IBOutlet NSTableView *rightFilterBarTable;
//*** No Selection ***
IBOutlet NSView *noselectionView;
IBOutlet NSPopUpButton *noselectionPopupButton;
IBOutlet NSTextField *noselectionSearchField;
IGKHTMLDisplayTypeMask acceptableDisplayTypes;
//*** Side Search ***
IBOutlet IGKArrayController *sideSearchController;
IBOutlet NSView *sideSearchContainer;
IBOutlet NSView *sideSearchView;
IBOutlet NSView *sideSearchIndicator;
IBOutlet NSSearchField *sideSearchViewField;
IBOutlet NSTableView *sideSearchViewResults;
NSMutableArray *sideSearchResults;
NSPredicate *sideFilterPredicate;
NSSortDescriptor *sideSortDescriptor;
NSString *sideSearchQuery;
//*** Table of Contents ***
IBOutlet NSView *tableOfContentsView;
IBOutlet NSTableView *tableOfContentsTableView;
IBOutlet IGKTableOfContentsView *tableOfContentsPicker;
NSUInteger tableOfContentsMask;
NSMutableArray *tableOfContentsTypes;
NSMutableArray *tableOfContentsTitles;
//*** In-file Find ***
IBOutlet NSWindow *findWindow;
IBOutlet NSView *findView;
IBOutlet NSTextField *findSearchField;
IBOutlet NSButton *findCloseButton;
IBOutlet NSButton *findRegexToggle;
IBOutlet NSSegmentedControl *findBackForwardStepper;
//*** Advanced Search ***
IBOutlet IGKArrayController *advancedController;
IBOutlet NSView *searchView;
IBOutlet NSSearchField *searchViewField;
IBOutlet NSScrollView *searchViewPredicateEditorScrollView;
IBOutlet IGKPredicateEditor *searchViewPredicateEditor;
IBOutlet NSScrollView *searchViewTableScrollView;
IBOutlet NSTableView *searchViewTable;
NSPredicate *advancedFilterPredicate;
//*** Other ***
IBOutlet NSWindow *savingProgressWindow;
IBOutlet NSProgressIndicator *savingProgressIndicator;
IGKSourceListWallpaperView *wallpaperView;
IBOutlet NSPopUpButton *docsetsFilterPopupButton;
IBOutlet NSArrayController *docsetsController;
int currentModeIndex;
BOOL awaken;
BOOL shouldIndex;
BOOL isIndexing;
BOOL isInFullscreen;
long frecencyToken;
NSManagedObjectID *currentObjectIDInBrowser;
NSArray *selectedFilterDocset;
}
@property (assign) IGKApplicationDelegate *appDelegate;
@property (assign) NSPredicate *sideFilterPredicate;
@property (assign) NSPredicate *advancedFilterPredicate;
@property (assign) NSNumber *ui_currentModeIndex;
@property (assign) BOOL shouldIndex;
@property (assign) BOOL isInFullscreen;
@property (assign) NSArray *selectedFilterDocset;
@property (readonly) WebView *browserWebView;
@property (readonly) NSString *sideSearchQuery;
+ (NSImage *)iconImageForURL:(NSURL *)url;
+ (IGKHTMLDisplayTypeMask)tableOfContentsMenuItemToMask:(NSInteger)tag;
- (IBAction)noselectionSearchField:(id)sender;
- (IBAction)changeSelectedFilterDocset:(id)sender;
- (IBAction)rightFilterSearchField:(id)sender;
- (IBAction)rightFilterGroupByMenu:(id)sender;
- (void)executeUISideSearch:(NSString *)query;
- (IBAction)executeSearch:(id)sender;
- (IBAction)executeAdvancedSearch:(id)sender;
- (IBAction)focusSearchField:(id)sender;
- (IBAction)changeViewModeTagged:(id)sender;
- (IBAction)backForward:(id)sender;
- (IBAction)openInSafari:(id)sender;
- (void)executeSearchWithString:(NSString *)query;
- (void)setBrowserActive:(BOOL)active;
- (void)tableViewSelectionDidChange:(NSNotification *)aNotification;
//Right filter bar
- (IBAction)findSymbol:(id)sender;
- (IBAction)toggleRightFilterBar:(id)sender;
- (BOOL)rightFilterBarShown;
- (void)setRightFilterBarShown:(BOOL)shown;
- (IBAction)toggleFullscreen:(id)sender;
- (BOOL)filterBarTableRowIsGroup:(NSInteger)row;
- (IBAction)predicateEditor:(id)sender;
- (void)loadURLRequest:(NSURL *)urlRequest recordHistory:(BOOL)recordHistory;
//Find Panel
- (IBAction)closeFindPanel:(id)sender;
- (IBAction)findPanelSearchField:(id)sender;
- (IBAction)findPanelSegmentedControl:(id)sender;
- (IBAction)findPanelPrevious:(id)sender;
- (IBAction)findPanelNext:(id)sender;
//Go to...
- (IBAction)goToNextResult:(id)sender;
- (IBAction)goToPreviousResult:(id)sender;
- (IBAction)goToNextSymbol:(id)sender;
- (IBAction)goToPreviousSymbol:(id)sender;
- (IBAction)goToTableOfContentsSection:(NSMenuItem *)sender;
@end