13
0

Note canvas event handling testing stuff.

git-svn-id: svn://localhost/ardour2/trunk@2154 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
David Robillard 2007-07-19 21:00:09 +00:00
parent 6da421be5d
commit 1aba241919
2 changed files with 17 additions and 0 deletions

View File

@ -152,6 +152,15 @@ MidiRegionView::canvas_event(GdkEvent* ev)
}
bool
MidiRegionView::note_canvas_event(GdkEvent* ev)
{
cerr << "NOTE CANVAS EVENT" << endl;
return true;
}
void
MidiRegionView::redisplay_model()
{
@ -326,6 +335,10 @@ MidiRegionView::add_event (const MidiEvent& ev)
ev_rect->property_outline_what() = (guint32) (0x1 & 0x4 & 0x8);
ev_rect->property_fill_color_rgba() = 0xFFFFFF66;
ev_rect->signal_event().connect(sigc::mem_fun(this, &MidiRegionView::note_canvas_event));
ev_rect->raise_to_top();
_events.push_back(ev_rect);
if (_active_notes)
_active_notes[note] = ev_rect;
@ -350,6 +363,9 @@ MidiRegionView::add_event (const MidiEvent& ev)
ev_diamond->show();
ev_diamond->property_outline_color_rgba() = 0xFFFFFFDD;
ev_diamond->property_fill_color_rgba() = 0xFFFFFF66;
ev_diamond->signal_event().connect(sigc::mem_fun(this, &MidiRegionView::note_canvas_event));
_events.push_back(ev_diamond);
}
}

View File

@ -98,6 +98,7 @@ class MidiRegionView : public RegionView
void clear_events();
bool canvas_event(GdkEvent* ev);
bool note_canvas_event(GdkEvent* ev);
std::vector<ArdourCanvas::Item*> _events;
ArdourCanvas::SimpleRect** _active_notes;