21 #include <boost/weak_ptr.hpp>
25 #include "canvas/colors.h"
43 cairo_surface_t* surface = cairo_image_surface_create (CAIRO_FORMAT_RGB24, 200, 200);
44 cairo_t* cr = cairo_create (surface);
56 for (PortGroup::BundleList::const_iterator j = r.begin(); j != r.end(); ++j) {
58 for (uint32_t k = 0; k < (*j)->bundle->nchannels().n_total(); ++k) {
64 cairo_text_extents_t ext;
65 cairo_text_extents (cr, (*j)->bundle->channel_name(k).c_str(), &ext);
71 cairo_text_extents_t ext;
72 cairo_text_extents (cr, (*j)->bundle->name().c_str(), &ext);
87 cairo_surface_destroy (surface);
115 for (PortGroup::BundleList::const_iterator i = bundles.begin(); i != bundles.end(); ++i) {
120 for (uint32_t j = 0; j <
N; ++j) {
124 (*i)->bundle->type_channel_to_overall (
_matrix->
type (), j)
159 }
else if (ev->button == 3) {
229 cairo_fill_preserve (cr);
234 cairo_text_extents_t ext;
235 cairo_text_extents (cr, b->
name().c_str(), &ext);
238 Gdk::Color textcolor;
242 cairo_show_text (cr, b->
name().c_str());
247 cairo_t* cr, Gdk::Color fg_colour, Gdk::Color bg_colour,
double xoff,
double yoff,
ARDOUR::BundleChannel const& bc
252 cairo_fill_preserve (cr);
262 cairo_text_extents_t ext;
263 cairo_text_extents (cr, bc.
bundle->channel_name(bc.
channel).c_str(), &ext);
266 Gdk::Color textcolor;
270 cairo_show_text (cr, bc.
bundle->channel_name(bc.
channel).c_str());
292 _body->queue_draw_area (
299 _body->queue_draw_area (
314 for (list<PortMatrixNode>::const_iterator i = m.begin(); i != m.end(); ++i) {
346 list<PortMatrixNode> n;
348 for (uint32_t i = 0; i < w.
bundle->nchannels().n_total(); ++i) {
double _longest_port_name
void popup_menu(ARDOUR::BundleChannel, ARDOUR::BundleChannel, uint32_t)
void add_channel_highlight(ARDOUR::BundleChannel const &)
void set_source_rgb(cairo_t *, Gdk::Color const &)
List::const_iterator begin() const
static uint32_t name_pad()
double component_to_parent_x(double x) const
virtual void remove_channel(ARDOUR::BundleChannel)
double channel_y(ARDOUR::BundleChannel const &) const
std::list< BundleRecord * > BundleList
double _longest_bundle_name
bool should_show(ARDOUR::DataType) const
static uint32_t grid_spacing()
std::list< PortMatrixNode > mouseover() const
uint32_t count_of_our_type(ARDOUR::ChanCount) const
static Gdk::Color get_a_bundle_colour(int x)
List::const_iterator end() const
void render_bundle_name(cairo_t *, Gdk::Color, Gdk::Color, double, double, boost::shared_ptr< ARDOUR::Bundle >)
column labels on top, row labels to the right
uint32_t _height
full height of the contents
uint32_t gdk_color_to_rgba(Gdk::Color const &)
uint32_t contrasting_text_color(uint32_t c)
void set_color_from_rgba(Gdk::Color &, uint32_t)
void motion(double, double)
double component_to_parent_y(double y) const
uint32_t group_size(boost::shared_ptr< const PortGroup >) const
void render_channel_name(cairo_t *, Gdk::Color, Gdk::Color, double, double, ARDOUR::BundleChannel const &)
virtual ARDOUR::BundleChannel position_to_channel(double, double, boost::shared_ptr< const PortGroup >) const
ChanCount nchannels() const
uint32_t channel_to_position(ARDOUR::BundleChannel, boost::shared_ptr< const PortGroup >) const
Gdk::Color background_colour()
uint32_t count_of_our_type_min_1(ARDOUR::ChanCount) const
void mouseover_changed(std::list< PortMatrixNode > const &)
Gdk::Rectangle _parent_rectangle
void compute_dimensions()
double channel_x(ARDOUR::BundleChannel const &) const
double bundle_name_x() const
void highlight_associated_channels(int, ARDOUR::BundleChannel)
static uint32_t label_border_width()
PortMatrixBody * _body
the PortMatrixBody that we're in
row labels to the left, column labels on the bottom
bool show_only_bundles() const
double parent_to_component_y(double y) const
ARDOUR::DataType type() const
static bool is_delete_event(GdkEventButton *)
double port_name_x() const
PortMatrixRowLabels(PortMatrix *, PortMatrixBody *)
double parent_to_component_x(double x) const
void set_mouseover(PortMatrixNode const &)
uint32_t _width
full width of the contents
boost::shared_ptr< Bundle > bundle
void queue_draw_for(ARDOUR::BundleChannel const &)
int channel
channel index, or -1 for "all"
boost::shared_ptr< const PortGroup > visible_rows() const
void button_press(double, double, GdkEventButton *)
static bool bundle_with_channels(boost::shared_ptr< ARDOUR::Bundle >)
Arrangement arrangement() const
PortGroupList const * rows() const