Remove website, now in yukkurigames.com repository.
[enjoyable.git] / Classes / NJMappingsViewController.h
1 //
2 // NJMappingsViewController.h
3 // Enjoyable
4 //
5 // Created by Joe Wreschnig on 3/17/13.
6 //
7 //
8
9 @class NJMapping;
10 @protocol NJMappingsViewControllerDelegate;
11
12 @interface NJMappingsViewController : NSViewController <NSTableViewDataSource,
13 NSTableViewDelegate,
14 NSOpenSavePanelDelegate,
15 NSPopoverDelegate>
16
17 @property (nonatomic, weak) IBOutlet id <NJMappingsViewControllerDelegate> delegate;
18
19 @property (nonatomic, strong) IBOutlet NSButton *removeMapping;
20 @property (nonatomic, strong) IBOutlet NSTableView *mappingList;
21 @property (nonatomic, strong) IBOutlet NSButton *mappingListTrigger;
22 @property (nonatomic, strong) IBOutlet NSPopover *mappingListPopover;
23 @property (nonatomic, strong) IBOutlet NSButton *moveUp;
24 @property (nonatomic, strong) IBOutlet NSButton *moveDown;
25
26 - (IBAction)addClicked:(id)sender;
27 - (IBAction)removeClicked:(id)sender;
28 - (IBAction)moveUpClicked:(id)sender;
29 - (IBAction)moveDownClicked:(id)sender;
30 - (IBAction)mappingTriggerClicked:(id)sender;
31
32 - (void)addedMappingAtIndex:(NSInteger)index startEditing:(BOOL)startEditing;
33 - (void)removedMappingAtIndex:(NSInteger)index;
34 - (void)changedActiveMappingToIndex:(NSInteger)index;
35
36 - (void)reloadData;
37 - (void)beginUpdates;
38 - (void)endUpdates;
39
40 @end
41
42 @protocol NJMappingsViewControllerDelegate
43
44 - (NSInteger)numberOfMappings:(NJMappingsViewController *)dvc;
45 - (NJMapping *)mappingsViewController:(NJMappingsViewController *)dvc
46 mappingForIndex:(NSUInteger)idx;
47
48
49 - (void)mappingsViewController:(NJMappingsViewController *)mvc
50 renameMappingAtIndex:(NSInteger)index
51 toName:(NSString *)name;
52
53 - (BOOL)mappingsViewController:(NJMappingsViewController *)mvc
54 canMoveMappingFromIndex:(NSInteger)fromIdx
55 toIndex:(NSInteger)toIdx;
56 - (void)mappingsViewController:(NJMappingsViewController *)mvc
57 moveMappingFromIndex:(NSInteger)fromIdx
58 toIndex:(NSInteger)toIdx;
59
60 - (BOOL)mappingsViewController:(NJMappingsViewController *)mvc
61 canRemoveMappingAtIndex:(NSInteger)idx;
62 - (void)mappingsViewController:(NJMappingsViewController *)mvc
63 removeMappingAtIndex:(NSInteger)idx;
64
65 - (BOOL)mappingsViewController:(NJMappingsViewController *)mvc
66 importMappingFromURL:(NSURL *)url
67 atIndex:(NSInteger)index
68 error:(NSError **)error;
69 - (void)mappingsViewController:(NJMappingsViewController *)mvc
70 addMapping:(NJMapping *)mapping;
71
72 - (void)mappingsViewController:(NJMappingsViewController *)mvc
73 choseMappingAtIndex:(NSInteger)idx;
74
75 @end