summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_drag.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2009-09-08 21:45:44 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2009-09-08 21:45:44 +0000
commit1bf79fa88502a156a71cd3d2de35aa234950c40c (patch)
treed17b2e9ed485511ac557647c4b331054c1d477c0 /gtk2_ardour/editor_drag.h
parent539c8361de35364effe804e2db184790226b340a (diff)
move note drag & note resize mouse handling up into the Drag/Editor infrastructure/level
git-svn-id: svn://localhost/ardour2/branches/3.0@5641 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_drag.h')
-rw-r--r--gtk2_ardour/editor_drag.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/gtk2_ardour/editor_drag.h b/gtk2_ardour/editor_drag.h
index 68b2624d11..64989c96fe 100644
--- a/gtk2_ardour/editor_drag.h
+++ b/gtk2_ardour/editor_drag.h
@@ -263,6 +263,39 @@ private:
TimeAxisView* _dest_trackview;
};
+/** Drags to resize MIDI notes */
+class NoteResizeDrag : public Drag
+{
+public:
+ NoteResizeDrag (Editor *, ArdourCanvas::Item *);
+
+ void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
+ void motion (GdkEvent *, bool);
+ void finished (GdkEvent *, bool);
+
+private:
+ MidiRegionView* region;
+ bool relative;
+ bool at_front;
+};
+
+class NoteDrag : public Drag
+{
+ public:
+ NoteDrag (Editor*, ArdourCanvas::Item*);
+
+ void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
+ void motion (GdkEvent *, bool);
+ void finished (GdkEvent *, bool);
+
+ private:
+ MidiRegionView* region;
+ double last_x;
+ double last_y;
+ double drag_delta_x;
+ double drag_delta_note;
+};
+
/** Drag of region gain */
class RegionGainDrag : public Drag
{