Ardour  8.12
io_selector.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2006 Doug McLain <doug@nostar.net>
3  * Copyright (C) 2005-2006 Taybin Rutkin <taybin@taybin.com>
4  * Copyright (C) 2005-2011 Paul Davis <paul@linuxaudiosystems.com>
5  * Copyright (C) 2007-2010 Carl Hetherington <carl@carlh.net>
6  * Copyright (C) 2007-2011 David Robillard <d@drobilla.net>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License along
19  * with this program; if not, write to the Free Software Foundation, Inc.,
20  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21  */
22 
23 #ifndef __gtkardour_io_selector_h__
24 #define __gtkardour_io_selector_h__
25 
26 #include "port_matrix.h"
27 #include "ardour_window.h"
28 
29 class IOSelector : public PortMatrix
30 {
31 public:
32  IOSelector (Gtk::Window*, ARDOUR::Session *, std::shared_ptr<ARDOUR::IO>);
33 
34  void set_state (ARDOUR::BundleChannel c[2], bool);
36 
37  std::string disassociation_verb () const;
38  std::string channel_noun () const;
39 
40  ARDOUR::Session* session() const { return _session; }
41 
42  uint32_t n_io_ports () const;
43  std::shared_ptr<ARDOUR::IO> const io () { return _io; }
44  void setup_ports (int);
45  bool list_is_global (int) const;
46 
49  }
50 
51  int ours () const {
52  return _ours;
53  }
54 
55  int other () const {
56  return _other;
57  }
58 
59 private:
60 
61  void setup_type ();
62  void io_changed ();
64 
65  int _other;
66  int _ours;
67  std::shared_ptr<ARDOUR::IO> _io;
68  std::shared_ptr<PortGroup> _port_group;
71 };
72 
74 {
75  public:
76  IOSelectorWindow (ARDOUR::Session *, std::shared_ptr<ARDOUR::IO>, bool can_cancel = false);
77 
78  IOSelector& selector() { return _selector; }
79 
80  protected:
81  void on_map ();
82  void on_show ();
83 
84  private:
86 
87  void io_name_changed (void *src);
89 };
90 
91 #endif /* __gtkardour_io_selector_h__ */
ARDOUR::Session * _session
IOSelector & selector()
Definition: io_selector.h:78
void on_show()
This is a default handler for the signal signal_show().
bool wm_delete(GdkEventAny *)
IOSelector _selector
Definition: io_selector.h:85
IOSelectorWindow(ARDOUR::Session *, std::shared_ptr< ARDOUR::IO >, bool can_cancel=false)
void io_name_changed(void *src)
void on_map()
This is a default handler for the signal signal_map().
void io_changed()
void setup_type()
bool _find_inputs_for_io_outputs
Definition: io_selector.h:69
uint32_t n_io_ports() const
PBD::ScopedConnection _io_connection
Definition: io_selector.h:70
std::shared_ptr< ARDOUR::IO > const io()
Definition: io_selector.h:43
std::string channel_noun() const
void io_changed_proxy()
IOSelector(Gtk::Window *, ARDOUR::Session *, std::shared_ptr< ARDOUR::IO >)
int ours() const
Definition: io_selector.h:51
void set_state(ARDOUR::BundleChannel c[2], bool)
std::string disassociation_verb() const
ARDOUR::Session * session() const
Definition: io_selector.h:40
void setup_ports(int)
int other() const
Definition: io_selector.h:55
PortMatrixNode::State get_state(ARDOUR::BundleChannel c[2]) const
bool find_inputs_for_io_outputs() const
Definition: io_selector.h:47
std::shared_ptr< ARDOUR::IO > _io
Definition: io_selector.h:67
std::shared_ptr< PortGroup > _port_group
Definition: io_selector.h:68
bool list_is_global(int) const