2 * Copyright (C) 2015 Ben Loftis <ben@harrisonconsoles.com>
3 * Copyright (C) 2017 Paul Davis <paul@linuxaudiosystems.com>
4 * Copyright (C) 2017 Robin Gareus <robin@gareus.org>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 #ifndef __gtkardour_monitor_output_selector_h__
22 #define __gtkardour_monitor_output_selector_h__
24 #include "port_matrix.h"
25 #include "ardour_window.h"
27 class MonitorSelector : public PortMatrix
30 MonitorSelector (Gtk::Window*, ARDOUR::Session *, boost::shared_ptr<ARDOUR::IO>);
32 void set_state (ARDOUR::BundleChannel c[2], bool);
33 PortMatrixNode::State get_state (ARDOUR::BundleChannel c[2]) const;
35 std::string disassociation_verb () const;
36 std::string channel_noun () const;
38 uint32_t n_io_ports () const;
39 boost::shared_ptr<ARDOUR::IO> const io () { return _io; }
40 void setup_ports (int);
41 bool list_is_global (int) const;
43 bool find_inputs_for_io_outputs () const {
44 return _find_inputs_for_io_outputs;
55 bool can_add_channels (boost::shared_ptr<ARDOUR::Bundle>) const { return false; }
56 bool can_remove_channels (boost::shared_ptr<ARDOUR::Bundle>) const { return false; }
57 bool can_rename_channels (boost::shared_ptr<ARDOUR::Bundle>) const { return false; }
61 void io_changed_proxy ();
65 boost::shared_ptr<ARDOUR::IO> _io;
66 boost::shared_ptr<PortGroup> _port_group;
67 bool _find_inputs_for_io_outputs;
68 PBD::ScopedConnection _io_connection;
71 class MonitorSelectorWindow : public ArdourWindow
74 MonitorSelectorWindow (ARDOUR::Session *, boost::shared_ptr<ARDOUR::IO>, bool can_cancel = false);
76 MonitorSelector& selector() { return _selector; }
83 MonitorSelector _selector;
85 void io_name_changed (void *src);
86 bool wm_delete (GdkEventAny*);
89 #endif /* __gtkardour_monitor_output_selector_h__ */