Add a PianoKeyboard to GenericUI (on a MIDI track)
[ardour.git] / gtk2_ardour / editor_drag.h
index f3fc99d53f076229b17883f562b6e2368d397ec6..df54c6bda7f57b39e5232fa5f7ee8dd589e23a3d 100644 (file)
@@ -501,7 +501,7 @@ private:
 /** "Drag" to cut a region (action only on button release) */
 class RegionCutDrag : public Drag
 {
-    public:
+public:
        RegionCutDrag (Editor*, ArdourCanvas::Item*, framepos_t);
        ~RegionCutDrag ();
 
@@ -510,7 +510,7 @@ class RegionCutDrag : public Drag
        void finished (GdkEvent*, bool);
        void aborted (bool);
 
-    private:
+private:
        EditorCursor* line;
 };
 
@@ -551,7 +551,7 @@ private:
 /** Drags to move MIDI notes */
 class NoteDrag : public Drag
 {
-  public:
+public:
        NoteDrag (Editor*, ArdourCanvas::Item*);
 
        void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
@@ -560,7 +560,7 @@ class NoteDrag : public Drag
        void aborted (bool);
 
        void setup_pointer_frame_offset ();
-  private:
+private:
 
        double total_dx (GdkEvent * event) const; // total movement in quarter notes
        int8_t total_dy () const;
@@ -822,6 +822,7 @@ private:
        double _grab_qn;
        ARDOUR::TempoSection* _tempo;
        XMLNode* _before_state;
+       bool     _drag_valid;
 };
 
 /** tempo curve twist drag */
@@ -880,6 +881,7 @@ private:
        double _grab_qn;
        ARDOUR::TempoSection* _tempo;
        XMLNode* _before_state;
+       bool _drag_valid;
 };
 
 /** Drag of the playhead cursor */
@@ -907,6 +909,12 @@ private:
        EditorCursor& _cursor;
        bool _stop; ///< true to stop the transport on starting the drag, otherwise false
        double _grab_zoom; ///< editor frames per unit when our grab started
+
+       //used for zooming
+       int _last_mx;
+       int _last_my;
+       int _last_dx;
+       int _last_y_delta;
 };
 
 /** Region fade-in drag */
@@ -1274,7 +1282,7 @@ private:
  */
 class CrossfadeEdgeDrag : public Drag
 {
-  public:
+public:
        CrossfadeEdgeDrag (Editor*, AudioRegionView*, ArdourCanvas::Item*, bool start);
 
        void start_grab (GdkEvent*, Gdk::Cursor* c = 0);
@@ -1290,26 +1298,10 @@ class CrossfadeEdgeDrag : public Drag
                return std::make_pair (4, 4);
        }
 
-  private:
+private:
        AudioRegionView* arv;
        bool start;
 };
 
-class RulerZoomDrag : public Drag
-{
-public:
-       RulerZoomDrag (Editor*, ArdourCanvas::Item*);
-
-       void start_grab (GdkEvent*, Gdk::Cursor* c = 0);
-       void motion (GdkEvent *, bool);
-       void finished (GdkEvent*, bool);
-       void aborted (bool);
-
-       virtual bool allow_vertical_autoscroll () const {
-               return false;
-       }
-
-};
-
 #endif /* __gtk2_ardour_editor_drag_h_ */