+
+void
+PortMatrixBody::set_cairo_clip (cairo_t* cr, Gdk::Rectangle const & r) const
+{
+ cairo_rectangle (cr, r.get_x(), r.get_y(), r.get_width(), r.get_height());
+ cairo_clip (cr);
+}
+
+void
+PortMatrixBody::component_size_changed ()
+{
+ if (_ignore_component_size_changed) {
+ return;
+ }
+
+ compute_rectangles ();
+ _matrix->setup_scrollbars ();
+}
+
+pair<uint32_t, uint32_t>
+PortMatrixBody::max_size () const
+{
+ pair<uint32_t, uint32_t> const col = _column_labels->dimensions ();
+ pair<uint32_t, uint32_t> const row = _row_labels->dimensions ();
+ pair<uint32_t, uint32_t> const grid = _grid->dimensions ();
+
+ return make_pair (std::max (row.first, _column_labels->overhang()) + grid.first, col.second + grid.second);
+}
+
+/** @return x position at which the column labels meet the border of the matrix */
+uint32_t
+PortMatrixBody::column_labels_border_x () const
+{
+ return _column_labels_border_x;
+}
+
+uint32_t
+PortMatrixBody::column_labels_height () const
+{
+ return _column_labels_height;
+}