mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 16:57:46 +00:00
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. :^)
This commit is contained in:
parent
de85cd0907
commit
dc3de47b03
14 changed files with 53 additions and 12 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue