#include <gtkmm/checkbutton.h>
#include <gtkmm/notebook.h>
#include <boost/shared_ptr.hpp>
+
#include "ardour/bundle.h"
+#include "ardour/types.h"
+#include "ardour/session_handle.h"
+
#include "port_group.h"
#include "port_matrix_types.h"
#include "i18n.h"
class Bundle;
}
+namespace Gtk {
+ namespace Menu_Helpers {
+ class MenuList;
+ }
+}
+
class PortMatrixBody;
-class PortMatrix : public Gtk::Table
+class PortMatrix : public Gtk::Table, public ARDOUR::SessionHandlePtr
{
public:
- PortMatrix (Gtk::Window*, ARDOUR::Session&, ARDOUR::DataType);
+ PortMatrix (Gtk::Window*, ARDOUR::Session *, ARDOUR::DataType);
~PortMatrix ();
void set_type (ARDOUR::DataType);
}
PortGroupList const * columns () const;
- boost::shared_ptr<PortGroup> visible_columns () const;
+ boost::shared_ptr<const PortGroup> visible_columns () const;
/** @return index into the _ports array for the list which is displayed as columns */
int column_index () const {
}
PortGroupList const * rows () const;
- boost::shared_ptr<PortGroup> visible_rows () const;
+ boost::shared_ptr<const PortGroup> visible_rows () const;
/** @return index into the _ports array for the list which is displayed as rows */
int row_index () const {
return &_ports[d];
}
- boost::shared_ptr<const PortGroup> visible_ports (int d) const {
- return _visible_ports[d];
- }
+ boost::shared_ptr<const PortGroup> visible_ports (int d) const;
void init ();
void setup ();
virtual void add_channel (boost::shared_ptr<ARDOUR::Bundle>);
virtual bool can_remove_channels (boost::shared_ptr<ARDOUR::Bundle>) const;
virtual void remove_channel (ARDOUR::BundleChannel);
+ virtual void remove_all_channels (boost::weak_ptr<ARDOUR::Bundle>);
virtual bool can_rename_channels (boost::shared_ptr<ARDOUR::Bundle>) const {
return false;
}
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];
- boost::shared_ptr<PortGroup> _visible_ports[2];
- ARDOUR::Session& _session;
private:
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 toggle_show_only_bundles ();
bool on_scroll_event (GdkEventScroll *);
boost::shared_ptr<ARDOUR::IO> io_from_bundle (boost::shared_ptr<ARDOUR::Bundle>) const;
- void bundle_changed (ARDOUR::Bundle::Change);
void setup_notebooks ();
void remove_notebook_pages (Gtk::Notebook &);
- void v_page_selected (GtkNotebookPage *, guint);
- void h_page_selected (GtkNotebookPage *, guint);
+ 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 ();
Gtk::Window* _parent;
/// port type that we are working with
ARDOUR::DataType _type;
- std::vector<sigc::connection> _route_connections;
+ PBD::ScopedConnectionList _route_connections;
+ PBD::ScopedConnectionList _changed_connections;
+ PBD::ScopedConnectionList _bundle_changed_connections;
PortMatrixBody* _body;
Gtk::HScrollbar _hscroll;
Gtk::Label _hlabel;
Gtk::VBox _vbox;
Gtk::HBox _hbox;
+ Gtk::Label _hspacer;
+ Gtk::Label _vspacer;
Gtk::Menu* _menu;
Arrangement _arrangement;
int _row_index;
int _min_height_divisor;
bool _show_only_bundles;
bool _inhibit_toggle_show_only_bundles;
- bool _in_setup_notebooks;
+ bool _ignore_notebook_page_selected;
};
#endif