AEEditorEvents.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. //
  2. // Copyright (c) 2014-2016 THUNDERBEAST GAMES LLC
  3. //
  4. // Permission is hereby granted, free of charge, to any person obtaining a copy
  5. // of this software and associated documentation files (the "Software"), to deal
  6. // in the Software without restriction, including without limitation the rights
  7. // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  8. // copies of the Software, and to permit persons to whom the Software is
  9. // furnished to do so, subject to the following conditions:
  10. //
  11. // The above copyright notice and this permission notice shall be included in
  12. // all copies or substantial portions of the Software.
  13. //
  14. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  19. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  20. // THE SOFTWARE.
  21. //
  22. #pragma once
  23. #include <Atomic/Core/Object.h>
  24. using namespace Atomic;
  25. namespace AtomicEditor
  26. {
  27. static const unsigned FINDTEXT_FLAG_NONE = 0x0;
  28. static const unsigned FINDTEXT_FLAG_CASESENSITIVE = 0x1;
  29. static const unsigned FINDTEXT_FLAG_WHOLEWORD = 0x2;
  30. static const unsigned FINDTEXT_FLAG_WRAP = 0x4;
  31. static const unsigned FINDTEXT_FLAG_NEXT = 0x8;
  32. static const unsigned FINDTEXT_FLAG_PREV = 0x10;
  33. EVENT(E_FINDTEXT, FindText)
  34. {
  35. PARAM(P_FLAGS, Flags); // int
  36. PARAM(P_TEXT, Text); // string
  37. }
  38. EVENT(E_FINDTEXTCLOSE, FindTextClose)
  39. {
  40. }
  41. EVENT(E_FINDTEXTOPEN, FindTextOpen)
  42. {
  43. }
  44. EVENT(E_JAVASCRIPTSAVED, JavascriptSaved)
  45. {
  46. }
  47. // editor play request
  48. EVENT(E_EDITORPLAYREQUEST, EditorPlayRequest)
  49. {
  50. PARAM(P_MODE, Mode); // uint (AEPlayerMode)
  51. }
  52. // stop play mode
  53. EVENT(E_EDITORPLAYSTOP, EditorPlayStop)
  54. {
  55. }
  56. // stop play mode
  57. EVENT(E_EDITORRESOURCEEDITORCHANGED, EditorResourceEditorChanged)
  58. {
  59. PARAM(P_RESOURCEEDITOR, ResourceEditor); // ResourceEditor*
  60. }
  61. // emitted once play has started
  62. EVENT(E_EDITORPLAYERSTARTED, EditorPlayerStarted)
  63. {
  64. PARAM(P_MODE, Mode); // uint (AEPlayerMode)
  65. }
  66. // emitted once player has paused
  67. EVENT(E_EDITORPLAYERPAUSED, EditorPlayerPaused)
  68. {
  69. }
  70. // emitted once paused player has resumed
  71. EVENT(E_EDITORPLAYERRESUMED, EditorPlayerResumed)
  72. {
  73. }
  74. // emitted once play has stopped
  75. EVENT(E_EDITORPLAYERSTOPPED, EditorPlayerStopped)
  76. {
  77. }
  78. EVENT(E_EDITORBUILD, EditorBuild)
  79. {
  80. PARAM(P_PLATFORM, Platform); // string
  81. PARAM(P_BUILDPATH, BuildPath); // string
  82. }
  83. // TODO: consolidate all errors to use this message
  84. static const unsigned EDITOR_MODALERROR = 0x1;
  85. static const unsigned EDITOR_MODALINFO = 0x2;
  86. EVENT(E_EDITORMODAL, EditorModal)
  87. {
  88. PARAM(P_TYPE, Type); // uint (EDITOR_ERROR_MODAL, etc)
  89. PARAM(P_TITLE, Title); // for modal errors, title text
  90. PARAM(P_MESSAGE, Message); // for modal errors, error text
  91. }
  92. EVENT(E_EDITORACTIVESCENEEDITORCHANGE, EditorActiveSceneEditorChange)
  93. {
  94. PARAM(P_SCENEEDITOR, SceneEditor);
  95. }
  96. EVENT(E_PLAYERERROR, PlayerError)
  97. {
  98. PARAM(P_TEXT, Text); // string
  99. }
  100. EVENT(E_CONSOLEMESSAGE, ConsoleMessage)
  101. {
  102. PARAM(P_TEXT, Text); // string
  103. }
  104. EVENT(E_CONSOLEERRORMESSAGE, ConsoleErrorMessage)
  105. {
  106. PARAM(P_TEXT, Text); // string
  107. }
  108. EVENT(E_PLATFORMCHANGE, PlatformChange)
  109. {
  110. PARAM(P_PLATFORM, Platform); // uint (AEEditorPlatform)
  111. }
  112. EVENT(E_SUBPROCESSOUTPUT, SubprocessOutput)
  113. {
  114. PARAM(P_TEXT, Text); // string
  115. }
  116. EVENT(E_SUBPROCESSCOMPLETE, SubprocessComplete)
  117. {
  118. PARAM(P_PROCESSKEY, ProcessKey); // unsigned
  119. PARAM(P_RETCODE, RetCode); // int (return code of process)
  120. }
  121. EVENT(E_CURLCOMPLETE, CurlComplete)
  122. {
  123. PARAM(P_CURLREQUEST, Request); // CurlRequest*
  124. }
  125. EVENT(E_EDITORSHUTDOWN, EditorShutdown)
  126. {
  127. }
  128. }