cache shaded meter-background regardless of color
[ardour.git] / libs / gtkmm2ext / gtkmm2ext / slider_controller.h
index 83cc1fddfd489e801fe38750ddc38b771cdcb719..4c6a5cb41d5d33208d2596bad6cc3458a49abc06 100644 (file)
@@ -14,7 +14,6 @@
     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__
@@ -25,6 +24,8 @@
 #include <gtkmm2ext/pixfader.h>
 #include <gtkmm2ext/binding_proxy.h>
 
+#include <boost/shared_ptr.hpp>
+
 namespace Gtkmm2ext {
        class Pix;
 }
@@ -38,12 +39,8 @@ namespace Gtkmm2ext {
 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);
@@ -52,33 +49,27 @@ class SliderController : public Gtkmm2ext::PixFader
        
        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);
 };