scene_string_names.h 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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. #ifndef SCENE_STRING_NAMES_H
  31. #define SCENE_STRING_NAMES_H
  32. #include "core/string/node_path.h"
  33. #include "core/string/string_name.h"
  34. class SceneStringNames {
  35. inline static SceneStringNames *singleton = nullptr;
  36. public:
  37. static void create() { singleton = memnew(SceneStringNames); }
  38. static void free() {
  39. memdelete(singleton);
  40. singleton = nullptr;
  41. }
  42. _FORCE_INLINE_ static SceneStringNames *get_singleton() { return singleton; }
  43. const StringName resized = StaticCString::create("resized");
  44. const StringName draw = StaticCString::create("draw");
  45. const StringName hidden = StaticCString::create("hidden");
  46. const StringName visibility_changed = StaticCString::create("visibility_changed");
  47. const StringName input_event = StaticCString::create("input_event");
  48. const StringName gui_input = StaticCString::create("gui_input");
  49. const StringName window_input = StaticCString::create("window_input");
  50. const StringName tree_entered = StaticCString::create("tree_entered");
  51. const StringName tree_exiting = StaticCString::create("tree_exiting");
  52. const StringName tree_exited = StaticCString::create("tree_exited");
  53. const StringName ready = StaticCString::create("ready");
  54. const StringName _ready = StaticCString::create("_ready");
  55. const StringName item_rect_changed = StaticCString::create("item_rect_changed");
  56. const StringName size_flags_changed = StaticCString::create("size_flags_changed");
  57. const StringName minimum_size_changed = StaticCString::create("minimum_size_changed");
  58. const StringName sleeping_state_changed = StaticCString::create("sleeping_state_changed");
  59. const StringName node_configuration_warning_changed = StaticCString::create("node_configuration_warning_changed");
  60. const StringName update = StaticCString::create("update");
  61. const StringName updated = StaticCString::create("updated");
  62. const StringName line_separation = StaticCString::create("line_separation");
  63. const StringName font = StaticCString::create("font");
  64. const StringName font_size = StaticCString::create("font_size");
  65. const StringName font_color = StaticCString::create("font_color");
  66. const StringName mouse_entered = StaticCString::create("mouse_entered");
  67. const StringName mouse_exited = StaticCString::create("mouse_exited");
  68. const StringName mouse_shape_entered = StaticCString::create("mouse_shape_entered");
  69. const StringName mouse_shape_exited = StaticCString::create("mouse_shape_exited");
  70. const StringName focus_entered = StaticCString::create("focus_entered");
  71. const StringName focus_exited = StaticCString::create("focus_exited");
  72. const StringName pre_sort_children = StaticCString::create("pre_sort_children");
  73. const StringName sort_children = StaticCString::create("sort_children");
  74. const StringName finished = StaticCString::create("finished");
  75. const StringName animation_finished = StaticCString::create("animation_finished");
  76. const StringName animation_changed = StaticCString::create("animation_changed");
  77. const StringName animation_started = StaticCString::create("animation_started");
  78. const StringName RESET = StaticCString::create("RESET");
  79. const StringName pose_updated = StaticCString::create("pose_updated");
  80. const StringName skeleton_updated = StaticCString::create("skeleton_updated");
  81. const StringName bone_enabled_changed = StaticCString::create("bone_enabled_changed");
  82. const StringName show_rest_only_changed = StaticCString::create("show_rest_only_changed");
  83. const StringName body_shape_entered = StaticCString::create("body_shape_entered");
  84. const StringName body_entered = StaticCString::create("body_entered");
  85. const StringName body_shape_exited = StaticCString::create("body_shape_exited");
  86. const StringName body_exited = StaticCString::create("body_exited");
  87. const StringName area_shape_entered = StaticCString::create("area_shape_entered");
  88. const StringName area_shape_exited = StaticCString::create("area_shape_exited");
  89. const StringName screen_entered = StaticCString::create("screen_entered");
  90. const StringName screen_exited = StaticCString::create("screen_exited");
  91. const StringName _spatial_editor_group = StaticCString::create("_spatial_editor_group");
  92. const StringName _request_gizmo = StaticCString::create("_request_gizmo");
  93. const StringName offset = StaticCString::create("offset");
  94. const StringName rotation_mode = StaticCString::create("rotation_mode");
  95. const StringName rotate = StaticCString::create("rotate");
  96. const StringName h_offset = StaticCString::create("h_offset");
  97. const StringName v_offset = StaticCString::create("v_offset");
  98. const StringName area_entered = StaticCString::create("area_entered");
  99. const StringName area_exited = StaticCString::create("area_exited");
  100. const StringName frame_changed = StaticCString::create("frame_changed");
  101. const StringName texture_changed = StaticCString::create("texture_changed");
  102. const StringName autoplay = StaticCString::create("autoplay");
  103. const StringName blend_times = StaticCString::create("blend_times");
  104. const StringName speed = StaticCString::create("speed");
  105. const NodePath path_pp = NodePath("..");
  106. const StringName default_ = StaticCString::create("default"); // default would conflict with C++ keyword.
  107. const StringName output = StaticCString::create("output");
  108. const StringName Master = StaticCString::create("Master"); // Audio bus name.
  109. const StringName theme_changed = StaticCString::create("theme_changed");
  110. const StringName shader = StaticCString::create("shader");
  111. const StringName shader_overrides_group = StaticCString::create("_shader_overrides_group_");
  112. const StringName shader_overrides_group_active = StaticCString::create("_shader_overrides_group_active_");
  113. const StringName _custom_type_script = StaticCString::create("_custom_type_script");
  114. const StringName pressed = StaticCString::create("pressed");
  115. const StringName id_pressed = StaticCString::create("id_pressed");
  116. const StringName toggled = StaticCString::create("toggled");
  117. const StringName hover = StaticCString::create("hover");
  118. const StringName panel = StaticCString::create("panel");
  119. const StringName item_selected = StaticCString::create("item_selected");
  120. const StringName confirmed = StaticCString::create("confirmed");
  121. const StringName text_changed = StaticCString::create("text_changed");
  122. const StringName text_submitted = StaticCString::create("text_submitted");
  123. const StringName value_changed = StaticCString::create("value_changed");
  124. const StringName Start = StaticCString::create("Start");
  125. const StringName End = StaticCString::create("End");
  126. const StringName FlatButton = StaticCString::create("FlatButton");
  127. };
  128. #define SceneStringName(m_name) SceneStringNames::get_singleton()->m_name
  129. #endif // SCENE_STRING_NAMES_H