Obey snap setting for MIDI stuff.
[ardour.git] / gtk2_ardour / panner2d.h
index b16a2a1a2f869ff0af0f68baa5c9fd8a99786096..fb4929ad2d30685602fa6e694132b485632d5001 100644 (file)
@@ -15,7 +15,6 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-    $Id$
 */
 
 #ifndef __ardour_panner_2d_h__
@@ -24,7 +23,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,10 +34,19 @@ namespace ARDOUR {
        class Panner;
 }
 
+namespace Gtk {
+       class Menu;
+       class CheckMenuItem;
+}
+
+namespace Pango {
+       class Layout;
+}
+
 class Panner2d : public Gtk::DrawingArea
 {
   public:
-       Panner2d (ARDOUR::Panner&, int32_t width, int32_t height);
+       Panner2d (ARDOUR::Panner&, int32_t height);
        ~Panner2d ();
        
        int puck_position (int which_puck, float& x, float& y);
@@ -63,11 +73,11 @@ class Panner2d : public Gtk::DrawingArea
        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 +94,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;