diff options
author | Andreas Kling <kling@serenityos.org> | 2022-08-25 20:50:15 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-08-26 01:04:52 +0200 |
commit | d571159aebbf1e7442622efb8346d5c0657c1e03 (patch) | |
tree | 8786143c2d9cb3d0520b17aeaab742ded1f04c44 /Userland/Applications/PixelPaint/ImageEditor.h | |
parent | 67596d9546fc2a08b5022dc60e5a30e3ea2c2f18 (diff) | |
download | serenity-d571159aebbf1e7442622efb8346d5c0657c1e03.zip |
PixelPaint: Move selection from ImageEditor to Image
This is preparation for making selection state undoable.
Diffstat (limited to 'Userland/Applications/PixelPaint/ImageEditor.h')
-rw-r--r-- | Userland/Applications/PixelPaint/ImageEditor.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Userland/Applications/PixelPaint/ImageEditor.h b/Userland/Applications/PixelPaint/ImageEditor.h index 5e9fb8e616..b7d5888d43 100644 --- a/Userland/Applications/PixelPaint/ImageEditor.h +++ b/Userland/Applications/PixelPaint/ImageEditor.h @@ -24,7 +24,8 @@ class Tool; class ImageEditor final : public GUI::AbstractZoomPanWidget - , public ImageClient { + , public ImageClient + , public SelectionClient { C_OBJECT(ImageEditor); public: @@ -71,9 +72,6 @@ public: Color secondary_color() const { return m_secondary_color; } void set_secondary_color(Color); - Selection& selection() { return m_selection; } - Selection const& selection() const { return m_selection; } - Color color_for(GUI::MouseEvent const&) const; Color color_for(GUI::MouseButton) const; @@ -134,6 +132,8 @@ private: virtual void image_did_change_rect(Gfx::IntRect const&) override; virtual void image_select_layer(Layer*) override; + virtual void selection_did_change() override; + GUI::MouseEvent event_adjusted_for_layer(GUI::MouseEvent const&, Layer const&) const; GUI::MouseEvent event_with_pan_and_scale_applied(GUI::MouseEvent const&) const; @@ -173,8 +173,6 @@ private: Variant<Gfx::StandardCursor, NonnullRefPtr<Gfx::Bitmap>> m_active_cursor { Gfx::StandardCursor::None }; - Selection m_selection; - bool m_loaded_from_image { true }; RefPtr<Core::Timer> m_marching_ants_timer; |