From 3845af6ce92ef15637ffb09410f442e7b4a104c3 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 27 Aug 2009 03:09:30 +0000 Subject: lots of MIDI editing stuff. to be explained on the website when its done git-svn-id: svn://localhost/ardour2/branches/3.0@5596 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/midi_list_editor.h | 73 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 gtk2_ardour/midi_list_editor.h (limited to 'gtk2_ardour/midi_list_editor.h') diff --git a/gtk2_ardour/midi_list_editor.h b/gtk2_ardour/midi_list_editor.h new file mode 100644 index 0000000000..ac931dcca6 --- /dev/null +++ b/gtk2_ardour/midi_list_editor.h @@ -0,0 +1,73 @@ +/* + Copyright (C) 2009 Paul Davis + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +#ifndef __ardour_gtk2_midi_list_editor_h_ +#define __ardour_gtk2_midi_list_editor_h_ + +#include +#include +#include + +#include "evoral/types.hpp" + +#include "ardour_dialog.h" + +namespace ARDOUR { + class MidiRegion; + class MidiModel; +}; + +class MidiListEditor : public ArdourDialog +{ + public: + MidiListEditor(boost::shared_ptr); + ~MidiListEditor(); + + private: + struct MidiListModelColumns : public Gtk::TreeModel::ColumnRecord { + MidiListModelColumns() { + add (channel); + add (note); + add (note_name); + add (velocity); + add (start); + add (length); + add (end); + }; + Gtk::TreeModelColumn channel; + Gtk::TreeModelColumn note; + Gtk::TreeModelColumn note_name; + Gtk::TreeModelColumn velocity; + Gtk::TreeModelColumn start; + Gtk::TreeModelColumn length; + Gtk::TreeModelColumn end; + }; + + MidiListModelColumns columns; + Glib::RefPtr model; + Gtk::TreeView view; + Gtk::ScrolledWindow scroller; + + boost::shared_ptr region; + + void edited (const Glib::ustring&, const Glib::ustring&); + void redisplay_model (); +}; + +#endif /* __ardour_gtk2_midi_list_editor_h_ */ -- cgit v1.2.3