Debian Codegraph @

editor/gui/editor_file_dialog.h

raw symbols SCIP
1 /**************************************************************************/
2 /* editor_file_dialog.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
31 #pragma once
32
33 #include "scene/gui/file_dialog.h"
34
35 class DependencyRemoveDialog;
36
37 class EditorFileDialog : public FileDialog {
38 GDCLASS(EditorFileDialog, FileDialog);
39
40 DependencyRemoveDialog *dependency_remove_dialog = nullptr;
41
42 protected:
43 virtual void _item_menu_id_pressed(int p_option) override;
44 virtual void _dir_contents_changed() override;
45
46 virtual bool _should_use_native_popup() const override;
47 virtual bool _should_hide_file(const String &p_file) const override;
48 virtual Color _get_folder_color(const String &p_path) const override;
49 virtual Vector2i _get_list_mode_icon_size() const override;
50
51 static void _bind_methods();
52 void _validate_property(PropertyInfo &p_property) const;
53 void _notification(int p_what);
54
55 public:
56 #ifndef DISABLE_DEPRECATED
57 void add_side_menu(Control *p_menu, const String &p_title = "") { ERR_FAIL_MSG("add_side_menu() is kept for compatibility and does nothing. For similar functionality, you can show another dialog after file dialog."); }
58 void set_disable_overwrite_warning(bool p_disable) { set_customization_flag_enabled(CUSTOMIZATION_OVERWRITE_WARNING, !p_disable); }
59 bool is_overwrite_warning_disabled() const { return !is_customization_flag_enabled(CUSTOMIZATION_OVERWRITE_WARNING); }
60 #endif
61 };