/** PortGroupList constructor.
*/
-
PortGroupList::PortGroupList ()
: _type (ARDOUR::DataType::AUDIO), _bundles_dirty (true)
{
for (std::vector<sigc::connection>::iterator i = _route_connections.begin(); i != _route_connections.end(); ++i) {
i->disconnect ();
}
+ _route_connections.clear ();
boost::shared_ptr<ARDOUR::RouteList> routes = _session.get_routes ();
for (ARDOUR::RouteList::iterator i = routes->begin(); i != routes->end(); ++i) {
/* we've set up before, so we need to clean up before re-setting-up */
/* XXX: we ought to be able to do this by just getting a list of children
from each container widget, but I couldn't make that work */
-
for (std::vector<Gtk::CheckButton*>::iterator i = _column_visibility_buttons.begin(); i != _column_visibility_buttons.end(); ++i) {
_column_visibility_box.remove (**i);
rename_channel (ARDOUR::BundleChannel (sb, c));
}
-
);
bool intersects;
+
Gdk::Rectangle r = exposure;
+ /* the get_pixmap call may cause things to be rerendered and sizes to change,
+ so fetch the pixmaps before calculating where to put it */
+ GdkPixmap* p = _column_labels->get_pixmap (get_window()->gobj());
r.intersect (_column_labels->parent_rectangle(), intersects);
if (intersects) {
+
gdk_draw_drawable (
get_window()->gobj(),
get_style()->get_fg_gc (Gtk::STATE_NORMAL)->gobj(),
- _column_labels->get_pixmap (get_window()->gobj()),
+ p,
_column_labels->parent_to_component_x (r.get_x()),
_column_labels->parent_to_component_y (r.get_y()),
r.get_x(),
}
r = exposure;
+ p = _row_labels->get_pixmap (get_window()->gobj());
r.intersect (_row_labels->parent_rectangle(), intersects);
if (intersects) {
gdk_draw_drawable (
get_window()->gobj(),
get_style()->get_fg_gc (Gtk::STATE_NORMAL)->gobj(),
- _row_labels->get_pixmap (get_window()->gobj()),
+ p,
_row_labels->parent_to_component_x (r.get_x()),
_row_labels->parent_to_component_y (r.get_y()),
r.get_x(),
}
r = exposure;
+ p = _grid->get_pixmap (get_window()->gobj());
r.intersect (_grid->parent_rectangle(), intersects);
if (intersects) {
gdk_draw_drawable (
get_window()->gobj(),
get_style()->get_fg_gc (Gtk::STATE_NORMAL)->gobj(),
- _grid->get_pixmap (get_window()->gobj()),
+ p,
_grid->parent_to_component_x (r.get_x()),
_grid->parent_to_component_y (r.get_y()),
r.get_x(),
cairo_rectangle (cr, r.get_x(), r.get_y(), r.get_width(), r.get_height());
cairo_clip (cr);
}
+
+void
+PortMatrixBody::component_size_changed ()
+{
+ compute_rectangles ();
+ _matrix->setup_scrollbars ();
+}
+
}
void highlight_associated_channels (int, uint32_t);
+ void component_size_changed ();
protected:
bool on_expose_event (GdkEventExpose *);
void rebuild_and_draw_row_labels ();
void update_bundles ();
void set_cairo_clip (cairo_t *, Gdk::Rectangle const &) const;
-
+
PortMatrix* _matrix;
PortMatrixColumnLabels* _column_labels;
PortMatrixRowLabels* _row_labels;
*/
-#include <iostream>
#include "port_matrix_component.h"
+#include "port_matrix.h"
+#include "port_matrix_body.h"
/** Constructor.
* @param p Port matrix that we're in.
if (_dimension_computation_required) {
compute_dimensions ();
_dimension_computation_required = false;
+ _body->component_size_changed ();
}
/* we may be zero width or height; if so, just
if (_dimension_computation_required) {
compute_dimensions ();
_dimension_computation_required = false;
+ _body->component_size_changed ();
}
return std::make_pair (_width, _height);
PortMatrixLabels::draw_extra (cairo_t* cr)
{
for (std::vector<ARDOUR::BundleChannel>::const_iterator i = _channel_highlights.begin(); i != _channel_highlights.end(); ++i) {
-
+
render_channel_name (
cr,
highlighted_channel_colour(),