X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fgtkmm2ext%2Fgtkmm2ext%2Fslider_controller.h;h=e756180eaf0b47671bf55c3040718d5720f89733;hb=22b07e0233a29d9633ffa825a79503befaf2e16e;hp=42ed05a761e774c6a1a0f3e7df199bf25dd8f575;hpb=bb826f4beebfcedc50570b818c305560d2233e47;p=ardour.git diff --git a/libs/gtkmm2ext/gtkmm2ext/slider_controller.h b/libs/gtkmm2ext/gtkmm2ext/slider_controller.h index 42ed05a761..e756180eaf 100644 --- a/libs/gtkmm2ext/gtkmm2ext/slider_controller.h +++ b/libs/gtkmm2ext/gtkmm2ext/slider_controller.h @@ -1,5 +1,5 @@ /* - Copyright (C) 1998-2006 Paul Davis + Copyright (C) 1998-2006 Paul Davis This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or @@ -30,6 +30,8 @@ #include +#include "gtkmm2ext/visibility.h" + namespace Gtkmm2ext { class Pix; } @@ -40,43 +42,43 @@ namespace PBD { namespace Gtkmm2ext { -class SliderController : public Gtkmm2ext::PixFader +class LIBGTKMM2EXT_API SliderController : public Gtkmm2ext::PixFader { - public: - SliderController (Gtk::Adjustment* adj, int orientation, int, int); - - virtual ~SliderController () {} - - void set_value (float); + public: + SliderController (Gtk::Adjustment* adj, boost::shared_ptr mc, int orientation, int, int); - Gtk::SpinButton& get_spin_button () { return spin; } - - bool on_button_press_event (GdkEventButton *ev); + virtual ~SliderController () {} - void set_controllable (boost::shared_ptr c) { binding_proxy.set_controllable (c); } + Gtk::SpinButton& get_spin_button () { assert(_ctrl); return _spin; } + void set_controllable (boost::shared_ptr c) { _binding_proxy.set_controllable (c); } - protected: - BindingProxy binding_proxy; - Gtk::SpinButton spin; - Gtk::Frame spin_frame; - Gtk::HBox spin_hbox; - - void init (); + protected: + bool on_button_press_event (GdkEventButton *ev); + void ctrl_adjusted(); + void spin_adjusted(); + + BindingProxy _binding_proxy; + boost::shared_ptr _ctrl; + Gtk::Adjustment *_ctrl_adj; + Gtk::Adjustment _spin_adj; + Gtk::SpinButton _spin; + bool _ctrl_ignore; + bool _spin_ignore; }; -class VSliderController : public SliderController +class LIBGTKMM2EXT_API VSliderController : public SliderController { - public: - VSliderController (Gtk::Adjustment *adj, int, int, bool with_numeric = true); + public: + VSliderController (Gtk::Adjustment *adj, boost::shared_ptr mc, int, int); }; -class HSliderController : public SliderController +class LIBGTKMM2EXT_API HSliderController : public SliderController { - public: - HSliderController (Gtk::Adjustment *adj, int, int, bool with_numeric = true); + public: + HSliderController (Gtk::Adjustment *adj, boost::shared_ptr mc, int, int); }; }; /* namespace */ -#endif // __gtkmm2ext_slider_controller_h__ +#endif // __gtkmm2ext_slider_controller_h__