2009-01-23 16:24:11 -05:00
|
|
|
/*
|
|
|
|
Copyright (C) 2009 Paul Davis
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ardour_gtk_global_port_matrix_h__
|
|
|
|
#define __ardour_gtk_global_port_matrix_h__
|
|
|
|
|
2009-02-10 10:45:06 -05:00
|
|
|
#include <gtkmm/button.h>
|
2009-01-23 16:24:11 -05:00
|
|
|
#include "port_matrix.h"
|
|
|
|
#include "port_group.h"
|
|
|
|
#include "ardour_dialog.h"
|
2009-07-19 15:07:31 -04:00
|
|
|
#include "i18n.h"
|
2009-01-23 16:24:11 -05:00
|
|
|
|
|
|
|
class GlobalPortMatrix : public PortMatrix
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
GlobalPortMatrix (ARDOUR::Session&, ARDOUR::DataType);
|
|
|
|
|
2009-02-08 22:18:10 -05:00
|
|
|
void setup_ports (int);
|
2009-01-23 16:24:11 -05:00
|
|
|
|
2009-01-30 10:08:09 -05:00
|
|
|
void set_state (ARDOUR::BundleChannel c[2], bool);
|
2009-05-03 10:31:42 -04:00
|
|
|
PortMatrixNode::State get_state (ARDOUR::BundleChannel c[2]) const;
|
2009-01-23 16:24:11 -05:00
|
|
|
|
2009-01-30 10:08:09 -05:00
|
|
|
bool can_remove_channels (int d) const {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
void remove_channel (ARDOUR::BundleChannel) {}
|
|
|
|
bool can_rename_channels (int d) const {
|
2009-01-23 16:24:11 -05:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2009-07-19 15:07:31 -04:00
|
|
|
std::string disassociation_verb () const {
|
|
|
|
return _("Disconnect");
|
|
|
|
}
|
|
|
|
|
2009-02-08 22:18:10 -05:00
|
|
|
bool list_is_global (int) const {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2009-01-23 16:24:11 -05:00
|
|
|
private:
|
2009-01-30 10:08:09 -05:00
|
|
|
/* see PortMatrix: signal flow from 0 to 1 (out to in) */
|
|
|
|
enum {
|
|
|
|
OUT = 0,
|
|
|
|
IN = 1,
|
|
|
|
};
|
2009-01-23 16:24:11 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2009-01-26 15:41:22 -05:00
|
|
|
class GlobalPortMatrixWindow : public Gtk::Window
|
2009-01-23 16:24:11 -05:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
GlobalPortMatrixWindow (ARDOUR::Session&, ARDOUR::DataType);
|
|
|
|
|
|
|
|
private:
|
2009-07-17 18:54:45 -04:00
|
|
|
void on_realize ();
|
2009-07-18 09:10:08 -04:00
|
|
|
void max_size_changed ();
|
|
|
|
void set_max_size ();
|
2009-05-03 10:31:42 -04:00
|
|
|
|
2009-01-23 16:24:11 -05:00
|
|
|
GlobalPortMatrix _port_matrix;
|
2009-02-10 10:45:06 -05:00
|
|
|
Gtk::Button _rescan_button;
|
2009-05-03 10:31:42 -04:00
|
|
|
Gtk::CheckButton _show_ports_button;
|
2009-01-23 16:24:11 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|