fix mistaken "do not roll" conclusion in TransportFSM::compute_should_roll()
[ardour.git] / gtk2_ardour / port_matrix_labels.cc
1 /*
2  * Copyright (C) 2009 Carl Hetherington <carl@carlh.net>
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 along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18
19 #include "ardour/bundle.h"
20 #include "port_matrix_labels.h"
21 #include "port_matrix.h"
22
23 void
24 PortMatrixLabels::draw_extra (cairo_t* cr)
25 {
26         for (std::vector<ARDOUR::BundleChannel>::const_iterator i = _channel_highlights.begin(); i != _channel_highlights.end(); ++i) {
27                 if (_matrix->show_only_bundles()) {
28                         render_bundle_name (
29                                 cr,
30                                 mouseover_line_colour(),
31                                 highlighted_channel_colour(),
32                                 component_to_parent_x (channel_x (*i)),
33                                 component_to_parent_y (channel_y (*i)),
34                                 i->bundle
35                                 );
36                 } else {
37                         render_channel_name (
38                                 cr,
39                                 mouseover_line_colour(),
40                                 highlighted_channel_colour(),
41                                 component_to_parent_x (channel_x (*i)),
42                                 component_to_parent_y (channel_y (*i)),
43                                 *i
44                                 );
45                 }
46         }
47 }
48
49 void
50 PortMatrixLabels::clear_channel_highlights ()
51 {
52         for (std::vector<ARDOUR::BundleChannel>::const_iterator i = _channel_highlights.begin(); i != _channel_highlights.end(); ++i) {
53                 queue_draw_for (*i);
54         }
55
56         _channel_highlights.clear ();
57 }
58
59 void
60 PortMatrixLabels::add_channel_highlight (ARDOUR::BundleChannel const & bc)
61 {
62         _channel_highlights.push_back (bc);
63         queue_draw_for (bc);
64 }
65