mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-13 11:42:38 +03:00
1c0669f010
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. :^)
23 lines
557 B
C++
23 lines
557 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:
|
|
virtual const char* class_name() const override { return "EraseTool"; }
|
|
Rect build_rect(const Point& pos, const Rect& widget_rect);
|
|
OwnPtr<GMenu> m_context_menu;
|
|
int m_thickness { 1 };
|
|
};
|