5 // Created by Sam McCall on 4/05/09.
6 // Copyright 2009 University of Otago. All rights reserved.
9 #import <Cocoa/Cocoa.h>
11 @
class TargetController
;
13 @interface ConfigsController
: NSObject
{
14 NSMutableArray
* configs
;
15 IBOutlet NSButton
* removeButton
;
16 IBOutlet NSTableView
* tableView
;
17 IBOutlet TargetController
* targetController
;
18 Config
* currentConfig
;
19 Config
* neutralConfig
; /* last config to be manually selected */
20 ProcessSerialNumber attachedApplication
;
23 -(IBAction
) addPressed
: (id
)sender
;
24 -(IBAction
) removePressed
: (id
)sender
;
25 -(void) activateConfig
: (Config
*)config forApplication
: (ProcessSerialNumber
*) psn
;
27 -(NSDictionary
*) dumpAll
;
28 -(void) loadAllFrom
: (NSDictionary
*) dict
;
30 @
property(readonly
) Config
* currentConfig
;
31 @
property(readonly
) Config
* currentNeutralConfig
;
32 @
property(readonly
) NSArray
* configs
;
33 @
property(readonly
) ProcessSerialNumber
* targetApplication
;
37 -(void) applicationSwitchedTo
: (NSString
*) name withPsn
: (ProcessSerialNumber
) psn
;