diff options
author | Ben Loftis <ben@harrisonconsoles.com> | 2019-05-31 13:36:46 -0500 |
---|---|---|
committer | Ben Loftis <ben@harrisonconsoles.com> | 2019-08-01 12:11:31 -0500 |
commit | fc981d4399b0b2c67f06e4ebd5f3a4a531d63693 (patch) | |
tree | 66186712f235bd841a5081b5d738142edf685ac9 /gtk2_ardour/editor_sources.h | |
parent | ed325b52b2e4d81e090069a3c952f8216dacd5b5 (diff) |
(Source List) Revert to displaying whole-file Regions instead of Sources.
This preserves the stereo-ness of files that were imported or recorded in stereo.
ToDo (maybe someday): provide a disclosure triangle that exposes the individual channels in a multichannel region
Diffstat (limited to 'gtk2_ardour/editor_sources.h')
-rw-r--r-- | gtk2_ardour/editor_sources.h | 43 |
1 files changed, 28 insertions, 15 deletions
diff --git a/gtk2_ardour/editor_sources.h b/gtk2_ardour/editor_sources.h index 75ddf41b5c..5bcc9f5c2d 100644 --- a/gtk2_ardour/editor_sources.h +++ b/gtk2_ardour/editor_sources.h @@ -45,12 +45,10 @@ public: void clear (); - void remove_selected_sources (); - void selection_mapover (sigc::slot<void,boost::shared_ptr<ARDOUR::Region> >); - boost::shared_ptr<ARDOUR::Source> get_dragged_source (); - boost::shared_ptr<ARDOUR::Source> get_single_selection (); + boost::shared_ptr<ARDOUR::Region> get_dragged_region (); + boost::shared_ptr<ARDOUR::Region> get_single_selection (); void block_change_connection (bool b) { _change_connection.block (b); @@ -60,6 +58,10 @@ public: _display.get_selection()->unselect_all (); } + //user actions + void remove_selected_sources (); + void recover_selected_sources(); + XMLNode& get_state () const; void set_state (const XMLNode &); @@ -72,12 +74,12 @@ private: add (natural_pos); add (path); add (color_); - add (source); + add (region); add (natural_s); } Gtk::TreeModelColumn<std::string> name; - Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::Source> > source; + Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::Region> > region; Gtk::TreeModelColumn<Gdk::Color> color_; Gtk::TreeModelColumn<std::string> natural_pos; Gtk::TreeModelColumn<std::string> path; @@ -91,8 +93,8 @@ private: void freeze_tree_model (); void thaw_tree_model (); - void source_changed (boost::shared_ptr<ARDOUR::Source>); - void populate_row (Gtk::TreeModel::Row row, boost::shared_ptr<ARDOUR::Source> source); + void source_changed (boost::shared_ptr<ARDOUR::Region>); + void populate_row (Gtk::TreeModel::Row row, boost::shared_ptr<ARDOUR::Region> region); void selection_changed (); sigc::connection _change_connection; @@ -113,11 +115,22 @@ private: void format_position (ARDOUR::samplepos_t pos, char* buf, size_t bufsize, bool onoff = true); - void add_source (boost::shared_ptr<ARDOUR::Source>); - void remove_source (boost::shared_ptr<ARDOUR::Source>); + void add_source (boost::shared_ptr<ARDOUR::Region>); + void remove_source (boost::shared_ptr<ARDOUR::Region>); void clock_format_changed (); + void redisplay (); + + void suspend_redisplay () { + _no_redisplay = true; + } + + void resume_redisplay () { + _no_redisplay = false; + redisplay (); + } + void drag_data_received ( Glib::RefPtr<Gdk::DragContext> const &, gint, gint, Gtk::SelectionData const &, guint, guint ); @@ -126,19 +139,19 @@ private: Gtk::ScrolledWindow _scroller; Gtk::Frame _frame; - Gtkmm2ext::DnDTreeView<boost::shared_ptr<ARDOUR::Source> > _display; + Gtkmm2ext::DnDTreeView<boost::shared_ptr<ARDOUR::Region> > _display; Glib::RefPtr<Gtk::TreeStore> _model; - PBD::ScopedConnection source_property_connection; - - PBD::ScopedConnection source_added_connection; - PBD::ScopedConnection source_removed_connection; + PBD::ScopedConnection region_property_connection; + PBD::ScopedConnection check_new_region_connection; PBD::ScopedConnection editor_freeze_connection; PBD::ScopedConnection editor_thaw_connection; Selection* _selection; + + bool _no_redisplay; }; |