PolycodeAppDelegate.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. //
  2. // PolycodeAppDelegate.h
  3. // Polycode
  4. //
  5. // Created by Ivan Safrin on 11/28/10.
  6. // Copyright 2010 Local Projects. All rights reserved.
  7. //
  8. #import <Cocoa/Cocoa.h>
  9. #import "PolycodeView.h"
  10. #include "Polycode.h"
  11. #include "PolycodeIDEApp.h"
  12. using namespace Polycode;
  13. @class PolycodeAppDelegate;
  14. class PolycodeAppEventHandler : public EventHandler {
  15. public:
  16. PolycodeAppEventHandler() {}
  17. ~PolycodeAppEventHandler() {}
  18. void handleEvent(Event *evt);
  19. PolycodeAppDelegate* appDelegate;
  20. };
  21. @interface PolycodeAppDelegate : NSObject <NSApplicationDelegate> {
  22. NSWindow *window;
  23. PolycodeIDEApp *app;
  24. PolycodeView *polycodeView;
  25. PolycodeAppEventHandler *eventHandler;
  26. NSTimer* timer;
  27. NSMenu *projectMenu;
  28. String fileToOpen;
  29. BOOL mustShowProjectMenu;
  30. }
  31. @property (assign) IBOutlet PolycodeView *polycodeView;
  32. @property (assign) IBOutlet NSWindow *window;
  33. @property (assign) IBOutlet NSMenu *projectMenu;
  34. - (void) showProjectMenu;
  35. // Menu accessors
  36. -(IBAction) toggleConsole: (id) sender;
  37. -(IBAction) refreshProject: (id) sender;
  38. -(IBAction) renameFile: (id) sender;
  39. -(IBAction) removeFile: (id) sender;
  40. -(IBAction) newGroup: (id) sender;
  41. -(IBAction) browseExamples: (id) sender;
  42. -(IBAction) runProject: (id) sender;
  43. -(IBAction) exportProject: (id) sender;
  44. -(IBAction) newProject: (id) sender;
  45. -(IBAction) closeProject: (id) sender;
  46. -(IBAction) closeFile: (id) sender;
  47. -(IBAction) newFile: (id) sender;
  48. -(IBAction) openProject: (id) sender;
  49. -(IBAction) saveFile: (id) sender;
  50. -(IBAction) findText: (id) sender;
  51. -(IBAction) openDocs: (id) sender;
  52. -(IBAction) showAbout: (id) sender;
  53. -(IBAction) showSettings: (id) sender;
  54. @end