diff options
Diffstat (limited to 'editor/filesystem_dock.h')
-rw-r--r-- | editor/filesystem_dock.h | 71 |
1 files changed, 37 insertions, 34 deletions
diff --git a/editor/filesystem_dock.h b/editor/filesystem_dock.h index f39ca9e74d..42a72b7ee8 100644 --- a/editor/filesystem_dock.h +++ b/editor/filesystem_dock.h @@ -1,32 +1,32 @@ -/*************************************************************************/ -/* filesystem_dock.h */ -/*************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/*************************************************************************/ -/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */ -/* */ -/* 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. */ -/*************************************************************************/ +/**************************************************************************/ +/* filesystem_dock.h */ +/**************************************************************************/ +/* 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. */ +/**************************************************************************/ #ifndef FILESYSTEM_DOCK_H #define FILESYSTEM_DOCK_H @@ -79,7 +79,7 @@ private: FILE_OPEN, FILE_INHERIT, FILE_MAIN_SCENE, - FILE_INSTANCE, + FILE_INSTANTIATE, FILE_ADD_FAVORITE, FILE_REMOVE_FAVORITE, FILE_DEPENDENCIES, @@ -94,6 +94,7 @@ private: FILE_NEW_SCRIPT, FILE_NEW_SCENE, FILE_SHOW_IN_EXPLORER, + FILE_OPEN_EXTERNAL, FILE_COPY_PATH, FILE_COPY_UID, FILE_NEW_RESOURCE, @@ -213,7 +214,7 @@ private: void _file_multi_selected(int p_index, bool p_selected); void _tree_multi_selected(Object *p_item, int p_column, bool p_selected); - void _get_imported_files(const String &p_path, Vector<String> &r_files) const; + bool _get_imported_files(const String &p_path, String &r_extension, Vector<String> &r_files) const; void _update_import_dock(); void _get_all_items_in_dir(EditorFileSystemDirectory *p_efsd, Vector<String> &r_files, Vector<String> &r_folders) const; @@ -297,12 +298,12 @@ private: void _update_display_mode(bool p_force = false); - Vector<String> _tree_get_selected(bool remove_self_inclusion = true); + Vector<String> _tree_get_selected(bool remove_self_inclusion = true) const; bool _is_file_type_disabled_by_feature_profile(const StringName &p_class); void _feature_profile_changed(); - Vector<String> _remove_self_included_paths(Vector<String> selected_strings); + static Vector<String> _remove_self_included_paths(Vector<String> selected_strings); private: static FileSystemDock *singleton; @@ -315,9 +316,11 @@ protected: static void _bind_methods(); public: - String get_selected_path() const; + Vector<String> get_selected_paths() const; String get_current_path() const; + String get_current_directory() const; + void navigate_to_path(const String &p_path); void focus_on_filter(); |