/**************************************************************************/ /* editor_debugger_tree.cpp */ /**************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ /* https://godotengine.org */ /**************************************************************************/ /* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */ /* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ /* "Software"), to deal in the Software without restriction, including */ /* without limitation the rights to use, copy, modify, merge, publish, */ /* distribute, sublicense, and/or sell copies of the Software, and to */ /* permit persons to whom the Software is furnished to do so, subject to */ /* the following conditions: */ /* */ /* The above copyright notice and this permission notice shall be */ /* included in all copies or substantial portions of the Software. */ /* */ /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */ /* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ /* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ #include "editor_debugger_tree.h" #include "editor/editor_node.h" #include "editor/editor_string_names.h" #include "editor/gui/editor_file_dialog.h" #include "editor/scene_tree_dock.h" #include "scene/debugger/scene_debugger.h" #include "scene/gui/texture_rect.h" #include "scene/resources/packed_scene.h" #include "servers/display_server.h" EditorDebuggerTree::EditorDebuggerTree() { … } void EditorDebuggerTree::_notification(int p_what) { … } void EditorDebuggerTree::_bind_methods() { … } void EditorDebuggerTree::_scene_tree_selected() { … } void EditorDebuggerTree::_scene_tree_folded(Object *p_obj) { … } void EditorDebuggerTree::_scene_tree_rmb_selected(const Vector2 &p_position, MouseButton p_button) { … } /// Populates inspect_scene_tree given data in nodes as a flat list, encoded depth first. /// /// Given a nodes array like [R,A,B,C,D,E] the following Tree will be generated, assuming /// filter is an empty String, R and A child count are 2, B is 1 and C, D and E are 0. /// /// R /// |-A /// | |-B /// | | |-C /// | | /// | |-D /// | /// |-E /// void EditorDebuggerTree::update_scene_tree(const SceneDebuggerTree *p_tree, int p_debugger) { … } Variant EditorDebuggerTree::get_drag_data(const Point2 &p_point) { … } void EditorDebuggerTree::update_icon_max_width() { … } String EditorDebuggerTree::get_selected_path() { … } String EditorDebuggerTree::_get_path(TreeItem *p_item) { … } void EditorDebuggerTree::_item_menu_id_pressed(int p_option) { … } void EditorDebuggerTree::_file_selected(const String &p_file) { … }