2 * Copyright (C) 2005-2006 Doug McLain <doug@nostar.net>
3 * Copyright (C) 2005-2006 Taybin Rutkin <taybin@taybin.com>
4 * Copyright (C) 2005-2011 Paul Davis <paul@linuxaudiosystems.com>
5 * Copyright (C) 2007-2010 Carl Hetherington <carl@carlh.net>
6 * Copyright (C) 2007-2011 David Robillard <d@drobilla.net>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 #ifndef __gtkardour_io_selector_h__
24 #define __gtkardour_io_selector_h__
26 #include "port_matrix.h"
27 #include "ardour_window.h"
29 class IOSelector : public PortMatrix
32 IOSelector (Gtk::Window*, ARDOUR::Session *, boost::shared_ptr<ARDOUR::IO>);
34 void set_state (ARDOUR::BundleChannel c[2], bool);
35 PortMatrixNode::State get_state (ARDOUR::BundleChannel c[2]) const;
37 std::string disassociation_verb () const;
38 std::string channel_noun () const;
40 ARDOUR::Session* session() const { return _session; }
42 uint32_t n_io_ports () const;
43 boost::shared_ptr<ARDOUR::IO> const io () { return _io; }
44 void setup_ports (int);
45 bool list_is_global (int) const;
47 bool find_inputs_for_io_outputs () const {
48 return _find_inputs_for_io_outputs;
63 void io_changed_proxy ();
67 boost::shared_ptr<ARDOUR::IO> _io;
68 boost::shared_ptr<PortGroup> _port_group;
69 bool _find_inputs_for_io_outputs;
70 PBD::ScopedConnection _io_connection;
73 class IOSelectorWindow : public ArdourWindow
76 IOSelectorWindow (ARDOUR::Session *, boost::shared_ptr<ARDOUR::IO>, bool can_cancel = false);
78 IOSelector& selector() { return _selector; }
87 void io_name_changed (void *src);
88 bool wm_delete (GdkEventAny*);
91 #endif /* __gtkardour_io_selector_h__ */