mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-10 07:26:32 +01:00
Canvas::Item container operations need to be virtual; add parented() virtual method for lazy child positioning
This commit is contained in:
parent
5a4b76d1f9
commit
9d8920b4cd
1 changed files with 9 additions and 4 deletions
|
|
@ -209,10 +209,10 @@ public:
|
|||
void* get_data (std::string const &) const;
|
||||
|
||||
/* nested item ("grouping") API */
|
||||
void add (Item *);
|
||||
void add_front (Item *);
|
||||
void remove (Item *);
|
||||
void clear (bool with_delete = false);
|
||||
virtual void add (Item *);
|
||||
virtual void add_front (Item *);
|
||||
virtual void remove (Item *);
|
||||
virtual void clear_children (bool with_delete = false);
|
||||
std::list<Item*> const & items () const {
|
||||
return _items;
|
||||
}
|
||||
|
|
@ -321,6 +321,11 @@ protected:
|
|||
Duple scroll_offset() const;
|
||||
Duple position_offset() const;
|
||||
|
||||
/* called when _parent is set to a non-null value. Containers can use
|
||||
this to do size calculations less frequently.
|
||||
*/
|
||||
virtual void parented() {}
|
||||
|
||||
private:
|
||||
void init ();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue