#include <string>
#include <gtkmm2ext/gtk_ui.h>
-#include <gtkmm2ext/pixscroller.h>
+#include <gtkmm2ext/pixfader.h>
#include <gtkmm2ext/slider_controller.h>
#include "i18n.h"
using namespace Gtkmm2ext;
using namespace PBD;
-SliderController::SliderController (Glib::RefPtr<Gdk::Pixbuf> slide,
- Glib::RefPtr<Gdk::Pixbuf> 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
void
SliderController::set_value (float v)
{
- adj.set_value (v);
+ adjustment.set_value (v);
}
bool
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<Gdk::Pixbuf> slide,
- Glib::RefPtr<Gdk::Pixbuf> 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);
}
}
-HSliderController::HSliderController (Glib::RefPtr<Gdk::Pixbuf> slide,
- Glib::RefPtr<Gdk::Pixbuf> 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);