X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fmidi_list_editor.h;h=f8d2ce9432cd630748d50950911137de0c98359f;hb=6ee23029a338951705c589be6c61ab52099758b6;hp=20ffd39fee5905c0b36572d782e1660ecb609e8c;hpb=737f91174f6680277632b6914a30b4be3ac81ab7;p=ardour.git diff --git a/gtk2_ardour/midi_list_editor.h b/gtk2_ardour/midi_list_editor.h index 20ffd39fee..f8d2ce9432 100644 --- a/gtk2_ardour/midi_list_editor.h +++ b/gtk2_ardour/midi_list_editor.h @@ -20,6 +20,8 @@ #define __ardour_gtk2_midi_list_editor_h_ #include +#include +#include #include #include @@ -36,6 +38,7 @@ namespace Evoral { namespace ARDOUR { class MidiRegion; class MidiModel; + class MidiTrack; class Session; }; @@ -44,7 +47,8 @@ class MidiListEditor : public ArdourWindow public: typedef Evoral::Note NoteType; - MidiListEditor(ARDOUR::Session*, boost::shared_ptr); + MidiListEditor(ARDOUR::Session*, boost::shared_ptr, + boost::shared_ptr); ~MidiListEditor(); private: @@ -56,26 +60,42 @@ class MidiListEditor : public ArdourWindow add (velocity); add (start); add (length); - add (end); add (_note); }; - Gtk::TreeModelColumn channel; - Gtk::TreeModelColumn note; + Gtk::TreeModelColumn channel; + Gtk::TreeModelColumn note; Gtk::TreeModelColumn note_name; - Gtk::TreeModelColumn velocity; + Gtk::TreeModelColumn velocity; Gtk::TreeModelColumn start; Gtk::TreeModelColumn length; - Gtk::TreeModelColumn end; Gtk::TreeModelColumn > _note; }; + struct NoteLengthColumns : public Gtk::TreeModel::ColumnRecord { + NoteLengthColumns() { + add (ticks); + add (name); + } + Gtk::TreeModelColumn ticks; + Gtk::TreeModelColumn name; + }; + MidiListModelColumns columns; Glib::RefPtr model; + NoteLengthColumns note_length_columns; + Glib::RefPtr note_length_model; Gtk::TreeView view; Gtk::ScrolledWindow scroller; - std::string _current_edit; + Gtk::TreeModel::Path edit_path; + int edit_column; + Gtk::CellRendererText* editing_renderer; + Gtk::CellEditable* editing_editable; + Gtk::Table buttons; + Gtk::VBox vbox; + Gtk::ToggleButton sound_notes_button; boost::shared_ptr region; + boost::shared_ptr track; /** connection used to connect to model's ContentChanged signal */ PBD::ScopedConnection content_connection; @@ -83,13 +103,16 @@ class MidiListEditor : public ArdourWindow void edited (const std::string&, const std::string&); void editing_started (Gtk::CellEditable*, const std::string& path, int); void editing_canceled (); + void stop_editing (bool cancelled = false); void redisplay_model (); bool key_press (GdkEventKey* ev); bool key_release (GdkEventKey* ev); + bool scroll_event (GdkEventScroll*); void delete_selected_note (); + void selection_changed (); }; #endif /* __ardour_gtk2_midi_list_editor_h_ */