#include "ardour_dialog.h"
#include "port_matrix.h"
+#include "i18n.h"
namespace ARDOUR {
class PortInsert;
}
-class IOSelector : public PortMatrix {
+class IOSelector : public PortMatrix
+{
public:
- IOSelector (ARDOUR::Session&, boost::shared_ptr<ARDOUR::IO>, bool);
- ~IOSelector ();
-
- void set_state (
- boost::shared_ptr<ARDOUR::Bundle>,
- uint32_t,
- boost::shared_ptr<ARDOUR::Bundle>,
- uint32_t,
- bool,
- uint32_t
- );
-
- State get_state (
- boost::shared_ptr<ARDOUR::Bundle>,
- uint32_t,
- boost::shared_ptr<ARDOUR::Bundle>,
- uint32_t
- ) const;
-
- void add_channel (boost::shared_ptr<ARDOUR::Bundle>);
- void remove_channel (boost::shared_ptr<ARDOUR::Bundle>, uint32_t);
- bool can_rename_channels () const {
- return false;
+ IOSelector (Gtk::Window*, ARDOUR::Session&, boost::shared_ptr<ARDOUR::IO>);
+
+ void set_state (ARDOUR::BundleChannel c[2], bool);
+ PortMatrixNode::State get_state (ARDOUR::BundleChannel c[2]) const;
+
+ std::string disassociation_verb () const {
+ return _("Disconnect");
+ }
+
+ std::string channel_noun () const {
+ return _("port");
}
- uint32_t n_rows () const;
- uint32_t maximum_rows () const;
- uint32_t minimum_rows () const;
+ uint32_t n_io_ports () const;
boost::shared_ptr<ARDOUR::IO> const io () { return _io; }
- void setup ();
+ 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:
- ARDOUR::Session& _session;
+
+ int _other;
+ int _ours;
boost::shared_ptr<ARDOUR::IO> _io;
- PortGroup* _port_group;
-
- void ports_changed ();
+ boost::shared_ptr<PortGroup> _port_group;
+ bool _find_inputs_for_io_outputs;
};
-class IOSelectorWindow : public ArdourDialog
+class IOSelectorWindow : public Gtk::Window
{
public:
- IOSelectorWindow (ARDOUR::Session&, boost::shared_ptr<ARDOUR::IO>, bool for_input, bool can_cancel = false);
+ IOSelectorWindow (ARDOUR::Session&, boost::shared_ptr<ARDOUR::IO>, bool can_cancel = false);
IOSelector& selector() { return _selector; }
private:
IOSelector _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 cancel ();
- void accept ();
-
- void ports_changed ();
+
void io_name_changed (void *src);
};
class PortInsertUI : public Gtk::VBox
{
public:
- PortInsertUI (ARDOUR::Session&, boost::shared_ptr<ARDOUR::PortInsert>);
+ PortInsertUI (Gtk::Window*, ARDOUR::Session&, boost::shared_ptr<ARDOUR::PortInsert>);
void redisplay ();
void finished (IOSelector::Result);
Gtk::Button ok_button;
Gtk::Button cancel_button;
- Gtk::Button rescan_button;
Gtk::Frame button_frame;
void cancel ();