substantive changes to pixfaders and derived classes. now fully dynamically sizable...
[ardour.git] / libs / gtkmm2ext / slider_controller.cc
index 92fd9d078b7ee5d442debdc817a139d21e8f4660..e3c47f332ea00c06c690ed35b2e83b905ce33798 100644 (file)
 using namespace Gtkmm2ext;
 using namespace PBD;
 
-SliderController::SliderController (Glib::RefPtr<Gdk::Pixbuf> image,
-                                   Gtk::Adjustment *adj,  int orientation,
-                                   boost::shared_ptr<Controllable> c,
-                                   bool with_numeric)
-
-       : PixFader (image, *adj, orientation),
-         binding_proxy (c),
-         spin (*adj, 0, 2)
+SliderController::SliderController (Gtk::Adjustment *adj, int orientation, int fader_length, int fader_girth)
+       : PixFader (*adj, orientation, fader_length, fader_girth)
+       , spin (*adj, 0, 2)
 {                        
        spin.set_name ("SliderControllerValue");
        spin.set_size_request (70,-1); // should be based on font size somehow
@@ -55,15 +50,13 @@ SliderController::on_button_press_event (GdkEventButton *ev)
        if (binding_proxy.button_press_handler (ev)) {
                return true;
        }
+
        return PixFader::on_button_press_event (ev);
 }
 
-VSliderController::VSliderController (Glib::RefPtr<Gdk::Pixbuf> image,
-                                     Gtk::Adjustment *adj,
-                                     boost::shared_ptr<Controllable> control,
-                                     bool with_numeric)
+VSliderController::VSliderController (Gtk::Adjustment *adj, int fader_length, int fader_girth, bool with_numeric)
 
-       : SliderController (image, adj, VERT, control, with_numeric)
+       : SliderController (adj, VERT, fader_length, fader_girth)
 {
        if (with_numeric) {
                spin_frame.add (spin);
@@ -74,12 +67,10 @@ VSliderController::VSliderController (Glib::RefPtr<Gdk::Pixbuf> image,
        }
 }
 
-HSliderController::HSliderController (Glib::RefPtr<Gdk::Pixbuf> image,
-                                     Gtk::Adjustment *adj,
-                                     boost::shared_ptr<Controllable> control,
+HSliderController::HSliderController (Gtk::Adjustment *adj, int fader_length, int fader_girth,
                                      bool with_numeric)
        
-       : SliderController (image, adj, HORIZ, control, with_numeric)
+       : SliderController (adj, HORIZ, fader_length, fader_girth)
 {
        if (with_numeric) {
                spin_frame.add (spin);