1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:48:11 +00:00
serenity/DevTools/HackStudio/FormWidget.h
Andreas Kling e87756424d HackStudio: Introduce a Tool class with subs CursorTool and WidgetTool
These will be used to draw out new widgets on a FormWidget, or in the
case of CursorTool, to select and manipulate existing widgets.
2019-11-10 21:45:32 +01:00

25 lines
632 B
C++

#pragma once
#include <LibGUI/GWidget.h>
class FormEditorWidget;
class FormWidget final : public GWidget {
C_OBJECT(FormWidget)
public:
virtual ~FormWidget() override;
FormEditorWidget& editor();
const FormEditorWidget& editor() const;
private:
virtual void paint_event(GPaintEvent&) override;
virtual void mousedown_event(GMouseEvent&) override;
virtual void mouseup_event(GMouseEvent&) override;
virtual void mousemove_event(GMouseEvent&) override;
explicit FormWidget(FormEditorWidget& parent);
// FIXME: This should be an app-wide preference instead.
int m_grid_size { 5 };
};