AEEditorShortcuts.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. // Copyright (c) 2014-2015, THUNDERBEAST GAMES LLC All rights reserved
  2. // Please see LICENSE.md in repository root for license information
  3. // https://github.com/AtomicGameEngine/AtomicGameEngine
  4. #pragma once
  5. #include <Atomic/Core/Object.h>
  6. #include <Atomic/IO/FileSystem.h>
  7. using namespace Atomic;
  8. namespace AtomicEditor
  9. {
  10. class EditorShortcuts : public Object
  11. {
  12. OBJECT(EditorShortcuts);
  13. public:
  14. /// Construct.
  15. EditorShortcuts(Context* context);
  16. /// Destruct.
  17. ~EditorShortcuts();
  18. void InvokeFileClose();
  19. void InvokeFileSave();
  20. void InvokeEditCut();
  21. void InvokeEditCopy();
  22. void InvokeEditPaste();
  23. void InvokeEditSelectAll();
  24. void InvokeEditUndo();
  25. void InvokeEditRedo();
  26. void InvokeEditFind();
  27. void InvokeEditFindNext();
  28. void InvokeEditFindPrev();
  29. void InvokeEditFormatCode();
  30. void InvokeBuild();
  31. void InvokeBuildSettings();
  32. void InvokePlayStop();
  33. private:
  34. bool IsProjectLoaded();
  35. void InvokeResourceFrameShortcut(const String& id);
  36. void HandleKeyDown(StringHash eventType, VariantMap& eventData);
  37. void HandleKeyUp(StringHash eventType, VariantMap& eventData);
  38. void HandleEditorShutdown(StringHash eventType, VariantMap& eventData);
  39. };
  40. }