Flesh out RDFF documentation.
[ardour.git] / gtk2_ardour / editor_tempodisplay.cc
index edfaee36941b63bf27a04aad33fe5840b864d190..2e4842016a6673ecb08942f21f5123bb26f8a73d 100644 (file)
 
 */
 
+#ifdef WAF_BUILD
+#include "gtk2ardour-config.h"
+#endif
+
 #include <cstdio> // for sprintf, grrr
 #include <cstdlib>
 #include <cmath>
@@ -45,6 +49,7 @@
 #include "time_axis_view.h"
 #include "ardour_ui.h"
 #include "tempo_lines.h"
+#include "utils.h"
 
 #include "i18n.h"
 
@@ -93,7 +98,7 @@ Editor::draw_metric_marks (const Metrics& metrics)
 }
 
 void
-Editor::tempo_map_changed (const PropertyChange& ignored)
+Editor::tempo_map_changed (const PropertyChange& /*ignored*/)
 {
        if (!_session) {
                return;
@@ -133,13 +138,13 @@ Editor::redisplay_tempo (bool immediate_redraw)
 }
 
 void
-Editor::compute_current_bbt_points (nframes_t leftmost, nframes_t rightmost)
+Editor::compute_current_bbt_points (framepos_t leftmost, framepos_t rightmost)
 {
        if (!_session) {
                return;
        }
 
-       BBT_Time previous_beat, next_beat; // the beats previous to the leftmost frame and after the rightmost frame
+       Timecode::BBT_Time previous_beat, next_beat; // the beats previous to the leftmost frame and after the rightmost frame
 
        _session->bbt_time(leftmost, previous_beat);
        _session->bbt_time(rightmost, next_beat);
@@ -189,14 +194,14 @@ Editor::draw_measures ()
        }
 
        if (tempo_lines == 0) {
-               tempo_lines = new TempoLines(*track_canvas, time_line_group, physical_screen_height);
+               tempo_lines = new TempoLines(*track_canvas, time_line_group, physical_screen_height(get_window()));
        }
 
        tempo_lines->draw(*current_bbt_points, frames_per_unit);
 }
 
 void
-Editor::mouse_add_new_tempo_event (nframes64_t frame)
+Editor::mouse_add_new_tempo_event (framepos_t frame)
 {
        if (_session == 0) {
                return;
@@ -219,7 +224,7 @@ Editor::mouse_add_new_tempo_event (nframes64_t frame)
        }
 
        double bpm = 0;
-       BBT_Time requested;
+       Timecode::BBT_Time requested;
 
        bpm = tempo_dialog.get_bpm ();
        double nt = tempo_dialog.get_note_type();
@@ -238,7 +243,7 @@ Editor::mouse_add_new_tempo_event (nframes64_t frame)
 }
 
 void
-Editor::mouse_add_new_meter_event (nframes64_t frame)
+Editor::mouse_add_new_meter_event (framepos_t frame)
 {
        if (_session == 0) {
                return;
@@ -266,7 +271,7 @@ Editor::mouse_add_new_meter_event (nframes64_t frame)
        bpb = max (1.0, bpb); // XXX is this a reasonable limit?
 
        double note_type = meter_dialog.get_note_type ();
-       BBT_Time requested;
+       Timecode::BBT_Time requested;
 
        meter_dialog.get_bbt_time (requested);
 
@@ -347,7 +352,7 @@ Editor::edit_tempo_section (TempoSection* section)
 
        double bpm = tempo_dialog.get_bpm ();
        double nt = tempo_dialog.get_note_type ();
-       BBT_Time when;
+       Timecode::BBT_Time when;
        tempo_dialog.get_bbt_time(when);
        bpm = max (0.01, bpm);