mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 12:27:34 +00:00
PixelPaint: Pass raw mouse event to Tools and wrap them all in a struct
This commit adds a Tool::MouseEvent struct, which contains events that may be needed by tools: layer-relative, image-relative and raw (editor- relative) event. The raw event is used by ZoomTool to properly pan the view. This fixes a bug which caused image to snap out of sight.
This commit is contained in:
parent
635130ef76
commit
0224dc2882
28 changed files with 186 additions and 127 deletions
|
@ -19,9 +19,9 @@ public:
|
|||
RectangleSelectTool();
|
||||
virtual ~RectangleSelectTool();
|
||||
|
||||
virtual void on_mousedown(Layer&, GUI::MouseEvent&, GUI::MouseEvent&) override;
|
||||
virtual void on_mousemove(Layer&, GUI::MouseEvent&, GUI::MouseEvent&) override;
|
||||
virtual void on_mouseup(Layer&, GUI::MouseEvent&, GUI::MouseEvent&) override;
|
||||
virtual void on_mousedown(Layer&, MouseEvent& event) override;
|
||||
virtual void on_mousemove(Layer&, MouseEvent& event) override;
|
||||
virtual void on_mouseup(Layer&, MouseEvent& event) override;
|
||||
virtual void on_keydown(GUI::KeyEvent&) override;
|
||||
virtual void on_keyup(GUI::KeyEvent&) override;
|
||||
virtual void on_second_paint(Layer const&, GUI::PaintEvent&) override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue