Ardour  9.0-pre0-822-g12e3bc5c20
PortMatrix Class Referenceabstract

#include <port_matrix.h>

Inheritance diagram for PortMatrix:
[legend]

Public Types

enum  Arrangement { TOP_TO_RIGHT , LEFT_TO_BOTTOM }
 
enum  Result { Cancelled , Accepted }
 

Public Member Functions

 PortMatrix (Gtk::Window *, ARDOUR::Session *, ARDOUR::DataType)
 
 ~PortMatrix ()
 
void set_type (ARDOUR::DataType)
 
ARDOUR::DataType type () const
 
void disassociate_all ()
 
void setup_scrollbars ()
 
void popup_menu (ARDOUR::BundleChannel, ARDOUR::BundleChannel, uint32_t)
 
int min_height_divisor () const
 
void set_min_height_divisor (int f)
 
Arrangement arrangement () const
 
bool show_only_bundles () const
 
PortGroupList const * columns () const
 
std::shared_ptr< const PortGroupvisible_columns () const
 
int column_index () const
 
PortGroupList const * rows () const
 
std::shared_ptr< const PortGroupvisible_rows () const
 
int row_index () const
 
PortGroupList const * ports (int d) const
 
std::shared_ptr< const PortGroupvisible_ports (int d) const
 
void init ()
 
void setup ()
 
virtual void setup_ports (int)=0
 
void setup_all_ports ()
 
std::pair< uint32_t, uint32_t > max_size () const
 
bool should_show (ARDOUR::DataType) const
 
uint32_t count_of_our_type (ARDOUR::ChanCount) const
 
uint32_t count_of_our_type_min_1 (ARDOUR::ChanCount) const
 
PortMatrixNode::State get_association (PortMatrixNode) const
 
void flip ()
 
bool key_press (GdkEventKey *)
 
virtual void set_state (ARDOUR::BundleChannel c[2], bool s)=0
 
virtual PortMatrixNode::State get_state (ARDOUR::BundleChannel c[2]) const =0
 
virtual bool list_is_global (int) const =0
 
virtual bool can_add_channels (std::shared_ptr< ARDOUR::Bundle >) const
 
virtual void add_channel (std::shared_ptr< ARDOUR::Bundle >, ARDOUR::DataType)
 
virtual bool can_remove_channels (std::shared_ptr< ARDOUR::Bundle >) const
 
virtual void remove_channel (ARDOUR::BundleChannel)
 
virtual void remove_all_channels (std::weak_ptr< ARDOUR::Bundle >)
 
virtual bool can_rename_channels (std::shared_ptr< ARDOUR::Bundle >) const
 
virtual bool can_add_port (std::shared_ptr< ARDOUR::Bundle >, ARDOUR::DataType t) const
 
virtual void rename_channel (ARDOUR::BundleChannel)
 
virtual std::string disassociation_verb () const =0
 
virtual std::string channel_noun () const
 
- Public Member Functions inherited from ARDOUR::SessionHandlePtr
 SessionHandlePtr (ARDOUR::Session *s)
 
 SessionHandlePtr ()
 
virtual ~SessionHandlePtr ()
 
virtual void set_session (ARDOUR::Session *)
 
virtual ARDOUR::Sessionsession () const
 

Static Public Member Functions

static bool bundle_with_channels (std::shared_ptr< ARDOUR::Bundle >)
 

Public Attributes

sigc::signal< void, ResultFinished
 

Protected Attributes

PortGroupList _ports [2]
 
- Protected Attributes inherited from ARDOUR::SessionHandlePtr
ARDOUR::Session_session
 
PBD::ScopedConnectionList _session_connections
 

Private Member Functions

void hscroll_changed ()
 
void vscroll_changed ()
 
void routes_changed ()
 
void reconnect_to_routes ()
 
void select_arrangement ()
 
bool can_add_port_proxy (std::weak_ptr< ARDOUR::Bundle >, ARDOUR::DataType) const
 
void add_channel_proxy (std::weak_ptr< ARDOUR::Bundle >, ARDOUR::DataType)
 
void remove_channel_proxy (std::weak_ptr< ARDOUR::Bundle >, uint32_t)
 
void rename_channel_proxy (std::weak_ptr< ARDOUR::Bundle >, uint32_t)
 
void disassociate_all_on_channel (std::weak_ptr< ARDOUR::Bundle >, uint32_t, int)
 
void disassociate_all_on_bundle (std::weak_ptr< ARDOUR::Bundle >, int)
 
void setup_global_ports ()
 
void setup_global_ports_proxy ()
 
void toggle_show_only_bundles ()
 
bool on_scroll_event (GdkEventScroll *)
 
