2 Copyright (C) 2002-2007 Paul Davis
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 #ifndef __ardour_ui_io_selector_h__
21 #define __ardour_ui_io_selector_h__
23 #include "ardour_dialog.h"
24 #include "port_matrix.h"
26 class IOSelector : public PortMatrix {
28 IOSelector (ARDOUR::Session&, boost::shared_ptr<ARDOUR::IO>, bool);
30 void set_state (int, std::string const &, bool);
31 bool get_state (int, std::string const &) const;
32 uint32_t n_rows () const;
33 uint32_t maximum_rows () const;
34 uint32_t minimum_rows () const;
35 std::string row_name (int) const;
37 void remove_row (int);
38 std::string row_descriptor () const;
42 void ports_changed (ARDOUR::IOChange, void*);
44 boost::shared_ptr<ARDOUR::IO> _io;
47 class IOSelectorWindow : public ArdourDialog
50 IOSelectorWindow (ARDOUR::Session&, boost::shared_ptr<ARDOUR::IO>, bool for_input, bool can_cancel = false);
53 IOSelector& selector() { return _selector; }
61 /* overall operation buttons */
63 Gtk::Button ok_button;
64 Gtk::Button cancel_button;
65 Gtk::Button rescan_button;
73 class PortInsertUI : public Gtk::VBox
76 PortInsertUI (ARDOUR::Session&, boost::shared_ptr<ARDOUR::PortInsert>);
79 void finished (IOSelector::Result);
83 IOSelector input_selector;
84 IOSelector output_selector;
87 class PortInsertWindow : public ArdourDialog
90 PortInsertWindow (ARDOUR::Session&, boost::shared_ptr<ARDOUR::PortInsert>, bool can_cancel = false);
96 PortInsertUI _portinsertui;
99 Gtk::Button ok_button;
100 Gtk::Button cancel_button;
101 Gtk::Button rescan_button;
102 Gtk::Frame button_frame;
108 void plugin_going_away ();
109 sigc::connection going_away_connection;