mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 03:55:24 +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
Notes:
sideshowbarker
2024-07-19 09:16:44 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/2143da6434d
115 changed files with 220 additions and 338 deletions
|
@ -28,11 +28,6 @@
|
|||
|
||||
class Document;
|
||||
|
||||
namespace GUI {
|
||||
class TableView;
|
||||
class TreeView;
|
||||
}
|
||||
|
||||
class InspectorWidget final : public GUI::Widget {
|
||||
C_OBJECT(InspectorWidget)
|
||||
public:
|
||||
|
|
|
@ -31,12 +31,6 @@
|
|||
#include <AK/Vector.h>
|
||||
#include <LibGUI/Widget.h>
|
||||
|
||||
namespace GUI {
|
||||
class Button;
|
||||
class Label;
|
||||
class TextBox;
|
||||
}
|
||||
|
||||
class CalculatorWidget final : public GUI::Widget {
|
||||
C_OBJECT(CalculatorWidget)
|
||||
public:
|
||||
|
|
|
@ -34,10 +34,6 @@
|
|||
#include <LibGUI/Widget.h>
|
||||
#include <LibGUI/Window.h>
|
||||
|
||||
namespace GUI {
|
||||
class StatusBar;
|
||||
}
|
||||
|
||||
class HexEditor;
|
||||
|
||||
class HexEditorWidget final : public GUI::Widget {
|
||||
|
|
|
@ -31,11 +31,6 @@
|
|||
#include <LibGUI/Widget.h>
|
||||
#include <LibGUI/Window.h>
|
||||
|
||||
namespace GUI {
|
||||
class StackWidget;
|
||||
class TableView;
|
||||
}
|
||||
|
||||
class IRCAppWindow : public GUI::Window {
|
||||
public:
|
||||
IRCAppWindow();
|
||||
|
|
|
@ -28,10 +28,6 @@
|
|||
|
||||
#include <LibGUI/Widget.h>
|
||||
|
||||
namespace GUI {
|
||||
class TextEditor;
|
||||
}
|
||||
|
||||
class IRCChannel;
|
||||
class IRCClient;
|
||||
class IRCQuery;
|
||||
|
|
|
@ -30,11 +30,6 @@
|
|||
#include <LibGfx/Point.h>
|
||||
#include <LibGUI/ActionGroup.h>
|
||||
|
||||
namespace GUI {
|
||||
class Menu;
|
||||
class Painter;
|
||||
}
|
||||
|
||||
class EllipseTool final : public Tool {
|
||||
public:
|
||||
EllipseTool();
|
||||
|
|
|
@ -30,10 +30,6 @@
|
|||
#include <LibGfx/Point.h>
|
||||
#include <LibGUI/ActionGroup.h>
|
||||
|
||||
namespace GUI {
|
||||
class Menu;
|
||||
}
|
||||
|
||||
class EraseTool final : public Tool {
|
||||
public:
|
||||
EraseTool();
|
||||
|
|
|
@ -30,10 +30,6 @@
|
|||
#include <LibGfx/Point.h>
|
||||
#include <LibGUI/ActionGroup.h>
|
||||
|
||||
namespace GUI {
|
||||
class Menu;
|
||||
}
|
||||
|
||||
class LineTool final : public Tool {
|
||||
public:
|
||||
LineTool();
|
||||
|
|
|
@ -30,10 +30,6 @@
|
|||
#include <LibGfx/Point.h>
|
||||
#include <LibGUI/ActionGroup.h>
|
||||
|
||||
namespace GUI {
|
||||
class Menu;
|
||||
}
|
||||
|
||||
class PenTool final : public Tool {
|
||||
public:
|
||||
PenTool();
|
||||
|
|
|
@ -29,11 +29,6 @@
|
|||
#include "Tool.h"
|
||||
#include <LibGfx/Point.h>
|
||||
|
||||
namespace GUI {
|
||||
class Menu;
|
||||
class Painter;
|
||||
}
|
||||
|
||||
class RectangleTool final : public Tool {
|
||||
public:
|
||||
RectangleTool();
|
||||
|
|
|
@ -31,10 +31,6 @@
|
|||
#include <LibGUI/ActionGroup.h>
|
||||
#include <LibGUI/Painter.h>
|
||||
|
||||
namespace GUI {
|
||||
class Menu;
|
||||
}
|
||||
|
||||
class SprayTool final : public Tool {
|
||||
public:
|
||||
SprayTool();
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/MessageBox.h>
|
||||
#include <LibGUI/Window.h>
|
||||
#include <LibGfx/Bitmap.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
|
|
|
@ -29,11 +29,6 @@
|
|||
|
||||
#include <LibGUI/Frame.h>
|
||||
|
||||
namespace GUI {
|
||||
class Label;
|
||||
class Slider;
|
||||
}
|
||||
|
||||
class AudioEngine;
|
||||
class MainWidget;
|
||||
|
||||
|
|
|
@ -37,10 +37,6 @@ class SamplerWidget;
|
|||
class KeysWidget;
|
||||
class KnobsWidget;
|
||||
|
||||
namespace GUI {
|
||||
class TabWidget;
|
||||
}
|
||||
|
||||
class MainWidget final : public GUI::Widget {
|
||||
C_OBJECT(MainWidget)
|
||||
public:
|
||||
|
|
|
@ -28,11 +28,6 @@
|
|||
|
||||
#include <LibGUI/Frame.h>
|
||||
|
||||
namespace GUI {
|
||||
class Label;
|
||||
class Button;
|
||||
}
|
||||
|
||||
class AudioEngine;
|
||||
|
||||
class WaveEditor final : public GUI::Frame {
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include "MainWidget.h"
|
||||
#include <LibAudio/ClientConnection.h>
|
||||
#include <LibAudio/WavWriter.h>
|
||||
#include <LibCore/EventLoop.h>
|
||||
#include <LibCore/File.h>
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
#include <LibGUI/Action.h>
|
||||
|
@ -38,6 +39,7 @@
|
|||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/MessageBox.h>
|
||||
#include <LibGUI/Window.h>
|
||||
#include <LibGfx/Bitmap.h>
|
||||
#include <LibThread/Thread.h>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
|
|
|
@ -28,10 +28,6 @@
|
|||
|
||||
#include <LibGUI/Widget.h>
|
||||
|
||||
namespace GUI {
|
||||
class Label;
|
||||
}
|
||||
|
||||
class GraphWidget;
|
||||
|
||||
class MemoryStatsWidget final : public GUI::Widget {
|
||||
|
|
|
@ -29,10 +29,6 @@
|
|||
#include <LibCore/Timer.h>
|
||||
#include <LibGUI/LazyWidget.h>
|
||||
|
||||
namespace GUI {
|
||||
class TableView;
|
||||
}
|
||||
|
||||
class NetworkStatisticsWidget final : public GUI::LazyWidget {
|
||||
C_OBJECT(NetworkStatisticsWidget)
|
||||
public:
|
||||
|
|
|
@ -28,10 +28,6 @@
|
|||
|
||||
#include <LibGUI/Widget.h>
|
||||
|
||||
namespace GUI {
|
||||
class TableView;
|
||||
}
|
||||
|
||||
class ProcessFileDescriptorMapWidget final : public GUI::Widget {
|
||||
C_OBJECT(ProcessFileDescriptorMapWidget);
|
||||
public:
|
||||
|
|
|
@ -28,11 +28,6 @@
|
|||
|
||||
#include <LibGUI/Widget.h>
|
||||
|
||||
namespace GUI {
|
||||
class JsonArrayModel;
|
||||
class TableView;
|
||||
}
|
||||
|
||||
class ProcessMemoryMapWidget final : public GUI::Widget {
|
||||
C_OBJECT(ProcessMemoryMapWidget);
|
||||
|
||||
|
|
|
@ -28,10 +28,6 @@
|
|||
|
||||
#include <LibGUI/Widget.h>
|
||||
|
||||
namespace GUI {
|
||||
class TableView;
|
||||
}
|
||||
|
||||
class ProcessUnveiledPathsWidget final : public GUI::Widget {
|
||||
C_OBJECT(ProcessUnveiledPathsWidget);
|
||||
public:
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#include <LibGUI/TextBox.h>
|
||||
#include <LibGUI/TextEditor.h>
|
||||
#include <LibGUI/ToolBar.h>
|
||||
#include <LibGfx/Font.h>
|
||||
|
||||
TextEditorWidget::TextEditorWidget()
|
||||
{
|
||||
|
@ -466,7 +467,7 @@ void TextEditorWidget::drop_event(GUI::DropEvent& event)
|
|||
|
||||
if (event.mime_data().has_urls()) {
|
||||
auto urls = event.mime_data().urls();
|
||||
if (urls.is_empty() )
|
||||
if (urls.is_empty())
|
||||
return;
|
||||
if (urls.size() > 1) {
|
||||
GUI::MessageBox::show("TextEditor can only open one file at a time!", "One at a time please!", GUI::MessageBox::Type::Error, GUI::MessageBox::InputType::OK, window());
|
||||
|
|
|
@ -33,13 +33,6 @@
|
|||
#include <LibGUI/Widget.h>
|
||||
#include <LibGUI/Window.h>
|
||||
|
||||
namespace GUI {
|
||||
class Button;
|
||||
class StatusBar;
|
||||
class TextBox;
|
||||
class TextEditor;
|
||||
}
|
||||
|
||||
class TextEditorWidget final : public GUI::Widget {
|
||||
C_OBJECT(TextEditorWidget)
|
||||
public:
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
*/
|
||||
|
||||
#include "TextWidget.h"
|
||||
#include <AK/Optional.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <AK/Vector.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)
|
||||
|
|
|
@ -28,10 +28,6 @@
|
|||
|
||||
#include <LibGUI/Widget.h>
|
||||
|
||||
namespace GUI {
|
||||
class Label;
|
||||
}
|
||||
|
||||
class Editor;
|
||||
|
||||
class EditorWrapper : public GUI::Widget {
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/HashTable.h>
|
||||
#include <LibGUI/ScrollableWidget.h>
|
||||
|
||||
class FormWidget;
|
||||
|
|
|
@ -28,11 +28,6 @@
|
|||
|
||||
#include <LibGUI/Widget.h>
|
||||
|
||||
namespace GUI {
|
||||
class ModelIndex;
|
||||
class TableView;
|
||||
}
|
||||
|
||||
class LocatorTextBox;
|
||||
|
||||
class Locator final : public GUI::Widget {
|
||||
|
|
|
@ -28,10 +28,6 @@
|
|||
|
||||
#include <LibGUI/Widget.h>
|
||||
|
||||
namespace GUI {
|
||||
class Label;
|
||||
}
|
||||
|
||||
class ProcessStateWidget final : public GUI::Widget {
|
||||
C_OBJECT(ProcessStateWidget)
|
||||
public:
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -31,10 +31,7 @@
|
|||
#include <AK/JsonValue.h>
|
||||
#include <AK/NonnullRefPtrVector.h>
|
||||
#include <AK/OwnPtr.h>
|
||||
|
||||
namespace GUI {
|
||||
class Model;
|
||||
}
|
||||
#include <LibGUI/Forward.h>
|
||||
|
||||
class ProfileModel;
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include <LibGUI/BoxLayout.h>
|
||||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/Model.h>
|
||||
#include <LibGUI/TreeView.h>
|
||||
#include <LibGUI/Window.h>
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -28,11 +28,6 @@
|
|||
|
||||
#include <LibGUI/Window.h>
|
||||
|
||||
namespace GUI {
|
||||
class TableView;
|
||||
class TextBox;
|
||||
}
|
||||
|
||||
class VBPropertiesWindow final : public GUI::Window {
|
||||
C_OBJECT(VBPropertiesWindow)
|
||||
public:
|
||||
|
|
|
@ -28,12 +28,9 @@
|
|||
|
||||
#include <AK/Function.h>
|
||||
#include <AK/String.h>
|
||||
#include <LibGUI/Forward.h>
|
||||
#include <LibGUI/Variant.h>
|
||||
|
||||
namespace GUI {
|
||||
class Widget;
|
||||
}
|
||||
|
||||
class VBWidget;
|
||||
|
||||
class VBProperty {
|
||||
|
|
|
@ -36,11 +36,6 @@
|
|||
#include <LibGfx/Rect.h>
|
||||
#include <LibGUI/Widget.h>
|
||||
|
||||
namespace GUI {
|
||||
class Painter;
|
||||
class Variant;
|
||||
}
|
||||
|
||||
class VBForm;
|
||||
class VBProperty;
|
||||
class VBWidgetPropertyModel;
|
||||
|
|
|
@ -30,11 +30,6 @@
|
|||
#include <LibCore/Timer.h>
|
||||
#include <LibGUI/Frame.h>
|
||||
|
||||
namespace GUI {
|
||||
class Button;
|
||||
class Label;
|
||||
}
|
||||
|
||||
class Field;
|
||||
class SquareButton;
|
||||
class SquareLabel;
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -30,9 +30,6 @@
|
|||
|
||||
namespace GUI {
|
||||
|
||||
class Painter;
|
||||
|
||||
// FIXME: Rename this to something without "table cell" in the name.
|
||||
class TableCellPaintingDelegate {
|
||||
public:
|
||||
virtual ~TableCellPaintingDelegate() {}
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
*/
|
||||
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <Kernel/KeyCode.h>
|
||||
#include <LibGUI/AbstractView.h>
|
||||
#include <LibGUI/DragOperation.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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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() {}
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
*/
|
||||
|
||||
#include <LibGUI/BoxLayout.h>
|
||||
#include <LibGUI/Widget.h>
|
||||
#include <LibGfx/Orientation.h>
|
||||
#include <stdio.h>
|
||||
|
||||
//#define GBOXLAYOUT_DEBUG
|
||||
|
|
|
@ -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 {}
|
||||
|
|
|
@ -35,8 +35,6 @@
|
|||
|
||||
namespace GUI {
|
||||
|
||||
class Action;
|
||||
|
||||
class Button : public AbstractButton {
|
||||
C_OBJECT(Button)
|
||||
public:
|
||||
|
|
|
@ -26,8 +26,6 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Function.h>
|
||||
#include <AK/String.h>
|
||||
#include <LibGUI/AbstractButton.h>
|
||||
|
||||
namespace GUI {
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -30,8 +30,6 @@
|
|||
|
||||
namespace GUI {
|
||||
|
||||
class Frame;
|
||||
|
||||
class ColorPicker final : public Dialog {
|
||||
C_OBJECT(ColorPicker)
|
||||
public:
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
*/
|
||||
|
||||
#include <LibGUI/ColumnsView.h>
|
||||
#include <LibGUI/Model.h>
|
||||
#include <LibGUI/Painter.h>
|
||||
#include <LibGUI/ScrollBar.h>
|
||||
#include <LibGfx/CharacterBitmap.h>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -31,9 +31,6 @@
|
|||
|
||||
namespace GUI {
|
||||
|
||||
class Button;
|
||||
class TextEditor;
|
||||
|
||||
class ComboBox : public Widget {
|
||||
C_OBJECT(ComboBox)
|
||||
public:
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <LibCore/EventLoop.h>
|
||||
#include <LibGUI/Window.h>
|
||||
|
||||
namespace GUI {
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -32,10 +32,6 @@
|
|||
|
||||
namespace GUI {
|
||||
|
||||
class FileSystemModel;
|
||||
class Label;
|
||||
class TextBox;
|
||||
|
||||
class FilePicker final : public Dialog {
|
||||
C_OBJECT(FilePicker)
|
||||
public:
|
||||
|
|
77
Libraries/LibGUI/Forward.h
Normal file
77
Libraries/LibGUI/Forward.h
Normal file
|
@ -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;
|
||||
|
||||
}
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
#include <AK/String.h>
|
||||
#include <LibGUI/Icon.h>
|
||||
#include <LibGfx/Bitmap.h>
|
||||
|
||||
GIcon::GIcon()
|
||||
: m_impl(GIconImpl::create())
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -30,9 +30,6 @@
|
|||
|
||||
namespace GUI {
|
||||
|
||||
class Button;
|
||||
class TextEditor;
|
||||
|
||||
class InputBox : public Dialog {
|
||||
C_OBJECT(InputBox)
|
||||
public:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -38,6 +38,7 @@ OBJS = \
|
|||
MenuItem.o \
|
||||
MessageBox.o \
|
||||
Model.o \
|
||||
ModelIndex.o \
|
||||
ModelSelection.o \
|
||||
Painter.o \
|
||||
ProgressBar.o \
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -38,8 +38,6 @@
|
|||
|
||||
namespace GUI {
|
||||
|
||||
class AbstractView;
|
||||
|
||||
enum class SortOrder {
|
||||
None,
|
||||
Ascending,
|
||||
|
|
39
Libraries/LibGUI/ModelIndex.cpp
Normal file
39
Libraries/LibGUI/ModelIndex.cpp
Normal file
|
@ -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());
|
||||
}
|
||||
|
||||
}
|
|
@ -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&);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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&);
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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 };
|
||||
|
||||
|
|
|
@ -30,8 +30,6 @@
|
|||
|
||||
namespace GUI {
|
||||
|
||||
class ScrollBar;
|
||||
|
||||
class ScrollableWidget : public Frame {
|
||||
C_OBJECT(ScrollableWidget)
|
||||
public:
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/String.h>
|
||||
#include <AK/Traits.h>
|
||||
#include <Kernel/KeyCode.h>
|
||||
|
||||
|
|
|
@ -30,9 +30,6 @@
|
|||
|
||||
namespace GUI {
|
||||
|
||||
class Button;
|
||||
class TextEditor;
|
||||
|
||||
class SpinBox : public Widget {
|
||||
C_OBJECT(SpinBox)
|
||||
public:
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
|
|
@ -30,9 +30,6 @@
|
|||
|
||||
namespace GUI {
|
||||
|
||||
class Label;
|
||||
class ResizeCorner;
|
||||
|
||||
class StatusBar : public Widget {
|
||||
C_OBJECT(StatusBar)
|
||||
public:
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
|
||||
namespace GUI {
|
||||
|
||||
class TextEditor;
|
||||
|
||||
class SyntaxHighlighter {
|
||||
AK_MAKE_NONCOPYABLE(SyntaxHighlighter);
|
||||
AK_MAKE_NONMOVABLE(SyntaxHighlighter);
|
||||
|
|
|
@ -26,10 +26,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Function.h>
|
||||
#include <AK/HashMap.h>
|
||||
#include <LibGUI/AbstractTableView.h>
|
||||
#include <LibGUI/Model.h>
|
||||
|
||||
namespace GUI {
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Function.h>
|
||||
#include <LibGUI/TextEditor.h>
|
||||
|
||||
namespace GUI {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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]; }
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -31,8 +31,6 @@
|
|||
|
||||
namespace GUI {
|
||||
|
||||
class Action;
|
||||
|
||||
class ToolBar : public Widget {
|
||||
C_OBJECT(ToolBar)
|
||||
public:
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue