ardour
port_matrix_labels.cc
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2009 Paul Davis
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program; if not, write to the Free Software
16  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 
18 */
19 
20 #include "ardour/bundle.h"
21 #include "port_matrix_labels.h"
22 #include "port_matrix.h"
23 
24 void
26 {
27  for (std::vector<ARDOUR::BundleChannel>::const_iterator i = _channel_highlights.begin(); i != _channel_highlights.end(); ++i) {
28  if (_matrix->show_only_bundles()) {
30  cr,
35  i->bundle
36  );
37  } else {
39  cr,
44  *i
45  );
46  }
47  }
48 }
49 
50 void
52 {
53  for (std::vector<ARDOUR::BundleChannel>::const_iterator i = _channel_highlights.begin(); i != _channel_highlights.end(); ++i) {
54  queue_draw_for (*i);
55  }
56 
57  _channel_highlights.clear ();
58 }
59 
60 void
62 {
63  _channel_highlights.push_back (bc);
64  queue_draw_for (bc);
65 }
66 
void add_channel_highlight(ARDOUR::BundleChannel const &)
virtual double channel_y(ARDOUR::BundleChannel const &) const =0
virtual void render_bundle_name(cairo_t *, Gdk::Color, Gdk::Color, double, double, boost::shared_ptr< ARDOUR::Bundle >)=0
virtual double channel_x(ARDOUR::BundleChannel const &) const =0
virtual void render_channel_name(cairo_t *, Gdk::Color, Gdk::Color, double, double, ARDOUR::BundleChannel const &)=0
virtual void queue_draw_for(ARDOUR::BundleChannel const &)=0
static Gdk::Color highlighted_channel_colour()
std::vector< ARDOUR::BundleChannel > _channel_highlights
virtual double component_to_parent_x(double x) const =0
bool show_only_bundles() const
Definition: port_matrix.h:94
static Gdk::Color mouseover_line_colour()
void draw_extra(cairo_t *)
virtual double component_to_parent_y(double y) const =0