X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Ftempo_lines.h;h=5d1d7d71faacd59d404bde770b8baae9900802b6;hb=3dcb7bf3d3f4eca512c799b5f63fd412e5e3e233;hp=defe07226c0c8a4016816f1efb0555f4fe778db8;hpb=6ae4f104371ed433a79c8845de97428d964edd8b;p=ardour.git diff --git a/gtk2_ardour/tempo_lines.h b/gtk2_ardour/tempo_lines.h index defe07226c..5d1d7d71fa 100644 --- a/gtk2_ardour/tempo_lines.h +++ b/gtk2_ardour/tempo_lines.h @@ -19,40 +19,34 @@ #ifndef __ardour_tempo_lines_h__ #define __ardour_tempo_lines_h__ -#include -#include -#include +#include "ardour/beats_samples_converter.h" #include "ardour/tempo.h" -typedef boost::fast_pool_allocator< - std::pair, - boost::default_user_allocator_new_delete, - boost::details::pool::null_mutex, - 8192> - MapAllocator; +#include "canvas/line_set.h" class TempoLines { public: - TempoLines(ArdourCanvas::GtkCanvasViewport& canvas, ArdourCanvas::Group* group, double screen_height); + TempoLines (ArdourCanvas::Container* group, double screen_height, ARDOUR::BeatsSamplesConverter* bfc); + ~TempoLines (); - void tempo_map_changed(); + void tempo_map_changed(samplepos_t new_origin); - void draw(const ARDOUR::TempoMap::BBTPointList::const_iterator& begin, - const ARDOUR::TempoMap::BBTPointList::const_iterator& end, - double frames_per_unit); + void draw (std::vector& grid, + unsigned divisions, + ARDOUR::samplecnt_t leftmost_sample, + ARDOUR::samplecnt_t sample_rate); void show(); void hide(); private: - typedef std::map, MapAllocator> Lines; - Lines _lines; - - ArdourCanvas::GtkCanvasViewport& _canvas_viewport; - ArdourCanvas::Group* _group; - double _clean_left; - double _clean_right; - double _height; + void draw_ticks (std::vector& grid, + unsigned divisions, + ARDOUR::samplecnt_t leftmost_sample, + ARDOUR::samplecnt_t sample_rate); + + ArdourCanvas::LineSet lines; + ARDOUR::BeatsSamplesConverter* _bfc; }; #endif /* __ardour_tempo_lines_h__ */