MCP: fix uninitialized variable; start work on extending MCP gui
[ardour.git] / libs / surfaces / mackie / gui.h
1 /*
2         Copyright (C) 2010 Paul Davis
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
15         along with this program; if not, write to the Free Software
16         Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 */
18
19 #include <gtkmm/comboboxtext.h>
20 #include <gtkmm/box.h>
21 #include <gtkmm/spinbutton.h>
22 #include <gtkmm/table.h>
23 #include <gtkmm/treeview.h>
24 #include <gtkmm/liststore.h>
25 #include <gtkmm/notebook.h>
26 #include <gtkmm/scrolledwindow.h>
27
28 class MackieControlProtocol;
29
30 #include "i18n.h"
31
32 class MackieControlProtocolGUI : public Gtk::Notebook
33 {
34   public:
35     MackieControlProtocolGUI (MackieControlProtocol &);
36     
37   private:
38     void surface_combo_changed ();
39     
40     MackieControlProtocol& _cp;
41     Gtk::ComboBoxText _surface_combo;
42
43     struct AvailableActionColumns : public Gtk::TreeModel::ColumnRecord {
44             AvailableActionColumns() {
45                     add (name);
46                     add (path);
47             }
48             Gtk::TreeModelColumn<std::string> name;
49             Gtk::TreeModelColumn<std::string> path;
50     };
51     
52     struct FunctionKeyColumns : public Gtk::TreeModel::ColumnRecord {
53         FunctionKeyColumns() {
54                 add (name);
55                 add (unmodified);
56                 add (shift);
57                 add (control);
58                 add (option);
59                 add (cmdalt);
60                 add (shiftcontrol);
61         };
62         Gtk::TreeModelColumn<std::string> name;
63         Gtk::TreeModelColumn<std::string> unmodified;
64         Gtk::TreeModelColumn<std::string> shift;
65         Gtk::TreeModelColumn<std::string> control;
66         Gtk::TreeModelColumn<std::string> option;
67         Gtk::TreeModelColumn<std::string> cmdalt;
68         Gtk::TreeModelColumn<std::string> shiftcontrol;
69     };
70
71     AvailableActionColumns available_action_columns;
72     FunctionKeyColumns function_key_columns;
73
74     Gtk::ScrolledWindow function_key_scroller;
75     Gtk::TreeView function_key_editor;
76     Glib::RefPtr<Gtk::ListStore> function_key_model;
77     Glib::RefPtr<Gtk::TreeStore> available_action_model;
78
79     void rebuild_function_key_editor ();
80 };
81