blob: 3258cede354f7f994d5f807d8a244908f53c0574 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#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;
// FIXME: This should be an app-wide preference instead.
int grid_size() const { return m_grid_size; }
private:
virtual void paint_event(GPaintEvent&) override;
virtual void second_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);
int m_grid_size { 5 };
};
|