editor_inspector.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661
  1. /**************************************************************************/
  2. /* editor_inspector.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 EDITOR_INSPECTOR_H
  31. #define EDITOR_INSPECTOR_H
  32. #include "editor_property_name_processor.h"
  33. #include "scene/gui/box_container.h"
  34. #include "scene/gui/scroll_container.h"
  35. class AcceptDialog;
  36. class Button;
  37. class ConfirmationDialog;
  38. class EditorInspector;
  39. class EditorValidationPanel;
  40. class LineEdit;
  41. class MarginContainer;
  42. class OptionButton;
  43. class PanelContainer;
  44. class PopupMenu;
  45. class SpinBox;
  46. class StyleBoxFlat;
  47. class TextureRect;
  48. class EditorPropertyRevert {
  49. public:
  50. static Variant get_property_revert_value(Object *p_object, const StringName &p_property, bool *r_is_valid);
  51. static bool can_property_revert(Object *p_object, const StringName &p_property, const Variant *p_custom_current_value = nullptr);
  52. };
  53. class EditorProperty : public Container {
  54. GDCLASS(EditorProperty, Container);
  55. public:
  56. enum MenuItems {
  57. MENU_COPY_VALUE,
  58. MENU_PASTE_VALUE,
  59. MENU_COPY_PROPERTY_PATH,
  60. MENU_PIN_VALUE,
  61. MENU_OPEN_DOCUMENTATION,
  62. };
  63. enum ColorationMode {
  64. COLORATION_CONTAINER_RESOURCE,
  65. COLORATION_RESOURCE,
  66. COLORATION_EXTERNAL,
  67. };
  68. private:
  69. String label;
  70. int text_size;
  71. friend class EditorInspector;
  72. Object *object = nullptr;
  73. StringName property;
  74. String property_path;
  75. String doc_path;
  76. bool internal = false;
  77. bool has_doc_tooltip = false;
  78. int property_usage;
  79. bool read_only = false;
  80. bool checkable = false;
  81. bool checked = false;
  82. bool draw_warning = false;
  83. bool draw_prop_warning = false;
  84. bool keying = false;
  85. bool deletable = false;
  86. Rect2 right_child_rect;
  87. Rect2 bottom_child_rect;
  88. Rect2 keying_rect;
  89. bool keying_hover = false;
  90. Rect2 revert_rect;
  91. bool revert_hover = false;
  92. Rect2 check_rect;
  93. bool check_hover = false;
  94. Rect2 delete_rect;
  95. bool delete_hover = false;
  96. bool can_revert = false;
  97. bool can_pin = false;
  98. bool pin_hidden = false;
  99. bool pinned = false;
  100. bool use_folding = false;
  101. bool draw_top_bg = true;
  102. void _update_popup();
  103. void _focusable_focused(int p_index);
  104. bool selectable = true;
  105. bool selected = false;
  106. int selected_focusable;
  107. float split_ratio;
  108. Vector<Control *> focusables;
  109. Control *label_reference = nullptr;
  110. Control *bottom_editor = nullptr;
  111. PopupMenu *menu = nullptr;
  112. HashMap<StringName, Variant> cache;
  113. GDVIRTUAL0(_update_property)
  114. GDVIRTUAL1(_set_read_only, bool)
  115. void _update_pin_flags();
  116. protected:
  117. bool has_borders = false;
  118. void _notification(int p_what);
  119. static void _bind_methods();
  120. virtual void _set_read_only(bool p_read_only);
  121. virtual void gui_input(const Ref<InputEvent> &p_event) override;
  122. virtual void shortcut_input(const Ref<InputEvent> &p_event) override;
  123. const Color *_get_property_colors();
  124. virtual Variant _get_cache_value(const StringName &p_prop, bool &r_valid) const;
  125. virtual StringName _get_revert_property() const;
  126. void _update_property_bg();
  127. public:
  128. void emit_changed(const StringName &p_property, const Variant &p_value, const StringName &p_field = StringName(), bool p_changing = false);
  129. virtual Size2 get_minimum_size() const override;
  130. void set_label(const String &p_label);
  131. String get_label() const;
  132. void set_read_only(bool p_read_only);
  133. bool is_read_only() const;
  134. Object *get_edited_object();
  135. StringName get_edited_property() const;
  136. inline Variant get_edited_property_value() const { return object->get(property); }
  137. EditorInspector *get_parent_inspector() const;
  138. void set_doc_path(const String &p_doc_path);
  139. void set_internal(bool p_internal);
  140. virtual void update_property();
  141. void update_editor_property_status();
  142. virtual bool use_keying_next() const;
  143. void set_checkable(bool p_checkable);
  144. bool is_checkable() const;
  145. void set_checked(bool p_checked);
  146. bool is_checked() const;
  147. void set_draw_warning(bool p_draw_warning);
  148. bool is_draw_warning() const;
  149. void set_keying(bool p_keying);
  150. bool is_keying() const;
  151. virtual bool is_colored(ColorationMode p_mode) { return false; }
  152. void set_deletable(bool p_enable);
  153. bool is_deletable() const;
  154. void add_focusable(Control *p_control);
  155. void grab_focus(int p_focusable = -1);
  156. void select(int p_focusable = -1);
  157. void deselect();
  158. bool is_selected() const;
  159. void set_label_reference(Control *p_control);
  160. void set_bottom_editor(Control *p_control);
  161. void set_use_folding(bool p_use_folding);
  162. bool is_using_folding() const;
  163. virtual void expand_all_folding();
  164. virtual void collapse_all_folding();
  165. virtual void expand_revertable();
  166. virtual Variant get_drag_data(const Point2 &p_point) override;
  167. virtual void update_cache();
  168. virtual bool is_cache_valid() const;
  169. void set_selectable(bool p_selectable);
  170. bool is_selectable() const;
  171. void set_name_split_ratio(float p_ratio);
  172. float get_name_split_ratio() const;
  173. void set_object_and_property(Object *p_object, const StringName &p_property);
  174. virtual Control *make_custom_tooltip(const String &p_text) const override;
  175. void set_draw_top_bg(bool p_draw) { draw_top_bg = p_draw; }
  176. bool can_revert_to_default() const { return can_revert; }
  177. void menu_option(int p_option);
  178. EditorProperty();
  179. };
  180. class EditorInspectorPlugin : public RefCounted {
  181. GDCLASS(EditorInspectorPlugin, RefCounted);
  182. public:
  183. friend class EditorInspector;
  184. struct AddedEditor {
  185. Control *property_editor = nullptr;
  186. Vector<String> properties;
  187. String label;
  188. bool add_to_end = false;
  189. };
  190. List<AddedEditor> added_editors;
  191. protected:
  192. static void _bind_methods();
  193. GDVIRTUAL1RC(bool, _can_handle, Object *)
  194. GDVIRTUAL1(_parse_begin, Object *)
  195. GDVIRTUAL2(_parse_category, Object *, String)
  196. GDVIRTUAL2(_parse_group, Object *, String)
  197. GDVIRTUAL7R(bool, _parse_property, Object *, Variant::Type, String, PropertyHint, String, BitField<PropertyUsageFlags>, bool)
  198. GDVIRTUAL1(_parse_end, Object *)
  199. #ifndef DISABLE_DEPRECATED
  200. void _add_property_editor_bind_compat_92322(const String &p_for_property, Control *p_prop, bool p_add_to_end);
  201. static void _bind_compatibility_methods();
  202. #endif // DISABLE_DEPRECATED
  203. public:
  204. void add_custom_control(Control *control);
  205. void add_property_editor(const String &p_for_property, Control *p_prop, bool p_add_to_end = false, const String &p_label = String());
  206. void add_property_editor_for_multiple_properties(const String &p_label, const Vector<String> &p_properties, Control *p_prop);
  207. virtual bool can_handle(Object *p_object);
  208. virtual void parse_begin(Object *p_object);
  209. virtual void parse_category(Object *p_object, const String &p_category);
  210. virtual void parse_group(Object *p_object, const String &p_group);
  211. virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide = false);
  212. virtual void parse_end(Object *p_object);
  213. };
  214. class EditorInspectorCategory : public Control {
  215. GDCLASS(EditorInspectorCategory, Control);
  216. friend class EditorInspector;
  217. // Right-click context menu options.
  218. enum ClassMenuOption {
  219. MENU_OPEN_DOCS,
  220. };
  221. Ref<Texture2D> icon;
  222. String label;
  223. String doc_class_name;
  224. PopupMenu *menu = nullptr;
  225. void _handle_menu_option(int p_option);
  226. protected:
  227. void _notification(int p_what);
  228. virtual void gui_input(const Ref<InputEvent> &p_event) override;
  229. public:
  230. virtual Size2 get_minimum_size() const override;
  231. virtual Control *make_custom_tooltip(const String &p_text) const override;
  232. EditorInspectorCategory();
  233. };
  234. class EditorInspectorSection : public Container {
  235. GDCLASS(EditorInspectorSection, Container);
  236. String label;
  237. String section;
  238. bool vbox_added = false; // Optimization.
  239. Color bg_color;
  240. bool foldable = false;
  241. int indent_depth = 0;
  242. int level = 1;
  243. Timer *dropping_unfold_timer = nullptr;
  244. bool dropping = false;
  245. bool dropping_for_unfold = false;
  246. HashSet<StringName> revertable_properties;
  247. void _test_unfold();
  248. int _get_header_height();
  249. Ref<Texture2D> _get_arrow();
  250. protected:
  251. Object *object = nullptr;
  252. VBoxContainer *vbox = nullptr;
  253. void _notification(int p_what);
  254. static void _bind_methods();
  255. virtual void gui_input(const Ref<InputEvent> &p_event) override;
  256. public:
  257. virtual Size2 get_minimum_size() const override;
  258. void setup(const String &p_section, const String &p_label, Object *p_object, const Color &p_bg_color, bool p_foldable, int p_indent_depth = 0, int p_level = 1);
  259. VBoxContainer *get_vbox();
  260. void unfold();
  261. void fold();
  262. void set_bg_color(const Color &p_bg_color);
  263. bool has_revertable_properties() const;
  264. void property_can_revert_changed(const String &p_path, bool p_can_revert);
  265. EditorInspectorSection();
  266. ~EditorInspectorSection();
  267. };
  268. class EditorInspectorArray : public EditorInspectorSection {
  269. GDCLASS(EditorInspectorArray, EditorInspectorSection);
  270. enum Mode {
  271. MODE_NONE,
  272. MODE_USE_COUNT_PROPERTY,
  273. MODE_USE_MOVE_ARRAY_ELEMENT_FUNCTION,
  274. } mode = MODE_NONE;
  275. StringName count_property;
  276. StringName array_element_prefix;
  277. String swap_method;
  278. int count = 0;
  279. VBoxContainer *elements_vbox = nullptr;
  280. Control *control_dropping = nullptr;
  281. bool dropping = false;
  282. Button *add_button = nullptr;
  283. AcceptDialog *resize_dialog = nullptr;
  284. SpinBox *new_size_spin_box = nullptr;
  285. // Pagination.
  286. int page_length = 5;
  287. int page = 0;
  288. int max_page = 0;
  289. int begin_array_index = 0;
  290. int end_array_index = 0;
  291. bool read_only = false;
  292. bool movable = true;
  293. bool numbered = false;
  294. enum MenuOptions {
  295. OPTION_MOVE_UP = 0,
  296. OPTION_MOVE_DOWN,
  297. OPTION_NEW_BEFORE,
  298. OPTION_NEW_AFTER,
  299. OPTION_REMOVE,
  300. OPTION_CLEAR_ARRAY,
  301. OPTION_RESIZE_ARRAY,
  302. };
  303. int popup_array_index_pressed = -1;
  304. PopupMenu *rmb_popup = nullptr;
  305. struct ArrayElement {
  306. PanelContainer *panel = nullptr;
  307. MarginContainer *margin = nullptr;
  308. HBoxContainer *hbox = nullptr;
  309. Button *move_up = nullptr;
  310. TextureRect *move_texture_rect = nullptr;
  311. Button *move_down = nullptr;
  312. Label *number = nullptr;
  313. VBoxContainer *vbox = nullptr;
  314. Button *erase = nullptr;
  315. };
  316. LocalVector<ArrayElement> array_elements;
  317. Ref<StyleBoxFlat> odd_style;
  318. Ref<StyleBoxFlat> even_style;
  319. int _get_array_count();
  320. void _add_button_pressed();
  321. void _paginator_page_changed(int p_page);
  322. void _rmb_popup_id_pressed(int p_id);
  323. void _control_dropping_draw();
  324. void _vbox_visibility_changed();
  325. void _panel_draw(int p_index);
  326. void _panel_gui_input(Ref<InputEvent> p_event, int p_index);
  327. void _move_element(int p_element_index, int p_to_pos);
  328. void _clear_array();
  329. void _resize_array(int p_size);
  330. Array _extract_properties_as_array(const List<PropertyInfo> &p_list);
  331. int _drop_position() const;
  332. void _new_size_spin_box_value_changed(float p_value);
  333. void _new_size_spin_box_text_submitted(const String &p_text);
  334. void _resize_dialog_confirmed();
  335. void _update_elements_visibility();
  336. void _setup();
  337. Variant get_drag_data_fw(const Point2 &p_point, Control *p_from);
  338. void drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from);
  339. bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const;
  340. void _remove_item(int p_index);
  341. protected:
  342. void _notification(int p_what);
  343. static void _bind_methods();
  344. public:
  345. void setup_with_move_element_function(Object *p_object, const String &p_label, const StringName &p_array_element_prefix, int p_page, const Color &p_bg_color, bool p_foldable, bool p_movable = true, bool p_numbered = false, int p_page_length = 5, const String &p_add_item_text = "");
  346. void setup_with_count_property(Object *p_object, const String &p_label, const StringName &p_count_property, const StringName &p_array_element_prefix, int p_page, const Color &p_bg_color, bool p_foldable, bool p_movable = true, bool p_numbered = false, int p_page_length = 5, const String &p_add_item_text = "", const String &p_swap_method = "");
  347. VBoxContainer *get_vbox(int p_index);
  348. EditorInspectorArray(bool p_read_only);
  349. };
  350. class EditorPaginator : public HBoxContainer {
  351. GDCLASS(EditorPaginator, HBoxContainer);
  352. int page = 0;
  353. int max_page = 0;
  354. Button *first_page_button = nullptr;
  355. Button *prev_page_button = nullptr;
  356. LineEdit *page_line_edit = nullptr;
  357. Label *page_count_label = nullptr;
  358. Button *next_page_button = nullptr;
  359. Button *last_page_button = nullptr;
  360. void _first_page_button_pressed();
  361. void _prev_page_button_pressed();
  362. void _page_line_edit_text_submitted(const String &p_text);
  363. void _next_page_button_pressed();
  364. void _last_page_button_pressed();
  365. protected:
  366. void _notification(int p_what);
  367. static void _bind_methods();
  368. public:
  369. void update(int p_page, int p_max_page);
  370. EditorPaginator();
  371. };
  372. class EditorInspector : public ScrollContainer {
  373. GDCLASS(EditorInspector, ScrollContainer);
  374. enum {
  375. MAX_PLUGINS = 1024
  376. };
  377. static Ref<EditorInspectorPlugin> inspector_plugins[MAX_PLUGINS];
  378. static int inspector_plugin_count;
  379. VBoxContainer *main_vbox = nullptr;
  380. // Map used to cache the instantiated editors.
  381. HashMap<StringName, List<EditorProperty *>> editor_property_map;
  382. List<EditorInspectorSection *> sections;
  383. HashSet<StringName> pending;
  384. void _clear(bool p_hide_plugins = true);
  385. Object *object = nullptr;
  386. Object *next_object = nullptr;
  387. //
  388. LineEdit *search_box = nullptr;
  389. bool show_standard_categories = false;
  390. bool show_custom_categories = false;
  391. bool hide_script = true;
  392. bool hide_metadata = true;
  393. bool use_doc_hints = false;
  394. EditorPropertyNameProcessor::Style property_name_style = EditorPropertyNameProcessor::STYLE_CAPITALIZED;
  395. bool use_settings_name_style = true;
  396. bool use_filter = false;
  397. bool autoclear = false;
  398. bool use_folding = false;
  399. int changing;
  400. bool update_all_pending = false;
  401. bool read_only = false;
  402. bool keying = false;
  403. bool sub_inspector = false;
  404. bool wide_editors = false;
  405. bool deletable_properties = false;
  406. float refresh_countdown;
  407. bool update_tree_pending = false;
  408. StringName _prop_edited;
  409. StringName property_selected;
  410. int property_focusable;
  411. int update_scroll_request;
  412. struct DocCacheInfo {
  413. String doc_path;
  414. String theme_item_name;
  415. };
  416. HashMap<StringName, HashMap<StringName, DocCacheInfo>> doc_cache;
  417. HashSet<StringName> restart_request_props;
  418. HashMap<String, String> custom_property_descriptions;
  419. HashMap<ObjectID, int> scroll_cache;
  420. String property_prefix; // Used for sectioned inspector.
  421. String object_class;
  422. Variant property_clipboard;
  423. bool restrict_to_basic = false;
  424. void _edit_set(const String &p_name, const Variant &p_value, bool p_refresh_all, const String &p_changed_field);
  425. void _property_changed(const String &p_path, const Variant &p_value, const String &p_name = "", bool p_changing = false, bool p_update_all = false);
  426. void _multiple_properties_changed(const Vector<String> &p_paths, const Array &p_values, bool p_changing = false);
  427. void _property_keyed(const String &p_path, bool p_advance);
  428. void _property_keyed_with_value(const String &p_path, const Variant &p_value, bool p_advance);
  429. void _property_deleted(const String &p_path);
  430. void _property_checked(const String &p_path, bool p_checked);
  431. void _property_pinned(const String &p_path, bool p_pinned);
  432. bool _property_path_matches(const String &p_property_path, const String &p_filter, EditorPropertyNameProcessor::Style p_style);
  433. void _resource_selected(const String &p_path, Ref<Resource> p_resource);
  434. void _property_selected(const String &p_path, int p_focusable);
  435. void _object_id_selected(const String &p_path, ObjectID p_id);
  436. void _node_removed(Node *p_node);
  437. HashMap<StringName, int> per_array_page;
  438. void _page_change_request(int p_new_page, const StringName &p_array_prefix);
  439. void _changed_callback();
  440. void _edit_request_change(Object *p_object, const String &p_prop);
  441. void _keying_changed();
  442. void _filter_changed(const String &p_text);
  443. void _parse_added_editors(VBoxContainer *current_vbox, EditorInspectorSection *p_section, Ref<EditorInspectorPlugin> ped);
  444. void _vscroll_changed(double);
  445. void _feature_profile_changed();
  446. bool _is_property_disabled_by_feature_profile(const StringName &p_property);
  447. ConfirmationDialog *add_meta_dialog = nullptr;
  448. LineEdit *add_meta_name = nullptr;
  449. OptionButton *add_meta_type = nullptr;
  450. EditorValidationPanel *validation_panel = nullptr;
  451. void _add_meta_confirm();
  452. void _show_add_meta_dialog();
  453. void _check_meta_name();
  454. protected:
  455. static void _bind_methods();
  456. void _notification(int p_what);
  457. public:
  458. static void add_inspector_plugin(const Ref<EditorInspectorPlugin> &p_plugin);
  459. static void remove_inspector_plugin(const Ref<EditorInspectorPlugin> &p_plugin);
  460. static void cleanup_plugins();
  461. static Button *create_inspector_action_button(const String &p_text);
  462. static EditorProperty *instantiate_property_editor(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false);
  463. bool is_main_editor_inspector() const;
  464. String get_selected_path() const;
  465. void update_tree();
  466. void update_property(const String &p_prop);
  467. void edit(Object *p_object);
  468. Object *get_edited_object();
  469. Object *get_next_edited_object();
  470. void set_keying(bool p_active);
  471. void set_read_only(bool p_read_only);
  472. EditorPropertyNameProcessor::Style get_property_name_style() const;
  473. void set_property_name_style(EditorPropertyNameProcessor::Style p_style);
  474. // If true, the inspector will update its property name style according to the current editor settings.
  475. void set_use_settings_name_style(bool p_enable);
  476. void set_autoclear(bool p_enable);
  477. void set_show_categories(bool p_show_standard, bool p_show_custom);
  478. void set_use_doc_hints(bool p_enable);
  479. void set_hide_script(bool p_hide);
  480. void set_hide_metadata(bool p_hide);
  481. void set_use_filter(bool p_use);
  482. void register_text_enter(Node *p_line_edit);
  483. void set_use_folding(bool p_use_folding, bool p_update_tree = true);
  484. bool is_using_folding();
  485. void collapse_all_folding();
  486. void expand_all_folding();
  487. void expand_revertable();
  488. void set_scroll_offset(int p_offset);
  489. int get_scroll_offset() const;
  490. void set_property_prefix(const String &p_prefix);
  491. String get_property_prefix() const;
  492. void add_custom_property_description(const String &p_class, const String &p_property, const String &p_description);
  493. String get_custom_property_description(const String &p_property) const;
  494. void set_object_class(const String &p_class);
  495. String get_object_class() const;
  496. void set_use_wide_editors(bool p_enable);
  497. void set_sub_inspector(bool p_enable);
  498. bool is_sub_inspector() const { return sub_inspector; }
  499. void set_use_deletable_properties(bool p_enabled);
  500. void set_restrict_to_basic_settings(bool p_restrict);
  501. void set_property_clipboard(const Variant &p_value);
  502. Variant get_property_clipboard() const;
  503. EditorInspector();
  504. };
  505. #endif // EDITOR_INSPECTOR_H