From 3ca78453da93335597ecdf924c2e44fc0cd244fa Mon Sep 17 00:00:00 2001 From: Relintai Date: Thu, 17 Mar 2022 12:47:22 +0100 Subject: [PATCH] Moved more includes. --- editor/editor_profiler.cpp | 1 + editor/plugins/sprite_editor_plugin.cpp | 1 + scene/gui/color_picker.cpp | 1 + scene/gui/item_list.cpp | 1 + scene/gui/item_list.h | 3 ++- scene/gui/line_edit.cpp | 1 + scene/gui/line_edit.h | 3 ++- scene/gui/link_button.cpp | 1 + scene/gui/link_button.h | 1 - scene/gui/menu_button.cpp | 1 + scene/gui/menu_button.h | 3 ++- scene/gui/option_button.cpp | 1 + scene/gui/option_button.h | 3 ++- scene/gui/rich_text_label.cpp | 1 + scene/gui/rich_text_label.h | 5 ++++- scene/gui/scroll_container.cpp | 1 + scene/gui/scroll_container.h | 3 ++- scene/gui/shortcut.cpp | 4 ++++ scene/gui/shortcut.h | 4 +++- scene/gui/spin_box.cpp | 2 ++ scene/gui/spin_box.h | 5 +++-- scene/gui/tab_container.cpp | 1 + scene/gui/tab_container.h | 4 +++- 23 files changed, 40 insertions(+), 11 deletions(-) diff --git a/editor/editor_profiler.cpp b/editor/editor_profiler.cpp index 2967fa491..872e4fc57 100644 --- a/editor/editor_profiler.cpp +++ b/editor/editor_profiler.cpp @@ -33,6 +33,7 @@ #include "core/os/os.h" #include "editor_scale.h" #include "editor_settings.h" +#include "scene/main/timer.h" void EditorProfiler::_make_metric_ptrs(Metric &m) { for (int i = 0; i < m.categories.size(); i++) { diff --git a/editor/plugins/sprite_editor_plugin.cpp b/editor/plugins/sprite_editor_plugin.cpp index 0bab52f88..2e8e61d45 100644 --- a/editor/plugins/sprite_editor_plugin.cpp +++ b/editor/plugins/sprite_editor_plugin.cpp @@ -38,6 +38,7 @@ #include "scene/2d/polygon_2d.h" #include "scene/gui/box_container.h" #include "thirdparty/misc/clipper.hpp" +#include "scene/resources/bit_map.h" void SpriteEditor::_node_removed(Node *p_node) { if (p_node == node) { diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp index 4e6f99259..f3ee17532 100644 --- a/scene/gui/color_picker.cpp +++ b/scene/gui/color_picker.cpp @@ -45,6 +45,7 @@ #include "scene/gui/texture_rect.h" #include "scene/gui/tool_button.h" #include "scene/gui/shortcut.h" +#include "scene/gui/popup_menu.h" #ifdef TOOLS_ENABLED #include "editor/editor_scale.h" diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp index 3ed6bdbe4..978658d04 100644 --- a/scene/gui/item_list.cpp +++ b/scene/gui/item_list.cpp @@ -31,6 +31,7 @@ #include "item_list.h" #include "core/os/os.h" #include "core/project_settings.h" +#include "scene/gui/scroll_bar.h" void ItemList::add_item(const String &p_item, const Ref &p_texture, bool p_selectable) { Item item; diff --git a/scene/gui/item_list.h b/scene/gui/item_list.h index 069e18fe8..f2bce110c 100644 --- a/scene/gui/item_list.h +++ b/scene/gui/item_list.h @@ -32,7 +32,8 @@ #define ITEMLIST_H #include "scene/gui/control.h" -#include "scene/gui/scroll_bar.h" + +class VScrollBar; class ItemList : public Control { GDCLASS(ItemList, Control); diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index e81086c0b..f5a9db5d6 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -37,6 +37,7 @@ #include "core/translation.h" #include "label.h" #include "scene/main/timer.h" +#include "scene/gui/popup_menu.h" #ifdef TOOLS_ENABLED #include "editor/editor_scale.h" diff --git a/scene/gui/line_edit.h b/scene/gui/line_edit.h index cd94e354d..05af0d796 100644 --- a/scene/gui/line_edit.h +++ b/scene/gui/line_edit.h @@ -32,7 +32,8 @@ #define LINE_EDIT_H #include "scene/gui/control.h" -#include "scene/gui/popup_menu.h" + +class PopupMenu; class LineEdit : public Control { GDCLASS(LineEdit, Control); diff --git a/scene/gui/link_button.cpp b/scene/gui/link_button.cpp index 9042b210a..af52e0e12 100644 --- a/scene/gui/link_button.cpp +++ b/scene/gui/link_button.cpp @@ -31,6 +31,7 @@ #include "link_button.h" #include "core/translation.h" +#include "scene/gui/shortcut.h" void LinkButton::set_text(const String &p_text) { if (text == p_text) { diff --git a/scene/gui/link_button.h b/scene/gui/link_button.h index 6d388af8c..3aa281251 100644 --- a/scene/gui/link_button.h +++ b/scene/gui/link_button.h @@ -32,7 +32,6 @@ #define LINKBUTTON_H #include "scene/gui/base_button.h" -#include "scene/resources/bit_map.h" class LinkButton : public BaseButton { GDCLASS(LinkButton, BaseButton); diff --git a/scene/gui/menu_button.cpp b/scene/gui/menu_button.cpp index b86c25c22..92f595174 100644 --- a/scene/gui/menu_button.cpp +++ b/scene/gui/menu_button.cpp @@ -33,6 +33,7 @@ #include "core/os/keyboard.h" #include "scene/main/viewport.h" #include "scene/gui/shortcut.h" +#include "scene/gui/popup_menu.h" void MenuButton::_unhandled_key_input(Ref p_event) { ERR_FAIL_COND(p_event.is_null()); diff --git a/scene/gui/menu_button.h b/scene/gui/menu_button.h index 08246ea18..9baf12dcf 100644 --- a/scene/gui/menu_button.h +++ b/scene/gui/menu_button.h @@ -32,7 +32,8 @@ #define MENU_BUTTON_H #include "scene/gui/button.h" -#include "scene/gui/popup_menu.h" + +class PopupMenu; class MenuButton : public Button { GDCLASS(MenuButton, Button); diff --git a/scene/gui/option_button.cpp b/scene/gui/option_button.cpp index 9e626cd74..6868bc7d3 100644 --- a/scene/gui/option_button.cpp +++ b/scene/gui/option_button.cpp @@ -32,6 +32,7 @@ #include "core/os/input.h" #include "core/print_string.h" #include "scene/gui/shortcut.h" +#include "scene/gui/popup_menu.h" Size2 OptionButton::get_minimum_size() const { Size2 minsize = Button::get_minimum_size(); diff --git a/scene/gui/option_button.h b/scene/gui/option_button.h index 9c938d163..0ccf4b416 100644 --- a/scene/gui/option_button.h +++ b/scene/gui/option_button.h @@ -32,7 +32,8 @@ #define OPTION_BUTTON_H #include "scene/gui/button.h" -#include "scene/gui/popup_menu.h" + +class PopupMenu; class OptionButton : public Button { GDCLASS(OptionButton, Button); diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index 95e125fbb..a421120cd 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -34,6 +34,7 @@ #include "core/os/keyboard.h" #include "core/os/os.h" #include "scene/scene_string_names.h" +#include "scene/gui/scroll_bar.h" #ifdef TOOLS_ENABLED #include "editor/editor_scale.h" diff --git a/scene/gui/rich_text_label.h b/scene/gui/rich_text_label.h index 49579746e..e339e98ae 100644 --- a/scene/gui/rich_text_label.h +++ b/scene/gui/rich_text_label.h @@ -31,8 +31,11 @@ #ifndef RICH_TEXT_LABEL_H #define RICH_TEXT_LABEL_H +#include "scene/gui/control.h" + #include "rich_text_effect.h" -#include "scene/gui/scroll_bar.h" + +class VScrollBar; class RichTextLabel : public Control { GDCLASS(RichTextLabel, Control); diff --git a/scene/gui/scroll_container.cpp b/scene/gui/scroll_container.cpp index 371997e34..6e6cf83eb 100644 --- a/scene/gui/scroll_container.cpp +++ b/scene/gui/scroll_container.cpp @@ -31,6 +31,7 @@ #include "scroll_container.h" #include "core/os/os.h" #include "scene/main/viewport.h" +#include "scroll_bar.h" bool ScrollContainer::clips_input() const { return true; diff --git a/scene/gui/scroll_container.h b/scene/gui/scroll_container.h index 81462be71..26f0b0544 100644 --- a/scene/gui/scroll_container.h +++ b/scene/gui/scroll_container.h @@ -33,7 +33,8 @@ #include "container.h" -#include "scroll_bar.h" +class HScrollBar; +class VScrollBar; class ScrollContainer : public Container { GDCLASS(ScrollContainer, Container); diff --git a/scene/gui/shortcut.cpp b/scene/gui/shortcut.cpp index 13ef3601c..bfeb4f151 100644 --- a/scene/gui/shortcut.cpp +++ b/scene/gui/shortcut.cpp @@ -31,6 +31,7 @@ #include "shortcut.h" #include "core/os/keyboard.h" +#include "core/os/input_event.h" void ShortCut::set_shortcut(const Ref &p_shortcut) { shortcut = p_shortcut; @@ -71,3 +72,6 @@ void ShortCut::_bind_methods() { ShortCut::ShortCut() { } + +ShortCut::~ShortCut() { +} \ No newline at end of file diff --git a/scene/gui/shortcut.h b/scene/gui/shortcut.h index eb2272880..09ca4fd39 100644 --- a/scene/gui/shortcut.h +++ b/scene/gui/shortcut.h @@ -31,9 +31,10 @@ #ifndef SHORTCUT_H #define SHORTCUT_H -#include "core/os/input_event.h" #include "core/resource.h" +class InputEvent; + class ShortCut : public Resource { GDCLASS(ShortCut, Resource); @@ -51,6 +52,7 @@ public: String get_as_text() const; ShortCut(); + ~ShortCut(); }; #endif // SHORTCUT_H diff --git a/scene/gui/spin_box.cpp b/scene/gui/spin_box.cpp index c8055b44a..1dcc2a9e4 100644 --- a/scene/gui/spin_box.cpp +++ b/scene/gui/spin_box.cpp @@ -32,6 +32,8 @@ #include "core/math/expression.h" #include "core/os/input.h" #include "scene/gui/shortcut.h" +#include "scene/main/timer.h" +#include "scene/gui/popup_menu.h" Size2 SpinBox::get_minimum_size() const { Size2 ms = line_edit->get_combined_minimum_size(); diff --git a/scene/gui/spin_box.h b/scene/gui/spin_box.h index 2fb3b47f7..fe2cd19c0 100644 --- a/scene/gui/spin_box.h +++ b/scene/gui/spin_box.h @@ -31,9 +31,10 @@ #ifndef SPIN_BOX_H #define SPIN_BOX_H -#include "scene/gui/line_edit.h" #include "scene/gui/range.h" -#include "scene/main/timer.h" +#include "scene/gui/line_edit.h" + +class Timer; class SpinBox : public Range { GDCLASS(SpinBox, Range); diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp index 4a42d2431..08bff2d31 100644 --- a/scene/gui/tab_container.cpp +++ b/scene/gui/tab_container.cpp @@ -34,6 +34,7 @@ #include "scene/gui/box_container.h" #include "scene/gui/label.h" #include "scene/gui/texture_rect.h" +#include "scene/gui/popup.h" int TabContainer::_get_top_margin() const { if (!tabs_visible) { diff --git a/scene/gui/tab_container.h b/scene/gui/tab_container.h index dad2244d0..7f4abca32 100644 --- a/scene/gui/tab_container.h +++ b/scene/gui/tab_container.h @@ -32,7 +32,9 @@ #define TAB_CONTAINER_H #include "scene/gui/container.h" -#include "scene/gui/popup.h" + +class Popup; + class TabContainer : public Container { GDCLASS(TabContainer, Container);