-
Notifications
You must be signed in to change notification settings - Fork 0
/
SettingsController.m
76 lines (62 loc) · 1.66 KB
/
SettingsController.m
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
//
// SettingsController.m
// Spectronics
//
// Created by Ivan Wick on 12/20/11.
// Copyright 2011 __MyCompanyName__. All rights reserved.
//
#import "SettingsController.h"
@implementation SettingsController
@synthesize invertColors;
@synthesize color;
@synthesize scroll;
@synthesize linear;
@synthesize orientation;
@synthesize visualPluginData;
- (NSArray*)viewSettingsKeys
{
return [NSArray arrayWithObjects:
@"invertColors",
@"color",
@"scroll",
@"linear",
@"orientation",
nil];
}
- (NSArray*)processSettingsKeys
{
return [NSArray arrayWithObjects:
@"bandBias",
nil];
}
- (void)setBandBias:(BOOL)bandBias { self.visualPluginData->biasNormFlag = bandBias; }
- (BOOL)bandBias { return self.visualPluginData->biasNormFlag; }
- (NSDictionary*) preferencesDictionary
{
NSMutableArray *saveKeys = [NSMutableArray arrayWithCapacity:10];
[saveKeys addObjectsFromArray:self.viewSettingsKeys];
[saveKeys addObjectsFromArray:self.processSettingsKeys];
return [self dictionaryWithValuesForKeys:saveKeys];
}
#if 0 // so far nothing needs to be inited here.
- (id)initWithWindow:(NSWindow *)window
{
self = [super initWithWindow:window];
if (self) {
// Initialization code here.
}
return self;
}
- (void)windowDidLoad
{
[super windowDidLoad];
// Implement this method to handle any initialization after your window controller's window has been loaded from its nib file.
}
#endif
#if 0 // not modal.
- (void)windowWillClose:(NSNotification *)notification
{
[[NSApplication sharedApplication] stopModal];
}
#endif
@end