summaryrefslogtreecommitdiff
path: root/gtk2_ardour/audio_clock.h
diff options
context:
space:
mode:
authorBen Loftis <ben@harrisonconsoles.com>2015-04-21 08:35:20 -0500
committerBen Loftis <ben@harrisonconsoles.com>2015-04-21 08:35:20 -0500
commit91fac4c96dc6210dcc056da70dc608700d7eb570 (patch)
tree93c24f138224d39975e6da4abaa4b36a521b970b /gtk2_ardour/audio_clock.h
parentf44e2e55fdd6e4d265f3eff715b071a27da8b5eb (diff)
parentd3d7428a189d031739f901472f016b2907752640 (diff)
merge fix for tempo branch
Diffstat (limited to 'gtk2_ardour/audio_clock.h')
-rw-r--r--gtk2_ardour/audio_clock.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/gtk2_ardour/audio_clock.h b/gtk2_ardour/audio_clock.h
index 5ab75c261f..10a24cd3ac 100644
--- a/gtk2_ardour/audio_clock.h
+++ b/gtk2_ardour/audio_clock.h
@@ -98,10 +98,22 @@ class AudioClock : public CairoWidget, public ARDOUR::SessionHandlePtr
protected:
void render (cairo_t*, cairo_rectangle_t*);
+ bool get_is_duration () const { return is_duration; } ;
virtual void build_ops_menu ();
Gtk::Menu *ops_menu;
+ bool on_button_press_event (GdkEventButton *ev);
+ bool on_button_release_event(GdkEventButton *ev);
+ bool is_lower_layout_click(int y) const {
+ return y > upper_height + separator_height;
+ }
+ bool is_right_layout_click(int x) const {
+ return x > x_leading_padding + get_left_rect_width() + separator_height;
+ }
+ double get_left_rect_width() const {
+ return round (((get_width() - separator_height) * mode_based_info_ratio) + 0.5);
+ }
private:
Mode _mode;
std::string _name;
@@ -187,8 +199,6 @@ class AudioClock : public CairoWidget, public ARDOUR::SessionHandlePtr
bool on_key_press_event (GdkEventKey *);
bool on_key_release_event (GdkEventKey *);
bool on_scroll_event (GdkEventScroll *ev);
- bool on_button_press_event (GdkEventButton *ev);
- bool on_button_release_event(GdkEventButton *ev);
void on_style_changed (const Glib::RefPtr<Gtk::Style>&);
void on_size_request (Gtk::Requisition* req);
bool on_motion_notify_event (GdkEventMotion *ev);