From 866569d22a9e9b57b771e2ab882b0455ce8df01e Mon Sep 17 00:00:00 2001 From: Relintai Date: Thu, 17 Mar 2022 11:52:53 +0100 Subject: [PATCH] Moved more includes to cpp files. --- editor/code_editor.cpp | 1 + editor/editor_dir_dialog.cpp | 3 +++ editor/editor_help.cpp | 1 + editor/editor_layouts_dialog.cpp | 1 + editor/editor_layouts_dialog.h | 1 + editor/plugins/material_editor_plugin.cpp | 1 + editor/plugins/mesh_editor_plugin.cpp | 1 + editor/plugins/polygon_2d_editor_plugin.cpp | 1 + editor/plugins/texture_region_editor_plugin.cpp | 1 + editor/project_manager.cpp | 3 +++ editor/quick_open.cpp | 2 ++ scene/gui/color_picker.cpp | 1 + scene/gui/color_rect.cpp | 2 ++ scene/gui/dialogs.cpp | 6 ++++++ scene/gui/dialogs.h | 10 +++++----- scene/gui/file_dialog.cpp | 8 ++++++++ scene/gui/file_dialog.h | 14 +++++++++++++- 17 files changed, 51 insertions(+), 6 deletions(-) diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index a6ca39197..b570623ea 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -39,6 +39,7 @@ #include "scene/gui/margin_container.h" #include "scene/gui/separator.h" #include "scene/resources/dynamic_font.h" +#include "scene/gui/texture_button.h" void GotoLineDialog::popup_find_line(TextEdit *p_edit) { text_editor = p_edit; diff --git a/editor/editor_dir_dialog.cpp b/editor/editor_dir_dialog.cpp index 7bd516734..3eb6d0d8e 100644 --- a/editor/editor_dir_dialog.cpp +++ b/editor/editor_dir_dialog.cpp @@ -35,6 +35,9 @@ #include "editor/editor_file_system.h" #include "editor/editor_settings.h" #include "editor_scale.h" +#include "scene/gui/button.h" +#include "scene/gui/box_container.h" + void EditorDirDialog::_update_dir(TreeItem *p_item, EditorFileSystemDirectory *p_dir, const String &p_select_path) { updating = true; diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index d520d5306..023130ec9 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -38,6 +38,7 @@ #include "editor_node.h" #include "editor_scale.h" #include "editor_settings.h" +#include "scene/gui/texture_button.h" #define CONTRIBUTE_URL vformat("%s/community/contributing/updating_the_class_reference.html", VERSION_DOCS_URL) diff --git a/editor/editor_layouts_dialog.cpp b/editor/editor_layouts_dialog.cpp index 857b065ff..783ce491c 100644 --- a/editor/editor_layouts_dialog.cpp +++ b/editor/editor_layouts_dialog.cpp @@ -35,6 +35,7 @@ #include "editor/editor_settings.h" #include "scene/gui/item_list.h" #include "scene/gui/line_edit.h" +#include "scene/gui/box_container.h" void EditorLayoutsDialog::_line_gui_input(const Ref &p_event) { Ref k = p_event; diff --git a/editor/editor_layouts_dialog.h b/editor/editor_layouts_dialog.h index 3cb3a8c96..36025a042 100644 --- a/editor/editor_layouts_dialog.h +++ b/editor/editor_layouts_dialog.h @@ -35,6 +35,7 @@ class LineEdit; class ItemList; +class VBoxContainer; class EditorLayoutsDialog : public ConfirmationDialog { GDCLASS(EditorLayoutsDialog, ConfirmationDialog); diff --git a/editor/plugins/material_editor_plugin.cpp b/editor/plugins/material_editor_plugin.cpp index 8e525b104..6e5ce7346 100644 --- a/editor/plugins/material_editor_plugin.cpp +++ b/editor/plugins/material_editor_plugin.cpp @@ -34,6 +34,7 @@ #include "scene/gui/viewport_container.h" #include "scene/resources/particles_material.h" #include "scene/main/viewport.h" +#include "scene/gui/texture_button.h" void MaterialEditor::_notification(int p_what) { if (p_what == NOTIFICATION_READY) { diff --git a/editor/plugins/mesh_editor_plugin.cpp b/editor/plugins/mesh_editor_plugin.cpp index 7b1d6e2b1..656f84917 100644 --- a/editor/plugins/mesh_editor_plugin.cpp +++ b/editor/plugins/mesh_editor_plugin.cpp @@ -32,6 +32,7 @@ #include "editor/editor_scale.h" #include "scene/main/viewport.h" +#include "scene/gui/texture_button.h" void MeshEditor::_gui_input(Ref p_event) { Ref mm = p_event; diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp index 86aa1ea3a..5ec55fb1f 100644 --- a/editor/plugins/polygon_2d_editor_plugin.cpp +++ b/editor/plugins/polygon_2d_editor_plugin.cpp @@ -37,6 +37,7 @@ #include "editor/editor_scale.h" #include "editor/editor_settings.h" #include "scene/2d/skeleton_2d.h" +#include "scene/gui/panel.h" Node2D *Polygon2DEditor::_get_node() const { return node; diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp index 8340d303c..8ea71e02b 100644 --- a/editor/plugins/texture_region_editor_plugin.cpp +++ b/editor/plugins/texture_region_editor_plugin.cpp @@ -35,6 +35,7 @@ #include "core/os/keyboard.h" #include "editor/editor_scale.h" #include "scene/gui/check_box.h" +#include "scene/gui/panel.h" /** @author Mariano Suligoy diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index 16c8b78c5..b9f335e05 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -51,6 +51,9 @@ #include "scene/gui/texture_rect.h" #include "scene/gui/tool_button.h" #include "servers/navigation_server.h" +#include "scene/gui/label.h" +#include "scene/gui/texture_button.h" +#include "scene/gui/panel.h" static inline String get_project_key_from_path(const String &dir) { return dir.replace("/", "::"); diff --git a/editor/quick_open.cpp b/editor/quick_open.cpp index a34e2bfa2..3c4661c77 100644 --- a/editor/quick_open.cpp +++ b/editor/quick_open.cpp @@ -32,6 +32,8 @@ #include "core/os/keyboard.h" #include "scene/gui/shortcut.h" +#include "scene/gui/button.h" +#include "scene/gui/box_container.h" void EditorQuickOpen::popup_dialog(const StringName &p_base, bool p_enable_multi, bool p_dontclear) { base_type = p_base; diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp index 2397f5423..4e6f99259 100644 --- a/scene/gui/color_picker.cpp +++ b/scene/gui/color_picker.cpp @@ -44,6 +44,7 @@ #include "scene/gui/spin_box.h" #include "scene/gui/texture_rect.h" #include "scene/gui/tool_button.h" +#include "scene/gui/shortcut.h" #ifdef TOOLS_ENABLED #include "editor/editor_scale.h" diff --git a/scene/gui/color_rect.cpp b/scene/gui/color_rect.cpp index 04bf1c8ab..fb45515e9 100644 --- a/scene/gui/color_rect.cpp +++ b/scene/gui/color_rect.cpp @@ -30,6 +30,8 @@ #include "color_rect.h" +#include "scene/gui/shortcut.h" + void ColorRect::set_frame_color(const Color &p_color) { color = p_color; update(); diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp index e2897c2d2..7b1eee222 100644 --- a/scene/gui/dialogs.cpp +++ b/scene/gui/dialogs.cpp @@ -33,6 +33,12 @@ #include "core/translation.h" #include "line_edit.h" +#include "box_container.h" +#include "scene/gui/button.h" +#include "scene/gui/label.h" +#include "scene/gui/panel.h" +#include "scene/gui/texture_button.h" + #ifdef TOOLS_ENABLED #include "editor/editor_node.h" #include "editor/editor_scale.h" diff --git a/scene/gui/dialogs.h b/scene/gui/dialogs.h index 66c0ac56d..d2178aafc 100644 --- a/scene/gui/dialogs.h +++ b/scene/gui/dialogs.h @@ -31,12 +31,12 @@ #ifndef DIALOGS_H #define DIALOGS_H -#include "box_container.h" -#include "scene/gui/button.h" -#include "scene/gui/label.h" -#include "scene/gui/panel.h" #include "scene/gui/popup.h" -#include "scene/gui/texture_button.h" + +class TextureButton; +class HBoxContainer; +class Label; +class Button; class WindowDialog : public Popup { GDCLASS(WindowDialog, Popup); diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp index af52f6809..c63ade836 100644 --- a/scene/gui/file_dialog.cpp +++ b/scene/gui/file_dialog.cpp @@ -34,6 +34,14 @@ #include "core/print_string.h" #include "scene/gui/label.h" #include "scene/gui/shortcut.h" +/* +#include "box_container.h" +#include "core/os/dir_access.h" +#include "scene/gui/line_edit.h" +#include "scene/gui/option_button.h" +#include "scene/gui/tool_button.h" +#include "scene/gui/tree.h" +*/ FileDialog::GetIconFunc FileDialog::get_icon_func = nullptr; FileDialog::GetIconFunc FileDialog::get_large_icon_func = nullptr; diff --git a/scene/gui/file_dialog.h b/scene/gui/file_dialog.h index dcc99e729..750838a0c 100644 --- a/scene/gui/file_dialog.h +++ b/scene/gui/file_dialog.h @@ -31,14 +31,26 @@ #ifndef FILE_DIALOG_H #define FILE_DIALOG_H +#include "scene/gui/dialogs.h" + #include "box_container.h" #include "core/os/dir_access.h" -#include "scene/gui/dialogs.h" #include "scene/gui/line_edit.h" #include "scene/gui/option_button.h" #include "scene/gui/tool_button.h" #include "scene/gui/tree.h" + +class Button; +class VBoxContainer; +class LineEdit; +class HBoxContainer; +class OptionButton; +class Tree; +class AcceptDialog; +class DirAccess; +class ToolButton; + class FileDialog : public ConfirmationDialog { GDCLASS(FileDialog, ConfirmationDialog);