2007-08-05 21:31:02 +00:00
|
|
|
/*
|
2019-08-02 23:26:43 +02:00
|
|
|
* Copyright (C) 2007-2015 David Robillard <d@drobilla.net>
|
|
|
|
|
* Copyright (C) 2012-2017 Paul Davis <paul@linuxaudiosystems.com>
|
|
|
|
|
* Copyright (C) 2015-2017 Nick Mainsbridge <mainsbridge@gmail.com>
|
|
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
|
*/
|
2007-08-05 21:31:02 +00:00
|
|
|
|
2024-09-25 18:38:59 -06:00
|
|
|
#pragma once
|
2007-08-05 21:31:02 +00:00
|
|
|
|
2009-02-25 18:26:51 +00:00
|
|
|
#include "ardour/tempo.h"
|
2007-08-05 21:31:02 +00:00
|
|
|
|
2014-06-09 15:39:57 -04:00
|
|
|
#include "canvas/line_set.h"
|
|
|
|
|
|
2007-08-05 21:31:02 +00:00
|
|
|
class TempoLines {
|
|
|
|
|
public:
|
2017-09-18 12:39:17 -04:00
|
|
|
TempoLines (ArdourCanvas::Container* group, double screen_height, ARDOUR::BeatsSamplesConverter* bfc);
|
2017-06-09 01:56:28 +10:00
|
|
|
~TempoLines ();
|
2008-09-23 22:23:39 +00:00
|
|
|
|
2017-09-18 12:39:17 -04:00
|
|
|
void tempo_map_changed(samplepos_t new_origin);
|
2007-08-05 21:31:02 +00:00
|
|
|
|
2015-12-20 04:41:45 +11:00
|
|
|
void draw (std::vector<ARDOUR::TempoMap::BBTPoint>& grid,
|
2019-04-08 21:37:02 +02:00
|
|
|
unsigned divisions,
|
|
|
|
|
ARDOUR::samplecnt_t leftmost_sample,
|
|
|
|
|
ARDOUR::samplecnt_t sample_rate);
|
2008-09-23 22:23:39 +00:00
|
|
|
|
|
|
|
|
void show();
|
2007-08-05 21:31:02 +00:00
|
|
|
void hide();
|
|
|
|
|
|
|
|
|
|
private:
|
2015-12-20 04:41:45 +11:00
|
|
|
void draw_ticks (std::vector<ARDOUR::TempoMap::BBTPoint>& grid,
|
2019-04-08 21:37:02 +02:00
|
|
|
unsigned divisions,
|
|
|
|
|
ARDOUR::samplecnt_t leftmost_sample,
|
|
|
|
|
ARDOUR::samplecnt_t sample_rate);
|
2015-01-07 08:37:20 -05:00
|
|
|
|
2014-06-09 15:39:57 -04:00
|
|
|
ArdourCanvas::LineSet lines;
|
2017-09-18 12:39:17 -04:00
|
|
|
ARDOUR::BeatsSamplesConverter* _bfc;
|
2007-08-05 21:31:02 +00:00
|
|
|
};
|
|
|
|
|
|