#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 {
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; }
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;
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__ */