AEEditorApp.h 791 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #pragma once
  2. #include "AEEditorCommon.h"
  3. using namespace Atomic;
  4. namespace Atomic
  5. {
  6. class JSVM;
  7. }
  8. namespace AtomicEditor
  9. {
  10. class AEPreferences;
  11. class AEEditorApp : public AEEditorCommon
  12. {
  13. OBJECT(AEEditorApp);
  14. public:
  15. /// Construct.
  16. AEEditorApp(Context* context);
  17. /// Setup before engine initialization. Verify that a script file has been specified.
  18. virtual void Setup();
  19. /// Setup after engine initialization. Load the script and execute its start function.
  20. virtual void Start();
  21. /// Cleanup after the main loop. Run the script's stop function if it exists.
  22. virtual void Stop();
  23. private:
  24. void HandleExitRequested(StringHash eventType, VariantMap& eventData);
  25. void HandleJSError(StringHash eventType, VariantMap& eventData);
  26. };
  27. }