//
@class NJMapping;
-@class NJOutputController;
-
-@interface NJMappingsController : NSObject <NSTableViewDataSource,
- NSTableViewDelegate,
- NSOpenSavePanelDelegate,
- NSPopoverDelegate,
- NSFastEnumeration>
-{
- IBOutlet NSButton *removeButton;
- IBOutlet NSTableView *tableView;
- IBOutlet NJOutputController *outputController;
- IBOutlet NSButton *popoverActivate;
- IBOutlet NSPopover *popover;
- IBOutlet NSButton *moveUp;
- IBOutlet NSButton *moveDown;
-}
+
+@interface NJMappingsController : NSObject <NSFastEnumeration>
@property (nonatomic, readonly) NJMapping *currentMapping;
-@property (nonatomic, readonly) NSArray *mappings;
+@property (nonatomic, readonly) NSUInteger count;
- (NJMapping *)objectForKeyedSubscript:(NSString *)name;
- (NJMapping *)objectAtIndexedSubscript:(NSUInteger)idx;
-- (void)addMappingWithContentsOfURL:(NSURL *)url;
+- (NSInteger)indexOfMapping:(NJMapping *)mapping;
+
+- (void)addMapping:(NJMapping *)mapping;
+- (void)insertMapping:(NJMapping *)mapping atIndex:(NSInteger)idx;
+- (void)removeMappingAtIndex:(NSInteger)idx;
+- (void)mergeMapping:(NJMapping *)mapping intoMapping:(NJMapping *)existing;
+- (void)moveMoveMappingFromIndex:(NSInteger)fromIdx toIndex:(NSInteger)toIdx;
+- (void)renameMapping:(NJMapping *)mapping to:(NSString *)name;
+
- (void)activateMapping:(NJMapping *)mapping;
-- (void)activateMappingForProcess:(NSString *)processName;
+- (void)activateMappingForProcess:(NSRunningApplication *)app;
+
- (void)save;
- (void)load;
-- (IBAction)mappingPressed:(id)sender;
-- (IBAction)addPressed:(id)sender;
-- (IBAction)removePressed:(id)sender;
-- (IBAction)moveUpPressed:(id)sender;
-- (IBAction)moveDownPressed:(id)sender;
-- (IBAction)importPressed:(id)sender;
-- (IBAction)exportPressed:(id)sender;
-
@end