Apply some missing widget names
[ardour.git] / gtk2_ardour / tempo_lines.h
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/beats_samples_converter.h"
25 #include "ardour/tempo.h"
26
27 #include "canvas/line_set.h"
28
29 class TempoLines {
30 public:
31         TempoLines (ArdourCanvas::Container* group, double screen_height, ARDOUR::BeatsSamplesConverter* bfc);
32         ~TempoLines ();
33
34         void tempo_map_changed(samplepos_t new_origin);
35
36         void draw (std::vector<ARDOUR::TempoMap::BBTPoint>& grid,
37                    unsigned                                 divisions,
38                    ARDOUR::samplecnt_t                      leftmost_sample,
39                    ARDOUR::samplecnt_t                      sample_rate);
40
41         void show();
42         void hide();
43
44 private:
45         void draw_ticks (std::vector<ARDOUR::TempoMap::BBTPoint>& grid,
46                          unsigned                                 divisions,
47                          ARDOUR::samplecnt_t                      leftmost_sample,
48                          ARDOUR::samplecnt_t                      sample_rate);
49
50         ArdourCanvas::LineSet lines;
51         ARDOUR::BeatsSamplesConverter* _bfc;
52 };
53
54 #endif /* __ardour_tempo_lines_h__ */