X-Git-Url: https://git.yukkurigames.com/?p=enjoyable.git;a=blobdiff_plain;f=Classes%2FNJMappingMenuController.h;fp=Classes%2FNJMappingMenuController.h;h=9c9432a66b00a3357f7d963241add3fda6a45110;hp=0000000000000000000000000000000000000000;hb=dacfcc6b0bf3bfebc89b5e6e8266da9eb36177cd;hpb=3fae21830d647cf9c208fc8f96e23efedccdbd0e diff --git a/Classes/NJMappingMenuController.h b/Classes/NJMappingMenuController.h new file mode 100644 index 0000000..9c9432a --- /dev/null +++ b/Classes/NJMappingMenuController.h @@ -0,0 +1,50 @@ +// +// NJMappingMenuController.h +// Enjoyable +// +// Created by Joe Wreschnig on 3/11/13. +// +// + +#import + +@class NJMapping; + +@protocol NJMappingMenuDelegate + +- (void)mappingWasChosen:(NJMapping *)mapping; + // Called when a menu item created by the controller is chosen. + +- (void)mappingListShouldOpen; + // Called when the "overflow" menu item is chosen, this means the + // user should be presented with the list of available mappings. + +@end + +@interface NJMappingMenuController : NSObject + // Mapping menu controllers manage the contents of a menu that + // shows a list of all available mappings, as well as the current + // event translation state. The menu may have other items in it as + // well, but none at an adjacent index that also have NJMappings + // as represented objects. + +@property (nonatomic, strong) IBOutlet NSMenu *menu; + // The menu to put mapping items in. + +@property (nonatomic, weak) IBOutlet id delegate; + // The delegate to inform about requested mapping changes. + +@property (nonatomic, assign) NSInteger firstMappingIndex; + // The index in the menu to insert mappings into. The menu can + // have other dynamic items as long as you update this index as + // you add or remove them. + +@property (nonatomic, assign) BOOL hasKeyEquivalents; + // Whether or not to add key equivalents to the menu items. + +@property (nonatomic, strong) IBOutlet NSMenuItem *eventTranslationToggle; + // A menu item representing the current event translation state. + // This outlet is optional. + + +@end