remove Glib::ustring from gtk2_ardour
[ardour.git] / gtk2_ardour / audio_clock.h
index 67d137d3777ecee3eabc596c7de14a55335fc042..c51c321ba46415af262ea5aabecba52c93c0103f 100644 (file)
 #include <gtkmm/label.h>
 #include <gtkmm/frame.h>
 #include "ardour/ardour.h"
+#include "ardour/session_handle.h"
 
 namespace ARDOUR {
        class Session;
 }
 
-class AudioClock : public Gtk::HBox
+class AudioClock : public Gtk::HBox, public ARDOUR::SessionHandlePtr
 {
   public:
        enum Mode {
@@ -42,7 +43,8 @@ class AudioClock : public Gtk::HBox
                Off
        };
 
-       AudioClock (std::string clock_name, bool transient, std::string widget_name, bool editable, bool is_duration = false, bool with_info = false);
+       AudioClock (const std::string& clock_name, bool is_transient, const std::string& widget_name, 
+                    bool editable, bool follows_playhead, bool duration = false, bool with_info = false);
 
        Mode mode() const { return _mode; }
 
@@ -72,13 +74,14 @@ class AudioClock : public Gtk::HBox
        static bool has_focus() { return _has_focus; }
 
   private:
-       ARDOUR::Session  *session;
        Mode             _mode;
        uint32_t          key_entry_state;
        std::string      _name;
        bool              is_transient;
        bool              is_duration;
        bool              editable;
+       /** true if this clock follows the playhead, meaning that certain operations are redundant */
+       bool             _follows_playhead;
 
        Gtk::Menu  *ops_menu;
 
@@ -214,6 +217,7 @@ class AudioClock : public Gtk::HBox
        static const uint32_t field_length[(int)AudioFrames+1];
        static bool _has_focus;
 
+       void on_style_changed (const Glib::RefPtr<Gtk::Style>&);
 };
 
 #endif /* __audio_clock_h__ */