Make editor route list rec button respect group settings.
[ardour.git] / gtk2_ardour / io_selector.h
index 20bcb2ff274100ea93addf7fd793b8cb1a55f089..adf5bb97f65bce7bf77e1ce40dd1b1b3d2473f9d 100644 (file)
 
 #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; }
 
@@ -80,19 +82,7 @@ class IOSelectorWindow : public ArdourDialog
        
   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);
 };
 
@@ -100,7 +90,7 @@ class IOSelectorWindow : public ArdourDialog
 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);
@@ -124,7 +114,6 @@ class PortInsertWindow : public ArdourDialog
        
        Gtk::Button ok_button;
        Gtk::Button cancel_button;
-       Gtk::Button rescan_button;
        Gtk::Frame button_frame;
        
        void cancel ();