Standardize drawing of PixFader and BarController; implement flat_buttons and prelight.
[ardour.git] / libs / gtkmm2ext / gtkmm2ext / barcontroller.h
index e0e14f1c26d1625873a9711a9aa64d087b9f62a7..5fc3c17aeaa2ef292306ff604b76f49edf72107e 100644 (file)
 
 #include <gtkmm/frame.h>
 #include <gtkmm/drawingarea.h>
-#include <gtkmm2ext/binding_proxy.h>
+#include <cairo.h>
 
+#include "gtkmm2ext/visibility.h"
+#include "gtkmm2ext/binding_proxy.h"
 
 namespace Gtkmm2ext {
 
-class BarController : public Gtk::Frame
+class LIBGTKMM2EXT_API BarController : public Gtk::Frame
 {
   public:
        BarController (Gtk::Adjustment& adj, boost::shared_ptr<PBD::Controllable>);
 
-       virtual ~BarController () {}
+       virtual ~BarController ();
 
        enum barStyle {
                LeftToRight,
@@ -82,8 +84,10 @@ class BarController : public Gtk::Frame
        Gtk::SpinButton     spinner;
        bool                use_parent;
        bool                logarithmic;
+        sigc::slot<std::string> _label_slot;
+        bool                    _use_slot;
 
-       virtual std::string get_label (int& /*x*/) {
+       virtual std::string get_label (double& /*x*/) {
                return "";
        }
        
@@ -93,9 +97,13 @@ class BarController : public Gtk::Frame
        virtual bool expose (GdkEventExpose *);
        virtual bool scroll (GdkEventScroll *);
        virtual bool entry_focus_out (GdkEventFocus*);
+       bool on_enter_notify_event (GdkEventCrossing* ev);
+       bool on_leave_notify_event (GdkEventCrossing* ev);
 
        gint mouse_control (double x, GdkWindow* w, double scaling);
 
+       Gdk::Color get_parent_bg ();
+
        gint switch_to_bar ();
        gint switch_to_spinner ();
 
@@ -104,6 +112,9 @@ class BarController : public Gtk::Frame
        
        int entry_input (double* new_value);
        bool entry_output ();
+
+       bool _hovering;
+
 };