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
31
class
LIBCANVAS_API
ScrollGroup
:
public
Container
32
{
33
public
:
34
enum
ScrollSensitivity
{
35
ScrollsVertically = 0x1,
36
ScrollsHorizontally = 0x2
37
};
38
39
ScrollGroup
(
Canvas
*,
ScrollSensitivity
);
40
ScrollGroup
(
Item
*,
ScrollSensitivity
);
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
:
53
ScrollSensitivity
_scroll_sensitivity
;
54
Duple
_scroll_offset
;
55
};
56
57
}
58
59
#endif
container.h
LIBCANVAS_API
#define LIBCANVAS_API
Definition:
canvas/canvas/visibility.h:39
ArdourCanvas::Canvas
Definition:
canvas/canvas/canvas.h:73
ArdourCanvas::Container
Definition:
canvas/canvas/container.h:40
ArdourCanvas::Item
Definition:
canvas/canvas/item.h:57
ArdourCanvas::ScrollGroup
Definition:
scroll_group.h:32
ArdourCanvas::ScrollGroup::ScrollSensitivity
ScrollSensitivity
Definition:
scroll_group.h:34
ArdourCanvas::ScrollGroup::sensitivity
ScrollSensitivity sensitivity() const
Definition:
scroll_group.h:50
ArdourCanvas::ScrollGroup::_scroll_offset
Duple _scroll_offset
Definition:
scroll_group.h:54
ArdourCanvas::ScrollGroup::render
void render(Rect const &area, Cairo::RefPtr< Cairo::Context > context) const
ArdourCanvas::ScrollGroup::covers_canvas
bool covers_canvas(Duple const &d) const
ArdourCanvas::ScrollGroup::ScrollGroup
ScrollGroup(Item *, ScrollSensitivity)
ArdourCanvas::ScrollGroup::scroll_offset
Duple scroll_offset() const
Definition:
scroll_group.h:43
ArdourCanvas::ScrollGroup::scroll_to
void scroll_to(Duple const &d)
ArdourCanvas::ScrollGroup::_scroll_sensitivity
ScrollSensitivity _scroll_sensitivity
Definition:
scroll_group.h:53
ArdourCanvas::ScrollGroup::covers_window
bool covers_window(Duple const &d) const
ArdourCanvas::ScrollGroup::ScrollGroup
ScrollGroup(Canvas *, ScrollSensitivity)
ArdourCanvas
Definition:
audio_clip_editor.h:56
ArdourCanvas::Duple
Definition:
canvas/canvas/types.h:65
ArdourCanvas::Rect
Definition:
canvas/canvas/types.h:112
libs
canvas
canvas
scroll_group.h
Generated on Wed Dec 25 2024 05:44:46 for Ardour by
1.9.1