mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:18:11 +00:00
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.
This commit is contained in:
parent
2e6ab58117
commit
2143da6434
115 changed files with 220 additions and 338 deletions
|
@ -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]; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue