diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2011-06-17 21:47:20 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2011-06-17 21:47:20 +0000 |
commit | 01e006e46e6d4dd0ab25e08bd44d13dd1e195886 (patch) | |
tree | 3ed1b959caa20fd0e117de2fcfa557738ae5aa86 /gtk2_ardour/volume_controller.h | |
parent | cb8bc87a542e35794a12e76a23594e63b3bad521 (diff) |
some changes to try to make the monitor section gain controls work as intended, and along the way start to rationalize MotionFeedback/VolumeController classes
git-svn-id: svn://localhost/ardour2/branches/3.0@9746 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/volume_controller.h')
-rw-r--r-- | gtk2_ardour/volume_controller.h | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/gtk2_ardour/volume_controller.h b/gtk2_ardour/volume_controller.h index d55e654930..8693f5f0da 100644 --- a/gtk2_ardour/volume_controller.h +++ b/gtk2_ardour/volume_controller.h @@ -24,27 +24,33 @@ #include "gtkmm2ext/motionfeedback.h" -// march 2010: this exists as a placeholder to add a controllable, but maybe it will -// end up in MotionFeedback - class VolumeController : public Gtkmm2ext::MotionFeedback { public: VolumeController (Glib::RefPtr<Gdk::Pixbuf>, - Gtk::Adjustment *adj, + boost::shared_ptr<PBD::Controllable>, + double def, + double step, + double page, bool with_numeric = true, int image_width = 40, - int image_height = 40); + int image_height = 40, + bool linear = true, + bool dB = false); virtual ~VolumeController () {} - void set_controllable (boost::shared_ptr<PBD::Controllable> c); + + static void _dB_printer (char buf[32], const boost::shared_ptr<PBD::Controllable>& adj, void* arg); + + protected: + double to_control_value (double); + double to_display_value (double); private: - Gtk::Adjustment *adjustment; - PBD::ScopedConnection controllable_connection; + bool _linear; + bool _controllable_uses_dB; - void adjustment_value_changed (); - void controllable_value_changed (); + void dB_printer (char buf[32], const boost::shared_ptr<PBD::Controllable>& adj); }; #endif // __gtk_ardour_vol_controller_h__ |