2007-08-05 17:31:02 -04:00
|
|
|
/*
|
2009-10-14 12:10:01 -04:00
|
|
|
Copyright (C) 2000-2007 Paul Davis
|
2007-08-05 17:31:02 -04:00
|
|
|
|
|
|
|
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ardour_tempo_lines_h__
|
|
|
|
#define __ardour_tempo_lines_h__
|
|
|
|
|
2013-04-21 15:06:09 -04:00
|
|
|
#include <list>
|
2009-02-25 13:26:51 -05:00
|
|
|
#include "ardour/tempo.h"
|
2007-08-05 17:31:02 -04:00
|
|
|
|
|
|
|
class TempoLines {
|
|
|
|
public:
|
2013-04-17 10:53:17 -04:00
|
|
|
TempoLines(ArdourCanvas::Canvas& canvas, ArdourCanvas::Group* group, double screen_height);
|
2008-09-23 18:23:39 -04:00
|
|
|
|
|
|
|
void tempo_map_changed();
|
2007-08-05 17:31:02 -04:00
|
|
|
|
2013-04-21 15:06:09 -04:00
|
|
|
void draw (const ARDOUR::TempoMap::BBTPointList::const_iterator& begin,
|
|
|
|
const ARDOUR::TempoMap::BBTPointList::const_iterator& end,
|
|
|
|
double frames_per_unit);
|
2008-09-23 18:23:39 -04:00
|
|
|
|
|
|
|
void show();
|
2007-08-05 17:31:02 -04:00
|
|
|
void hide();
|
|
|
|
|
|
|
|
private:
|
2013-04-21 15:06:09 -04:00
|
|
|
typedef std::list<ArdourCanvas::Line*> Lines;
|
2008-09-23 18:23:39 -04:00
|
|
|
Lines _lines;
|
2013-04-21 15:06:09 -04:00
|
|
|
Lines _cache;
|
2007-08-05 17:31:02 -04:00
|
|
|
|
2013-04-17 10:53:17 -04:00
|
|
|
ArdourCanvas::Canvas& _canvas;
|
2007-08-05 17:31:02 -04:00
|
|
|
ArdourCanvas::Group* _group;
|
2008-10-14 09:35:17 -04:00
|
|
|
double _height;
|
2007-08-05 17:31:02 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* __ardour_tempo_lines_h__ */
|