Ardour  8.7-14-g57a6773833
faderport/gui.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015-2016 Paul Davis <paul@linuxaudiosystems.com>
3  * Copyright (C) 2019 Johannes Mueller <github@johannes-mueller.org>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
20 #ifndef __ardour_faderport_gui_h__
21 #define __ardour_faderport_gui_h__
22 
23 #include <vector>
24 #include <string>
25 
26 #include <gtkmm/box.h>
27 #include <gtkmm/combobox.h>
28 #include <gtkmm/image.h>
29 #include <gtkmm/table.h>
30 #include <gtkmm/treestore.h>
31 
32 namespace Gtk {
33  class CellRendererCombo;
34  class ListStore;
35 }
36 
37 #include "faderport.h"
38 
39 namespace ActionManager {
40  class ActionModel;
41 }
42 
43 namespace ArdourSurface {
44 
45 class FPGUI : public Gtk::VBox
46 {
47 public:
49  ~FPGUI ();
50 
51 private:
59 
60  /* the mix, proj, trns and user buttons have no obvious semantics for
61  * ardour, mixbus etc., so we allow the user to define their
62  * functionality from a small, curated set of options.
63  */
64 
70 
74 
77  add (short_name);
78  add (full_name);
79  }
82  };
83 
86 
87  Glib::RefPtr<Gtk::ListStore> build_midi_port_list (std::vector<std::string> const & ports, bool for_input);
88  void active_port_changed (Gtk::ComboBox*,bool for_input);
89 
91 
92  std::map<std::string,std::string> action_map; // map from action names to paths
93 
94  void build_action_combo (Gtk::ComboBox& cb, std::vector<std::pair<std::string,std::string> > const & actions, FaderPort::ButtonID, FaderPort::ButtonState);
100 
102 };
103 
104 }
105 
106 #endif /* __ardour_faderport_gui_h__ */
void build_user_action_combo(Gtk::ComboBox &, FaderPort::ButtonState)
void build_proj_action_combo(Gtk::ComboBox &, FaderPort::ButtonState)
PBD::ScopedConnectionList _port_connections
Definition: faderport/gui.h:72
Gtk::ComboBox foot_combo[3]
Definition: faderport/gui.h:69
Gtk::ComboBox output_combo
Definition: faderport/gui.h:57
void build_foot_action_combo(Gtk::ComboBox &, FaderPort::ButtonState)
FPGUI(FaderPort &)
void build_trns_action_combo(Gtk::ComboBox &, FaderPort::ButtonState)
void action_changed(Gtk::ComboBox *, FaderPort::ButtonID, FaderPort::ButtonState)
Glib::RefPtr< Gtk::ListStore > build_midi_port_list(std::vector< std::string > const &ports, bool for_input)
Gtk::ComboBox trns_combo[3]
Definition: faderport/gui.h:67
void build_mix_action_combo(Gtk::ComboBox &, FaderPort::ButtonState)
void build_action_combo(Gtk::ComboBox &cb, std::vector< std::pair< std::string, std::string > > const &actions, FaderPort::ButtonID, FaderPort::ButtonState)
Gtk::ComboBox proj_combo[3]
Definition: faderport/gui.h:66
Gtk::ComboBox user_combo[2]
Definition: faderport/gui.h:68
const ActionManager::ActionModel & action_model
Definition: faderport/gui.h:90
Gtk::Table action_table
Definition: faderport/gui.h:55
Gtk::ComboBox mix_combo[3]
Definition: faderport/gui.h:65
void active_port_changed(Gtk::ComboBox *, bool for_input)
MidiPortColumns midi_port_columns
Definition: faderport/gui.h:84
Gtk::ComboBox input_combo
Definition: faderport/gui.h:56
std::map< std::string, std::string > action_map
Definition: faderport/gui.h:92
void add(TreeModelColumnBase &column)
Definition: ardour_ui.h:188
Gtk::TreeModelColumn< std::string > short_name
Definition: faderport/gui.h:80
Gtk::TreeModelColumn< std::string > full_name
Definition: faderport/gui.h:81