ladybird/Applications/PaintBrush/PenTool.h
Andreas Kling 1c0669f010 LibDraw: Introduce (formerly known as SharedGraphics.)
Instead of LibGUI and WindowServer building their own copies of the drawing
and graphics code, let's it in a separate LibDraw library.

This avoids building the code twice, and will encourage better separation
of concerns. :^)
2019-07-18 10:18:16 +02:00

25 lines
590 B
C++

#pragma once
#include "Tool.h"
#include <LibDraw/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 };
};