2 Copyright (C) 2009 Paul Davis
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 #include "ardour_ui.h"
24 #include "midi_region_view.h"
25 #include "canvas-sysex.h"
27 using namespace Gnome::Canvas;
30 CanvasSysEx::CanvasSysEx(
31 MidiRegionView& region,
37 const ARDOUR::MidiModel::SysExPtr sysex)
42 ARDOUR_UI::config()->canvasvar_MidiSysExOutline.get(),
43 ARDOUR_UI::config()->canvasvar_MidiSysExFill.get(),
52 CanvasSysEx::~CanvasSysEx()
57 CanvasSysEx::on_event(GdkEvent* ev)
60 case GDK_BUTTON_PRESS:
61 if (ev->button.button == 3) {
67 if (ev->scroll.direction == GDK_SCROLL_UP) {
69 } else if (ev->scroll.direction == GDK_SCROLL_DOWN) {
75 switch (ev->key.keyval) {
79 _region.delete_sysex (this);
86 case GDK_ENTER_NOTIFY:
87 _region.sysex_entered (this);
91 case GDK_LEAVE_NOTIFY:
92 _region.sysex_left (this);