X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fstereo_panner.h;h=19fa0c056ec892fc20504c6ab66d3324ddb92c4b;hb=c40437430acf4b65d8acb8b084eae8cd2f6f5402;hp=e1e8e79067efbcb5899318da19b70dea25a5ed30;hpb=cf9f7d17ccf9d514e951f3b05615c93e073621f4;p=ardour.git diff --git a/gtk2_ardour/stereo_panner.h b/gtk2_ardour/stereo_panner.h index e1e8e79067..19fa0c056e 100644 --- a/gtk2_ardour/stereo_panner.h +++ b/gtk2_ardour/stereo_panner.h @@ -21,20 +21,31 @@ #define __gtk_ardour_stereo_panner_h__ #include "pbd/signals.h" - -#include -#include +#include "gtkmm2ext/binding_proxy.h" +#include "panner_interface.h" namespace PBD { class Controllable; } -class StereoPanner : public Gtk::DrawingArea +namespace ARDOUR { + class Panner; +} + +class StereoPanner : public PannerInterface { public: - StereoPanner (boost::shared_ptr pos, boost::shared_ptr width); + StereoPanner (boost::shared_ptr); ~StereoPanner (); + boost::shared_ptr get_position_controllable() const { return position_control; } + boost::shared_ptr get_width_controllable() const { return width_control; } + + sigc::signal StartPositionGesture; + sigc::signal StopPositionGesture; + sigc::signal StartWidthGesture; + sigc::signal StopWidthGesture; + protected: bool on_expose_event (GdkEventExpose*); bool on_button_press_event (GdkEventButton*); @@ -42,11 +53,10 @@ class StereoPanner : public Gtk::DrawingArea bool on_motion_notify_event (GdkEventMotion*); bool on_scroll_event (GdkEventScroll*); bool on_key_press_event (GdkEventKey*); - bool on_key_release_event (GdkEventKey*); - bool on_enter_notify_event (GdkEventCrossing* ev); - bool on_leave_notify_event (GdkEventCrossing* ev); private: + PannerEditor* editor (); + boost::shared_ptr position_control; boost::shared_ptr width_control; PBD::ScopedConnectionList connections; @@ -57,18 +67,22 @@ class StereoPanner : public Gtk::DrawingArea int drag_start_x; int last_drag_x; double accumulated_delta; + bool detented; + + BindingProxy position_binder; + BindingProxy width_binder; + + void set_drag_data (); - void value_change (); - void set_tooltip (); - - struct ColorScheme { + struct ColorScheme { uint32_t outline; uint32_t fill; uint32_t text; uint32_t background; + uint32_t rule; }; - enum State { + enum State { Normal, Mono, Inverted @@ -77,7 +91,7 @@ class StereoPanner : public Gtk::DrawingArea static ColorScheme colors[3]; static void set_colors (); static bool have_colors; - static PBD::Signal0 color_change; + void color_handler (); }; #endif /* __gtk_ardour_stereo_panner_h__ */