AEEditorEvents.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  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. using namespace Atomic;
  7. namespace AtomicEditor
  8. {
  9. static const unsigned FINDTEXT_FLAG_NONE = 0x0;
  10. static const unsigned FINDTEXT_FLAG_CASESENSITIVE = 0x1;
  11. static const unsigned FINDTEXT_FLAG_WHOLEWORD = 0x2;
  12. static const unsigned FINDTEXT_FLAG_WRAP = 0x4;
  13. static const unsigned FINDTEXT_FLAG_NEXT = 0x8;
  14. static const unsigned FINDTEXT_FLAG_PREV = 0x10;
  15. EVENT(E_FINDTEXT, FindText)
  16. {
  17. PARAM(P_FLAGS, Flags); // int
  18. PARAM(P_TEXT, Text); // string
  19. }
  20. EVENT(E_FINDTEXTCLOSE, FindTextClose)
  21. {
  22. }
  23. EVENT(E_FINDTEXTOPEN, FindTextOpen)
  24. {
  25. }
  26. EVENT(E_JAVASCRIPTSAVED, JavascriptSaved)
  27. {
  28. }
  29. // editor play request
  30. EVENT(E_EDITORPLAYREQUEST, EditorPlayRequest)
  31. {
  32. PARAM(P_MODE, Mode); // uint (AEPlayerMode)
  33. }
  34. // stop play mode
  35. EVENT(E_EDITORPLAYSTOP, EditorPlayStop)
  36. {
  37. }
  38. // stop play mode
  39. EVENT(E_EDITORRESOURCEEDITORCHANGED, EditorResourceEditorChanged)
  40. {
  41. PARAM(P_RESOURCEEDITOR, ResourceEditor); // ResourceEditor*
  42. }
  43. // emitted once play has started
  44. EVENT(E_EDITORPLAYSTARTED, EditorPlayStarted)
  45. {
  46. PARAM(P_MODE, Mode); // uint (AEPlayerMode)
  47. }
  48. // emitted once play has stopped
  49. EVENT(E_EDITORPLAYSTOPPED, EditorPlayStopped)
  50. {
  51. }
  52. EVENT(E_EDITORBUILD, EditorBuild)
  53. {
  54. PARAM(P_PLATFORM, Platform); // string
  55. PARAM(P_BUILDPATH, BuildPath); // string
  56. }
  57. // TODO: consolidate all errors to use this message
  58. static const unsigned EDITOR_MODALERROR = 0x1;
  59. static const unsigned EDITOR_MODALINFO = 0x2;
  60. EVENT(E_EDITORMODAL, EditorModal)
  61. {
  62. PARAM(P_TYPE, Type); // uint (EDITOR_ERROR_MODAL, etc)
  63. PARAM(P_TITLE, Title); // for modal errors, title text
  64. PARAM(P_MESSAGE, Message); // for modal errors, error text
  65. }
  66. EVENT(E_EDITORACTIVESCENECHANGE, EditorActiveSceneChange)
  67. {
  68. PARAM(P_SCENE, Scene); // Scene*
  69. }
  70. EVENT(E_EDITORACTIVENODECHANGE, EditorActiveNodeChange)
  71. {
  72. PARAM(P_NODE, Node); // Node*
  73. }
  74. EVENT(E_PLAYERERROR, PlayerError)
  75. {
  76. PARAM(P_TEXT, Text); // string
  77. }
  78. EVENT(E_CONSOLEMESSAGE, ConsoleMessage)
  79. {
  80. PARAM(P_TEXT, Text); // string
  81. }
  82. EVENT(E_CONSOLEERRORMESSAGE, ConsoleErrorMessage)
  83. {
  84. PARAM(P_TEXT, Text); // string
  85. }
  86. EVENT(E_PLATFORMCHANGE, PlatformChange)
  87. {
  88. PARAM(P_PLATFORM, Platform); // uint (AEEditorPlatform)
  89. }
  90. EVENT(E_SUBPROCESSOUTPUT, SubprocessOutput)
  91. {
  92. PARAM(P_TEXT, Text); // string
  93. }
  94. EVENT(E_SUBPROCESSCOMPLETE, SubprocessComplete)
  95. {
  96. PARAM(P_PROCESSKEY, ProcessKey); // unsigned
  97. PARAM(P_RETCODE, RetCode); // int (return code of process)
  98. }
  99. EVENT(E_CURLCOMPLETE, CurlComplete)
  100. {
  101. PARAM(P_CURLREQUEST, Request); // CurlRequest*
  102. }
  103. EVENT(E_EDITORSHUTDOWN, EditorShutdown)
  104. {
  105. }
  106. }