mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-05 17:16:04 +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
Notes:
sideshowbarker
2024-07-18 05:14:29 +09:00
Author: https://github.com/sppmacd
Commit: 0224dc2882
Pull-request: https://github.com/SerenityOS/serenity/pull/9593
Reviewed-by: https://github.com/Hendiadyoin1
Reviewed-by: https://github.com/joebentley
Reviewed-by: https://github.com/nico
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