From 7eea227bcdfcd930458e7638502a4cc1194bae6d Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 17 Jul 2009 13:18:58 +0000 Subject: Use track colours in the port matrix. git-svn-id: svn://localhost/ardour2/branches/3.0@5367 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/port_group.h | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) (limited to 'gtk2_ardour/port_group.h') diff --git a/gtk2_ardour/port_group.h b/gtk2_ardour/port_group.h index 5abe0c9bcd..f3f84a23ad 100644 --- a/gtk2_ardour/port_group.h +++ b/gtk2_ardour/port_group.h @@ -38,6 +38,7 @@ namespace ARDOUR { class PortMatrix; class RouteBundle; +class PublicEditor; /** A list of bundles and ports, grouped by some aspect of their * type e.g. busses, tracks, system. Each group has 0 or more bundles @@ -49,6 +50,7 @@ public: PortGroup (std::string const & n); void add_bundle (boost::shared_ptr); + void add_bundle (boost::shared_ptr, Gdk::Color); void remove_bundle (boost::shared_ptr); boost::shared_ptr only_bundle (); void clear (); @@ -56,10 +58,6 @@ public: std::string name; ///< name for the group - ARDOUR::BundleList const & bundles () const { - return _bundles; - } - bool visible () const { return _visible; } @@ -74,14 +72,23 @@ public: sigc::signal Modified; sigc::signal BundleChanged; + struct BundleRecord { + boost::shared_ptr bundle; + Gdk::Color colour; + bool has_colour; + sigc::connection changed_connection; + }; + + typedef std::list BundleList; + + BundleList const & bundles () const { + return _bundles; + } + private: void bundle_changed (ARDOUR::Bundle::Change); - - ARDOUR::BundleList _bundles; - typedef std::map, sigc::connection> ConnectionList; - ConnectionList _bundle_changed_connections; - + BundleList _bundles; bool _visible; ///< true if the group is visible in the UI }; @@ -96,7 +103,7 @@ class PortGroupList : public sigc::trackable void add_group (boost::shared_ptr); void set_type (ARDOUR::DataType); void gather (ARDOUR::Session &, bool); - ARDOUR::BundleList const & bundles () const; + PortGroup::BundleList const & bundles () const; void clear (); void remove_bundle (boost::shared_ptr); uint32_t total_visible_channels () const; @@ -126,7 +133,7 @@ class PortGroupList : public sigc::trackable void maybe_add_processor_to_bundle (boost::weak_ptr, boost::shared_ptr, bool, std::set > &); ARDOUR::DataType _type; - mutable ARDOUR::BundleList _bundles; + mutable PortGroup::BundleList _bundles; List _groups; std::vector _bundle_changed_connections; bool _signals_suspended; -- cgit v1.2.3