2 Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net>
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.
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.
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.
20 /** @file src/wx/audio_mapping_view.h
21 * @brief AudioMappingView class.
25 #include <boost/signals2.hpp>
28 #include "lib/audio_mapping.h"
30 /** @class AudioMappingView
31 * @brief This class displays the mapping of one set of audio channels to another,
32 * with gain values on each node of the map.
34 * The AudioMapping passed to set() describes the actual channel mapping,
35 * and the names passed to set_input_channels() and set_output_channels() are
36 * used to label the rows and columns.
38 * The display's row count is equal to the AudioMapping's input channel count,
39 * and the column count is equal to the number of name passed to
40 * set_output_channels(). Any other output channels in the AudioMapping are
41 * hidden from view. Thus input channels are never hidden but output channels
45 class AudioMappingView : public wxPanel
48 AudioMappingView (wxWindow *);
50 void set (AudioMapping);
51 void set_input_channels (std::vector<std::string> const & names);
52 void set_output_channels (std::vector<std::string> const & names);
54 boost::signals2::signal<void (AudioMapping)> Changed;
57 void left_click (wxGridEvent &);
58 void right_click (wxGridEvent &);
59 void mouse_moved (wxMouseEvent &);
61 void map_values_changed ();
76 int _last_tooltip_row;
77 int _last_tooltip_column;