Note canvas event handling testing stuff.
git-svn-id: svn://localhost/ardour2/trunk@2154 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
6da421be5d
commit
1aba241919
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user