View-free NJMappingsController.
[enjoyable.git] / Classes / NJMappingsController.h
index bca6c1f..83ed8ef 100644 (file)
@@ -9,38 +9,27 @@
 @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)mappingsChanged;
+
 - (void)activateMapping:(NJMapping *)mapping;
 - (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