2 * Copyright (C) 2016 Robin Gareus <robin@gareus.org>
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 #ifndef _gtk2_ardour_lua_script_manager_h_
20 #define _gtk2_ardour_lua_script_manager_h_
23 #include "ardour/luascripting.h"
25 #include "ardour_window.h"
26 #include "luainstance.h"
28 class LuaScriptManager : public ArdourWindow
34 void session_going_away();
40 void setup_actions ();
41 void action_selection_changed ();
42 void set_action_script_name (int, const std::string&);
44 void set_action_btn_clicked ();
45 void del_action_btn_clicked ();
46 void edit_action_btn_clicked ();
47 void call_action_btn_clicked ();
49 class LuaActionScriptModelColumns : public Gtk::TreeModelColumnRecord
52 LuaActionScriptModelColumns ()
60 Gtk::TreeModelColumn<int> id;
61 Gtk::TreeModelColumn<std::string> action;
62 Gtk::TreeModelColumn<std::string> name;
63 Gtk::TreeModelColumn<bool> enabled;
66 Gtk::Button _a_set_button;
67 Gtk::Button _a_del_button;
68 Gtk::Button _a_edit_button;
69 Gtk::Button _a_call_button;
71 Glib::RefPtr<Gtk::ListStore> _a_store;
72 LuaActionScriptModelColumns _a_model;
73 Gtk::TreeView _a_view;
75 /* action callback hooks */
76 void setup_callbacks ();
77 void callback_selection_changed ();
78 void set_callback_script_name (PBD::ID, const std::string&, const ActionHook& ah);
80 void add_callback_btn_clicked ();
81 void del_callback_btn_clicked ();
83 class LuaCallbackScriptModelColumns : public Gtk::TreeModelColumnRecord
86 LuaCallbackScriptModelColumns ()
93 Gtk::TreeModelColumn<PBD::ID> id;
94 Gtk::TreeModelColumn<std::string> name;
95 Gtk::TreeModelColumn<std::string> signals;
98 Glib::RefPtr<Gtk::ListStore> _c_store;
99 LuaCallbackScriptModelColumns _c_model;
100 Gtk::TreeView _c_view;
102 Gtk::Button _c_add_button;
103 Gtk::Button _c_del_button;
106 #endif /* _gtk2_ardour_lua_script_manager_h_ */