#include "ardour_dialog.h"
#include "port_matrix.h"
-class IOSelector : public PortMatrix {
+namespace ARDOUR {
+ class PortInsert;
+}
+
+class IOSelector : public PortMatrix
+{
public:
IOSelector (ARDOUR::Session&, boost::shared_ptr<ARDOUR::IO>, bool);
- void set_state (int, std::string const &, bool);
- bool get_state (int, std::string const &) const;
- uint32_t n_rows () const;
- uint32_t maximum_rows () const;
- uint32_t minimum_rows () const;
- std::string row_name (int) const;
- void add_row ();
- void remove_row (int);
- std::string row_descriptor () const;
- boost::shared_ptr<ARDOUR::IO> const io() { return _io; }
+ void set_state (ARDOUR::BundleChannel c[2], bool);
+ State get_state (ARDOUR::BundleChannel c[2]) const;
+
+ void add_channel (boost::shared_ptr<ARDOUR::Bundle>);
+ bool can_remove_channels (int d) const {
+ return d == _ours;
+ }
+ void remove_channel (ARDOUR::BundleChannel);
+ bool can_rename_channels (int d) const {
+ return false;
+ }
+
+ uint32_t n_io_ports () const;
+ uint32_t maximum_io_ports () const;
+ uint32_t minimum_io_ports () const;
+ boost::shared_ptr<ARDOUR::IO> const io () { return _io; }
+ void setup_ports (int);
+ bool list_is_global (int) const;
+
+ bool find_inputs_for_io_outputs () const {
+ return _find_inputs_for_io_outputs;
+ }
+
+ int ours () const {
+ return _ours;
+ }
+
+ int other () const {
+ return _other;
+ }
+
private:
- boost::shared_ptr<ARDOUR::IO> _io;
- void ports_changed (ARDOUR::IOChange, void*);
+ int _other;
+ int _ours;
+ boost::shared_ptr<ARDOUR::IO> _io;
+ boost::shared_ptr<PortGroup> _port_group;
+ bool _find_inputs_for_io_outputs;
};
class IOSelectorWindow : public ArdourDialog
{
public:
IOSelectorWindow (ARDOUR::Session&, boost::shared_ptr<ARDOUR::IO>, bool for_input, bool can_cancel = false);
- ~IOSelectorWindow ();
IOSelector& selector() { return _selector; }
/* overall operation buttons */
Gtk::Button add_button;
+ Gtk::Button disconnect_button;
Gtk::Button ok_button;
Gtk::Button cancel_button;
Gtk::Button rescan_button;
- void rescan ();
void cancel ();
void accept ();
-
- void ports_changed (ARDOUR::IOChange change, void *src);
+ void rescan ();
+
+ void ports_changed ();
void io_name_changed (void *src);
};
void finished (IOSelector::Result);
private:
- Gtk::HBox hbox;
IOSelector input_selector;
IOSelector output_selector;
};
Gtk::Button rescan_button;
Gtk::Frame button_frame;
- void rescan ();
void cancel ();
void accept ();