make autoscroll a bit easier to use, fix missing measure lines when moving the editor...
[ardour.git] / gtk2_ardour / panner2d.h
index 70f79f7d6d3b34b5a8541ef5e4f7e9cc5dc49335..1bf8879ba5d40e71d23c183db7a468689483875e 100644 (file)
@@ -24,7 +24,9 @@
 #include <sys/types.h>
 #include <map>
 #include <string>
-#include <gtkmm.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:
@@ -63,11 +74,11 @@ class Panner2d : public Gtk::DrawingArea
        sigc::signal<void,int> TargetMoved;
 
   protected:
-       gint on_expose_event (GdkEventExpose *);
-       gint on_button_press_event (GdkEventButton *);
-       gint on_button_release_event (GdkEventButton *);
-       gint on_motion_notify_event (GdkEventMotion *);
-       void on_size_allocate (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;