AEEditorEvents.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. //
  2. // Copyright (c) 2014-2015, THUNDERBEAST GAMES LLC All rights reserved
  3. // LICENSE: Atomic Game Engine Editor and Tools EULA
  4. // Please see LICENSE_ATOMIC_EDITOR_AND_TOOLS.md in repository root for
  5. // license information: https://github.com/AtomicGameEngine/AtomicGameEngine
  6. //
  7. #pragma once
  8. #include <Atomic/Core/Object.h>
  9. using namespace Atomic;
  10. namespace AtomicEditor
  11. {
  12. static const unsigned FINDTEXT_FLAG_NONE = 0x0;
  13. static const unsigned FINDTEXT_FLAG_CASESENSITIVE = 0x1;
  14. static const unsigned FINDTEXT_FLAG_WHOLEWORD = 0x2;
  15. static const unsigned FINDTEXT_FLAG_WRAP = 0x4;
  16. static const unsigned FINDTEXT_FLAG_NEXT = 0x8;
  17. static const unsigned FINDTEXT_FLAG_PREV = 0x10;
  18. EVENT(E_FINDTEXT, FindText)
  19. {
  20. PARAM(P_FLAGS, Flags); // int
  21. PARAM(P_TEXT, Text); // string
  22. }
  23. EVENT(E_FINDTEXTCLOSE, FindTextClose)
  24. {
  25. }
  26. EVENT(E_FINDTEXTOPEN, FindTextOpen)
  27. {
  28. }
  29. EVENT(E_JAVASCRIPTSAVED, JavascriptSaved)
  30. {
  31. }
  32. // editor play request
  33. EVENT(E_EDITORPLAYREQUEST, EditorPlayRequest)
  34. {
  35. PARAM(P_MODE, Mode); // uint (AEPlayerMode)
  36. }
  37. // stop play mode
  38. EVENT(E_EDITORPLAYSTOP, EditorPlayStop)
  39. {
  40. }
  41. // stop play mode
  42. EVENT(E_EDITORRESOURCEEDITORCHANGED, EditorResourceEditorChanged)
  43. {
  44. PARAM(P_RESOURCEEDITOR, ResourceEditor); // ResourceEditor*
  45. }
  46. // emitted once play has started
  47. EVENT(E_EDITORPLAYERSTARTED, EditorPlayerStarted)
  48. {
  49. PARAM(P_MODE, Mode); // uint (AEPlayerMode)
  50. }
  51. // emitted once play has stopped
  52. EVENT(E_EDITORPLAYERSTOPPED, EditorPlayerStopped)
  53. {
  54. }
  55. EVENT(E_EDITORBUILD, EditorBuild)
  56. {
  57. PARAM(P_PLATFORM, Platform); // string
  58. PARAM(P_BUILDPATH, BuildPath); // string
  59. }
  60. // TODO: consolidate all errors to use this message
  61. static const unsigned EDITOR_MODALERROR = 0x1;
  62. static const unsigned EDITOR_MODALINFO = 0x2;
  63. EVENT(E_EDITORMODAL, EditorModal)
  64. {
  65. PARAM(P_TYPE, Type); // uint (EDITOR_ERROR_MODAL, etc)
  66. PARAM(P_TITLE, Title); // for modal errors, title text
  67. PARAM(P_MESSAGE, Message); // for modal errors, error text
  68. }
  69. EVENT(E_EDITORACTIVESCENEEDITORCHANGE, EditorActiveSceneEditorChange)
  70. {
  71. PARAM(P_SCENEEDITOR, SceneEditor);
  72. }
  73. EVENT(E_PLAYERERROR, PlayerError)
  74. {
  75. PARAM(P_TEXT, Text); // string
  76. }
  77. EVENT(E_CONSOLEMESSAGE, ConsoleMessage)
  78. {
  79. PARAM(P_TEXT, Text); // string
  80. }
  81. EVENT(E_CONSOLEERRORMESSAGE, ConsoleErrorMessage)
  82. {
  83. PARAM(P_TEXT, Text); // string
  84. }
  85. EVENT(E_PLATFORMCHANGE, PlatformChange)
  86. {
  87. PARAM(P_PLATFORM, Platform); // uint (AEEditorPlatform)
  88. }
  89. EVENT(E_SUBPROCESSOUTPUT, SubprocessOutput)
  90. {
  91. PARAM(P_TEXT, Text); // string
  92. }
  93. EVENT(E_SUBPROCESSCOMPLETE, SubprocessComplete)
  94. {
  95. PARAM(P_PROCESSKEY, ProcessKey); // unsigned
  96. PARAM(P_RETCODE, RetCode); // int (return code of process)
  97. }
  98. EVENT(E_CURLCOMPLETE, CurlComplete)
  99. {
  100. PARAM(P_CURLREQUEST, Request); // CurlRequest*
  101. }
  102. EVENT(E_EDITORSHUTDOWN, EditorShutdown)
  103. {
  104. }
  105. }