X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fmidi_list_editor.h;h=1d982fd56d7027c7f02f9efb896bb73dde327dcd;hb=19e97d1d64e8aa6d87d79d1f6332065992e5e027;hp=96a04ada7c96c7515b681b66baeccba048bffa1e;hpb=bb9cc45cd22af67ac275a5e73accbe14fee664d8;p=ardour.git diff --git a/gtk2_ardour/midi_list_editor.h b/gtk2_ardour/midi_list_editor.h index 96a04ada7c..1d982fd56d 100644 --- a/gtk2_ardour/midi_list_editor.h +++ b/gtk2_ardour/midi_list_editor.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2009 Paul Davis + 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 @@ -14,7 +14,6 @@ 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_ @@ -26,8 +25,14 @@ #include "evoral/types.hpp" +#include "ardour/session_handle.h" + #include "ardour_dialog.h" +namespace Evoral { + template class Note; +}; + namespace ARDOUR { class MidiRegion; class MidiModel; @@ -39,7 +44,7 @@ class MidiListEditor : public ArdourDialog public: typedef Evoral::Note NoteType; - MidiListEditor(ARDOUR::Session&, boost::shared_ptr); + MidiListEditor(ARDOUR::Session*, boost::shared_ptr); ~MidiListEditor(); private: @@ -52,7 +57,7 @@ class MidiListEditor : public ArdourDialog add (start); add (length); add (end); - add (note); + add (_note); }; Gtk::TreeModelColumn channel; Gtk::TreeModelColumn note; @@ -64,16 +69,24 @@ class MidiListEditor : public ArdourDialog Gtk::TreeModelColumn > _note; }; - ARDOUR::Session& session; MidiListModelColumns columns; Glib::RefPtr model; Gtk::TreeView view; Gtk::ScrolledWindow scroller; + std::string _current_edit; boost::shared_ptr region; - void edited (const Glib::ustring&, const Glib::ustring&); + void edited (const std::string&, const std::string&); + void editing_started (Gtk::CellEditable*, const std::string& path, int); + void editing_canceled (); + void redisplay_model (); + + bool key_press (GdkEventKey* ev); + bool key_release (GdkEventKey* ev); + + void delete_selected_note (); }; #endif /* __ardour_gtk2_midi_list_editor_h_ */