X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=libs%2Fgtkmm2ext%2Fslider_controller.cc;h=e3c47f332ea00c06c690ed35b2e83b905ce33798;hb=d9df0ea6e50f4caa23b4c9e67236e17e303ef89e;hp=e524eba1cbd4bdd57010351bf3a10bf2feee1e5c;hpb=79986643c0c904f6574bb5323e2233a43a9e622e;p=ardour.git diff --git a/libs/gtkmm2ext/slider_controller.cc b/libs/gtkmm2ext/slider_controller.cc index e524eba1cb..e3c47f332e 100644 --- a/libs/gtkmm2ext/slider_controller.cc +++ b/libs/gtkmm2ext/slider_controller.cc @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include "i18n.h" @@ -28,15 +28,9 @@ using namespace Gtkmm2ext; using namespace PBD; -SliderController::SliderController (Glib::RefPtr slide, - Glib::RefPtr rail, - Gtk::Adjustment *adj, - Controllable& c, - bool with_numeric) - - : PixScroller (*adj, slide, rail), - 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 @@ -47,7 +41,7 @@ SliderController::SliderController (Glib::RefPtr slide, void SliderController::set_value (float v) { - adj.set_value (v); + adjustment.set_value (v); } bool @@ -56,16 +50,13 @@ SliderController::on_button_press_event (GdkEventButton *ev) if (binding_proxy.button_press_handler (ev)) { return true; } - return PixScroller::on_button_press_event (ev); + + return PixFader::on_button_press_event (ev); } -VSliderController::VSliderController (Glib::RefPtr slide, - Glib::RefPtr rail, - Gtk::Adjustment *adj, - Controllable& control, - bool with_numeric) +VSliderController::VSliderController (Gtk::Adjustment *adj, int fader_length, int fader_girth, bool with_numeric) - : SliderController (slide, rail, adj, control, with_numeric) + : SliderController (adj, VERT, fader_length, fader_girth) { if (with_numeric) { spin_frame.add (spin); @@ -76,13 +67,10 @@ VSliderController::VSliderController (Glib::RefPtr slide, } } -HSliderController::HSliderController (Glib::RefPtr slide, - Glib::RefPtr rail, - Gtk::Adjustment *adj, - Controllable& control, +HSliderController::HSliderController (Gtk::Adjustment *adj, int fader_length, int fader_girth, bool with_numeric) - : SliderController (slide, rail, adj, control, with_numeric) + : SliderController (adj, HORIZ, fader_length, fader_girth) { if (with_numeric) { spin_frame.add (spin);