Add a PianoKeyboard to GenericUI (on a MIDI track)
[ardour.git] / gtk2_ardour / audio_clock.cc
index 532e4f88677284a58d8af122bf227b1e0a689c36..3c5d065264436e4a3f2b0f11de54ac001f185e05 100644 (file)
 #include <gtkmm/style.h>
 #include <sigc++/bind.h>
 
-#include "gtkmm2ext/cairocell.h"
 #include "gtkmm2ext/utils.h"
 #include "gtkmm2ext/rgb_macros.h"
 
+#include "widgets/tooltips.h"
+
 #include "ardour/profile.h"
 #include "ardour/lmath.h"
 #include "ardour/session.h"
@@ -42,7 +43,6 @@
 #include "enums_convert.h"
 #include "gui_thread.h"
 #include "keyboard.h"
-#include "tooltips.h"
 #include "ui_config.h"
 #include "utils.h"
 
@@ -50,6 +50,7 @@
 
 using namespace ARDOUR;
 using namespace ARDOUR_UI_UTILS;
+using namespace ArdourWidgets;
 using namespace PBD;
 using namespace Gtk;
 using namespace std;
@@ -327,10 +328,10 @@ AudioClock::render (Cairo::RefPtr<Cairo::Context> const& ctx, cairo_rectangle_t*
 
                                cairo_set_source_rgba (cr, cursor_r, cursor_g, cursor_b, cursor_a);
                                cairo_rectangle (cr,
-                                                min (get_width() - 2.0,
-                                                     (double) xcenter + cursor.get_x()/PANGO_SCALE + em_width),
-                                                (get_height() - layout_height)/2.0,
-                                                2.0, cursor.get_height()/PANGO_SCALE);
+                                                min (get_width() - 2.0,
+                                                (double) xcenter + cursor.get_x()/PANGO_SCALE + em_width),
+                                                (get_height() - layout_height)/2.0,
+                                                2.0, cursor.get_height()/PANGO_SCALE);
                                cairo_fill (cr);
                        } else {
                                /* we've entered all possible digits, no cursor */
@@ -1722,8 +1723,7 @@ AudioClock::on_motion_notify_event (GdkEventMotion *ev)
 
 
        if (Keyboard::modifier_state_contains (ev->state,
-                                              Keyboard::PrimaryModifier|Keyboard::SecondaryModifier)) {
-
+                                              Keyboard::PrimaryModifier|Keyboard::SecondaryModifier)) {
                pixel_frame_scale_factor = 0.025f;
        }
 
@@ -1881,7 +1881,7 @@ AudioClock::timecode_validate_edit (const string&)
        char ignored[2];
 
        if (sscanf (_layout->get_text().c_str(), "%[- _]%" PRId32 ":%" PRId32 ":%" PRId32 "%[:;]%" PRId32,
-                   ignored, &hours, &TC.minutes, &TC.seconds, ignored, &TC.frames) != 6) {
+                   ignored, &hours, &TC.minutes, &TC.seconds, ignored, &TC.frames) != 6) {
                return false;
        }
 
@@ -1996,10 +1996,10 @@ AudioClock::frames_from_bbt_string (framepos_t pos, const string& str) const
        if (is_duration) {
                any.bbt.bars++;
                any.bbt.beats++;
-                return _session->any_duration_to_frames (pos, any);
+               return _session->any_duration_to_frames (pos, any);
        } else {
-                return _session->convert_to_frames (any);
-        }
+               return _session->convert_to_frames (any);
+       }
 }