#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
{
BBT,
MinSec,
Frames,
- Off,
+ Off
};
AudioClock (const string& name, bool editable, bool is_duration = false, bool with_tempo_meter = false);
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;
Bars,
Beats,
Ticks,
- AudioFrames,
+ AudioFrames
};
Gtk::EventBox audio_frames_ebox;
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);
void build_ops_menu ();
void setup_events ();
+ void smpte_offset_changed ();
+
static const uint32_t field_length[(int)AudioFrames+1];
};