Files
atom/Atom/Classes/AtomController.h
Nathan Sobo a010c8e3c6 Add window.bindMenuItem, which adds a menu item that invokes a given function.
Every menu item is created with a path (File > Save). The functions are stored in a hash from (menu item path -> action) on the window. When an AtomMenuItem is selected, it looks up the action on the current window based on its path.
2011-12-26 13:12:27 -06:00

24 lines
576 B
Objective-C

#import <Cocoa/Cocoa.h>
#import "JSCocoa.h"
@class JSCocoa;
@class WebView;
struct JSGlobalContextRef;
@interface AtomController : NSWindowController <NSWindowDelegate>
@property (assign) WebView *webView;
@property (nonatomic, retain, readonly) NSString *url;
@property (nonatomic, retain, readonly) NSString *bootstrapScript;
- (id)initForSpecs;
- (id)initWithURL:(NSString *)url;
- (void)triggerAtomEventWithName:(NSString *)name data:(id)data;
- (void)reload;
- (JSValueRefAndContextRef)jsWindow;
- (void)performActionForMenuItemPath:(NSString *)menuItemPath;
@end