+PortMatrix::PortMatrix (Window* parent, Session* session, DataType type)
+ : Table (4, 4)
+ , _parent (parent)
+ , _type (type)
+ , _menu (0)
+ , _arrangement (TOP_TO_RIGHT)
+ , _row_index (0)
+ , _column_index (1)
+ , _min_height_divisor (1)
+ , _show_only_bundles (false)
+ , _inhibit_toggle_show_only_bundles (false)
+ , _ignore_notebook_page_selected (false)
+{
+ set_session (session);
+
+ _body = new PortMatrixBody (this);
+ _body->DimensionsChanged.connect (sigc::mem_fun (*this, &PortMatrix::body_dimensions_changed));
+
+ _hbox.pack_end (_hspacer, true, true);
+ _hbox.pack_end (_hnotebook, false, false);
+ _hbox.pack_end (_hlabel, false, false);
+
+ _vnotebook.signal_switch_page().connect (sigc::mem_fun (*this, &PortMatrix::notebook_page_selected));
+ _vnotebook.property_tab_border() = 4;
+ _vnotebook.set_name (X_("PortMatrixLabel"));
+ _hnotebook.signal_switch_page().connect (sigc::mem_fun (*this, &PortMatrix::notebook_page_selected));
+ _hnotebook.property_tab_border() = 4;
+ _hnotebook.set_name (X_("PortMatrixLabel"));
+
+ _vlabel.set_use_markup ();
+ _vlabel.set_alignment (1, 1);
+ _vlabel.set_padding (4, 16);
+ _vlabel.set_name (X_("PortMatrixLabel"));
+ _hlabel.set_use_markup ();
+ _hlabel.set_alignment (1, 0.5);
+ _hlabel.set_padding (16, 4);
+ _hlabel.set_name (X_("PortMatrixLabel"));
+
+ set_row_spacing (0, 8);
+ set_col_spacing (0, 8);
+ set_row_spacing (2, 8);
+ set_col_spacing (2, 8);
+
+ _body->show ();
+ _vbox.show ();
+ _hbox.show ();
+ _vscroll.show ();
+ _hscroll.show ();
+ _vlabel.show ();
+ _hlabel.show ();
+ _hspacer.show ();
+ _vspacer.show ();
+ _vnotebook.show ();
+ _hnotebook.show ();
+}