Fix several cases where the UI did not properly reflect model changes.
[enjoyable.git] / Classes / NJMappingsController.h
1 //
2 // NJMappingsController.h
3 // Enjoy
4 //
5 // Created by Sam McCall on 4/05/09.
6 // Copyright 2009 University of Otago. All rights reserved.
7 //
8
9 @class NJMapping;
10
11 @interface NJMappingsController : NSObject <NSFastEnumeration>
12
13 @property (nonatomic, readonly) NJMapping *currentMapping;
14 @property (nonatomic, readonly) NSUInteger count;
15
16 - (NJMapping *)objectForKeyedSubscript:(NSString *)name;
17 - (NJMapping *)objectAtIndexedSubscript:(NSUInteger)idx;
18 - (NSInteger)indexOfMapping:(NJMapping *)mapping;
19
20 - (void)addMapping:(NJMapping *)mapping;
21 - (void)insertMapping:(NJMapping *)mapping atIndex:(NSInteger)idx;
22 - (void)removeMappingAtIndex:(NSInteger)idx;
23 - (void)mergeMapping:(NJMapping *)mapping intoMapping:(NJMapping *)existing;
24 - (void)moveMoveMappingFromIndex:(NSInteger)fromIdx toIndex:(NSInteger)toIdx;
25 - (void)renameMapping:(NJMapping *)mapping to:(NSString *)name;
26
27 - (void)activateMapping:(NJMapping *)mapping;
28 - (void)activateMappingForProcess:(NSRunningApplication *)app;
29
30 - (void)save;
31 - (void)load;
32
33 @end