-
Notifications
You must be signed in to change notification settings - Fork 407
/
GlobalPrefs.h
executable file
·190 lines (135 loc) · 6.2 KB
/
GlobalPrefs.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
//
// GlobalPrefs.h
// Notation
//
// Created by Zachary Schneirov on 1/31/06.
/*Copyright (c) 2010, Zachary Schneirov. All rights reserved.
This file is part of Notational Velocity.
Notational Velocity is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Notational Velocity is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Notational Velocity. If not, see <http://www.gnu.org/licenses/>. */
#import <Cocoa/Cocoa.h>
#import "SynchronizedNoteProtocol.h"
#import "BufferUtils.h"
extern NSString *NoteTitleColumnString;
extern NSString *NoteLabelsColumnString;
extern NSString *NoteDateModifiedColumnString;
extern NSString *NoteDateCreatedColumnString;
extern NSString *NotePreviewString;
extern NSString *NVPTFPboardType;
@class NotesTableView;
@class BookmarksController;
@class NotationPrefs;
@class PTKeyCombo;
@class PTHotKey;
enum { NoteTitleColumn, NoteLabelsColumn, NoteDateModifiedColumn, NoteDateCreatedColumn };
#define ColumnIsSet(__ColumnEnum, __columnsBitmap) (((1 << (__ColumnEnum)) & (__columnsBitmap)) != 0)
BOOL ColorsEqualWith8BitChannels(NSColor *c1, NSColor *c2);
@interface GlobalPrefs : NSObject {
NSUserDefaults *defaults;
id (*runCallbacksIMP)(GlobalPrefs*, SEL, SEL, id);
NSMutableDictionary *selectorObservers;
PTKeyCombo *appActivationKeyCombo;
PTHotKey *appActivationHotKey;
BookmarksController *bookmarksController;
NotationPrefs *notationPrefs;
NSDictionary *noteBodyAttributes, *searchTermHighlightAttributes;
NSMutableParagraphStyle *noteBodyParagraphStyle;
NSFont *noteBodyFont;
BOOL autoCompleteSearches;
NSMutableArray *tableColumns;
unsigned int tableColsBitmap;
}
+ (GlobalPrefs *)defaultPrefs;
- (void)registerWithTarget:(id)sender forChangesInSettings:(SEL)firstSEL, ...;
- (void)registerForSettingChange:(SEL)selector withTarget:(id)sender;
- (void)unregisterForNotificationsFromSelector:(SEL)selector sender:(id)sender;
- (void)notifyCallbacksForSelector:(SEL)selector excludingSender:(id)sender;
- (void)setNotationPrefs:(NotationPrefs*)newNotationPrefs sender:(id)sender;
- (NotationPrefs*)notationPrefs;
- (void)removeTableColumn:(NSString*)columnKey sender:(id)sender;
- (void)addTableColumn:(NSString*)columnKey sender:(id)sender;
- (NSArray*)visibleTableColumns;
- (unsigned int)tableColumnsBitmap;
- (void)setSortedTableColumnKey:(NSString*)sortedKey reversed:(BOOL)reversed sender:(id)sender;
- (NSString*)sortedTableColumnKey;
- (BOOL)tableIsReverseSorted;
- (BOOL)tableColumnsShowPreview;
- (void)setTableColumnsShowPreview:(BOOL)showPreview sender:(id)sender;
- (void)resolveNoteBodyFontFromNotationPrefsFromSender:(id)sender;
- (void)setNoteBodyFont:(NSFont*)aFont sender:(id)sender;
- (void)_setNoteBodyFont:(NSFont*)aFont;
- (NSFont*)noteBodyFont;
- (NSDictionary*)noteBodyAttributes;
- (NSParagraphStyle*)noteBodyParagraphStyle;
- (BOOL)_bodyFontIsMonospace;
- (void)setForegroundTextColor:(NSColor*)aColor sender:(id)sender;
- (NSColor*)foregroundTextColor;
- (void)setBackgroundTextColor:(NSColor*)aColor sender:(id)sender;
- (NSColor*)backgroundTextColor;
- (void)setTabIndenting:(BOOL)value sender:(id)sender;
- (BOOL)tabKeyIndents;
- (void)setUseTextReplacement:(BOOL)value sender:(id)sender;
- (BOOL)useTextReplacement;
- (void)setCheckSpellingAsYouType:(BOOL)value sender:(id)sender;
- (BOOL)checkSpellingAsYouType;
- (void)setConfirmNoteDeletion:(BOOL)value sender:(id)sender;
- (BOOL)confirmNoteDeletion;
- (void)setQuitWhenClosingWindow:(BOOL)value sender:(id)sender;
- (BOOL)quitWhenClosingWindow;
- (void)setAppActivationKeyCombo:(PTKeyCombo*)aCombo sender:(id)sender;
- (PTKeyCombo*)appActivationKeyCombo;
- (PTHotKey*)appActivationHotKey;
- (BOOL)registerAppActivationKeystrokeWithTarget:(id)target selector:(SEL)selector;
- (void)setPastePreservesStyle:(BOOL)value sender:(id)sender;
- (BOOL)pastePreservesStyle;
- (void)setAutoFormatsDoneTag:(BOOL)value sender:(id)sender;
- (BOOL)autoFormatsDoneTag;
- (BOOL)autoIndentsNewLines;
- (void)setAutoIndentsNewLines:(BOOL)value sender:(id)sender;
- (BOOL)autoFormatsListBullets;
- (void)setAutoFormatsListBullets:(BOOL)value sender:(id)sender;
- (void)setLinksAutoSuggested:(BOOL)value sender:(id)sender;
- (BOOL)linksAutoSuggested;
- (void)setMakeURLsClickable:(BOOL)value sender:(id)sender;
- (BOOL)URLsAreClickable;
- (void)setShouldHighlightSearchTerms:(BOOL)shouldHighlight sender:(id)sender;
- (BOOL)highlightSearchTerms;
- (void)setSearchTermHighlightColor:(NSColor*)color sender:(id)sender;
- (NSDictionary*)searchTermHighlightAttributes;
- (NSColor*)searchTermHighlightColorRaw:(BOOL)isRaw;
- (void)setSoftTabs:(BOOL)value sender:(id)sender;
- (BOOL)softTabs;
- (int)numberOfSpacesInTab;
- (float)tableFontSize;
- (void)setTableFontSize:(float)fontSize sender:(id)sender;
- (void)setHorizontalLayout:(BOOL)value sender:(id)sender;
- (BOOL)horizontalLayout;
- (BOOL)autoCompleteSearches;
- (void)setAutoCompleteSearches:(BOOL)value sender:(id)sender;
- (NSString*)lastSelectedPreferencesPane;
- (void)setLastSelectedPreferencesPane:(NSString*)pane sender:(id)sender;
- (double)scrollOffsetOfLastSelectedNote;
- (CFUUIDBytes)UUIDBytesOfLastSelectedNote;
- (NSString*)lastSearchString;
- (void)setLastSearchString:(NSString*)string selectedNote:(id<SynchronizedNote>)aNote scrollOffsetForTableView:(NotesTableView*)tv sender:(id)sender;
- (void)saveCurrentBookmarksFromSender:(id)sender;
- (BookmarksController*)bookmarksController;
- (void)setAliasDataForDefaultDirectory:(NSData*)alias sender:(id)sender;
- (NSData*)aliasDataForDefaultDirectory;
- (NSString*)displayNameForDefaultDirectoryWithFSRef:(FSRef*)fsRef;
- (NSString*)humanViewablePathForDefaultDirectory;
- (void)setBlorImportAttempted:(BOOL)value;
- (BOOL)triedToImportBlor;
- (void)synchronize;
@end
@interface NSObject (GlobalPrefsDelegate)
- (void)settingChangedForSelectorString:(NSString*)selectorString;
@end