summaryrefslogtreecommitdiff
path: root/gtk2_ardour/port_group.h
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-07-17 13:18:58 +0000
committerCarl Hetherington <carl@carlh.net>2009-07-17 13:18:58 +0000
commit7eea227bcdfcd930458e7638502a4cc1194bae6d (patch)
tree10f917329a68de06155204c530d5586ffb8c873f /gtk2_ardour/port_group.h
parent939cff515018f9a5123e90a182dec56efdd7c508 (diff)
Use track colours in the port matrix.
git-svn-id: svn://localhost/ardour2/branches/3.0@5367 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/port_group.h')
-rw-r--r--gtk2_ardour/port_group.h29
1 files changed, 18 insertions, 11 deletions
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<ARDOUR::Bundle>);
+ void add_bundle (boost::shared_ptr<ARDOUR::Bundle>, Gdk::Color);
void remove_bundle (boost::shared_ptr<ARDOUR::Bundle>);
boost::shared_ptr<ARDOUR::Bundle> 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<void> Modified;
sigc::signal<void, ARDOUR::Bundle::Change> BundleChanged;
+ struct BundleRecord {
+ boost::shared_ptr<ARDOUR::Bundle> bundle;
+ Gdk::Color colour;
+ bool has_colour;
+ sigc::connection changed_connection;
+ };
+
+ typedef std::list<BundleRecord> BundleList;
+
+ BundleList const & bundles () const {
+ return _bundles;
+ }
+
private:
void bundle_changed (ARDOUR::Bundle::Change);
-
- ARDOUR::BundleList _bundles;
- typedef std::map<boost::shared_ptr<ARDOUR::Bundle>, 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<PortGroup>);
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<ARDOUR::Bundle>);
uint32_t total_visible_channels () const;
@@ -126,7 +133,7 @@ class PortGroupList : public sigc::trackable
void maybe_add_processor_to_bundle (boost::weak_ptr<ARDOUR::Processor>, boost::shared_ptr<RouteBundle>, bool, std::set<boost::shared_ptr<ARDOUR::IO> > &);
ARDOUR::DataType _type;
- mutable ARDOUR::BundleList _bundles;
+ mutable PortGroup::BundleList _bundles;
List _groups;
std::vector<sigc::connection> _bundle_changed_connections;
bool _signals_suspended;