Ardour  8.12
tempo_lines.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2007-2015 David Robillard <d@drobilla.net>
3  * Copyright (C) 2012-2017 Paul Davis <paul@linuxaudiosystems.com>
4  * Copyright (C) 2015-2017 Nick Mainsbridge <mainsbridge@gmail.com>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19  */
20 
21 #ifndef __ardour_tempo_lines_h__
22 #define __ardour_tempo_lines_h__
23 
24 #include "ardour/tempo.h"
25 
26 #include "canvas/line_set.h"
27 
28 class TempoLines {
29 public:
30  TempoLines (ArdourCanvas::Container* group, double screen_height, ARDOUR::BeatsSamplesConverter* bfc);
32 
33  void tempo_map_changed(samplepos_t new_origin);
34 
35  void draw (std::vector<ARDOUR::TempoMap::BBTPoint>& grid,
36  unsigned divisions,
37  ARDOUR::samplecnt_t leftmost_sample,
38  ARDOUR::samplecnt_t sample_rate);
39 
40  void show();
41  void hide();
42 
43 private:
44  void draw_ticks (std::vector<ARDOUR::TempoMap::BBTPoint>& grid,
45  unsigned divisions,
46  ARDOUR::samplecnt_t leftmost_sample,
47  ARDOUR::samplecnt_t sample_rate);
48 
50  ARDOUR::BeatsSamplesConverter* _bfc;
51 };
52 
53 #endif /* __ardour_tempo_lines_h__ */
void draw_ticks(std::vector< ARDOUR::TempoMap::BBTPoint > &grid, unsigned divisions, ARDOUR::samplecnt_t leftmost_sample, ARDOUR::samplecnt_t sample_rate)
TempoLines(ArdourCanvas::Container *group, double screen_height, ARDOUR::BeatsSamplesConverter *bfc)
ARDOUR::BeatsSamplesConverter * _bfc
Definition: tempo_lines.h:50
void hide()
ArdourCanvas::LineSet lines
Definition: tempo_lines.h:49
void draw(std::vector< ARDOUR::TempoMap::BBTPoint > &grid, unsigned divisions, ARDOUR::samplecnt_t leftmost_sample, ARDOUR::samplecnt_t sample_rate)
void tempo_map_changed(samplepos_t new_origin)
void show()
Temporal::samplecnt_t samplecnt_t
Temporal::samplepos_t samplepos_t
int screen_height()