size-based scrolling and right-click pages for editor notebook
[ardour.git] / gtk2_ardour / panner2d.h
index 8161be29f27c9bc0f943ab733d02f29eb7dcb9ca..ff81ea398719b0c4c1155a4462c99a52d7c8daf3 100644 (file)
@@ -24,7 +24,9 @@
 #include <sys/types.h>
 #include <map>
 #include <string>
-#include <gtk--.h>
+
+#include <glibmm/refptr.h>
+#include <gtkmm/drawingarea.h>
 
 using std::map;
 using std::string;
@@ -33,6 +35,15 @@ namespace ARDOUR {
        class Panner;
 }
 
+namespace Gtk {
+       class Menu;
+       class CheckMenuItem;
+}
+
+namespace Pango {
+       class Layout;
+}
+
 class Panner2d : public Gtk::DrawingArea
 {
   public:
@@ -59,15 +70,15 @@ class Panner2d : public Gtk::DrawingArea
        void move_puck (int, float x, float y);
        void reset (uint32_t n_inputs);
 
-       SigC::Signal1<void,int> PuckMoved;
-       SigC::Signal1<void,int> TargetMoved;
+       sigc::signal<void,int> PuckMoved;
+       sigc::signal<void,int> TargetMoved;
 
   protected:
-       gint expose_event_impl (GdkEventExpose *);
-       gint button_press_event_impl (GdkEventButton *);
-       gint button_release_event_impl (GdkEventButton *);
-       gint motion_notify_event_impl (GdkEventMotion *);
-       void size_allocate_impl (GtkAllocation* alloc);
+       bool on_expose_event (GdkEventExpose *);
+       bool on_button_press_event (GdkEventButton *);
+       bool on_button_release_event (GdkEventButton *);
+       bool on_motion_notify_event (GdkEventMotion *);
+       void on_size_allocate (Gtk::Allocation alloc);
 
   private:
        struct Target {
@@ -84,8 +95,9 @@ class Panner2d : public Gtk::DrawingArea
        ARDOUR::Panner& panner;
        Gtk::Menu* context_menu;
        Gtk::CheckMenuItem* bypass_menu_item;
+       Glib::RefPtr<Pango::Layout> layout;
 
-       typedef map<int,Target *> Targets;
+       typedef std::map<int,Target *> Targets;
        Targets targets;
        Targets pucks;