X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fautomation_controller.h;h=c5d64c16c7d67c02aaae5a89d72a894be77c1e19;hb=528ad3416affba88adef19e7f8db71504772e057;hp=0392d8c9a4cb44dace7e4ef7ae0a8ca4c6bf265e;hpb=aed44005b26eb359025b33f10c8d588ab732d096;p=ardour.git diff --git a/gtk2_ardour/automation_controller.h b/gtk2_ardour/automation_controller.h index 0392d8c9a4..c5d64c16c7 100644 --- a/gtk2_ardour/automation_controller.h +++ b/gtk2_ardour/automation_controller.h @@ -21,6 +21,13 @@ #ifndef __ardour_gtk_automation_controller_h__ #define __ardour_gtk_automation_controller_h__ +#ifdef YES +#undef YES +#endif +#ifdef NO +#undef NO +#endif + #include #include @@ -35,41 +42,67 @@ namespace ARDOUR { class Automatable; } +class AutomationBarController : public Gtkmm2ext::BarController { +public: + AutomationBarController(boost::shared_ptr printer, + boost::shared_ptr ac, + Gtk::Adjustment* adj); + ~AutomationBarController(); +private: + std::string get_label (double&); + boost::shared_ptr _printer; + boost::shared_ptr _controllable; +}; + /** A BarController which displays the value and allows control of an AutomationControl */ -class AutomationController : public Gtkmm2ext::BarController { +class AutomationController : public Gtk::Alignment { public: static boost::shared_ptr create( - boost::shared_ptr parent, - const Evoral::Parameter& param, - boost::shared_ptr ac); + boost::shared_ptr parent, + const Evoral::Parameter& param, + const ARDOUR::ParameterDescriptor& desc, + boost::shared_ptr ac); ~AutomationController(); boost::shared_ptr controllable() { return _controllable; } + void disable_vertical_scroll(); + Gtk::Adjustment* adjustment() { return _adjustment; } + Gtk::Widget* widget() { return _widget; } void display_effective_value(); void value_adjusted(); void stop_updating (); + sigc::signal StartGesture; + sigc::signal StopGesture; + private: - AutomationController (boost::shared_ptr printer, boost::shared_ptr ac, Gtk::Adjustment* adj); - std::string get_label (double&); + AutomationController (boost::shared_ptr printer, + boost::shared_ptr ac, + Gtk::Adjustment* adj); void start_touch(); void end_touch(); + void toggled(); + + void run_note_select_dialog(); + void set_ratio(double ratio); + void set_freq_beats(double beats); + bool on_button_release(GdkEventButton* ev); void value_changed(); - void automation_state_changed(); - bool _ignore_change; - boost::shared_ptr _printer; + Gtk::Widget* _widget; + boost::shared_ptr _printer; boost::shared_ptr _controllable; Gtk::Adjustment* _adjustment; sigc::connection _screen_update_connection; PBD::ScopedConnection _changed_connection; + bool _ignore_change; };