summaryrefslogtreecommitdiff
path: root/gtk2_ardour/port_matrix_body.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-01-25 06:47:11 +0000
committerCarl Hetherington <carl@carlh.net>2009-01-25 06:47:11 +0000
commit49510ba1d7fc1c85e767c05f10f9481998ef94b0 (patch)
treee04210728fb9b5e52864eb8cdc0774e4d0b9d7f2 /gtk2_ardour/port_matrix_body.cc
parenta9d67a2cc97b28795a9112a176ba1f2c1ab470d3 (diff)
Some refactoring. Add port group headers to the port matrix.
git-svn-id: svn://localhost/ardour2/branches/3.0@4443 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/port_matrix_body.cc')
-rw-r--r--gtk2_ardour/port_matrix_body.cc20
1 files changed, 11 insertions, 9 deletions
diff --git a/gtk2_ardour/port_matrix_body.cc b/gtk2_ardour/port_matrix_body.cc
index d9d8013578..3531712a56 100644
--- a/gtk2_ardour/port_matrix_body.cc
+++ b/gtk2_ardour/port_matrix_body.cc
@@ -19,6 +19,7 @@
#include <iostream>
#include "ardour/bundle.h"
+#include "ardour/types.h"
#include "port_matrix_body.h"
#include "port_matrix.h"
@@ -29,7 +30,9 @@ PortMatrixBody::PortMatrixBody (PortMatrix* p, Arrangement a)
_grid (p, this),
_arrangement (a),
_xoffset (0),
- _yoffset (0)
+ _yoffset (0),
+ _column_ports (_port_matrix->type(), _port_matrix->offering_input()),
+ _row_ports (_port_matrix->type(), !_port_matrix->offering_input())
{
modify_bg (Gtk::STATE_NORMAL, Gdk::Color ("#00000"));
}
@@ -215,10 +218,7 @@ PortMatrixBody::compute_rectangles ()
}
void
-PortMatrixBody::setup (
- std::vector<boost::shared_ptr<ARDOUR::Bundle> > const & row,
- std::vector<boost::shared_ptr<ARDOUR::Bundle> > const & column
- )
+PortMatrixBody::setup (PortGroupList const& row, PortGroupList const& column)
{
for (std::list<sigc::connection>::iterator i = _bundle_connections.begin(); i != _bundle_connections.end(); ++i) {
i->disconnect ();
@@ -226,10 +226,11 @@ PortMatrixBody::setup (
_bundle_connections.clear ();
- _row_bundles = row;
- _column_bundles = column;
+ _row_ports = row;
+ _column_ports = column;
- for (std::vector<boost::shared_ptr<ARDOUR::Bundle> >::iterator i = _row_bundles.begin(); i != _row_bundles.end(); ++i) {
+ ARDOUR::BundleList r = _row_ports.bundles ();
+ for (ARDOUR::BundleList::iterator i = r.begin(); i != r.end(); ++i) {
_bundle_connections.push_back (
(*i)->NameChanged.connect (sigc::mem_fun (*this, &PortMatrixBody::rebuild_and_draw_row_labels))
@@ -237,7 +238,8 @@ PortMatrixBody::setup (
}
- for (std::vector<boost::shared_ptr<ARDOUR::Bundle> >::iterator i = _column_bundles.begin(); i != _column_bundles.end(); ++i) {
+ ARDOUR::BundleList c = _column_ports.bundles ();
+ for (ARDOUR::BundleList::iterator i = c.begin(); i != c.end(); ++i) {
_bundle_connections.push_back (
(*i)->NameChanged.connect (sigc::mem_fun (*this, &PortMatrixBody::rebuild_and_draw_column_labels))
);