diff options
author | Robin Gareus <robin@gareus.org> | 2016-02-13 13:51:10 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-02-13 13:51:10 +0100 |
commit | fc5c247aa152235a749180bd0e86efe0ce32a20a (patch) | |
tree | c1984df413cf188fe347237ea1ddd25b676eb41c /gtk2_ardour/export_report.h | |
parent | fbbde01f259cf290b8d1f1e8b9fe7fa443097c34 (diff) |
add post-export audition seeking
Diffstat (limited to 'gtk2_ardour/export_report.h')
-rw-r--r-- | gtk2_ardour/export_report.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gtk2_ardour/export_report.h b/gtk2_ardour/export_report.h index ba83343eda..6c4ae28a8c 100644 --- a/gtk2_ardour/export_report.h +++ b/gtk2_ardour/export_report.h @@ -80,6 +80,17 @@ public: _aw = w; } + sigc::signal<void, float> seek_playhead; + +protected: + bool on_button_press_event (GdkEventButton *ev) { + CairoWidget::on_button_press_event (ev); + if (ev->button == 1 && _aw > 0 && ev->x >= _x0 && ev->x <= _x0 + _aw) { + seek_playhead (((float) ev->x - _x0) / (float)_aw); + } + return true; + } + private: Cairo::RefPtr<Cairo::ImageSurface> _surface; float _playhead; @@ -109,6 +120,7 @@ private: void audition (std::string, unsigned int, int); void stop_audition (); void audition_active (bool); + void audition_seek (int, float); void audition_progress (ARDOUR::framecnt_t, ARDOUR::framecnt_t); void on_switch_page (GtkNotebookPage*, guint page_num); |