AEEditorEvents.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  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 play has stopped
  67. EVENT(E_EDITORPLAYERSTOPPED, EditorPlayerStopped)
  68. {
  69. }
  70. EVENT(E_EDITORBUILD, EditorBuild)
  71. {
  72. PARAM(P_PLATFORM, Platform); // string
  73. PARAM(P_BUILDPATH, BuildPath); // string
  74. }
  75. // TODO: consolidate all errors to use this message
  76. static const unsigned EDITOR_MODALERROR = 0x1;
  77. static const unsigned EDITOR_MODALINFO = 0x2;
  78. EVENT(E_EDITORMODAL, EditorModal)
  79. {
  80. PARAM(P_TYPE, Type); // uint (EDITOR_ERROR_MODAL, etc)
  81. PARAM(P_TITLE, Title); // for modal errors, title text
  82. PARAM(P_MESSAGE, Message); // for modal errors, error text
  83. }
  84. EVENT(E_EDITORACTIVESCENEEDITORCHANGE, EditorActiveSceneEditorChange)
  85. {
  86. PARAM(P_SCENEEDITOR, SceneEditor);
  87. }
  88. EVENT(E_PLAYERERROR, PlayerError)
  89. {
  90. PARAM(P_TEXT, Text); // string
  91. }
  92. EVENT(E_CONSOLEMESSAGE, ConsoleMessage)
  93. {
  94. PARAM(P_TEXT, Text); // string
  95. }
  96. EVENT(E_CONSOLEERRORMESSAGE, ConsoleErrorMessage)
  97. {
  98. PARAM(P_TEXT, Text); // string
  99. }
  100. EVENT(E_PLATFORMCHANGE, PlatformChange)
  101. {
  102. PARAM(P_PLATFORM, Platform); // uint (AEEditorPlatform)
  103. }
  104. EVENT(E_SUBPROCESSOUTPUT, SubprocessOutput)
  105. {
  106. PARAM(P_TEXT, Text); // string
  107. }
  108. EVENT(E_SUBPROCESSCOMPLETE, SubprocessComplete)
  109. {
  110. PARAM(P_PROCESSKEY, ProcessKey); // unsigned
  111. PARAM(P_RETCODE, RetCode); // int (return code of process)
  112. }
  113. EVENT(E_CURLCOMPLETE, CurlComplete)
  114. {
  115. PARAM(P_CURLREQUEST, Request); // CurlRequest*
  116. }
  117. EVENT(E_EDITORSHUTDOWN, EditorShutdown)
  118. {
  119. }
  120. }