2007-08-05 17:31:02 -04:00
|
|
|
/*
|
2019-08-02 17:26:43 -04: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 17:31:02 -04:00
|
|
|
|
|
|
|
#ifndef __ardour_tempo_lines_h__
|
|
|
|
#define __ardour_tempo_lines_h__
|
|
|
|
|
2017-09-18 12:39:17 -04:00
|
|
|
#include "ardour/beats_samples_converter.h"
|
2009-02-25 13:26:51 -05:00
|
|
|
#include "ardour/tempo.h"
|
2007-08-05 17:31:02 -04:00
|
|
|
|
2014-06-09 15:39:57 -04:00
|
|
|
#include "canvas/line_set.h"
|
|
|
|
|
2007-08-05 17:31:02 -04:00
|
|
|
class TempoLines {
|
|
|
|
public:
|
2017-09-18 12:39:17 -04:00
|
|
|
TempoLines (ArdourCanvas::Container* group, double screen_height, ARDOUR::BeatsSamplesConverter* bfc);
|
2017-06-08 11:56:28 -04:00
|
|
|
~TempoLines ();
|
2008-09-23 18:23:39 -04:00
|
|
|
|
2017-09-18 12:39:17 -04:00
|
|
|
void tempo_map_changed(samplepos_t new_origin);
|
2007-08-05 17:31:02 -04:00
|
|
|
|
2015-12-19 12:41:45 -05:00
|
|
|
void draw (std::vector<ARDOUR::TempoMap::BBTPoint>& grid,
|
2019-04-08 15:37:02 -04:00
|
|
|
unsigned divisions,
|
|
|
|
ARDOUR::samplecnt_t leftmost_sample,
|
|
|
|
ARDOUR::samplecnt_t sample_rate);
|
2008-09-23 18:23:39 -04:00
|
|
|
|
|
|
|
void show();
|
2007-08-05 17:31:02 -04:00
|
|
|
void hide();
|
|
|
|
|
|
|
|
private:
|
2015-12-19 12:41:45 -05:00
|
|
|
void draw_ticks (std::vector<ARDOUR::TempoMap::BBTPoint>& grid,
|
2019-04-08 15:37:02 -04: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 17:31:02 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* __ardour_tempo_lines_h__ */
|