Chameleon Applications

Chameleon Applications Svn Source Tree

Root/trunk/ChameleonPrefPane/Sources/PreferencesControllerBase.h

1//
2// PreferencesControllerBase.h
3// ChameleonPrefPane
4//
5// Created by Rekursor on 1/22/10.
6//
7
8#import <Cocoa/Cocoa.h>
9#import <ChameleonPrefPane.h>
10#import "BootPropertyList.h"
11#import <ShellProcess.h>
12
13// ENHANCE ME: remove this globals and integrate them in ChameleonPrefPan or at least
14// add function accessor entry points
15extern PartitionExtractor * partExtractor;
16extern BootPropertyList * prop;
17
18// Defintion of the required protocol for any derived classes of PreferencesControllerBase
19@protocol PreferenceController
20
21@required
22 // must be implemented in all derived classes
23
24// Called by all buttons of each group in therface
25- (IBAction) onCheckButtonChange: (NSButton*) sender;
26
27// Called by all text fields of each group in therface
28- (IBAction) onTextFiedChange: (NSTextField*) sender;
29
30// Add the boot config options descriptors to the consolidated dictionary
31- (void) addOptionsDesc;
32
33// Set refresh all group states {enabled | disabled} depending on the authorizations state
34- (void) refreshLockStates;
35
36
37// load the corresponding Options from the interface
38- (void) loadOptionsFromPreferencesFile: (NSMutableDictionary*) dict;
39
40@end
41
42// Define common expected behavior for all derived controllers
43@interface PreferencesControllerBase : NSObject
44{
45}
46
47// from the id to desc map in prop, set all default values for dict
48+ (void) setDefaultValues: (NSMutableDictionary*) dict;
49
50// Set refresh state {enabled | disabled} depending on the authorizations state
51- (void) refreshLockState: (id) item;
52
53- (void) loadPreferences;
54- (bool) savePreferences;
55
56- (bool) handleSender: (id) sender withButton: (NSButton*) button forKey: (const char *) key;
57- (bool) handleSender: (id) sender withButton: (NSButton*) button andField:(NSTextField*) field
58 forKey: (const char *) key;
59
60-(NSMutableDictionary*) preferencesFile;
61-(NSMutableDictionary*) preferencesParts;
62
63-(ChameleonPrefPane*) chameleon;
64
65@end
66

Archive Download this file

Revision: 47