1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-15 14:37:35 +00:00
serenity/Applications/PaintBrush/EraseTool.h
Andreas Kling fd5eb79d19 LibGUI: Make GMenu inherit from CObject
This is primarily to make it possible to pass a GMenu* where a CObject*
is expected.
2019-12-09 21:05:44 +01:00

25 lines
628 B
C++

#pragma once
#include "Tool.h"
#include <LibDraw/Point.h>
class GMenu;
class EraseTool final : public Tool {
public:
EraseTool();
virtual ~EraseTool() override;
virtual void on_mousedown(GMouseEvent&) override;
virtual void on_mousemove(GMouseEvent&) override;
virtual void on_contextmenu(GContextMenuEvent&) override;
private:
Color get_color() const;
virtual const char* class_name() const override { return "EraseTool"; }
Rect build_rect(const Point& pos, const Rect& widget_rect);
RefPtr<GMenu> m_context_menu;
bool m_use_secondary_color { true };
int m_thickness { 1 };
};