scene_string_names.h 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. /**************************************************************************/
  2. /* scene_string_names.h */
  3. /**************************************************************************/
  4. /* This file is part of: */
  5. /* GODOT ENGINE */
  6. /* https://godotengine.org */
  7. /**************************************************************************/
  8. /* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
  9. /* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
  10. /* */
  11. /* Permission is hereby granted, free of charge, to any person obtaining */
  12. /* a copy of this software and associated documentation files (the */
  13. /* "Software"), to deal in the Software without restriction, including */
  14. /* without limitation the rights to use, copy, modify, merge, publish, */
  15. /* distribute, sublicense, and/or sell copies of the Software, and to */
  16. /* permit persons to whom the Software is furnished to do so, subject to */
  17. /* the following conditions: */
  18. /* */
  19. /* The above copyright notice and this permission notice shall be */
  20. /* included in all copies or substantial portions of the Software. */
  21. /* */
  22. /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
  23. /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
  24. /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
  25. /* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
  26. /* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
  27. /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
  28. /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
  29. /**************************************************************************/
  30. #pragma once
  31. #include "core/string/node_path.h"
  32. #include "core/string/string_name.h"
  33. class SceneStringNames {
  34. inline static SceneStringNames *singleton = nullptr;
  35. public:
  36. static void create() { singleton = memnew(SceneStringNames); }
  37. static void free() {
  38. memdelete(singleton);
  39. singleton = nullptr;
  40. }
  41. _FORCE_INLINE_ static SceneStringNames *get_singleton() { return singleton; }
  42. const StringName resized = "resized";
  43. const StringName draw = "draw";
  44. const StringName hidden = "hidden";
  45. const StringName visibility_changed = "visibility_changed";
  46. const StringName input_event = "input_event";
  47. const StringName gui_input = "gui_input";
  48. const StringName window_input = "window_input";
  49. const StringName tree_entered = "tree_entered";
  50. const StringName tree_exiting = "tree_exiting";
  51. const StringName tree_exited = "tree_exited";
  52. const StringName ready = "ready";
  53. const StringName _ready = "_ready";
  54. const StringName item_rect_changed = "item_rect_changed";
  55. const StringName size_flags_changed = "size_flags_changed";
  56. const StringName minimum_size_changed = "minimum_size_changed";
  57. const StringName sleeping_state_changed = "sleeping_state_changed";
  58. const StringName node_configuration_warning_changed = "node_configuration_warning_changed";
  59. const StringName update = "update";
  60. const StringName updated = "updated";
  61. const StringName line_separation = "line_separation";
  62. const StringName font = "font";
  63. const StringName font_size = "font_size";
  64. const StringName font_color = "font_color";
  65. const StringName mouse_entered = "mouse_entered";
  66. const StringName mouse_exited = "mouse_exited";
  67. const StringName mouse_shape_entered = "mouse_shape_entered";
  68. const StringName mouse_shape_exited = "mouse_shape_exited";
  69. const StringName focus_entered = "focus_entered";
  70. const StringName focus_exited = "focus_exited";
  71. const StringName pre_sort_children = "pre_sort_children";
  72. const StringName sort_children = "sort_children";
  73. const StringName finished = "finished";
  74. const StringName animation_finished = "animation_finished";
  75. const StringName animation_changed = "animation_changed";
  76. const StringName animation_started = "animation_started";
  77. const StringName RESET = "RESET";
  78. const StringName pose_updated = "pose_updated";
  79. const StringName skeleton_updated = "skeleton_updated";
  80. const StringName bone_enabled_changed = "bone_enabled_changed";
  81. const StringName show_rest_only_changed = "show_rest_only_changed";
  82. const StringName body_shape_entered = "body_shape_entered";
  83. const StringName body_entered = "body_entered";
  84. const StringName body_shape_exited = "body_shape_exited";
  85. const StringName body_exited = "body_exited";
  86. const StringName area_shape_entered = "area_shape_entered";
  87. const StringName area_shape_exited = "area_shape_exited";
  88. const StringName screen_entered = "screen_entered";
  89. const StringName screen_exited = "screen_exited";
  90. const StringName _spatial_editor_group = "_spatial_editor_group";
  91. const StringName _request_gizmo = "_request_gizmo";
  92. const StringName offset = "offset";
  93. const StringName rotation_mode = "rotation_mode";
  94. const StringName rotate = "rotate";
  95. const StringName h_offset = "h_offset";
  96. const StringName v_offset = "v_offset";
  97. const StringName area_entered = "area_entered";
  98. const StringName area_exited = "area_exited";
  99. const StringName frame_changed = "frame_changed";
  100. const StringName texture_changed = "texture_changed";
  101. const StringName autoplay = "autoplay";
  102. const StringName blend_times = "blend_times";
  103. const StringName speed = "speed";
  104. const NodePath path_pp = NodePath("..");
  105. const StringName default_ = "default"; // default would conflict with C++ keyword.
  106. const StringName output = "output";
  107. const StringName Master = "Master"; // Audio bus name.
  108. const StringName theme_changed = "theme_changed";
  109. const StringName shader = "shader";
  110. const StringName shader_overrides_group = "_shader_overrides_group_";
  111. const StringName shader_overrides_group_active = "_shader_overrides_group_active_";
  112. const StringName _custom_type_script = "_custom_type_script";
  113. const StringName pressed = "pressed";
  114. const StringName id_pressed = "id_pressed";
  115. const StringName toggled = "toggled";
  116. const StringName hover = "hover";
  117. const StringName panel = "panel";
  118. const StringName item_selected = "item_selected";
  119. const StringName confirmed = "confirmed";
  120. const StringName text_changed = "text_changed";
  121. const StringName text_submitted = "text_submitted";
  122. const StringName value_changed = "value_changed";
  123. const StringName Start = "Start";
  124. const StringName End = "End";
  125. const StringName FlatButton = "FlatButton";
  126. };
  127. #define SceneStringName(m_name) SceneStringNames::get_singleton()->m_name