diff options
author | Ben Loftis <ben@harrisonconsoles.com> | 2018-11-15 09:24:37 -0600 |
---|---|---|
committer | Ben Loftis <ben@harrisonconsoles.com> | 2019-08-01 12:11:31 -0500 |
commit | b1019bbbf622cf2c12b76fca445ccd89c46c30c9 (patch) | |
tree | 5e98c51f481209374b8fb306b89d075566f747bf /gtk2_ardour/editor_regions.h | |
parent | 3e6ce20fd71022dad54508b652e851148ae4a4c4 (diff) |
(Source List) Region List rewrite (gtk2 part)
See: https://docs.google.com/document/d/1sI7p9RoRVZtNx2n67RvBa0_16fuZblV_lNkkKN2g93s/edit?usp=sharing
Diffstat (limited to 'gtk2_ardour/editor_regions.h')
-rw-r--r-- | gtk2_ardour/editor_regions.h | 72 |
1 files changed, 21 insertions, 51 deletions
diff --git a/gtk2_ardour/editor_regions.h b/gtk2_ardour/editor_regions.h index 4b491e673d..f3543bac0b 100644 --- a/gtk2_ardour/editor_regions.h +++ b/gtk2_ardour/editor_regions.h @@ -41,20 +41,12 @@ public: void clear (); - void toggle_full (); - void toggle_show_auto_regions (); - void reset_sort_direction (bool); - void reset_sort_type (Editing::RegionListSortType, bool); void set_selected (RegionSelection &); void selection_mapover (sigc::slot<void,boost::shared_ptr<ARDOUR::Region> >); boost::shared_ptr<ARDOUR::Region> get_dragged_region (); boost::shared_ptr<ARDOUR::Region> get_single_selection (); - Editing::RegionListSortType sort_type () const { - return _sort_type; - } - void redisplay (); void suspend_redisplay () { @@ -84,9 +76,8 @@ private: struct Columns : public Gtk::TreeModel::ColumnRecord { Columns () { add (name); - add (region); - add (color_); - add (position); + add (take_id); + add (start); add (end); add (length); add (sync); @@ -96,15 +87,16 @@ private: add (glued); add (muted); add (opaque); - add (used); add (path); - add (property_toggles_visible); + add (region); + add (color_); + add (position); } Gtk::TreeModelColumn<std::string> name; - Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::Region> > region; - Gtk::TreeModelColumn<Gdk::Color> color_; - Gtk::TreeModelColumn<std::string> position; + Gtk::TreeModelColumn<std::string> take_id; + Gtk::TreeModelColumn<samplepos_t> position; + Gtk::TreeModelColumn<std::string> start; Gtk::TreeModelColumn<std::string> end; Gtk::TreeModelColumn<std::string> length; Gtk::TreeModelColumn<std::string> sync; @@ -114,10 +106,9 @@ private: Gtk::TreeModelColumn<bool> glued; Gtk::TreeModelColumn<bool> muted; Gtk::TreeModelColumn<bool> opaque; - Gtk::TreeModelColumn<std::string> used; Gtk::TreeModelColumn<std::string> path; - /** used to indicate whether the locked/glued/muted/opaque should be visible or not */ - Gtk::TreeModelColumn<bool> property_toggles_visible; + Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::Region> > region; + Gtk::TreeModelColumn<Gdk::Color> color_; }; Columns _columns; @@ -153,23 +144,22 @@ private: void show_context_menu (int button, int time); - int sorter (Gtk::TreeModel::iterator, Gtk::TreeModel::iterator); - void format_position (ARDOUR::samplepos_t pos, char* buf, size_t bufsize, bool onoff = true); void add_region (boost::shared_ptr<ARDOUR::Region>); + void destroy_region (boost::shared_ptr<ARDOUR::Region>); void populate_row (boost::shared_ptr<ARDOUR::Region>, Gtk::TreeModel::Row const &, PBD::PropertyChange const &); - void populate_row_used (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used); - void populate_row_position (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used); - void populate_row_end (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used); - void populate_row_sync (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used); - void populate_row_fade_in (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used, boost::shared_ptr<ARDOUR::AudioRegion>); - void populate_row_fade_out (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used, boost::shared_ptr<ARDOUR::AudioRegion>); - void populate_row_locked (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used); - void populate_row_muted (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used); - void populate_row_glued (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used); - void populate_row_opaque (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used); + void populate_row_used (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row); + void populate_row_position (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row); + void populate_row_end (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row); + void populate_row_sync (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row); + void populate_row_fade_in (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, boost::shared_ptr<ARDOUR::AudioRegion>); + void populate_row_fade_out (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, boost::shared_ptr<ARDOUR::AudioRegion>); + void populate_row_locked (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row); + void populate_row_muted (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row); + void populate_row_glued (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row); + void populate_row_opaque (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row); void populate_row_length (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row); void populate_row_name (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row); void populate_row_source (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row); @@ -177,20 +167,11 @@ private: void update_row (boost::shared_ptr<ARDOUR::Region>); void update_all_rows (); - void insert_into_tmp_regionlist (boost::shared_ptr<ARDOUR::Region>); - void drag_data_received ( Glib::RefPtr<Gdk::DragContext> const &, gint, gint, Gtk::SelectionData const &, guint, guint ); - Glib::RefPtr<Gtk::RadioAction> sort_type_action (Editing::RegionListSortType) const; - void set_full (bool); - - Glib::RefPtr<Gtk::Action> hide_action () const; - Glib::RefPtr<Gtk::Action> show_action () const; Glib::RefPtr<Gtk::Action> remove_unused_regions_action () const; - Glib::RefPtr<Gtk::ToggleAction> toggle_full_action () const; - Glib::RefPtr<Gtk::ToggleAction> toggle_show_auto_regions_action () const; Gtk::Menu* _menu; Gtk::ScrolledWindow _scroller; @@ -200,28 +181,17 @@ private: Glib::RefPtr<Gtk::TreeStore> _model; - bool _show_automatic_regions; - bool ignore_region_list_selection_change; - bool ignore_selected_region_change; bool _no_redisplay; - Editing::RegionListSortType _sort_type; - - std::list<boost::shared_ptr<ARDOUR::Region> > tmp_region_list; - typedef boost::unordered_map<boost::shared_ptr<ARDOUR::Region>, Gtk::TreeModel::iterator> RegionRowMap; - typedef boost::unordered_map<std::string, Gtk::TreeModel::RowReference > RegionSourceMap; RegionRowMap region_row_map; - RegionSourceMap parent_regions_sources_map; PBD::ScopedConnection region_property_connection; PBD::ScopedConnection check_new_region_connection; PBD::ScopedConnection editor_freeze_connection; PBD::ScopedConnection editor_thaw_connection; - - bool expanded; }; #endif /* __gtk_ardour_editor_regions_h__ */ |