Ardour  9.0-pre0-582-g084a23a80d
scroll_group.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Paul Davis <paul@linuxaudiosystems.com>
3  * Copyright (C) 2015 David Robillard <d@drobilla.net>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
20 #ifndef __CANVAS_SCROLL_GROUP_H__
21 #define __CANVAS_SCROLL_GROUP_H__
22 
23 #include "canvas/container.h"
24 
25 namespace ArdourCanvas {
26 
32 {
33  public:
35  ScrollsVertically = 0x1,
36  ScrollsHorizontally = 0x2
37  };
38 
41 
42  void scroll_to (Duple const& d);
43  Duple scroll_offset() const { return _scroll_offset; }
44 
45  bool covers_canvas (Duple const& d) const;
46  bool covers_window (Duple const& d) const;
47 
48  void render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const;
49 
50  ScrollSensitivity sensitivity() const { return _scroll_sensitivity; }
51 
52  private:
55 };
56 
57 }
58 
59 #endif
#define LIBCANVAS_API
ScrollSensitivity sensitivity() const
Definition: scroll_group.h:50
void render(Rect const &area, Cairo::RefPtr< Cairo::Context > context) const
bool covers_canvas(Duple const &d) const
ScrollGroup(Item *, ScrollSensitivity)
Duple scroll_offset() const
Definition: scroll_group.h:43
void scroll_to(Duple const &d)
ScrollSensitivity _scroll_sensitivity
Definition: scroll_group.h:53
bool covers_window(Duple const &d) const
ScrollGroup(Canvas *, ScrollSensitivity)