mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-29 01:47:43 +01:00
different approach to independent scrolling, involving ArdourCanvas::ScrollGroup
The idea now is that a scroll group item can be added to the canvas which will causes its children to scroll in either or both directions (horizontal or vertical). There are few complications: the position() of the ScrollGroup is ambiguous depending on whether you want it with scroll taken into account or not, so Item::canvas_position() was added, which defaults to the same value as Item::position() but is overridden by ScrollGroup to return the position independent of scrolling. This method is used when translating between item/canvas/window coordinate systems. Note that the basic idea is that we MOVE the scroll group when a scroll happens. This mirrors what happens in the GnomeCanvas, where Nick Mainsbridge came up with a great idea that allowed unification of the time bar and track canvases.
This commit is contained in:
parent
6e91e9fd5f
commit
cb9453b475
14 changed files with 200 additions and 122 deletions
|
|
@ -742,7 +742,20 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
ArdourCanvas::Group* transport_marker_bar_group;
|
||||
ArdourCanvas::Group* cd_marker_bar_group;
|
||||
|
||||
/* The group containing all trackviews. Only scrolled vertically. */
|
||||
/* The group containing all other groups that are scrolled vertically
|
||||
and horizontally.
|
||||
*/
|
||||
ArdourCanvas::Group* hv_scroll_group;
|
||||
|
||||
/* The group containing all other groups that are scrolled vertically ONLY
|
||||
*/
|
||||
ArdourCanvas::Group* v_scroll_group;
|
||||
|
||||
/* The group containing all other groups that are scrolled horizontally ONLY
|
||||
*/
|
||||
ArdourCanvas::Group* h_scroll_group;
|
||||
|
||||
/* The group containing all trackviews. */
|
||||
ArdourCanvas::Group* _trackview_group;
|
||||
|
||||
/* The group used for region motion. Sits on top of _trackview_group */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue