blob: 2ef8f7c7aa9329b38c6cae832256a7f5eb193820 (
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
|
#pragma once
#include "Tool.h"
#include <SharedGraphics/Point.h>
class GMenu;
class PenTool final : public Tool {
public:
PenTool();
virtual ~PenTool() override;
virtual void on_mousedown(GMouseEvent&) override;
virtual void on_mousemove(GMouseEvent&) override;
virtual void on_mouseup(GMouseEvent&) override;
virtual void on_contextmenu(GContextMenuEvent&) override;
private:
virtual const char* class_name() const override { return "PenTool"; }
Point m_last_drawing_event_position { -1, -1 };
OwnPtr<GMenu> m_context_menu;
int m_thickness { 1 };
};
|