diff options
author | Andreas Kling <kling@serenityos.org> | 2020-05-25 22:49:50 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-26 10:18:03 +0200 |
commit | dc3de47b039ffa84c397991a386fb54786bfe53e (patch) | |
tree | 880b21ea18a63be2292a2668e64dd0184d1048bb /Applications/PixelPaint/Layer.h | |
parent | de85cd09073034eb4e5df653b1cc17c5870c4afb (diff) | |
download | serenity-dc3de47b039ffa84c397991a386fb54786bfe53e.zip |
PixelPaint: Have layers and images send out notifications on changes
We use this to automatically update the thumbnail in LayerListWidget
when you draw into a layer. We also use it to repaint the ImageEditor
when the image changes somehow. :^)
Diffstat (limited to 'Applications/PixelPaint/Layer.h')
-rw-r--r-- | Applications/PixelPaint/Layer.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Applications/PixelPaint/Layer.h b/Applications/PixelPaint/Layer.h index 5eb8ed2d12..cc192cbe3f 100644 --- a/Applications/PixelPaint/Layer.h +++ b/Applications/PixelPaint/Layer.h @@ -33,6 +33,8 @@ namespace PixelPaint { +class Image; + class Layer : public RefCounted<Layer> { AK_MAKE_NONCOPYABLE(Layer); AK_MAKE_NONMOVABLE(Layer); @@ -55,6 +57,8 @@ public: const String& name() const { return m_name; } void set_name(const String& name) { m_name = name; } + void did_modify_bitmap(Image&); + private: explicit Layer(const Gfx::Size&, const String& name); |