diff options
Diffstat (limited to 'Libraries')
75 files changed, 201 insertions, 188 deletions
diff --git a/Libraries/LibGUI/AbstractButton.cpp b/Libraries/LibGUI/AbstractButton.cpp index fe22935c9b..2a7d386e9c 100644 --- a/Libraries/LibGUI/AbstractButton.cpp +++ b/Libraries/LibGUI/AbstractButton.cpp @@ -24,9 +24,10 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <LibGfx/Palette.h> +#include <LibCore/Timer.h> #include <LibGUI/AbstractButton.h> #include <LibGUI/Painter.h> +#include <LibGfx/Palette.h> namespace GUI { diff --git a/Libraries/LibGUI/AbstractButton.h b/Libraries/LibGUI/AbstractButton.h index 515c8e0bf1..b6bdf0ad0d 100644 --- a/Libraries/LibGUI/AbstractButton.h +++ b/Libraries/LibGUI/AbstractButton.h @@ -26,14 +26,10 @@ #pragma once -#include <LibCore/Timer.h> -#include <LibGfx/TextAlignment.h> #include <LibGUI/Widget.h> namespace GUI { -class Painter; - class AbstractButton : public Widget { C_OBJECT_ABSTRACT(GAbstractButton) public: diff --git a/Libraries/LibGUI/AbstractTableView.cpp b/Libraries/LibGUI/AbstractTableView.cpp index cb180241ce..9bf3395708 100644 --- a/Libraries/LibGUI/AbstractTableView.cpp +++ b/Libraries/LibGUI/AbstractTableView.cpp @@ -25,9 +25,11 @@ */ #include <AK/StringBuilder.h> +#include <AK/Vector.h> #include <LibGUI/AbstractTableView.h> #include <LibGUI/Action.h> #include <LibGUI/Menu.h> +#include <LibGUI/Model.h> #include <LibGUI/Painter.h> #include <LibGUI/ScrollBar.h> #include <LibGUI/Window.h> diff --git a/Libraries/LibGUI/AbstractTableView.h b/Libraries/LibGUI/AbstractTableView.h index 6dea47aeac..e6320abf8d 100644 --- a/Libraries/LibGUI/AbstractTableView.h +++ b/Libraries/LibGUI/AbstractTableView.h @@ -30,9 +30,6 @@ namespace GUI { -class Painter; - -// FIXME: Rename this to something without "table cell" in the name. class TableCellPaintingDelegate { public: virtual ~TableCellPaintingDelegate() {} diff --git a/Libraries/LibGUI/AbstractView.cpp b/Libraries/LibGUI/AbstractView.cpp index ba770efaa3..c8411142b0 100644 --- a/Libraries/LibGUI/AbstractView.cpp +++ b/Libraries/LibGUI/AbstractView.cpp @@ -25,6 +25,7 @@ */ #include <AK/StringBuilder.h> +#include <AK/Vector.h> #include <Kernel/KeyCode.h> #include <LibGUI/AbstractView.h> #include <LibGUI/DragOperation.h> diff --git a/Libraries/LibGUI/AbstractView.h b/Libraries/LibGUI/AbstractView.h index 8e9b52d71e..3c4a87e586 100644 --- a/Libraries/LibGUI/AbstractView.h +++ b/Libraries/LibGUI/AbstractView.h @@ -27,14 +27,11 @@ #pragma once #include <AK/Function.h> -#include <LibGUI/Model.h> #include <LibGUI/ModelSelection.h> #include <LibGUI/ScrollableWidget.h> namespace GUI { -class ModelEditingDelegate; - class AbstractView : public ScrollableWidget { C_OBJECT_ABSTRACT(AbstractView) friend class Model; diff --git a/Libraries/LibGUI/Action.h b/Libraries/LibGUI/Action.h index 2d3f899ece..5064d74d00 100644 --- a/Libraries/LibGUI/Action.h +++ b/Libraries/LibGUI/Action.h @@ -35,16 +35,12 @@ #include <AK/WeakPtr.h> #include <AK/Weakable.h> #include <LibCore/Object.h> +#include <LibGUI/Forward.h> #include <LibGUI/Shortcut.h> #include <LibGfx/Forward.h> namespace GUI { -class Action; -class ActionGroup; -class Button; -class MenuItem; - namespace CommonActions { NonnullRefPtr<Action> make_open_action(Function<void(Action&)>, Core::Object* parent = nullptr); NonnullRefPtr<Action> make_undo_action(Function<void(Action&)>, Core::Object* parent = nullptr); diff --git a/Libraries/LibGUI/ActionGroup.h b/Libraries/LibGUI/ActionGroup.h index 9816e0db30..0d538a4ea1 100644 --- a/Libraries/LibGUI/ActionGroup.h +++ b/Libraries/LibGUI/ActionGroup.h @@ -28,11 +28,10 @@ #include <AK/HashTable.h> #include <AK/Weakable.h> +#include <LibGUI/Forward.h> namespace GUI { -class Action; - class ActionGroup : public Weakable<ActionGroup> { public: ActionGroup() {} diff --git a/Libraries/LibGUI/Application.cpp b/Libraries/LibGUI/Application.cpp index 3f1ef5c5cb..3e75168eb8 100644 --- a/Libraries/LibGUI/Application.cpp +++ b/Libraries/LibGUI/Application.cpp @@ -24,6 +24,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include <LibCore/EventLoop.h> #include <LibGUI/Action.h> #include <LibGUI/Application.h> #include <LibGUI/Desktop.h> diff --git a/Libraries/LibGUI/Application.h b/Libraries/LibGUI/Application.h index f19a3dc551..400ed6fb5e 100644 --- a/Libraries/LibGUI/Application.h +++ b/Libraries/LibGUI/Application.h @@ -28,15 +28,13 @@ #include <AK/HashMap.h> #include <AK/OwnPtr.h> +#include <AK/String.h> #include <LibCore/Forward.h> +#include <LibGUI/Forward.h> #include <LibGUI/Shortcut.h> #include <LibGfx/Forward.h> namespace GUI { -class Action; -class KeyEvent; -class MenuBar; -class Window; class Application { public: diff --git a/Libraries/LibGUI/BoxLayout.cpp b/Libraries/LibGUI/BoxLayout.cpp index d2947b9e5e..86a8ee98fb 100644 --- a/Libraries/LibGUI/BoxLayout.cpp +++ b/Libraries/LibGUI/BoxLayout.cpp @@ -25,6 +25,8 @@ */ #include <LibGUI/BoxLayout.h> +#include <LibGUI/Widget.h> +#include <LibGfx/Orientation.h> #include <stdio.h> //#define GBOXLAYOUT_DEBUG diff --git a/Libraries/LibGUI/BoxLayout.h b/Libraries/LibGUI/BoxLayout.h index 5f517adb55..5f0c85ee65 100644 --- a/Libraries/LibGUI/BoxLayout.h +++ b/Libraries/LibGUI/BoxLayout.h @@ -26,28 +26,29 @@ #pragma once +#include <LibGUI/Forward.h> #include <LibGUI/Layout.h> -#include <LibGUI/Widget.h> +#include <LibGfx/Orientation.h> namespace GUI { class BoxLayout : public Layout { public: - explicit BoxLayout(Orientation); + explicit BoxLayout(Gfx::Orientation); virtual ~BoxLayout() override {} - Orientation orientation() const { return m_orientation; } + Gfx::Orientation orientation() const { return m_orientation; } virtual void run(Widget&) override; private: - Orientation m_orientation; + Gfx::Orientation m_orientation; }; class VerticalBoxLayout final : public BoxLayout { public: explicit VerticalBoxLayout() - : BoxLayout(Orientation::Vertical) + : BoxLayout(Gfx::Orientation::Vertical) { } virtual ~VerticalBoxLayout() override {} @@ -56,7 +57,7 @@ public: class HorizontalBoxLayout final : public BoxLayout { public: explicit HorizontalBoxLayout() - : BoxLayout(Orientation::Horizontal) + : BoxLayout(Gfx::Orientation::Horizontal) { } virtual ~HorizontalBoxLayout() override {} diff --git a/Libraries/LibGUI/Button.h b/Libraries/LibGUI/Button.h index d6a0eb415a..d11cecd9c6 100644 --- a/Libraries/LibGUI/Button.h +++ b/Libraries/LibGUI/Button.h @@ -35,8 +35,6 @@ namespace GUI { -class Action; - class Button : public AbstractButton { C_OBJECT(Button) public: diff --git a/Libraries/LibGUI/CheckBox.h b/Libraries/LibGUI/CheckBox.h index 0c395097f1..35ff654445 100644 --- a/Libraries/LibGUI/CheckBox.h +++ b/Libraries/LibGUI/CheckBox.h @@ -26,8 +26,6 @@ #pragma once -#include <AK/Function.h> -#include <AK/String.h> #include <LibGUI/AbstractButton.h> namespace GUI { diff --git a/Libraries/LibGUI/Clipboard.cpp b/Libraries/LibGUI/Clipboard.cpp index fb93155795..4266fa022c 100644 --- a/Libraries/LibGUI/Clipboard.cpp +++ b/Libraries/LibGUI/Clipboard.cpp @@ -24,6 +24,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include <AK/Badge.h> #include <AK/SharedBuffer.h> #include <LibGUI/Clipboard.h> #include <LibGUI/WindowServerConnection.h> diff --git a/Libraries/LibGUI/Clipboard.h b/Libraries/LibGUI/Clipboard.h index 832ef0e334..5504d91d88 100644 --- a/Libraries/LibGUI/Clipboard.h +++ b/Libraries/LibGUI/Clipboard.h @@ -26,14 +26,12 @@ #pragma once -#include <AK/Badge.h> #include <AK/Function.h> #include <AK/String.h> +#include <LibGUI/Forward.h> namespace GUI { -class WindowServerConnection; - class Clipboard { public: static Clipboard& the(); diff --git a/Libraries/LibGUI/ColorPicker.h b/Libraries/LibGUI/ColorPicker.h index d45350db30..d4d3548f1e 100644 --- a/Libraries/LibGUI/ColorPicker.h +++ b/Libraries/LibGUI/ColorPicker.h @@ -30,8 +30,6 @@ namespace GUI { -class Frame; - class ColorPicker final : public Dialog { C_OBJECT(ColorPicker) public: diff --git a/Libraries/LibGUI/ColumnsView.cpp b/Libraries/LibGUI/ColumnsView.cpp index 7f95469449..62a86e422a 100644 --- a/Libraries/LibGUI/ColumnsView.cpp +++ b/Libraries/LibGUI/ColumnsView.cpp @@ -25,6 +25,7 @@ */ #include <LibGUI/ColumnsView.h> +#include <LibGUI/Model.h> #include <LibGUI/Painter.h> #include <LibGUI/ScrollBar.h> #include <LibGfx/CharacterBitmap.h> diff --git a/Libraries/LibGUI/ComboBox.cpp b/Libraries/LibGUI/ComboBox.cpp index db8161d649..d791774f70 100644 --- a/Libraries/LibGUI/ComboBox.cpp +++ b/Libraries/LibGUI/ComboBox.cpp @@ -28,6 +28,7 @@ #include <LibGUI/ComboBox.h> #include <LibGUI/Desktop.h> #include <LibGUI/ListView.h> +#include <LibGUI/Model.h> #include <LibGUI/ScrollBar.h> #include <LibGUI/TextEditor.h> #include <LibGUI/Window.h> diff --git a/Libraries/LibGUI/ComboBox.h b/Libraries/LibGUI/ComboBox.h index d5f3ae45f1..9aff51066d 100644 --- a/Libraries/LibGUI/ComboBox.h +++ b/Libraries/LibGUI/ComboBox.h @@ -31,9 +31,6 @@ namespace GUI { -class Button; -class TextEditor; - class ComboBox : public Widget { C_OBJECT(ComboBox) public: diff --git a/Libraries/LibGUI/Desktop.cpp b/Libraries/LibGUI/Desktop.cpp index 65f2479839..88f00cbb20 100644 --- a/Libraries/LibGUI/Desktop.cpp +++ b/Libraries/LibGUI/Desktop.cpp @@ -24,6 +24,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include <AK/Badge.h> #include <LibCore/ConfigFile.h> #include <LibGUI/Desktop.h> #include <LibGUI/WindowServerConnection.h> diff --git a/Libraries/LibGUI/Desktop.h b/Libraries/LibGUI/Desktop.h index 4105609e82..fd2dd58664 100644 --- a/Libraries/LibGUI/Desktop.h +++ b/Libraries/LibGUI/Desktop.h @@ -26,15 +26,13 @@ #pragma once -#include <AK/Badge.h> #include <AK/Function.h> #include <AK/String.h> +#include <LibGUI/Forward.h> #include <LibGfx/Rect.h> namespace GUI { -class WindowServerConnection; - class Desktop { public: static Desktop& the(); diff --git a/Libraries/LibGUI/Dialog.cpp b/Libraries/LibGUI/Dialog.cpp index 68db140a18..9c4468b112 100644 --- a/Libraries/LibGUI/Dialog.cpp +++ b/Libraries/LibGUI/Dialog.cpp @@ -24,6 +24,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include <LibCore/EventLoop.h> #include <LibGUI/Desktop.h> #include <LibGUI/Dialog.h> #include <LibGUI/Event.h> diff --git a/Libraries/LibGUI/Dialog.h b/Libraries/LibGUI/Dialog.h index 2f7753be0c..c909267932 100644 --- a/Libraries/LibGUI/Dialog.h +++ b/Libraries/LibGUI/Dialog.h @@ -26,7 +26,6 @@ #pragma once -#include <LibCore/EventLoop.h> #include <LibGUI/Window.h> namespace GUI { diff --git a/Libraries/LibGUI/DragOperation.cpp b/Libraries/LibGUI/DragOperation.cpp index bd85629126..d67d1abd84 100644 --- a/Libraries/LibGUI/DragOperation.cpp +++ b/Libraries/LibGUI/DragOperation.cpp @@ -26,6 +26,7 @@ #include <AK/Badge.h> #include <AK/SharedBuffer.h> +#include <LibCore/EventLoop.h> #include <LibGUI/DragOperation.h> #include <LibGUI/WindowServerConnection.h> #include <LibGfx/Bitmap.h> diff --git a/Libraries/LibGUI/DragOperation.h b/Libraries/LibGUI/DragOperation.h index 17f45cce6f..ffaf366598 100644 --- a/Libraries/LibGUI/DragOperation.h +++ b/Libraries/LibGUI/DragOperation.h @@ -27,14 +27,12 @@ #pragma once #include <AK/OwnPtr.h> -#include <LibCore/EventLoop.h> #include <LibCore/Object.h> +#include <LibGUI/Forward.h> #include <LibGfx/Forward.h> namespace GUI { -class WindowServerConnection; - class DragOperation : public Core::Object { C_OBJECT(DragOperation) public: diff --git a/Libraries/LibGUI/FilePicker.h b/Libraries/LibGUI/FilePicker.h index 910202ac54..7e3329d5f0 100644 --- a/Libraries/LibGUI/FilePicker.h +++ b/Libraries/LibGUI/FilePicker.h @@ -32,10 +32,6 @@ namespace GUI { -class FileSystemModel; -class Label; -class TextBox; - class FilePicker final : public Dialog { C_OBJECT(FilePicker) public: diff --git a/Libraries/LibGUI/Forward.h b/Libraries/LibGUI/Forward.h new file mode 100644 index 0000000000..97c6977c4f --- /dev/null +++ b/Libraries/LibGUI/Forward.h @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2020, Andreas Kling <kling@serenityos.org> + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +namespace GUI { + +class AbstractButton; +class AbstractTableView; +class AbstractView; +class Action; +class ActionGroup; +class Application; +class BoxLayout; +class Button; +class Command; +class FileSystemModel; +class Frame; +class HorizontalBoxLayout; +class ItemView; +class JsonArrayModel; +class KeyEvent; +class Label; +class Layout; +class Menu; +class MenuBar; +class MenuItem; +class Model; +class ModelEditingDelegate; +class ModelIndex; +class MouseEvent; +class PaintEvent; +class Painter; +class ResizeCorner; +class ScrollBar; +class Slider; +class Splitter; +class StackWidget; +class StatusBar; +class SyntaxHighlighter; +class TabWidget; +class TableView; +class TextBox; +class TextDocument; +class TextDocumentLine; +class TextDocumentUndoCommand; +class TextEditor; +class TreeView; +class Variant; +class VerticalBoxLayout; +class WMEvent; +class Widget; +class Window; +class WindowServerConnection; + +} diff --git a/Libraries/LibGUI/Icon.cpp b/Libraries/LibGUI/Icon.cpp index 2a145f5500..cd60552155 100644 --- a/Libraries/LibGUI/Icon.cpp +++ b/Libraries/LibGUI/Icon.cpp @@ -26,6 +26,7 @@ #include <AK/String.h> #include <LibGUI/Icon.h> +#include <LibGfx/Bitmap.h> GIcon::GIcon() : m_impl(GIconImpl::create()) diff --git a/Libraries/LibGUI/Icon.h b/Libraries/LibGUI/Icon.h index 63e772c75b..ac188cfd0f 100644 --- a/Libraries/LibGUI/Icon.h +++ b/Libraries/LibGUI/Icon.h @@ -27,7 +27,9 @@ #pragma once #include <AK/HashMap.h> -#include <LibGfx/Bitmap.h> +#include <AK/NonnullRefPtr.h> +#include <AK/RefCounted.h> +#include <LibGfx/Forward.h> class GIconImpl : public RefCounted<GIconImpl> { public: diff --git a/Libraries/LibGUI/InputBox.h b/Libraries/LibGUI/InputBox.h index a65263b05d..1d0bd47e24 100644 --- a/Libraries/LibGUI/InputBox.h +++ b/Libraries/LibGUI/InputBox.h @@ -30,9 +30,6 @@ namespace GUI { -class Button; -class TextEditor; - class InputBox : public Dialog { C_OBJECT(InputBox) public: diff --git a/Libraries/LibGUI/ItemView.h b/Libraries/LibGUI/ItemView.h index d5eafe31ac..e67f23635b 100644 --- a/Libraries/LibGUI/ItemView.h +++ b/Libraries/LibGUI/ItemView.h @@ -26,16 +26,11 @@ #pragma once -#include <AK/Function.h> -#include <AK/HashMap.h> #include <LibGUI/AbstractView.h> -#include <LibGUI/Model.h> +#include <LibGUI/Forward.h> namespace GUI { -class ScrollBar; -class Painter; - class ItemView : public AbstractView { C_OBJECT(ItemView) public: diff --git a/Libraries/LibGUI/Layout.cpp b/Libraries/LibGUI/Layout.cpp index 98dde762f4..e5a6e57a53 100644 --- a/Libraries/LibGUI/Layout.cpp +++ b/Libraries/LibGUI/Layout.cpp @@ -24,6 +24,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include <AK/Badge.h> #include <LibGUI/Layout.h> #include <LibGUI/Widget.h> diff --git a/Libraries/LibGUI/Layout.h b/Libraries/LibGUI/Layout.h index 645836e919..f10555182a 100644 --- a/Libraries/LibGUI/Layout.h +++ b/Libraries/LibGUI/Layout.h @@ -26,16 +26,14 @@ #pragma once -#include <AK/Badge.h> #include <AK/OwnPtr.h> #include <AK/Vector.h> #include <AK/WeakPtr.h> +#include <LibGUI/Forward.h> #include <LibGUI/Margins.h> namespace GUI { -class Widget; - class Layout { public: Layout(); diff --git a/Libraries/LibGUI/ListView.cpp b/Libraries/LibGUI/ListView.cpp index c50e8d3b26..bdc1c5248a 100644 --- a/Libraries/LibGUI/ListView.cpp +++ b/Libraries/LibGUI/ListView.cpp @@ -25,10 +25,11 @@ */ #include <Kernel/KeyCode.h> -#include <LibGfx/Palette.h> #include <LibGUI/ListView.h> +#include <LibGUI/Model.h> #include <LibGUI/Painter.h> #include <LibGUI/ScrollBar.h> +#include <LibGfx/Palette.h> namespace GUI { diff --git a/Libraries/LibGUI/ListView.h b/Libraries/LibGUI/ListView.h index d1dffc4f91..1d866401e7 100644 --- a/Libraries/LibGUI/ListView.h +++ b/Libraries/LibGUI/ListView.h @@ -26,16 +26,10 @@ #pragma once -#include <AK/Function.h> -#include <AK/HashMap.h> #include <LibGUI/AbstractView.h> -#include <LibGUI/Model.h> namespace GUI { -class ScrollBar; -class Painter; - class ListView : public AbstractView { C_OBJECT(ListView) public: diff --git a/Libraries/LibGUI/Makefile b/Libraries/LibGUI/Makefile index 931cb40906..9ad544d6ff 100644 --- a/Libraries/LibGUI/Makefile +++ b/Libraries/LibGUI/Makefile @@ -38,6 +38,7 @@ OBJS = \ MenuItem.o \ MessageBox.o \ Model.o \ + ModelIndex.o \ ModelSelection.o \ Painter.o \ ProgressBar.o \ diff --git a/Libraries/LibGUI/Menu.h b/Libraries/LibGUI/Menu.h index 9d7c537e3d..aa9956c886 100644 --- a/Libraries/LibGUI/Menu.h +++ b/Libraries/LibGUI/Menu.h @@ -26,17 +26,13 @@ #pragma once -#include <AK/Function.h> #include <AK/NonnullOwnPtrVector.h> -#include <AK/NonnullRefPtr.h> #include <LibCore/Object.h> +#include <LibGUI/Forward.h> #include <LibGfx/Forward.h> namespace GUI { -class Action; -class MenuItem; - class Menu final : public Core::Object { C_OBJECT(Menu) public: @@ -56,8 +52,6 @@ public: void popup(const Gfx::Point& screen_position); void dismiss(); - Function<void(unsigned)> on_item_activation; - private: friend class MenuBar; diff --git a/Libraries/LibGUI/MenuBar.h b/Libraries/LibGUI/MenuBar.h index 751903f15d..f68c7929f4 100644 --- a/Libraries/LibGUI/MenuBar.h +++ b/Libraries/LibGUI/MenuBar.h @@ -28,12 +28,10 @@ #include <AK/Forward.h> #include <AK/NonnullRefPtrVector.h> +#include <LibGUI/Forward.h> namespace GUI { -class Application; -class Menu; - class MenuBar { public: MenuBar(); diff --git a/Libraries/LibGUI/MenuItem.h b/Libraries/LibGUI/MenuItem.h index f8c7a439ae..a55d60fdcc 100644 --- a/Libraries/LibGUI/MenuItem.h +++ b/Libraries/LibGUI/MenuItem.h @@ -28,12 +28,10 @@ #include <AK/Forward.h> #include <AK/RefPtr.h> +#include <LibGUI/Forward.h> namespace GUI { -class Action; -class Menu; - class MenuItem { public: enum class Type { diff --git a/Libraries/LibGUI/Model.h b/Libraries/LibGUI/Model.h index da09a1bac9..bc074440c8 100644 --- a/Libraries/LibGUI/Model.h +++ b/Libraries/LibGUI/Model.h @@ -38,8 +38,6 @@ namespace GUI { -class AbstractView; - enum class SortOrder { None, Ascending, diff --git a/Libraries/LibGUI/ModelIndex.cpp b/Libraries/LibGUI/ModelIndex.cpp new file mode 100644 index 0000000000..78c396a767 --- /dev/null +++ b/Libraries/LibGUI/ModelIndex.cpp @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include <AK/String.h> +#include <LibGUI/ModelIndex.h> + +namespace GUI { + +const LogStream& operator<<(const LogStream& stream, const ModelIndex& value) +{ + if (value.internal_data()) + return stream << String::format("ModelIndex(%d,%d,%p)", value.row(), value.column(), value.internal_data()); + return stream << String::format("ModelIndex(%d,%d)", value.row(), value.column()); +} + +} diff --git a/Libraries/LibGUI/ModelIndex.h b/Libraries/LibGUI/ModelIndex.h index 2b2481fbc1..c1c94d081e 100644 --- a/Libraries/LibGUI/ModelIndex.h +++ b/Libraries/LibGUI/ModelIndex.h @@ -26,13 +26,11 @@ #pragma once -#include <AK/LogStream.h> -#include <AK/String.h> +#include <AK/Traits.h> +#include <LibGUI/Forward.h> namespace GUI { -class Model; - class ModelIndex { friend class Model; @@ -72,12 +70,7 @@ private: void* m_internal_data { nullptr }; }; -inline const LogStream& operator<<(const LogStream& stream, const ModelIndex& value) -{ - if (value.internal_data()) - return stream << String::format("ModelIndex(%d,%d,%p)", value.row(), value.column(), value.internal_data()); - return stream << String::format("ModelIndex(%d,%d)", value.row(), value.column()); -} +const LogStream& operator<<(const LogStream&, const ModelIndex&); } diff --git a/Libraries/LibGUI/ModelSelection.cpp b/Libraries/LibGUI/ModelSelection.cpp index df7689323c..7bcec232cf 100644 --- a/Libraries/LibGUI/ModelSelection.cpp +++ b/Libraries/LibGUI/ModelSelection.cpp @@ -24,7 +24,9 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include <AK/Badge.h> #include <LibGUI/AbstractView.h> +#include <LibGUI/Model.h> #include <LibGUI/ModelSelection.h> namespace GUI { diff --git a/Libraries/LibGUI/ModelSelection.h b/Libraries/LibGUI/ModelSelection.h index b6452a35bd..c16ed82535 100644 --- a/Libraries/LibGUI/ModelSelection.h +++ b/Libraries/LibGUI/ModelSelection.h @@ -27,12 +27,11 @@ #pragma once #include <AK/HashTable.h> +#include <AK/Vector.h> #include <LibGUI/ModelIndex.h> namespace GUI { -class AbstractView; - class ModelSelection { public: ModelSelection(AbstractView& view) diff --git a/Libraries/LibGUI/Painter.h b/Libraries/LibGUI/Painter.h index a243e01cf4..ca30244505 100644 --- a/Libraries/LibGUI/Painter.h +++ b/Libraries/LibGUI/Painter.h @@ -26,12 +26,11 @@ #pragma once +#include <LibGUI/Forward.h> #include <LibGfx/Painter.h> namespace GUI { -class Widget; - class Painter : public Gfx::Painter { public: explicit Painter(Widget&); diff --git a/Libraries/LibGUI/ScrollBar.cpp b/Libraries/LibGUI/ScrollBar.cpp index 615077e945..fb8baf4ee1 100644 --- a/Libraries/LibGUI/ScrollBar.cpp +++ b/Libraries/LibGUI/ScrollBar.cpp @@ -24,11 +24,9 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <AK/Assertions.h> -#include <AK/StdLibExtras.h> +#include <LibCore/Timer.h> #include <LibGUI/Painter.h> #include <LibGUI/ScrollBar.h> -#include <LibGfx/Bitmap.h> #include <LibGfx/CharacterBitmap.h> #include <LibGfx/Palette.h> #include <LibGfx/StylePainter.h> diff --git a/Libraries/LibGUI/ScrollBar.h b/Libraries/LibGUI/ScrollBar.h index 8283ef3f76..d65d4f6186 100644 --- a/Libraries/LibGUI/ScrollBar.h +++ b/Libraries/LibGUI/ScrollBar.h @@ -27,7 +27,6 @@ #pragma once #include <AK/Function.h> -#include <LibCore/Timer.h> #include <LibGUI/Widget.h> namespace GUI { @@ -37,7 +36,7 @@ class ScrollBar final : public Widget { public: virtual ~ScrollBar() override; - Orientation orientation() const { return m_orientation; } + Gfx::Orientation orientation() const { return m_orientation; } bool is_scrollable() const { return max() != min(); } @@ -101,7 +100,7 @@ private: int m_scrub_start_value { 0 }; Gfx::Point m_scrub_origin; - Orientation m_orientation { Orientation::Vertical }; + Gfx::Orientation m_orientation { Gfx::Orientation::Vertical }; Component m_hovered_component { Component::Invalid }; bool m_scrubber_in_use { false }; diff --git a/Libraries/LibGUI/ScrollableWidget.h b/Libraries/LibGUI/ScrollableWidget.h index 78278579df..012fc12ed8 100644 --- a/Libraries/LibGUI/ScrollableWidget.h +++ b/Libraries/LibGUI/ScrollableWidget.h @@ -30,8 +30,6 @@ namespace GUI { -class ScrollBar; - class ScrollableWidget : public Frame { C_OBJECT(ScrollableWidget) public: diff --git a/Libraries/LibGUI/Shortcut.cpp b/Libraries/LibGUI/Shortcut.cpp index cc76d78a75..ab7d758b6a 100644 --- a/Libraries/LibGUI/Shortcut.cpp +++ b/Libraries/LibGUI/Shortcut.cpp @@ -24,6 +24,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include <AK/String.h> #include <AK/StringBuilder.h> #include <AK/Vector.h> #include <LibGUI/Shortcut.h> diff --git a/Libraries/LibGUI/Shortcut.h b/Libraries/LibGUI/Shortcut.h index 6497451fd0..ad19c6398a 100644 --- a/Libraries/LibGUI/Shortcut.h +++ b/Libraries/LibGUI/Shortcut.h @@ -26,7 +26,6 @@ #pragma once -#include <AK/String.h> #include <AK/Traits.h> #include <Kernel/KeyCode.h> diff --git a/Libraries/LibGUI/SpinBox.h b/Libraries/LibGUI/SpinBox.h index c4485674f0..e86d87948c 100644 --- a/Libraries/LibGUI/SpinBox.h +++ b/Libraries/LibGUI/SpinBox.h @@ -30,9 +30,6 @@ namespace GUI { -class Button; -class TextEditor; - class SpinBox : public Widget { C_OBJECT(SpinBox) public: diff --git a/Libraries/LibGUI/Splitter.h b/Libraries/LibGUI/Splitter.h index 9d7a59dff8..7f05f0b510 100644 --- a/Libraries/LibGUI/Splitter.h +++ b/Libraries/LibGUI/Splitter.h @@ -36,7 +36,7 @@ public: virtual ~Splitter() override; protected: - Splitter(Orientation, Widget* parent); + Splitter(Gfx::Orientation, Widget* parent); virtual void paint_event(PaintEvent&) override; virtual void resize_event(ResizeEvent&) override; @@ -52,7 +52,7 @@ private: void recompute_grabbable_rect(const Widget&, const Widget&); bool get_resize_candidates_at(const Gfx::Point&, Widget*&, Widget*&); - Orientation m_orientation; + Gfx::Orientation m_orientation; bool m_resizing { false }; Gfx::Point m_resize_origin; WeakPtr<Widget> m_first_resizee; @@ -69,7 +69,7 @@ public: private: explicit VerticalSplitter(Widget* parent) - : Splitter(Orientation::Vertical, parent) + : Splitter(Gfx::Orientation::Vertical, parent) { } }; @@ -81,7 +81,7 @@ public: private: explicit HorizontalSplitter(Widget* parent) - : Splitter(Orientation::Horizontal, parent) + : Splitter(Gfx::Orientation::Horizontal, parent) { } }; diff --git a/Libraries/LibGUI/StatusBar.h b/Libraries/LibGUI/StatusBar.h index d2d80cd9bd..eced08550a 100644 --- a/Libraries/LibGUI/StatusBar.h +++ b/Libraries/LibGUI/StatusBar.h @@ -30,9 +30,6 @@ namespace GUI { -class Label; -class ResizeCorner; - class StatusBar : public Widget { C_OBJECT(StatusBar) public: diff --git a/Libraries/LibGUI/SyntaxHighlighter.h b/Libraries/LibGUI/SyntaxHighlighter.h index c7aa3dc927..f4a31ca6e7 100644 --- a/Libraries/LibGUI/SyntaxHighlighter.h +++ b/Libraries/LibGUI/SyntaxHighlighter.h @@ -6,8 +6,6 @@ namespace GUI { -class TextEditor; - class SyntaxHighlighter { AK_MAKE_NONCOPYABLE(SyntaxHighlighter); AK_MAKE_NONMOVABLE(SyntaxHighlighter); diff --git a/Libraries/LibGUI/TableView.h b/Libraries/LibGUI/TableView.h index a21e6f9375..b13be77b45 100644 --- a/Libraries/LibGUI/TableView.h +++ b/Libraries/LibGUI/TableView.h @@ -26,10 +26,7 @@ #pragma once -#include <AK/Function.h> -#include <AK/HashMap.h> #include <LibGUI/AbstractTableView.h> -#include <LibGUI/Model.h> namespace GUI { diff --git a/Libraries/LibGUI/TextBox.h b/Libraries/LibGUI/TextBox.h index 1989ad9825..2d66658d5b 100644 --- a/Libraries/LibGUI/TextBox.h +++ b/Libraries/LibGUI/TextBox.h @@ -26,7 +26,6 @@ #pragma once -#include <AK/Function.h> #include <LibGUI/TextEditor.h> namespace GUI { diff --git a/Libraries/LibGUI/TextDocument.cpp b/Libraries/LibGUI/TextDocument.cpp index fd3d74afdf..3834419b02 100644 --- a/Libraries/LibGUI/TextDocument.cpp +++ b/Libraries/LibGUI/TextDocument.cpp @@ -24,6 +24,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include <AK/Badge.h> #include <AK/StringBuilder.h> #include <LibCore/Timer.h> #include <LibGUI/TextDocument.h> @@ -32,6 +33,11 @@ namespace GUI { +NonnullRefPtr<TextDocument> TextDocument::create(Client* client) +{ + return adopt(*new TextDocument(client)); +} + TextDocument::TextDocument(Client* client) { if (client) @@ -45,6 +51,10 @@ TextDocument::TextDocument(Client* client) }); } +TextDocument::~TextDocument() +{ +} + void TextDocument::set_text(const StringView& text) { m_client_notifications_enabled = false; diff --git a/Libraries/LibGUI/TextDocument.h b/Libraries/LibGUI/TextDocument.h index 10416937b2..51234450b7 100644 --- a/Libraries/LibGUI/TextDocument.h +++ b/Libraries/LibGUI/TextDocument.h @@ -26,13 +26,14 @@ #pragma once -#include <AK/Badge.h> #include <AK/HashTable.h> #include <AK/NonnullOwnPtrVector.h> #include <AK/NonnullRefPtr.h> #include <AK/Optional.h> #include <AK/RefCounted.h> -#include <LibCore/Timer.h> +#include <LibCore/Forward.h> +#include <LibGUI/Command.h> +#include <LibGUI/Forward.h> #include <LibGUI/TextRange.h> #include <LibGUI/UndoStack.h> #include <LibGfx/Color.h> @@ -40,11 +41,6 @@ namespace GUI { -class TextDocument; -class TextDocumentLine; -class TextDocumentUndoCommand; -class TextEditor; - struct TextDocumentSpan { TextRange range; Color color; @@ -76,10 +72,8 @@ public: virtual int soft_tab_width() const = 0; }; - static NonnullRefPtr<TextDocument> create(Client* client = nullptr) - { - return adopt(*new TextDocument(client)); - } + static NonnullRefPtr<TextDocument> create(Client* client = nullptr); + ~TextDocument(); size_t line_count() const { return (size_t)m_lines.size(); } const TextDocumentLine& line(size_t line_index) const { return m_lines[(int)line_index]; } diff --git a/Libraries/LibGUI/TextEditor.h b/Libraries/LibGUI/TextEditor.h index d84c485dd1..1a58833ce7 100644 --- a/Libraries/LibGUI/TextEditor.h +++ b/Libraries/LibGUI/TextEditor.h @@ -27,11 +27,9 @@ #pragma once #include <AK/Function.h> -#include <AK/HashMap.h> #include <AK/NonnullOwnPtrVector.h> #include <AK/NonnullRefPtrVector.h> #include <LibCore/ElapsedTimer.h> -#include <LibCore/Timer.h> #include <LibGUI/ScrollableWidget.h> #include <LibGUI/TextDocument.h> #include <LibGUI/TextRange.h> @@ -39,12 +37,6 @@ namespace GUI { -class Action; -class Menu; -class Painter; -class ScrollBar; -class SyntaxHighlighter; - class TextEditor : public ScrollableWidget , public TextDocument::Client { diff --git a/Libraries/LibGUI/ToolBar.h b/Libraries/LibGUI/ToolBar.h index 575207299e..09e655f2d7 100644 --- a/Libraries/LibGUI/ToolBar.h +++ b/Libraries/LibGUI/ToolBar.h @@ -31,8 +31,6 @@ namespace GUI { -class Action; - class ToolBar : public Widget { C_OBJECT(ToolBar) public: diff --git a/Libraries/LibGUI/TreeView.cpp b/Libraries/LibGUI/TreeView.cpp index 220df877b9..b2fd56d6cb 100644 --- a/Libraries/LibGUI/TreeView.cpp +++ b/Libraries/LibGUI/TreeView.cpp @@ -24,10 +24,12 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <LibGfx/Palette.h> +#include <LibGUI/Model.h> #include <LibGUI/Painter.h> #include <LibGUI/ScrollBar.h> #include <LibGUI/TreeView.h> +#include <LibGfx/Bitmap.h> +#include <LibGfx/Palette.h> //#define DEBUG_ITEM_RECTS diff --git a/Libraries/LibGUI/TreeView.h b/Libraries/LibGUI/TreeView.h index cc47b2bcdd..05a5b600d2 100644 --- a/Libraries/LibGUI/TreeView.h +++ b/Libraries/LibGUI/TreeView.h @@ -26,6 +26,7 @@ #pragma once +#include <AK/HashMap.h> #include <LibGUI/AbstractTableView.h> namespace GUI { @@ -35,7 +36,7 @@ class TreeView : public AbstractTableView { public: virtual ~TreeView() override; - virtual void scroll_into_view(const ModelIndex&, Orientation); + virtual void scroll_into_view(const ModelIndex&, Gfx::Orientation); virtual int item_count() const override; diff --git a/Libraries/LibGUI/UndoStack.cpp b/Libraries/LibGUI/UndoStack.cpp index 76c38eaca9..61999e6d07 100644 --- a/Libraries/LibGUI/UndoStack.cpp +++ b/Libraries/LibGUI/UndoStack.cpp @@ -24,6 +24,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include <LibGUI/Command.h> #include <LibGUI/UndoStack.h> namespace GUI { diff --git a/Libraries/LibGUI/UndoStack.h b/Libraries/LibGUI/UndoStack.h index 1893ad5ec1..2abc278d21 100644 --- a/Libraries/LibGUI/UndoStack.h +++ b/Libraries/LibGUI/UndoStack.h @@ -27,12 +27,10 @@ #pragma once #include <AK/NonnullOwnPtrVector.h> -#include <LibGUI/Command.h> +#include <LibGUI/Forward.h> namespace GUI { -class Command; - class UndoStack { public: UndoStack(); diff --git a/Libraries/LibGUI/Widget.h b/Libraries/LibGUI/Widget.h index 536d554424..4cd76ef0fd 100644 --- a/Libraries/LibGUI/Widget.h +++ b/Libraries/LibGUI/Widget.h @@ -26,11 +26,10 @@ #pragma once -#include <AK/Badge.h> -#include <AK/HashMap.h> #include <AK/String.h> #include <LibCore/Object.h> #include <LibGUI/Event.h> +#include <LibGUI/Forward.h> #include <LibGfx/Color.h> #include <LibGfx/Forward.h> #include <LibGfx/Orientation.h> @@ -40,10 +39,6 @@ extern WidgetClassRegistration registration_##class_name; \ WidgetClassRegistration registration_##class_name(#class_name, [](Widget* parent) { return class_name::construct(parent); }); -namespace GUI { -class Widget; -} - template<> inline bool Core::is<GUI::Widget>(const Core::Object& object) { @@ -52,11 +47,6 @@ inline bool Core::is<GUI::Widget>(const Core::Object& object) namespace GUI { -class Action; -class Layout; -class Menu; -class Window; - enum class SizePolicy { Fixed, Fill @@ -81,8 +71,6 @@ enum class VerticalDirection { Down }; -class Widget; - class WidgetClassRegistration { AK_MAKE_NONCOPYABLE(WidgetClassRegistration) AK_MAKE_NONMOVABLE(WidgetClassRegistration) diff --git a/Libraries/LibGUI/Window.cpp b/Libraries/LibGUI/Window.cpp index 4222de9ea1..3386f9a86c 100644 --- a/Libraries/LibGUI/Window.cpp +++ b/Libraries/LibGUI/Window.cpp @@ -28,6 +28,7 @@ #include <AK/JsonObject.h> #include <AK/NeverDestroyed.h> #include <AK/SharedBuffer.h> +#include <LibCore/EventLoop.h> #include <LibCore/MimeData.h> #include <LibGUI/Action.h> #include <LibGUI/Application.h> diff --git a/Libraries/LibGUI/Window.h b/Libraries/LibGUI/Window.h index 55b2856762..7c2478242d 100644 --- a/Libraries/LibGUI/Window.h +++ b/Libraries/LibGUI/Window.h @@ -27,10 +27,10 @@ #pragma once #include <AK/Function.h> -#include <AK/HashMap.h> #include <AK/String.h> #include <AK/WeakPtr.h> #include <LibCore/Object.h> +#include <LibGUI/Forward.h> #include <LibGUI/WindowType.h> #include <LibGfx/Color.h> #include <LibGfx/Forward.h> @@ -38,12 +38,6 @@ namespace GUI { -class Action; -class KeyEvent; -class WMEvent; -class Widget; -class WindowServerConnection; - enum class StandardCursor { None = 0, Arrow, diff --git a/Libraries/LibGUI/WindowServerConnection.cpp b/Libraries/LibGUI/WindowServerConnection.cpp index df0dab8df9..5b756cbd7d 100644 --- a/Libraries/LibGUI/WindowServerConnection.cpp +++ b/Libraries/LibGUI/WindowServerConnection.cpp @@ -25,6 +25,7 @@ */ #include <AK/SharedBuffer.h> +#include <LibCore/EventLoop.h> #include <LibCore/MimeData.h> #include <LibGUI/Action.h> #include <LibGUI/Application.h> diff --git a/Libraries/LibGfx/Forward.h b/Libraries/LibGfx/Forward.h index 325ec0c357..2c03bc303d 100644 --- a/Libraries/LibGfx/Forward.h +++ b/Libraries/LibGfx/Forward.h @@ -51,6 +51,7 @@ class Triangle; enum class BitmapFormat; enum class ColorRole; +enum class TextAlignment; } diff --git a/Libraries/LibGfx/Palette.h b/Libraries/LibGfx/Palette.h index 2c2dbce749..ecd647e15e 100644 --- a/Libraries/LibGfx/Palette.h +++ b/Libraries/LibGfx/Palette.h @@ -30,12 +30,9 @@ #include <AK/Noncopyable.h> #include <AK/RefCounted.h> #include <AK/RefPtr.h> +#include <LibGUI/Forward.h> #include <LibGfx/SystemTheme.h> -namespace GUI { -class Application; -} - namespace Gfx { class PaletteImpl : public RefCounted<PaletteImpl> { diff --git a/Libraries/LibHTML/Layout/LayoutWidget.h b/Libraries/LibHTML/Layout/LayoutWidget.h index 15c73f6417..1cb7831655 100644 --- a/Libraries/LibHTML/Layout/LayoutWidget.h +++ b/Libraries/LibHTML/Layout/LayoutWidget.h @@ -28,10 +28,6 @@ #include <LibHTML/Layout/LayoutReplaced.h> -namespace GUI { -class Widget; -} - class LayoutWidget : public LayoutReplaced { public: LayoutWidget(const Element&, GUI::Widget&); diff --git a/Libraries/LibHTML/RenderingContext.h b/Libraries/LibHTML/RenderingContext.h index 028555fd2a..8880f205aa 100644 --- a/Libraries/LibHTML/RenderingContext.h +++ b/Libraries/LibHTML/RenderingContext.h @@ -28,10 +28,7 @@ #include <LibGfx/Palette.h> #include <LibGfx/Rect.h> - -namespace GUI { -class Painter; -} +#include <LibGUI/Forward.h> class RenderingContext { public: diff --git a/Libraries/LibIPC/ServerConnection.h b/Libraries/LibIPC/ServerConnection.h index 8b74400dd9..04dc09641f 100644 --- a/Libraries/LibIPC/ServerConnection.h +++ b/Libraries/LibIPC/ServerConnection.h @@ -29,7 +29,6 @@ #include <AK/ByteBuffer.h> #include <AK/NonnullOwnPtrVector.h> #include <LibCore/Event.h> -#include <LibCore/EventLoop.h> #include <LibCore/LocalSocket.h> #include <LibCore/Notifier.h> #include <LibCore/SyscallUtils.h> diff --git a/Libraries/LibVT/TerminalWidget.h b/Libraries/LibVT/TerminalWidget.h index 7e465828c4..f518a21eb1 100644 --- a/Libraries/LibVT/TerminalWidget.h +++ b/Libraries/LibVT/TerminalWidget.h @@ -36,10 +36,6 @@ #include <LibGfx/Rect.h> #include <LibVT/Terminal.h> -namespace GUI { -class ScrollBar; -} - class TerminalWidget final : public GUI::Frame , public VT::TerminalClient { C_OBJECT(TerminalWidget) |