Path: blob/master/editor/inspector/editor_inspector.h
9900 views
/**************************************************************************/1/* editor_inspector.h */2/**************************************************************************/3/* This file is part of: */4/* GODOT ENGINE */5/* https://godotengine.org */6/**************************************************************************/7/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */8/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */9/* */10/* Permission is hereby granted, free of charge, to any person obtaining */11/* a copy of this software and associated documentation files (the */12/* "Software"), to deal in the Software without restriction, including */13/* without limitation the rights to use, copy, modify, merge, publish, */14/* distribute, sublicense, and/or sell copies of the Software, and to */15/* permit persons to whom the Software is furnished to do so, subject to */16/* the following conditions: */17/* */18/* The above copyright notice and this permission notice shall be */19/* included in all copies or substantial portions of the Software. */20/* */21/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */22/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */23/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */24/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */25/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */26/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */27/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */28/**************************************************************************/2930#pragma once3132#include "editor/inspector/editor_property_name_processor.h"33#include "scene/gui/box_container.h"34#include "scene/gui/button.h"35#include "scene/gui/panel_container.h"36#include "scene/gui/scroll_container.h"3738class AddMetadataDialog;39class AcceptDialog;40class ConfirmationDialog;41class EditorInspector;42class EditorValidationPanel;43class HSeparator;44class LineEdit;45class MarginContainer;46class OptionButton;47class PanelContainer;48class PopupMenu;49class SpinBox;50class StyleBoxFlat;51class TextureRect;5253class EditorPropertyRevert {54public:55static Variant get_property_revert_value(Object *p_object, const StringName &p_property, bool *r_is_valid);56static bool can_property_revert(Object *p_object, const StringName &p_property, const Variant *p_custom_current_value = nullptr);57};5859class EditorInspectorActionButton : public Button {60GDCLASS(EditorInspectorActionButton, Button);6162StringName icon_name;6364protected:65void _notification(int p_what);6667public:68EditorInspectorActionButton(const String &p_text, const StringName &p_icon_name);69};7071class EditorProperty : public Container {72GDCLASS(EditorProperty, Container);7374public:75enum MenuItems {76MENU_COPY_VALUE,77MENU_PASTE_VALUE,78MENU_COPY_PROPERTY_PATH,79MENU_OVERRIDE_FOR_PROJECT,80MENU_FAVORITE_PROPERTY,81MENU_PIN_VALUE,82MENU_DELETE,83MENU_REVERT_VALUE,84MENU_OPEN_DOCUMENTATION,85};8687enum ColorationMode {88COLORATION_CONTAINER_RESOURCE,89COLORATION_RESOURCE,90COLORATION_EXTERNAL,91};9293private:94String label;95int text_size;96friend class EditorInspector;97Object *object = nullptr;98StringName property;99String property_path;100String doc_path;101bool internal = false;102bool has_doc_tooltip = false;103104int property_usage;105106bool draw_label = true;107bool draw_background = true;108bool read_only = false;109bool checkable = false;110bool checked = false;111bool draw_warning = false;112bool draw_prop_warning = false;113bool keying = false;114bool deletable = false;115116Rect2 right_child_rect;117Rect2 bottom_child_rect;118119Rect2 keying_rect;120bool keying_hover = false;121Rect2 revert_rect;122bool revert_hover = false;123Rect2 check_rect;124bool check_hover = false;125Rect2 delete_rect;126bool delete_hover = false;127128bool can_revert = false;129bool can_pin = false;130bool pin_hidden = false;131bool pinned = false;132133bool can_favorite = false;134bool favorited = false;135136bool use_folding = false;137bool draw_top_bg = true;138139void _update_popup();140void _focusable_focused(int p_index);141142bool selectable = true;143bool selected = false;144int selected_focusable;145146float split_ratio;147148Vector<Control *> focusables;149Control *label_reference = nullptr;150Control *bottom_editor = nullptr;151PopupMenu *menu = nullptr;152153HashMap<StringName, Variant> cache;154155GDVIRTUAL0(_update_property)156GDVIRTUAL1(_set_read_only, bool)157158void _update_flags();159160protected:161bool has_borders = false;162bool can_override = false;163164void _notification(int p_what);165static void _bind_methods();166virtual void _set_read_only(bool p_read_only);167168virtual void gui_input(const Ref<InputEvent> &p_event) override;169virtual void shortcut_input(const Ref<InputEvent> &p_event) override;170const Color *_get_property_colors();171172virtual Variant _get_cache_value(const StringName &p_prop, bool &r_valid) const;173virtual StringName _get_revert_property() const;174175void _update_property_bg();176177void _accessibility_action_menu(const Variant &p_data);178void _accessibility_action_click(const Variant &p_data);179180public:181void emit_changed(const StringName &p_property, const Variant &p_value, const StringName &p_field = StringName(), bool p_changing = false);182183String get_tooltip_string(const String &p_string) const;184185virtual Size2 get_minimum_size() const override;186187void set_label(const String &p_label);188String get_label() const;189190void set_read_only(bool p_read_only);191bool is_read_only() const;192193void set_draw_label(bool p_draw_label);194bool is_draw_label() const;195196void set_draw_background(bool p_draw_background);197bool is_draw_background() const;198199Object *get_edited_object();200StringName get_edited_property() const;201inline Variant get_edited_property_value() const {202ERR_FAIL_NULL_V(object, Variant());203return object->get(property);204}205Variant get_edited_property_display_value() const;206EditorInspector *get_parent_inspector() const;207208void set_doc_path(const String &p_doc_path);209void set_internal(bool p_internal);210211virtual void update_property();212void update_editor_property_status();213214virtual bool use_keying_next() const;215216void set_checkable(bool p_checkable);217bool is_checkable() const;218219void set_checked(bool p_checked);220bool is_checked() const;221222void set_draw_warning(bool p_draw_warning);223bool is_draw_warning() const;224225void set_keying(bool p_keying);226bool is_keying() const;227228virtual bool is_colored(ColorationMode p_mode) { return false; }229230void set_deletable(bool p_enable);231bool is_deletable() const;232void add_focusable(Control *p_control);233void grab_focus(int p_focusable = -1);234void select(int p_focusable = -1);235void deselect();236bool is_selected() const;237238void set_label_reference(Control *p_control);239void set_bottom_editor(Control *p_control);240241void set_use_folding(bool p_use_folding);242bool is_using_folding() const;243244virtual void expand_all_folding();245virtual void collapse_all_folding();246virtual void expand_revertable();247248virtual Variant get_drag_data(const Point2 &p_point) override;249virtual void update_cache();250virtual bool is_cache_valid() const;251252void set_selectable(bool p_selectable);253bool is_selectable() const;254255void set_name_split_ratio(float p_ratio);256float get_name_split_ratio() const;257258void set_favoritable(bool p_favoritable);259bool is_favoritable() const;260261void set_object_and_property(Object *p_object, const StringName &p_property);262virtual Control *make_custom_tooltip(const String &p_text) const override;263264void set_draw_top_bg(bool p_draw) { draw_top_bg = p_draw; }265266bool can_revert_to_default() const { return can_revert; }267268void menu_option(int p_option);269270EditorProperty();271};272273class EditorInspectorPlugin : public RefCounted {274GDCLASS(EditorInspectorPlugin, RefCounted);275276public:277friend class EditorInspector;278struct AddedEditor {279Control *property_editor = nullptr;280Vector<String> properties;281String label;282bool add_to_end = false;283};284285List<AddedEditor> added_editors;286287protected:288static void _bind_methods();289290GDVIRTUAL1RC(bool, _can_handle, Object *)291GDVIRTUAL1(_parse_begin, Object *)292GDVIRTUAL2(_parse_category, Object *, String)293GDVIRTUAL2(_parse_group, Object *, String)294GDVIRTUAL7R(bool, _parse_property, Object *, Variant::Type, String, PropertyHint, String, BitField<PropertyUsageFlags>, bool)295GDVIRTUAL1(_parse_end, Object *)296297#ifndef DISABLE_DEPRECATED298void _add_property_editor_bind_compat_92322(const String &p_for_property, Control *p_prop, bool p_add_to_end);299static void _bind_compatibility_methods();300#endif // DISABLE_DEPRECATED301public:302void add_custom_control(Control *control);303void add_property_editor(const String &p_for_property, Control *p_prop, bool p_add_to_end = false, const String &p_label = String());304void add_property_editor_for_multiple_properties(const String &p_label, const Vector<String> &p_properties, Control *p_prop);305306virtual bool can_handle(Object *p_object);307virtual void parse_begin(Object *p_object);308virtual void parse_category(Object *p_object, const String &p_category);309virtual void parse_group(Object *p_object, const String &p_group);310virtual 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);311virtual void parse_end(Object *p_object);312};313314class EditorInspectorCategory : public Control {315GDCLASS(EditorInspectorCategory, Control);316317friend class EditorInspector;318319// Right-click context menu options.320enum ClassMenuOption {321MENU_OPEN_DOCS,322MENU_UNFAVORITE_ALL,323};324325struct ThemeCache {326int horizontal_separation = 0;327int vertical_separation = 0;328int class_icon_size = 0;329330Color font_color;331332Ref<Font> bold_font;333int bold_font_size = 0;334335Ref<Texture2D> icon_favorites;336Ref<Texture2D> icon_unfavorite;337Ref<Texture2D> icon_help;338339Ref<StyleBox> background;340} theme_cache;341342PropertyInfo info;343344Ref<Texture2D> icon;345String label;346String doc_class_name;347PopupMenu *menu = nullptr;348bool is_favorite = false;349bool menu_icon_dirty = true;350351void _handle_menu_option(int p_option);352void _popup_context_menu(const Point2i &p_position);353void _update_icon();354355protected:356static void _bind_methods();357358void _notification(int p_what);359virtual void gui_input(const Ref<InputEvent> &p_event) override;360361void _accessibility_action_menu(const Variant &p_data);362363public:364void set_as_favorite();365void set_property_info(const PropertyInfo &p_info);366void set_doc_class_name(const String &p_name);367368virtual Size2 get_minimum_size() const override;369virtual Control *make_custom_tooltip(const String &p_text) const override;370371EditorInspectorCategory();372};373374class EditorInspectorSection : public Container {375GDCLASS(EditorInspectorSection, Container);376377friend class EditorInspector;378379String label;380String section;381Color bg_color;382bool vbox_added = false; // Optimization.383bool foldable = false;384bool checkable = false;385bool checked = false;386bool keying = false;387int indent_depth = 0;388int level = 1;389String related_enable_property;390391Timer *dropping_unfold_timer = nullptr;392bool dropping_for_unfold = false;393394Rect2 check_rect;395bool check_hover = false;396Rect2 keying_rect;397bool keying_hover = false;398bool header_hover = false;399400bool checkbox_only = false;401402HashSet<StringName> revertable_properties;403404void _test_unfold();405int _get_header_height();406Ref<Texture2D> _get_arrow();407Ref<Texture2D> _get_checkbox();408409EditorInspector *_get_parent_inspector() const;410411struct ThemeCache {412int horizontal_separation = 0;413int vertical_separation = 0;414int inspector_margin = 0;415int indent_size = 0;416417Color warning_color;418Color prop_subsection;419Color font_color;420Color font_disabled_color;421Color font_hover_color;422Color font_pressed_color;423Color font_hover_pressed_color;424425Ref<Font> font;426int font_size = 0;427Ref<Font> bold_font;428int bold_font_size = 0;429Ref<Font> light_font;430int light_font_size = 0;431432Ref<Texture2D> arrow;433Ref<Texture2D> arrow_collapsed;434Ref<Texture2D> arrow_collapsed_mirrored;435Ref<Texture2D> icon_gui_checked;436Ref<Texture2D> icon_gui_unchecked;437Ref<Texture2D> icon_gui_animation_key;438439Ref<StyleBoxFlat> indent_box;440Ref<StyleBoxFlat> key_hover;441} theme_cache;442443protected:444Object *object = nullptr;445VBoxContainer *vbox = nullptr;446447void _notification(int p_what);448static void _bind_methods();449virtual void gui_input(const Ref<InputEvent> &p_event) override;450451void _accessibility_action_collapse(const Variant &p_data);452void _accessibility_action_expand(const Variant &p_data);453454public:455virtual Size2 get_minimum_size() const override;456virtual Control *make_custom_tooltip(const String &p_text) const override;457458void 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);459String get_section() const;460String get_label() const { return label; }461VBoxContainer *get_vbox();462void unfold();463void fold();464void set_bg_color(const Color &p_bg_color);465void reset_timer();466void set_checkable(const String &p_related_check_property, bool p_checkbox_only, bool p_checked);467inline bool is_checkable() const { return checkable; }468void set_checked(bool p_checked);469void set_keying(bool p_keying);470471bool has_revertable_properties() const;472void property_can_revert_changed(const String &p_path, bool p_can_revert);473void _property_edited(const String &p_property);474void update_property();475476EditorInspectorSection();477~EditorInspectorSection();478};479480class ArrayPanelContainer : public PanelContainer {481GDCLASS(ArrayPanelContainer, PanelContainer);482483protected:484void _notification(int p_what);485486void _accessibility_action_menu(const Variant &p_data);487488public:489ArrayPanelContainer();490};491492class EditorInspectorArray : public EditorInspectorSection {493GDCLASS(EditorInspectorArray, EditorInspectorSection);494495enum Mode {496MODE_NONE,497MODE_USE_COUNT_PROPERTY,498MODE_USE_MOVE_ARRAY_ELEMENT_FUNCTION,499} mode = MODE_NONE;500StringName count_property;501StringName array_element_prefix;502String swap_method;503504int count = 0;505int selected = -1;506507VBoxContainer *elements_vbox = nullptr;508509Control *control_dropping = nullptr;510bool dropping = false;511512Button *add_button = nullptr;513514AcceptDialog *resize_dialog = nullptr;515SpinBox *new_size_spin_box = nullptr;516517// Pagination.518int page_length = 5;519int page = 0;520int max_page = 0;521int begin_array_index = 0;522int end_array_index = 0;523524bool read_only = false;525bool movable = true;526bool is_const = false;527bool numbered = false;528529enum MenuOptions {530OPTION_MOVE_UP = 0,531OPTION_MOVE_DOWN,532OPTION_NEW_BEFORE,533OPTION_NEW_AFTER,534OPTION_REMOVE,535OPTION_CLEAR_ARRAY,536OPTION_RESIZE_ARRAY,537};538int popup_array_index_pressed = -1;539PopupMenu *rmb_popup = nullptr;540541struct ArrayElement {542PanelContainer *panel = nullptr;543MarginContainer *margin = nullptr;544HBoxContainer *hbox = nullptr;545Button *move_up = nullptr;546TextureRect *move_texture_rect = nullptr;547Button *move_down = nullptr;548Label *number = nullptr;549VBoxContainer *vbox = nullptr;550Button *erase = nullptr;551};552LocalVector<ArrayElement> array_elements;553554Ref<StyleBoxFlat> odd_style;555Ref<StyleBoxFlat> even_style;556557int _get_array_count();558void _add_button_pressed();559void _paginator_page_changed(int p_page);560561void _rmb_popup_id_pressed(int p_id);562563void _control_dropping_draw();564565void _vbox_visibility_changed();566567void _panel_draw(int p_index);568void _panel_gui_input(Ref<InputEvent> p_event, int p_index);569void _panel_gui_focus(int p_index);570void _panel_gui_unfocus(int p_index);571void _move_element(int p_element_index, int p_to_pos);572void _clear_array();573void _resize_array(int p_size);574Array _extract_properties_as_array(const List<PropertyInfo> &p_list);575int _drop_position() const;576577void _new_size_spin_box_value_changed(float p_value);578void _new_size_spin_box_text_submitted(const String &p_text);579void _resize_dialog_confirmed();580581void _update_elements_visibility();582void _setup();583584Variant get_drag_data_fw(const Point2 &p_point, Control *p_from);585void drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from);586bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const;587588void _remove_item(int p_index);589590protected:591void _notification(int p_what);592static void _bind_methods();593594public:595void 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_is_const = false, bool p_numbered = false, int p_page_length = 5, const String &p_add_item_text = "");596void 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_is_const = false, bool p_numbered = false, int p_page_length = 5, const String &p_add_item_text = "", const String &p_swap_method = "");597VBoxContainer *get_vbox(int p_index);598599void show_menu(int p_index, const Vector2 &p_offset);600601EditorInspectorArray(bool p_read_only);602};603604class EditorPaginator : public HBoxContainer {605GDCLASS(EditorPaginator, HBoxContainer);606607int page = 0;608int max_page = 0;609Button *first_page_button = nullptr;610Button *prev_page_button = nullptr;611LineEdit *page_line_edit = nullptr;612Label *page_count_label = nullptr;613Button *next_page_button = nullptr;614Button *last_page_button = nullptr;615616void _first_page_button_pressed();617void _prev_page_button_pressed();618void _page_line_edit_text_submitted(const String &p_text);619void _next_page_button_pressed();620void _last_page_button_pressed();621622protected:623void _notification(int p_what);624static void _bind_methods();625626public:627void update(int p_page, int p_max_page);628629EditorPaginator();630};631632class EditorInspector : public ScrollContainer {633GDCLASS(EditorInspector, ScrollContainer);634635friend class EditorPropertyResource;636637enum {638MAX_PLUGINS = 1024639};640static Ref<EditorInspectorPlugin> inspector_plugins[MAX_PLUGINS];641static int inspector_plugin_count;642643struct ThemeCache {644int vertical_separation = 0;645Color prop_subsection;646Ref<Texture2D> icon_add;647} theme_cache;648649EditorInspectorSection::ThemeCache section_theme_cache;650EditorInspectorCategory::ThemeCache category_theme_cache;651652bool can_favorite = false;653PackedStringArray current_favorites;654VBoxContainer *favorites_section = nullptr;655VBoxContainer *favorites_vbox = nullptr;656VBoxContainer *favorites_groups_vbox = nullptr;657HSeparator *favorites_separator = nullptr;658659EditorInspector *root_inspector = nullptr;660661VBoxContainer *base_vbox = nullptr;662VBoxContainer *begin_vbox = nullptr;663VBoxContainer *main_vbox = nullptr;664665// Map used to cache the instantiated editors.666HashMap<StringName, List<EditorProperty *>> editor_property_map;667List<EditorInspectorSection *> sections;668HashSet<StringName> pending;669670void _clear(bool p_hide_plugins = true);671Object *object = nullptr;672Object *next_object = nullptr;673674//675676LineEdit *search_box = nullptr;677bool show_standard_categories = false;678bool show_custom_categories = false;679bool hide_script = true;680bool hide_metadata = true;681bool use_doc_hints = false;682EditorPropertyNameProcessor::Style property_name_style = EditorPropertyNameProcessor::STYLE_CAPITALIZED;683bool use_settings_name_style = true;684bool use_filter = false;685bool autoclear = false;686bool use_folding = false;687int changing;688bool update_all_pending = false;689bool read_only = false;690bool keying = false;691bool wide_editors = false;692bool deletable_properties = false;693bool mark_unsaved = true;694695float refresh_countdown;696bool update_tree_pending = false;697StringName _prop_edited;698StringName property_selected;699int property_focusable;700int update_scroll_request;701702bool updating_theme = false;703704struct DocCacheInfo {705String doc_path;706String theme_item_name;707};708709HashMap<StringName, HashMap<StringName, DocCacheInfo>> doc_cache;710HashSet<StringName> restart_request_props;711HashMap<String, String> custom_property_descriptions;712713HashMap<ObjectID, int> scroll_cache;714715String property_prefix; // Used for sectioned inspector.716String object_class;717Variant property_clipboard;718719bool restrict_to_basic = false;720721void _edit_set(const String &p_name, const Variant &p_value, bool p_refresh_all, const String &p_changed_field);722723void _property_changed(const String &p_path, const Variant &p_value, const String &p_name = "", bool p_changing = false, bool p_update_all = false);724void _multiple_properties_changed(const Vector<String> &p_paths, const Array &p_values, bool p_changing = false);725void _property_keyed(const String &p_path, bool p_advance);726void _property_keyed_with_value(const String &p_path, const Variant &p_value, bool p_advance);727void _property_deleted(const String &p_path);728void _property_checked(const String &p_path, bool p_checked);729void _property_pinned(const String &p_path, bool p_pinned);730bool _property_path_matches(const String &p_property_path, const String &p_filter, EditorPropertyNameProcessor::Style p_style);731bool _resource_properties_matches(const Ref<Resource> &p_resource, const String &p_filter);732733void _resource_selected(const String &p_path, Ref<Resource> p_resource);734void _property_selected(const String &p_path, int p_focusable);735void _object_id_selected(const String &p_path, ObjectID p_id);736737void _update_current_favorites();738void _set_property_favorited(const String &p_path, bool p_favorited);739void _clear_current_favorites();740741void _node_removed(Node *p_node);742743HashMap<StringName, int> per_array_page;744void _page_change_request(int p_new_page, const StringName &p_array_prefix);745746void _changed_callback();747void _edit_request_change(Object *p_object, const String &p_prop);748749void _keying_changed();750751void _parse_added_editors(VBoxContainer *current_vbox, EditorInspectorSection *p_section, Ref<EditorInspectorPlugin> ped);752753void _vscroll_changed(double);754755void _feature_profile_changed();756757bool _is_property_disabled_by_feature_profile(const StringName &p_property);758759void _section_toggled_by_user(const String &p_path, bool p_value);760761AddMetadataDialog *add_meta_dialog = nullptr;762LineEdit *add_meta_name = nullptr;763OptionButton *add_meta_type = nullptr;764EditorValidationPanel *validation_panel = nullptr;765766void _add_meta_confirm();767void _show_add_meta_dialog();768769static EditorInspector *_get_control_parent_inspector(Control *p_control);770771protected:772static void _bind_methods();773void _notification(int p_what);774775public:776static void add_inspector_plugin(const Ref<EditorInspectorPlugin> &p_plugin);777static void remove_inspector_plugin(const Ref<EditorInspectorPlugin> &p_plugin);778static void cleanup_plugins();779780static 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);781782static void initialize_section_theme(EditorInspectorSection::ThemeCache &p_cache, Control *p_control);783static void initialize_category_theme(EditorInspectorCategory::ThemeCache &p_cache, Control *p_control);784785bool is_main_editor_inspector() const;786String get_selected_path() const;787788void update_tree();789void update_property(const String &p_prop);790void edit(Object *p_object);791Object *get_edited_object();792Object *get_next_edited_object();793794void set_keying(bool p_active);795void set_read_only(bool p_read_only);796void set_mark_unsaved(bool p_mark) { mark_unsaved = p_mark; }797798EditorPropertyNameProcessor::Style get_property_name_style() const;799void set_property_name_style(EditorPropertyNameProcessor::Style p_style);800801// If true, the inspector will update its property name style according to the current editor settings.802void set_use_settings_name_style(bool p_enable);803804void set_autoclear(bool p_enable);805806void set_show_categories(bool p_show_standard, bool p_show_custom);807void set_use_doc_hints(bool p_enable);808void set_hide_script(bool p_hide);809void set_hide_metadata(bool p_hide);810811void set_use_filter(bool p_use);812void register_text_enter(Node *p_line_edit);813814void set_use_folding(bool p_use_folding, bool p_update_tree = true);815bool is_using_folding();816817void collapse_all_folding();818void expand_all_folding();819void expand_revertable();820821void set_scroll_offset(int p_offset);822int get_scroll_offset() const;823824void set_property_prefix(const String &p_prefix);825String get_property_prefix() const;826827void add_custom_property_description(const String &p_class, const String &p_property, const String &p_description);828String get_custom_property_description(const String &p_property) const;829830void set_object_class(const String &p_class);831String get_object_class() const;832833void set_use_wide_editors(bool p_enable);834void set_root_inspector(EditorInspector *p_root_inspector);835EditorInspector *get_root_inspector() { return is_sub_inspector() ? root_inspector : this; }836bool is_sub_inspector() const { return root_inspector != nullptr; }837838void set_use_deletable_properties(bool p_enabled);839840void set_restrict_to_basic_settings(bool p_restrict);841void set_property_clipboard(const Variant &p_value);842Variant get_property_clipboard() const;843844EditorInspector();845};846847848