mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:37:35 +00:00
PixelPaint: Add selection functionality to the LayerListWidget
Now we can get rid of the old table view and with it the LayerModel.
This commit is contained in:
parent
e4b11a23b7
commit
18d68c8c94
10 changed files with 77 additions and 185 deletions
|
@ -55,6 +55,7 @@ public:
|
|||
|
||||
size_t layer_count() const { return m_layers.size(); }
|
||||
const Layer& layer(size_t index) const { return m_layers.at(index); }
|
||||
Layer& layer(size_t index) { return m_layers.at(index); }
|
||||
|
||||
const Gfx::Size& size() const { return m_size; }
|
||||
Gfx::Rect rect() const { return { {}, m_size }; }
|
||||
|
@ -63,8 +64,6 @@ public:
|
|||
|
||||
void paint_into(GUI::Painter&, const Gfx::Rect& dest_rect);
|
||||
|
||||
GUI::Model& layer_model();
|
||||
|
||||
void move_layer_to_front(Layer&);
|
||||
void move_layer_to_back(Layer&);
|
||||
void move_layer_up(Layer&);
|
||||
|
@ -77,17 +76,16 @@ public:
|
|||
|
||||
void layer_did_modify_bitmap(Badge<Layer>, const Layer&);
|
||||
|
||||
size_t index_of(const Layer&) const;
|
||||
|
||||
private:
|
||||
explicit Image(const Gfx::Size&);
|
||||
|
||||
void did_change();
|
||||
void did_modify_layer_stack();
|
||||
|
||||
size_t index_of(const Layer&) const;
|
||||
|
||||
Gfx::Size m_size;
|
||||
NonnullRefPtrVector<Layer> m_layers;
|
||||
RefPtr<GUI::Model> m_layer_model;
|
||||
|
||||
HashTable<ImageClient*> m_clients;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue