AudioUnit work.
[ardour.git] / gtk2_ardour / audio_clock.h
index b9c9be095dc5be4b926fcdebdbbe1a538d3b48ae..9ff5f45ddfca2bb9e7907143220beaa405f98306 100644 (file)
 #ifndef __audio_clock_h__
 #define __audio_clock_h__
 
-#include <gtk--.h>
+#include <gtkmm/box.h>
+#include <gtkmm/menu.h>
+#include <gtkmm/eventbox.h>
+#include <gtkmm/label.h>
+#include <gtkmm/frame.h>
 #include <ardour/ardour.h>
 
 namespace ARDOUR {
        class Session;
-};
+}
 
 class AudioClock : public Gtk::HBox
 {
@@ -36,7 +40,7 @@ class AudioClock : public Gtk::HBox
                BBT,
                MinSec,
                Frames,
-               Off,
+               Off
        };
        
        AudioClock (const string& name, bool editable, bool is_duration = false, bool with_tempo_meter = false);
@@ -50,7 +54,7 @@ class AudioClock : public Gtk::HBox
        jack_nframes_t current_duration (jack_nframes_t position = 0) const;
        void set_session (ARDOUR::Session *s);
 
-       SigC::Signal0<void> ValueChanged;
+       sigc::signal<void> ValueChanged;
 
   private:
        ARDOUR::Session  *session;
@@ -83,7 +87,7 @@ class AudioClock : public Gtk::HBox
                Bars,
                Beats, 
                Ticks,
-               AudioFrames,
+               AudioFrames
        };
 
        Gtk::EventBox  audio_frames_ebox;
@@ -144,14 +148,15 @@ class AudioClock : public Gtk::HBox
        double drag_y;
        double drag_accum;
 
-       void realize_impl ();
+       void on_realize ();
        
-       gint field_motion_notify_event (GdkEventMotion *ev, Field);
-       gint field_button_press_event (GdkEventButton *ev, Field);
-       gint field_button_release_event (GdkEventButton *ev, Field);
-       gint field_key_release_event (GdkEventKey *, Field);
-       gint field_focus_in_event (GdkEventFocus *, Field);
-       gint field_focus_out_event (GdkEventFocus *, Field);
+       bool field_motion_notify_event (GdkEventMotion *ev, Field);
+       bool field_button_press_event (GdkEventButton *ev, Field);
+       bool field_button_release_event (GdkEventButton *ev, Field);
+       bool field_button_scroll_event (GdkEventScroll *ev, Field);
+       bool field_key_release_event (GdkEventKey *, Field);
+       bool field_focus_in_event (GdkEventFocus *, Field);
+       bool field_focus_out_event (GdkEventFocus *, Field);
 
        void set_smpte (jack_nframes_t, bool);
        void set_bbt (jack_nframes_t, bool);
@@ -170,6 +175,8 @@ class AudioClock : public Gtk::HBox
        void build_ops_menu ();
        void setup_events ();
 
+       void smpte_offset_changed ();
+
        static const uint32_t field_length[(int)AudioFrames+1];
 };