mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:17:44 +00:00
HackStudio: Move the rubber-banding state into CursorTool
I originally put it in FormWidget because CursorTool was clueless about painting. This patch adds Tool::on_second_paint() which allows all the tools to hook into the second paint pass.
This commit is contained in:
parent
5fc62bcf68
commit
197ed1bb2a
5 changed files with 68 additions and 77 deletions
|
@ -5,6 +5,8 @@
|
|||
class FormEditorWidget;
|
||||
class GKeyEvent;
|
||||
class GMouseEvent;
|
||||
class GPaintEvent;
|
||||
class GPainter;
|
||||
|
||||
class Tool {
|
||||
AK_MAKE_NONCOPYABLE(Tool)
|
||||
|
@ -16,6 +18,7 @@ public:
|
|||
virtual void on_mouseup(GMouseEvent&) = 0;
|
||||
virtual void on_mousemove(GMouseEvent&) = 0;
|
||||
virtual void on_keydown(GKeyEvent&) = 0;
|
||||
virtual void on_second_paint(GPainter&, GPaintEvent&) {}
|
||||
|
||||
virtual const char* class_name() const = 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue