along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id$
*/
#ifndef __gtkmm2ext_slider_controller_h__
#include <gtkmm2ext/pixfader.h>
#include <gtkmm2ext/binding_proxy.h>
+#include <boost/shared_ptr.hpp>
+
namespace Gtkmm2ext {
class Pix;
}
class SliderController : public Gtkmm2ext::PixFader
{
public:
- SliderController (Glib::RefPtr<Gdk::Pixbuf> slider,
- Glib::RefPtr<Gdk::Pixbuf> rail,
- Gtk::Adjustment* adj,
- PBD::Controllable&,
- bool with_numeric = true);
-
+ SliderController (Gtk::Adjustment* adj, int orientation, int, int);
+
virtual ~SliderController () {}
void set_value (float);
bool on_button_press_event (GdkEventButton *ev);
+ void set_controllable (boost::shared_ptr<PBD::Controllable> c) { binding_proxy.set_controllable (c); }
+
protected:
BindingProxy binding_proxy;
- Glib::RefPtr<Gdk::Pixbuf> slider;
- Glib::RefPtr<Gdk::Pixbuf> rail;
Gtk::SpinButton spin;
Gtk::Frame spin_frame;
Gtk::HBox spin_hbox;
+
+ void init ();
};
class VSliderController : public SliderController
{
public:
- VSliderController (Glib::RefPtr<Gdk::Pixbuf> slider,
- Glib::RefPtr<Gdk::Pixbuf> rail,
- Gtk::Adjustment *adj,
- PBD::Controllable&,
- bool with_numeric = true);
+ VSliderController (Gtk::Adjustment *adj, int, int, bool with_numeric = true);
};
class HSliderController : public SliderController
{
public:
- HSliderController (Glib::RefPtr<Gdk::Pixbuf> slider,
- Glib::RefPtr<Gdk::Pixbuf> rail,
- Gtk::Adjustment *adj,
- PBD::Controllable&,
- bool with_numeric = true);
+ HSliderController (Gtk::Adjustment *adj, int, int, bool with_numeric = true);
};