Ardour  9.0-pre0-822-g12e3bc5c20
push2/gui.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 Paul Davis <paul@linuxaudiosystems.com>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #ifndef __ardour_push2_gui_h__
20 #define __ardour_push2_gui_h__
21 
22 #include <vector>
23 #include <string>
24 
25 #include <ytkmm/box.h>
26 #include <ytkmm/button.h>
27 #include <ytkmm/combobox.h>
28 #include <ytkmm/image.h>
29 #include <ytkmm/table.h>
30 #include <ytkmm/treestore.h>
31 #include <ytkmm/spinbutton.h>
32 #include <ytkmm/notebook.h>
33 
34 namespace Gtk {
35  class ListStore;
36 }
37 
38 #include "ardour/mode.h"
39 
40 #include "push2.h"
41 
42 namespace ArdourSurface {
43 
44 class P2GUI : public Gtk::VBox
45 {
46 public:
48  ~P2GUI ();
49 
50 private:
52  Gtk::HBox _hpacker;
55  Gtk::ComboBox _input_combo;
56  Gtk::ComboBox _output_combo;
57  Gtk::Image _image;
58 
61 
63 
64  struct MidiPortColumns : public Gtk::TreeModel::ColumnRecord {
66  add (short_name);
67  add (full_name);
68  }
69  Gtk::TreeModelColumn<std::string> short_name;
70  Gtk::TreeModelColumn<std::string> full_name;
71  };
72 
75 
76  Glib::RefPtr<Gtk::ListStore> build_midi_port_list (std::vector<std::string> const & ports, bool for_input);
77 
78  void active_port_changed (Gtk::ComboBox*,bool for_input);
79 
80  struct PressureModeColumns : public Gtk::TreeModel::ColumnRecord {
82  add (mode);
83  add (name);
84  }
85  Gtk::TreeModelColumn<Push2::PressureMode> mode;
86  Gtk::TreeModelColumn<std::string> name;
87  };
88 
90  Glib::RefPtr<Gtk::ListStore> build_pressure_mode_columns ();
91  Gtk::ComboBox _pressure_mode_selector;
93 
95 };
96 
97 }
98 
99 #endif /* __ardour_push2_gui_h__ */
PBD::ScopedConnectionList _port_connections
Definition: push2/gui.h:62
void reprogram_pressure_mode()
PressureModeColumns _pressure_mode_columns
Definition: push2/gui.h:89
Gtk::Table _action_table
Definition: push2/gui.h:54
Gtk::Table _table
Definition: push2/gui.h:53
Gtk::ComboBox _output_combo
Definition: push2/gui.h:56
Gtk::ComboBox _pressure_mode_selector
Definition: push2/gui.h:91
Gtk::HBox _hpacker
Definition: push2/gui.h:52
void active_port_changed(Gtk::ComboBox *, bool for_input)
Glib::RefPtr< Gtk::ListStore > build_pressure_mode_columns()
MidiPortColumns _midi_port_columns
Definition: push2/gui.h:73
Glib::RefPtr< Gtk::ListStore > build_midi_port_list(std::vector< std::string > const &ports, bool for_input)
Gtk::Image _image
Definition: push2/gui.h:57
Gtk::Label _pressure_mode_label
Definition: push2/gui.h:92
Gtk::ComboBox _input_combo
Definition: push2/gui.h:55
bool _ignore_active_change
Definition: push2/gui.h:74
struct Table Table
Definition: ardour_ui.h:189
Gtk::TreeModelColumn< std::string > full_name
Definition: push2/gui.h:70
Gtk::TreeModelColumn< std::string > short_name
Definition: push2/gui.h:69
Gtk::TreeModelColumn< std::string > name
Definition: push2/gui.h:86
Gtk::TreeModelColumn< Push2::PressureMode > mode
Definition: push2/gui.h:85