forked from scrod/nv
-
Notifications
You must be signed in to change notification settings - Fork 1
/
GlobalPrefs.h
executable file
·160 lines (116 loc) · 5.25 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
//
// GlobalPrefs.h
// Notation
//
// Created by Zachary Schneirov on 1/31/06.
/*Copyright (c) 2010, Zachary Schneirov. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted
provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions
and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of
conditions and the following disclaimer in the documentation and/or other materials provided with
the distribution.
- Neither the name of Notational Velocity nor the names of its contributors may be used to endorse
or promote products derived from this software without specific prior written permission. */
#import <Cocoa/Cocoa.h>
#import "SynchronizedNoteProtocol.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;
@interface GlobalPrefs : NSObject {
NSUserDefaults *defaults;
IMP runCallbacksIMP;
NSMutableDictionary *selectorObservers;
PTKeyCombo *appActivationKeyCombo;
PTHotKey *appActivationHotKey;
BookmarksController *bookmarksController;
NotationPrefs *notationPrefs;
NSDictionary *noteBodyAttributes, *searchTermHighlightAttributes;
NSMutableParagraphStyle *noteBodyParagraphStyle;
NSFont *noteBodyFont;
NSColor *searchTermHighlightColor;
BOOL autoCompleteSearches;
NSMutableArray *tableColumns;
}
+ (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;
- (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;
- (void)setNoteBodyFont:(NSFont*)aFont sender:(id)sender;
- (NSFont*)noteBodyFont;
- (NSDictionary*)noteBodyAttributes;
- (NSParagraphStyle*)noteBodyParagraphStyle;
- (BOOL)_bodyFontIsMonospace;
- (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)setLinksAutoSuggested:(BOOL)value sender:(id)sender;
- (BOOL)linksAutoSuggested;
- (void)setMakeURLsClickable:(BOOL)value sender:(id)sender;
- (BOOL)URLsAreClickable;
- (void)setSearchTermHighlightColor:(NSColor*)color sender:(id)sender;
- (NSDictionary*)searchTermHighlightAttributes;
- (NSColor*)searchTermHighlightColor;
- (void)setSoftTabs:(BOOL)value sender:(id)sender;
- (BOOL)softTabs;
- (int)numberOfSpacesInTab;
- (BOOL)drawFocusRing;
- (float)tableFontSize;
- (void)setTableFontSize:(float)fontSize sender:(id)sender;
- (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;
- (NSImage*)iconForDefaultDirectoryWithFSRef:(FSRef*)fsRef;
- (NSString*)displayNameForDefaultDirectoryWithFSRef:(FSRef*)fsRef;
- (NSString*)humanViewablePathForDefaultDirectory;
- (void)setBlorImportAttempted:(BOOL)value;
- (BOOL)triedToImportBlor;
- (void)synchronize;
@end
@interface NSObject (GlobalPrefsDelegate)
- (void)settingChangedForSelectorString:(NSString*)selectorString;
@end