2 Copyright (C) 2010 Paul Davis
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.
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.
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.
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>
28 class MackieControlProtocol;
32 class MackieControlProtocolGUI : public Gtk::Notebook
35 MackieControlProtocolGUI (MackieControlProtocol &);
38 void surface_combo_changed ();
40 MackieControlProtocol& _cp;
41 Gtk::ComboBoxText _surface_combo;
43 struct AvailableActionColumns : public Gtk::TreeModel::ColumnRecord {
44 AvailableActionColumns() {
48 Gtk::TreeModelColumn<std::string> name;
49 Gtk::TreeModelColumn<std::string> path;
52 struct FunctionKeyColumns : public Gtk::TreeModel::ColumnRecord {
53 FunctionKeyColumns() {
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;
71 AvailableActionColumns available_action_columns;
72 FunctionKeyColumns function_key_columns;
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;
79 void rebuild_function_key_editor ();