1 | /* SS_PrefsController */ |
---|
2 | |
---|
3 | |
---|
4 | @interface SS_PrefsController : NSObject |
---|
5 | { |
---|
6 | NSWindow *prefsWindow; |
---|
7 | NSMutableDictionary *preferencePanes; |
---|
8 | NSMutableArray *panesOrder; |
---|
9 | |
---|
10 | NSString *bundleExtension; |
---|
11 | NSString *searchPath; |
---|
12 | |
---|
13 | NSToolbar *prefsToolbar; |
---|
14 | NSMutableDictionary *prefsToolbarItems; |
---|
15 | |
---|
16 | NSToolbarDisplayMode toolbarDisplayMode; |
---|
17 | #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2 |
---|
18 | NSToolbarSizeMode toolbarSizeMode; |
---|
19 | #endif |
---|
20 | BOOL usesTexturedWindow; |
---|
21 | BOOL alwaysShowsToolbar; |
---|
22 | BOOL alwaysOpensCentered; |
---|
23 | |
---|
24 | BOOL debug; |
---|
25 | |
---|
26 | float minimumWidthForToolbar; |
---|
27 | |
---|
28 | id delegate; |
---|
29 | } |
---|
30 | |
---|
31 | // Convenience constructors |
---|
32 | + (id)preferencesWithPanesSearchPath:(NSString*)path bundleExtension:(NSString *)ext; |
---|
33 | + (id)preferencesWithBundleExtension:(NSString *)ext; |
---|
34 | + (id)preferencesWithPanesSearchPath:(NSString*)path; |
---|
35 | + (id)preferencesWithPanes:(NSArray *)inArray delegate:(id)inDelegate; |
---|
36 | + (id)preferences; |
---|
37 | |
---|
38 | // Designated initializer |
---|
39 | - (id)initWithPanesSearchPath:(NSString*)path bundleExtension:(NSString *)ext; |
---|
40 | |
---|
41 | - (id)initWithBundleExtension:(NSString *)ext; |
---|
42 | - (id)initWithPanesSearchPath:(NSString*)path; |
---|
43 | |
---|
44 | - (void)showPreferencesWindow; |
---|
45 | - (void)createPreferencesWindowAndDisplay:(BOOL)shouldDisplay; |
---|
46 | - (void)createPreferencesWindow; |
---|
47 | - (void)destroyPreferencesWindow; |
---|
48 | - (BOOL)loadPrefsWithIdentifier:(NSString *)name display:(BOOL)disp; |
---|
49 | - (BOOL)loadPreferencePaneNamed:(NSString *)name; |
---|
50 | - (void)activatePane:(NSString*)path; |
---|
51 | - (void)debugLog:(NSString*)msg; |
---|
52 | |
---|
53 | float ToolbarHeightForWindow(NSWindow *window); |
---|
54 | - (void)createPrefsToolbar; |
---|
55 | - (void)prefsToolbarItemClicked:(NSToolbarItem*)item; |
---|
56 | |
---|
57 | // Accessors |
---|
58 | - (NSWindow *)preferencesWindow; |
---|
59 | - (NSString *)bundleExtension; |
---|
60 | - (NSString *)searchPath; |
---|
61 | |
---|
62 | - (NSArray *)loadedPanes; |
---|
63 | - (NSArray *)panesOrder; |
---|
64 | - (void)setPanesOrder:(NSArray *)newPanesOrder; |
---|
65 | - (BOOL)debug; |
---|
66 | - (void)setDebug:(BOOL)newDebug; |
---|
67 | - (BOOL)usesTexturedWindow; |
---|
68 | - (void)setUsesTexturedWindow:(BOOL)newUsesTexturedWindow; |
---|
69 | - (BOOL)alwaysShowsToolbar; |
---|
70 | - (void)setAlwaysShowsToolbar:(BOOL)newAlwaysShowsToolbar; |
---|
71 | - (BOOL)alwaysOpensCentered; |
---|
72 | - (void)setAlwaysOpensCentered:(BOOL)newAlwaysOpensCentered; |
---|
73 | - (NSToolbarDisplayMode)toolbarDisplayMode; |
---|
74 | - (void)setToolbarDisplayMode:(NSToolbarDisplayMode)displayMode; |
---|
75 | #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2 |
---|
76 | - (NSToolbarSizeMode)toolbarSizeMode; |
---|
77 | - (void)setToolbarSizeMode:(NSToolbarSizeMode)sizeMode; |
---|
78 | #endif |
---|
79 | |
---|
80 | @end |
---|
81 | |
---|
82 | @interface NSObject (SS_PrefsControllerDelegate) |
---|
83 | - (void)prefsWindowWillClose:(SS_PrefsController *)sender; |
---|
84 | @end |
---|