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
This commit is contained in:
Paul Davis 2009-09-08 21:45:44 +00:00
parent 539c8361de
commit 1bf79fa885
13 changed files with 283 additions and 258 deletions

View file

@ -31,7 +31,7 @@ namespace Canvas {
class CanvasNote : public SimpleRect, public CanvasNoteEvent {
public:
typedef Evoral::Note<double> NoteType;
typedef Evoral::Note<Evoral::MusicalTime> NoteType;
double x1() { return property_x1(); }
double y1() { return property_y1(); }
@ -46,27 +46,12 @@ public:
bool on_event(GdkEvent* ev);
enum NoteEnd {
NOTE_ON,
NOTE_OFF
};
enum NoteState {
None,
RelativeResize,
AbsoluteResize
};
CanvasNote(
MidiRegionView& region,
Group& group,
const boost::shared_ptr<NoteType> note = boost::shared_ptr<NoteType>())
: SimpleRect(group), CanvasNoteEvent(region, this, note), _note_state(None)
CanvasNote (MidiRegionView& region,
Group& group,
const boost::shared_ptr<NoteType> note = boost::shared_ptr<NoteType>())
: SimpleRect(group), CanvasNoteEvent(region, this, note)
{
}
protected:
NoteState _note_state;
};
} // namespace Gnome