mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-13 18:16:35 +01:00
avoid recursing through the entire canvas when scrolling - only scroll explicitly identified ScrollGroups
This commit is contained in:
parent
a551181842
commit
c9f890bd7c
3 changed files with 32 additions and 13 deletions
|
|
@ -43,6 +43,7 @@ namespace ArdourCanvas
|
|||
|
||||
class Rect;
|
||||
class Group;
|
||||
class ScrollGroup;
|
||||
|
||||
/** The base class for our different types of canvas.
|
||||
*
|
||||
|
|
@ -108,7 +109,7 @@ public:
|
|||
}
|
||||
|
||||
void scroll_to (Coord x, Coord y);
|
||||
void set_global_scroll (bool);
|
||||
void add_scroller (ScrollGroup& i);
|
||||
|
||||
virtual Rect visible_area () const = 0;
|
||||
|
||||
|
|
@ -125,10 +126,11 @@ protected:
|
|||
RootGroup _root;
|
||||
|
||||
Duple _scroll_offset;
|
||||
bool _global_scroll;
|
||||
|
||||
virtual void pick_current_item (int state) = 0;
|
||||
virtual void pick_current_item (Duple const &, int state) = 0;
|
||||
|
||||
std::list<ScrollGroup*> scrollers;
|
||||
};
|
||||
|
||||
/** A canvas which renders onto a GTK EventBox */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue