summaryrefslogtreecommitdiff
path: root/DevTools/HackStudio
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-02-16 09:17:49 +0100
committerAndreas Kling <kling@serenityos.org>2020-02-16 09:41:56 +0100
commit2143da6434d3ee0d0e33c57533387b9f0f5fce30 (patch)
tree8e17e9def4c4fe384f9a19dfc63c7d79c17908b9 /DevTools/HackStudio
parent2e6ab5811720a41825e2f2a22b2ec3027e361099 (diff)
downloadserenity-2143da6434d3ee0d0e33c57533387b9f0f5fce30.zip
LibGUI: Add forwarding header
This patch adds <LibGUI/Forward.h> and uses it a bunch. It also dragged various header dependency reduction changes into it.
Diffstat (limited to 'DevTools/HackStudio')
-rw-r--r--DevTools/HackStudio/CursorTool.h5
-rw-r--r--DevTools/HackStudio/EditorWrapper.h4
-rw-r--r--DevTools/HackStudio/FindInFilesWidget.h6
-rw-r--r--DevTools/HackStudio/FormEditorWidget.h1
-rw-r--r--DevTools/HackStudio/Locator.h5
-rw-r--r--DevTools/HackStudio/ProcessStateWidget.h4
-rw-r--r--DevTools/HackStudio/ProjectFile.cpp5
-rw-r--r--DevTools/HackStudio/ProjectFile.h5
-rw-r--r--DevTools/HackStudio/Tool.h8
9 files changed, 9 insertions, 34 deletions
diff --git a/DevTools/HackStudio/CursorTool.h b/DevTools/HackStudio/CursorTool.h
index 2980075a39..36e6a97a2c 100644
--- a/DevTools/HackStudio/CursorTool.h
+++ b/DevTools/HackStudio/CursorTool.h
@@ -28,12 +28,9 @@
#include "Tool.h"
#include <AK/HashMap.h>
+#include <LibGUI/Forward.h>
#include <LibGfx/Point.h>
-namespace GUI {
-class Widget;
-}
-
class CursorTool final : public Tool {
public:
explicit CursorTool(FormEditorWidget& editor)
diff --git a/DevTools/HackStudio/EditorWrapper.h b/DevTools/HackStudio/EditorWrapper.h
index 886ac11707..c7ea938f30 100644
--- a/DevTools/HackStudio/EditorWrapper.h
+++ b/DevTools/HackStudio/EditorWrapper.h
@@ -28,10 +28,6 @@
#include <LibGUI/Widget.h>
-namespace GUI {
-class Label;
-}
-
class Editor;
class EditorWrapper : public GUI::Widget {
diff --git a/DevTools/HackStudio/FindInFilesWidget.h b/DevTools/HackStudio/FindInFilesWidget.h
index 5a2127d129..bcf0a73c78 100644
--- a/DevTools/HackStudio/FindInFilesWidget.h
+++ b/DevTools/HackStudio/FindInFilesWidget.h
@@ -28,12 +28,6 @@
#include <LibGUI/Widget.h>
-namespace GUI {
-class Button;
-class TableView;
-class TextBox;
-}
-
class FindInFilesWidget final : public GUI::Widget {
C_OBJECT(FindInFilesWidget)
public:
diff --git a/DevTools/HackStudio/FormEditorWidget.h b/DevTools/HackStudio/FormEditorWidget.h
index b74890eef7..69200b66cf 100644
--- a/DevTools/HackStudio/FormEditorWidget.h
+++ b/DevTools/HackStudio/FormEditorWidget.h
@@ -26,6 +26,7 @@
#pragma once
+#include <AK/HashTable.h>
#include <LibGUI/ScrollableWidget.h>
class FormWidget;
diff --git a/DevTools/HackStudio/Locator.h b/DevTools/HackStudio/Locator.h
index bb1773c9b3..4b0307babb 100644
--- a/DevTools/HackStudio/Locator.h
+++ b/DevTools/HackStudio/Locator.h
@@ -28,11 +28,6 @@
#include <LibGUI/Widget.h>
-namespace GUI {
-class ModelIndex;
-class TableView;
-}
-
class LocatorTextBox;
class Locator final : public GUI::Widget {
diff --git a/DevTools/HackStudio/ProcessStateWidget.h b/DevTools/HackStudio/ProcessStateWidget.h
index 97888371bf..22f10c573a 100644
--- a/DevTools/HackStudio/ProcessStateWidget.h
+++ b/DevTools/HackStudio/ProcessStateWidget.h
@@ -28,10 +28,6 @@
#include <LibGUI/Widget.h>
-namespace GUI {
-class Label;
-}
-
class ProcessStateWidget final : public GUI::Widget {
C_OBJECT(ProcessStateWidget)
public:
diff --git a/DevTools/HackStudio/ProjectFile.cpp b/DevTools/HackStudio/ProjectFile.cpp
index 646c428551..0e9493f40f 100644
--- a/DevTools/HackStudio/ProjectFile.cpp
+++ b/DevTools/HackStudio/ProjectFile.cpp
@@ -28,6 +28,11 @@
#include <LibCore/File.h>
#include <string.h>
+ProjectFile::ProjectFile(const String& name)
+ : m_name(name)
+{
+}
+
const GUI::TextDocument& ProjectFile::document() const
{
if (!m_document) {
diff --git a/DevTools/HackStudio/ProjectFile.h b/DevTools/HackStudio/ProjectFile.h
index 486895107b..1019d83368 100644
--- a/DevTools/HackStudio/ProjectFile.h
+++ b/DevTools/HackStudio/ProjectFile.h
@@ -44,10 +44,7 @@ public:
const GUI::TextDocument& document() const;
private:
- explicit ProjectFile(const String& name)
- : m_name(name)
- {
- }
+ explicit ProjectFile(const String& name);
String m_name;
mutable RefPtr<GUI::TextDocument> m_document;
diff --git a/DevTools/HackStudio/Tool.h b/DevTools/HackStudio/Tool.h
index e181f43458..7843ef08b2 100644
--- a/DevTools/HackStudio/Tool.h
+++ b/DevTools/HackStudio/Tool.h
@@ -27,16 +27,10 @@
#pragma once
#include <AK/Noncopyable.h>
+#include <LibGUI/Forward.h>
class FormEditorWidget;
-namespace GUI {
-class KeyEvent;
-class MouseEvent;
-class PaintEvent;
-class Painter;
-}
-
class Tool {
AK_MAKE_NONCOPYABLE(Tool)
AK_MAKE_NONMOVABLE(Tool)