std::shared_ptr< ARDOUR::IOio_from_bundle (std::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 &, std::weak_ptr< ARDOUR::Bundle >, int)
 
void add_disassociate_option (Gtk::Menu_Helpers::MenuList &, std::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
 
void parameter_changed (std::string)
 

Private Attributes

Gtk::Window * _parent
 
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
 

Additional Inherited Members

Detailed Description

Definition at line 61 of file port_matrix.h.

Member Enumeration Documentation

◆ Arrangement

Enumerator
TOP_TO_RIGHT 

column labels on top, row labels to the right

LEFT_TO_BOTTOM 

row labels to the left, column labels on the bottom

Definition at line 84 of file port_matrix.h.

◆ Result

Enumerator
Cancelled 
Accepted 

Definition at line 161 of file port_matrix.h.

Constructor & Destructor Documentation

◆ PortMatrix()

PortMatrix::PortMatrix ( Gtk::Window *  ,
ARDOUR::Session ,
ARDOUR::DataType   
)

◆ ~PortMatrix()

PortMatrix::~PortMatrix ( )

Member Function Documentation

◆ add_channel()

virtual void PortMatrix::add_channel ( std::shared_ptr< ARDOUR::Bundle ,
ARDOUR::DataType   
)
virtual

Reimplemented in BundleEditorMatrix.

◆ add_channel_proxy()

void PortMatrix::add_channel_proxy ( std::weak_ptr< ARDOUR::Bundle ,
ARDOUR::DataType   
)
private

◆ add_disassociate_option()

void PortMatrix::add_disassociate_option ( Gtk::Menu_Helpers::MenuList &  ,
std::weak_ptr< ARDOUR::Bundle ,
int  ,
int   
)
private

◆ add_remove_option()

void PortMatrix::add_remove_option ( Gtk::Menu_Helpers::MenuList &  ,
std::weak_ptr< ARDOUR::Bundle ,
int   
)
private

◆ arrangement()

Arrangement PortMatrix::arrangement ( ) const
inline
Returns
Arrangement in use

Definition at line 91 of file port_matrix.h.

◆ body_dimensions_changed()

void PortMatrix::body_dimensions_changed ( )
private

◆ bundle_with_channels()

static bool PortMatrix::bundle_with_channels ( std::shared_ptr< ARDOUR::Bundle )
static

◆ can_add_channels()

virtual bool PortMatrix::can_add_channels ( std::shared_ptr< ARDOUR::Bundle ) const
virtual

Reimplemented in BundleEditorMatrix.

◆ can_add_port()

virtual bool PortMatrix::can_add_port ( std::shared_ptr< ARDOUR::Bundle ,
ARDOUR::DataType  t 
) const
virtual

Reimplemented in BundleEditorMatrix.

◆ can_add_port_proxy()

bool PortMatrix::can_add_port_proxy ( std::weak_ptr< ARDOUR::Bundle ,
ARDOUR::DataType   
) const
private

◆ can_flip()

bool PortMatrix::can_flip ( ) const
private

◆ can_remove_channels()

virtual bool PortMatrix::can_remove_channels ( std::shared_ptr< ARDOUR::Bundle ) const
virtual

Reimplemented in BundleEditorMatrix.

◆ can_rename_channels()

virtual bool PortMatrix::can_rename_channels ( std::shared_ptr< ARDOUR::Bundle ) const
inlinevirtual

Reimplemented in BundleEditorMatrix.

Definition at line 153 of file port_matrix.h.

◆ channel_noun()

virtual std::string PortMatrix::channel_noun ( ) const
virtual

Reimplemented in IOSelector, and GlobalPortMatrix.

◆ check_flip()

std::pair<int, int> PortMatrix::check_flip ( ) const
private

◆ column_index()

int PortMatrix::column_index ( ) const
inline
Returns
index into the _ports array for the list which is displayed as columns

Definition at line 103 of file port_matrix.h.

◆ columns()

PortGroupList const* PortMatrix::columns ( ) const

◆ count_of_our_type()

uint32_t PortMatrix::count_of_our_type ( ARDOUR::ChanCount  ) const

◆ count_of_our_type_min_1()

uint32_t PortMatrix::count_of_our_type_min_1 ( ARDOUR::ChanCount  ) const

◆ disassociate_all()

void PortMatrix::disassociate_all ( )

◆ disassociate_all_on_bundle()

void PortMatrix::disassociate_all_on_bundle ( std::weak_ptr< ARDOUR::Bundle ,
int   
)
private

◆ disassociate_all_on_channel()

void PortMatrix::disassociate_all_on_channel ( std::weak_ptr< ARDOUR::Bundle ,
uint32_t  ,
int   
)
private

◆ disassociation_verb()

virtual std::string PortMatrix::disassociation_verb ( ) const
pure virtual

◆ flip()

void PortMatrix::flip ( )

◆ get_association()

PortMatrixNode::State PortMatrix::get_association ( PortMatrixNode  ) const

◆ get_state()

virtual PortMatrixNode::State PortMatrix::get_state ( ARDOUR::BundleChannel  c[2]) const
pure virtual
Parameters
cChannels; where c[0] is from _ports[0] and c[1] is from _ports[1].
Returns
state

Implemented in IOSelector, GlobalPortMatrix, and BundleEditorMatrix.

◆ hscroll_changed()

void PortMatrix::hscroll_changed ( )
private

◆ init()

void PortMatrix::init ( )

◆ io_from_bundle()

std::shared_ptr<ARDOUR::IO> PortMatrix::io_from_bundle ( std::shared_ptr< ARDOUR::Bundle ) const
private

◆ key_press()

bool PortMatrix::key_press ( GdkEventKey *  )

◆ list_is_global()

virtual bool PortMatrix::list_is_global ( int  ) const
pure virtual

◆ max_size()

std::pair<uint32_t, uint32_t> PortMatrix::max_size ( ) const

◆ min_height_divisor()

int PortMatrix::min_height_divisor ( ) const
inline

Definition at line 77 of file port_matrix.h.

◆ notebook_page_selected()

void PortMatrix::notebook_page_selected ( GtkNotebookPage *  ,
guint   
)
private

◆ on_scroll_event()

bool PortMatrix::on_scroll_event ( GdkEventScroll *  )
private

◆ parameter_changed()

void PortMatrix::parameter_changed ( std::string  )
private

◆ popup_menu()

void PortMatrix::popup_menu ( ARDOUR::BundleChannel  ,
ARDOUR::BundleChannel  ,
uint32_t   
)

◆ port_connected_or_disconnected()

void PortMatrix::port_connected_or_disconnected ( )
private

◆ ports()

PortGroupList const* PortMatrix::ports ( int  d) const
inline

Definition at line 115 of file port_matrix.h.

◆ reconnect_to_routes()

void PortMatrix::reconnect_to_routes ( )
private

◆ remove_all_channels()

virtual void PortMatrix::remove_all_channels ( std::weak_ptr< ARDOUR::Bundle )
virtual

◆ remove_channel()

virtual void PortMatrix::remove_channel ( ARDOUR::BundleChannel  )
virtual

Reimplemented in BundleEditorMatrix.

◆ remove_channel_proxy()

void PortMatrix::remove_channel_proxy ( std::weak_ptr< ARDOUR::Bundle ,
uint32_t   
)
private

◆ remove_notebook_pages()

void PortMatrix::remove_notebook_pages ( Gtk::Notebook &  )
private

◆ rename_channel()

virtual void PortMatrix::rename_channel ( ARDOUR::BundleChannel  )
inlinevirtual

Reimplemented in BundleEditorMatrix.

Definition at line 157 of file port_matrix.h.

◆ rename_channel_proxy()

void PortMatrix::rename_channel_proxy ( std::weak_ptr< ARDOUR::Bundle ,
uint32_t   
)
private

◆ route_processors_changed()

void PortMatrix::route_processors_changed ( ARDOUR::RouteProcessorChange  )
private

◆ routes_changed()

void PortMatrix::routes_changed ( )
private

◆ row_index()

int PortMatrix::row_index ( ) const
inline
Returns
index into the _ports array for the list which is displayed as rows

Definition at line 111 of file port_matrix.h.

◆ rows()

PortGroupList const* PortMatrix::rows ( ) const

◆ select_arrangement()

void PortMatrix::select_arrangement ( )
private

◆ session_going_away()

void PortMatrix::session_going_away ( )
privatevirtual

Reimplemented from ARDOUR::SessionHandlePtr.

◆ set_min_height_divisor()

void PortMatrix::set_min_height_divisor ( int  f)
inline

Definition at line 80 of file port_matrix.h.

◆ set_state()

virtual void PortMatrix::set_state ( ARDOUR::BundleChannel  c[2],
bool  s 
)
pure virtual
Parameters
cChannels; where c[0] is from _ports[0] and c[1] is from _ports[1].
sNew state.

Implemented in IOSelector, GlobalPortMatrix, and BundleEditorMatrix.

◆ set_type()

void PortMatrix::set_type ( ARDOUR::DataType  )

◆ setup()

void PortMatrix::setup ( )

◆ setup_all_ports()

void PortMatrix::setup_all_ports ( )

◆ setup_global_ports()

void PortMatrix::setup_global_ports ( )
private

◆ setup_global_ports_proxy()

void PortMatrix::setup_global_ports_proxy ( )
private

◆ setup_notebooks()

void PortMatrix::setup_notebooks ( )
private

◆ setup_ports()

virtual void PortMatrix::setup_ports ( int  )
pure virtual

◆ setup_scrollbars()

void PortMatrix::setup_scrollbars ( )

◆ should_show()

bool PortMatrix::should_show ( ARDOUR::DataType  ) const

◆ show_only_bundles()

bool PortMatrix::show_only_bundles ( ) const
inline

Definition at line 95 of file port_matrix.h.

◆ toggle_show_only_bundles()

void PortMatrix::toggle_show_only_bundles ( )
private

◆ type()

ARDOUR::DataType PortMatrix::type ( ) const
inline

Definition at line 69 of file port_matrix.h.

◆ update_tab_highlighting()

void PortMatrix::update_tab_highlighting ( )
private

◆ visible_columns()

std::shared_ptr<const PortGroup> PortMatrix::visible_columns ( ) const

◆ visible_ports()

std::shared_ptr<const PortGroup> PortMatrix::visible_ports ( int  d) const

◆ visible_rows()

std::shared_ptr<const PortGroup> PortMatrix::visible_rows ( ) const

◆ vscroll_changed()

void PortMatrix::vscroll_changed ( )
private

Member Data Documentation

◆ _arrangement

Arrangement PortMatrix::_arrangement
private

Definition at line 232 of file port_matrix.h.

◆ _body

PortMatrixBody* PortMatrix::_body
private

Definition at line 220 of file port_matrix.h.

◆ _bundle_changed_connections

PBD::ScopedConnectionList PortMatrix::_bundle_changed_connections
private

Definition at line 218 of file port_matrix.h.

◆ _changed_connections

PBD::ScopedConnectionList PortMatrix::_changed_connections
private

Definition at line 217 of file port_matrix.h.

◆ _column_index

int PortMatrix::_column_index
private

Definition at line 234 of file port_matrix.h.

◆ _hbox

Gtk::HBox PortMatrix::_hbox
private

Definition at line 228 of file port_matrix.h.

◆ _hlabel

Gtk::Label PortMatrix::_hlabel
private

Definition at line 226 of file port_matrix.h.

◆ _hnotebook

Gtk::Notebook PortMatrix::_hnotebook
private

Definition at line 224 of file port_matrix.h.

◆ _hscroll

Gtk::HScrollbar PortMatrix::_hscroll
private

Definition at line 221 of file port_matrix.h.

◆ _hspacer

Gtk::Label PortMatrix::_hspacer
private

Definition at line 229 of file port_matrix.h.

◆ _ignore_notebook_page_selected

bool PortMatrix::_ignore_notebook_page_selected
private

Definition at line 238 of file port_matrix.h.

◆ _inhibit_toggle_show_only_bundles

bool PortMatrix::_inhibit_toggle_show_only_bundles
private

Definition at line 237 of file port_matrix.h.

◆ _menu

Gtk::Menu* PortMatrix::_menu
private

Definition at line 231 of file port_matrix.h.

◆ _min_height_divisor

int PortMatrix::_min_height_divisor
private

Definition at line 235 of file port_matrix.h.

◆ _parent

Gtk::Window* PortMatrix::_parent
private

Definition at line 212 of file port_matrix.h.

◆ _ports

PortGroupList PortMatrix::_ports[2]
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.

Definition at line 178 of file port_matrix.h.

◆ _route_connections

PBD::ScopedConnectionList PortMatrix::_route_connections
private

Definition at line 216 of file port_matrix.h.

◆ _row_index

int PortMatrix::_row_index
private

Definition at line 233 of file port_matrix.h.

◆ _show_only_bundles

bool PortMatrix::_show_only_bundles
private

Definition at line 236 of file port_matrix.h.

◆ _type

ARDOUR::DataType PortMatrix::_type
private

port type that we are working with, or NIL if we are working with all of them

Definition at line 215 of file port_matrix.h.

◆ _vbox

Gtk::VBox PortMatrix::_vbox
private

Definition at line 227 of file port_matrix.h.

◆ _vlabel

Gtk::Label PortMatrix::_vlabel
private

Definition at line 225 of file port_matrix.h.

◆ _vnotebook

Gtk::Notebook PortMatrix::_vnotebook
private

Definition at line 223 of file port_matrix.h.

◆ _vscroll

Gtk::VScrollbar PortMatrix::_vscroll
private

Definition at line 222 of file port_matrix.h.

◆ _vspacer

Gtk::Label PortMatrix::_vspacer
private

Definition at line 230 of file port_matrix.h.

◆ Finished

sigc::signal<void, Result> PortMatrix::Finished

Definition at line 166 of file port_matrix.h.


The documentation for this class was generated from the following file: