diff options
author | Andreas Kling <kling@serenityos.org> | 2020-05-12 23:44:46 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-12 23:44:46 +0200 |
commit | 83d24dcb1d4d921c4d1c9f85ca97808b2a463b32 (patch) | |
tree | 6b2d88a0584d6dc4cccf718f3751f892a203f394 /Applications/PaintBrush/EraseTool.h | |
parent | 7dd8f1b921c5c63c21415a6ded179134a18e1ae2 (diff) | |
download | serenity-83d24dcb1d4d921c4d1c9f85ca97808b2a463b32.zip |
PaintBrush: Port all the existing toolbox tools to the Layer world :^)
Many tools are not working perfectly right yet, but we'll fix them!
Diffstat (limited to 'Applications/PaintBrush/EraseTool.h')
-rw-r--r-- | Applications/PaintBrush/EraseTool.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Applications/PaintBrush/EraseTool.h b/Applications/PaintBrush/EraseTool.h index bdbfcf21ec..8384b8e8fe 100644 --- a/Applications/PaintBrush/EraseTool.h +++ b/Applications/PaintBrush/EraseTool.h @@ -29,18 +29,21 @@ #include "Tool.h" #include <LibGUI/ActionGroup.h> #include <LibGfx/Point.h> +#include <LibGfx/Forward.h> + +namespace PaintBrush { class EraseTool final : public Tool { public: EraseTool(); virtual ~EraseTool() override; - virtual void on_mousedown(GUI::MouseEvent&) override; - virtual void on_mousemove(GUI::MouseEvent&) override; + virtual void on_mousedown(Layer&, GUI::MouseEvent&) override; + virtual void on_mousemove(Layer&, GUI::MouseEvent&) override; virtual void on_contextmenu(GUI::ContextMenuEvent&) override; private: - Color get_color() const; + Gfx::Color get_color() const; virtual const char* class_name() const override { return "EraseTool"; } Gfx::Rect build_rect(const Gfx::Point& pos, const Gfx::Rect& widget_rect); RefPtr<GUI::Menu> m_context_menu; @@ -49,3 +52,5 @@ private: int m_thickness { 1 }; GUI::ActionGroup m_thickness_actions; }; + +} |