2016-07-06 22:43:34 -04:00
|
|
|
/*
|
2019-08-03 08:34:29 -04:00
|
|
|
* Copyright (C) 2016 Paul Davis <paul@linuxaudiosystems.com>
|
|
|
|
*
|
|
|
|
* 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.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
2016-07-06 22:43:34 -04:00
|
|
|
|
|
|
|
#ifndef __ardour_push2_gui_h__
|
|
|
|
#define __ardour_push2_gui_h__
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#include <gtkmm/box.h>
|
2016-07-07 15:53:19 -04:00
|
|
|
#include <gtkmm/button.h>
|
2016-07-06 22:43:34 -04:00
|
|
|
#include <gtkmm/combobox.h>
|
|
|
|
#include <gtkmm/image.h>
|
|
|
|
#include <gtkmm/table.h>
|
|
|
|
#include <gtkmm/treestore.h>
|
2016-07-07 14:26:55 -04:00
|
|
|
#include <gtkmm/spinbutton.h>
|
2016-07-07 09:26:06 -04:00
|
|
|
#include <gtkmm/notebook.h>
|
2016-07-06 22:43:34 -04:00
|
|
|
|
|
|
|
namespace Gtk {
|
|
|
|
class CellRendererCombo;
|
|
|
|
class ListStore;
|
|
|
|
}
|
|
|
|
|
2016-09-28 11:47:10 -04:00
|
|
|
#include "ardour/mode.h"
|
|
|
|
|
2016-07-06 22:43:34 -04:00
|
|
|
#include "push2.h"
|
|
|
|
|
|
|
|
namespace ArdourSurface {
|
|
|
|
|
|
|
|
class P2GUI : public Gtk::VBox
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
P2GUI (Push2&);
|
|
|
|
~P2GUI ();
|
|
|
|
|
|
|
|
private:
|
|
|
|
Push2& p2;
|
2016-07-07 00:10:27 -04:00
|
|
|
PBD::ScopedConnectionList p2_connections;
|
2016-07-06 22:43:34 -04:00
|
|
|
Gtk::HBox hpacker;
|
|
|
|
Gtk::Table table;
|
|
|
|
Gtk::Table action_table;
|
|
|
|
Gtk::ComboBox input_combo;
|
|
|
|
Gtk::ComboBox output_combo;
|
|
|
|
Gtk::Image image;
|
|
|
|
|
|
|
|
void update_port_combos ();
|
|
|
|
PBD::ScopedConnection connection_change_connection;
|
|
|
|
void connection_handler ();
|
2016-09-30 11:21:21 -04:00
|
|
|
PBD::ScopedConnection port_reg_connection;
|
2016-07-06 22:43:34 -04:00
|
|
|
|
|
|
|
struct MidiPortColumns : public Gtk::TreeModel::ColumnRecord {
|
|
|
|
MidiPortColumns() {
|
|
|
|
add (short_name);
|
|
|
|
add (full_name);
|
|
|
|
}
|
|
|
|
Gtk::TreeModelColumn<std::string> short_name;
|
|
|
|
Gtk::TreeModelColumn<std::string> full_name;
|
|
|
|
};
|
|
|
|
|
|
|
|
MidiPortColumns midi_port_columns;
|
|
|
|
bool ignore_active_change;
|
|
|
|
|
|
|
|
Glib::RefPtr<Gtk::ListStore> build_midi_port_list (std::vector<std::string> const & ports, bool for_input);
|
|
|
|
void active_port_changed (Gtk::ComboBox*,bool for_input);
|
|
|
|
|
2016-08-25 21:05:23 -04:00
|
|
|
struct PressureModeColumns : public Gtk::TreeModel::ColumnRecord {
|
|
|
|
PressureModeColumns() {
|
|
|
|
add (mode);
|
|
|
|
add (name);
|
|
|
|
}
|
|
|
|
Gtk::TreeModelColumn<Push2::PressureMode> mode;
|
|
|
|
Gtk::TreeModelColumn<std::string> name;
|
|
|
|
};
|
|
|
|
PressureModeColumns pressure_mode_columns;
|
|
|
|
Glib::RefPtr<Gtk::ListStore> build_pressure_mode_columns ();
|
|
|
|
Gtk::ComboBox pressure_mode_selector;
|
|
|
|
Gtk::Label pressure_mode_label;
|
|
|
|
|
|
|
|
void reprogram_pressure_mode ();
|
2016-07-06 22:43:34 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* __ardour_push2_gui_h__ */
|