#pragma once #include "Tool.h" #include #include class GMenu; class SprayTool final : public Tool { public: SprayTool(); virtual ~SprayTool() override; virtual void on_mousedown(GMouseEvent&) override; virtual void on_mouseup(GMouseEvent&) override; virtual void on_mousemove(GMouseEvent&) override; virtual void on_contextmenu(GContextMenuEvent&) override; private: virtual const char* class_name() const override { return "SprayTool"; } void paint_it(); RefPtr m_timer; Point m_last_pos; Color m_color; OwnPtr m_context_menu; int m_thickness { 1 }; };