fix up file renaming code a little bit
[ArdourMidi.git] / gtk2_ardour / canvas-hit.cc
blob6fcc68f5994ba467717f89edc2c1e132bf2eba88
1 #include "canvas-note.h"
2 #include "midi_region_view.h"
3 #include "public_editor.h"
4 #include "evoral/Note.hpp"
5 #include "utils.h"
7 using namespace ARDOUR;
9 namespace Gnome {
10 namespace Canvas {
12 CanvasHit::CanvasHit (MidiRegionView& region,
13 Group& group,
14 double size,
15 const boost::shared_ptr<NoteType> note,
16 bool with_events)
17 : Diamond(group, size)
18 , CanvasNoteEvent(region, this, note)
20 if (with_events) {
21 signal_event().connect (sigc::mem_fun (*this, &CanvasHit::on_event));
25 bool
26 CanvasHit::on_event(GdkEvent* ev)
28 if (!CanvasNoteEvent::on_event (ev)) {
29 return _region.get_trackview().editor().canvas_note_event (ev, this);
31 return true;
34 void
35 CanvasHit::move_event(double dx, double dy)
37 move_by (dx, dy);
40 } // namespace Gnome
41 } // namespace Canvas