+ enum Result {
+ Cancelled,
+ Accepted
+ };
+
+ sigc::signal<void, Result> Finished;
+
+ static bool bundle_with_channels (boost::shared_ptr<ARDOUR::Bundle>);
+
+protected:
+
+ /** We have two port group lists. One will be presented on the rows of the matrix,
+ the other on the columns. The PortMatrix chooses the arrangement based on which has
+ more ports in it. Subclasses must fill these two lists with the port groups that they
+ wish to present. The PortMatrix will arrange its layout such that signal flow is vaguely
+ from left to right as you go from list 0 to list 1. Hence subclasses which deal with
+ inputs and outputs should put outputs in list 0 and inputs in list 1. */
+ PortGroupList _ports[2];
+
+private:
+
+ void hscroll_changed ();
+ void vscroll_changed ();
+ void routes_changed ();
+ void reconnect_to_routes ();
+ void select_arrangement ();
+ void add_channel_proxy (boost::weak_ptr<ARDOUR::Bundle>, ARDOUR::DataType);
+ void remove_channel_proxy (boost::weak_ptr<ARDOUR::Bundle>, uint32_t);
+ void rename_channel_proxy (boost::weak_ptr<ARDOUR::Bundle>, uint32_t);
+ void disassociate_all_on_channel (boost::weak_ptr<ARDOUR::Bundle>, uint32_t, int);
+ void disassociate_all_on_bundle (boost::weak_ptr<ARDOUR::Bundle>, int);
+ void setup_global_ports ();
+ void setup_global_ports_proxy (ARDOUR::RouteSortOrderKey);
+ void toggle_show_only_bundles ();
+ bool on_scroll_event (GdkEventScroll *);
+ boost::shared_ptr<ARDOUR::IO> io_from_bundle (boost::shared_ptr<ARDOUR::Bundle>) const;
+ void setup_notebooks ();
+ void remove_notebook_pages (Gtk::Notebook &);
+ void notebook_page_selected (GtkNotebookPage *, guint);
+ void route_processors_changed (ARDOUR::RouteProcessorChange);
+ void body_dimensions_changed ();
+ void session_going_away ();
+ void add_remove_option (Gtk::Menu_Helpers::MenuList &, boost::weak_ptr<ARDOUR::Bundle>, int);
+ void add_disassociate_option (Gtk::Menu_Helpers::MenuList &, boost::weak_ptr<ARDOUR::Bundle>, int, int);
+ void port_connected_or_disconnected ();
+ void update_tab_highlighting ();
+ std::pair<int, int> check_flip () const;
+ bool can_flip () const;
+
+ Gtk::Window* _parent;
+
+ /** port type that we are working with, or NIL if we are working with all of them */
+ ARDOUR::DataType _type;
+ PBD::ScopedConnectionList _route_connections;
+ PBD::ScopedConnectionList _changed_connections;
+ PBD::ScopedConnectionList _bundle_changed_connections;
+
+ PortMatrixBody* _body;
+ Gtk::HScrollbar _hscroll;
+ Gtk::VScrollbar _vscroll;
+ Gtk::Notebook _vnotebook;
+ Gtk::Notebook _hnotebook;
+ Gtk::Label _vlabel;
+ Gtk::Label _hlabel;
+ Gtk::VBox _vbox;
+ Gtk::HBox _hbox;
+ Gtk::Label _hspacer;
+ Gtk::Label _vspacer;
+ Gtk::Menu* _menu;
+ Arrangement _arrangement;
+ int _row_index;
+ int _column_index;
+ int _min_height_divisor;
+ bool _show_only_bundles;
+ bool _inhibit_toggle_show_only_bundles;
+ bool _ignore_notebook_page_selected;