Ardour  9.0-pre0-384-ga76afae0e9
mackie/gui.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2007 John Anderson
3  * Copyright (C) 2012-2016 Paul Davis <paul@linuxaudiosystems.com>
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 #include <vector>
21 
22 #include <gtkmm/comboboxtext.h>
23 #include <gtkmm/box.h>
24 #include <gtkmm/spinbutton.h>
25 #include <gtkmm/table.h>
26 #include <gtkmm/image.h>
27 #include <gtkmm/liststore.h>
28 #include <gtkmm/notebook.h>
29 #include <gtkmm/radiobutton.h>
30 #include <gtkmm/scale.h>
31 #include <gtkmm/scrolledwindow.h>
32 #include <gtkmm/treeview.h>
33 #include <gtkmm/treestore.h>
34 
35 namespace Gtk {
36  class CellRendererCombo;
37 }
38 
39 #include "button.h"
40 
41 #include "pbd/i18n.h"
42 
43 namespace ActionManager {
44  class ActionModel;
45 }
46 
47 namespace ArdourSurface { namespace MACKIE_NAMESPACE {
48 
49 class MackieControlProtocol;
50 class Surface;
51 
53 {
54  public:
56 
57  private:
62 
63  typedef std::vector<Gtk::ComboBox*> PortCombos;
66 
69  add (short_name);
70  add (full_name);
71  }
74  };
75 
78  add (name);
79  add (id);
80  add (plain);
81  add (shift);
82  add (control);
83  add (option);
84  add (cmdalt);
85  add (shiftcontrol);
86  };
88  Gtk::TreeModelColumn<int> id; // enum Button::ID
95  };
96 
99 
102  Glib::RefPtr<Gtk::ListStore> function_key_model;
103 
105 
106  Glib::RefPtr<Gtk::ListStore> build_midi_port_list (bool for_input);
107 
110  void action_changed (const Glib::ustring &sPath, const Gtk::TreeModel::iterator &, Gtk::TreeModelColumnBase);
112 
116 
125 
128 
132 
136 
138  void device_changed ();
139 
140  void update_port_combos (std::vector<std::string> const&, std::vector<std::string> const&,
141  Gtk::ComboBox* input_combo,
142  Gtk::ComboBox* output_combo,
143  std::shared_ptr<MACKIE_NAMESPACE::Surface> surface);
144 
147 
148  Glib::RefPtr<Gtk::ListStore> build_midi_port_list (std::vector<std::string> const & ports, bool for_input);
151  void active_port_changed (Gtk::ComboBox* combo, std::weak_ptr<MACKIE_NAMESPACE::Surface> ws, bool for_input);
152 };
153 
154 } // namespace Mackie
155 } // namespace ArdourSurface
void active_port_changed(Gtk::ComboBox *combo, std::weak_ptr< NS_MCU ::Surface > ws, bool for_input)
PBD::ScopedConnectionList _port_connections
Definition: mackie/gui.h:145
const ActionManager::ActionModel & action_model
Definition: mackie/gui.h:104
Gtk::CellRendererCombo * make_action_renderer(Glib::RefPtr< Gtk::TreeStore > model, Gtk::TreeModelColumnBase)
void update_port_combos(std::vector< std::string > const &, std::vector< std::string > const &, Gtk::ComboBox *input_combo, Gtk::ComboBox *output_combo, std::shared_ptr< NS_MCU ::Surface > surface)
Glib::RefPtr< Gtk::ListStore > build_midi_port_list(std::vector< std::string > const &ports, bool for_input)
std::vector< Gtk::ComboBox * > PortCombos
Definition: mackie/gui.h:63
MackieControlProtocolGUI(MackieControlProtocol &)
void action_changed(const Glib::ustring &sPath, const Gtk::TreeModel::iterator &, Gtk::TreeModelColumnBase)
Glib::RefPtr< Gtk::ListStore > build_midi_port_list(bool for_input)
Glib::RefPtr< Gtk::ListStore > function_key_model
Definition: mackie/gui.h:102
GtkImageIconNameData name
Definition: gtkimage.h:6
PBD::PropertyDescriptor< float > shift
void add(const Gtk::StockItem &item)
Definition: ardour_ui.h:187
Definition: getopt.h:74
#define MACKIE_NAMESPACE