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 #include <gtkmm/button.h>
20 #include <gtkmm/comboboxtext.h>
21 #include <gtkmm/label.h>
23 #include "ardour/luascripting.h"
25 #include "ardour_dialog.h"
27 class ScriptSelector : public ArdourDialog
30 ScriptSelector (std::string title, ARDOUR::LuaScriptInfo::ScriptType t);
31 ARDOUR::LuaScriptInfoPtr script() const { return _script; }
36 void script_combo_changed ();
39 Gtk::ComboBoxText _script_combo;
43 Gtk::Label _description;
45 ARDOUR::LuaScriptList _scripts;
46 ARDOUR::LuaScriptInfoPtr _script;
47 ARDOUR::LuaScriptInfo::ScriptType _script_type;
48 sigc::connection _combocon;
51 class SessionScriptManager : public ArdourDialog
54 SessionScriptManager (std::string title, const std::vector<std::string>&);
55 std::string name () { return _names_combo.get_active_text (); }
58 Gtk::ComboBoxText _names_combo;
61 class ScriptParameterDialog : public ArdourDialog
64 ScriptParameterDialog (std::string title, const ARDOUR::LuaScriptInfoPtr&, const std::vector<std::string>&, ARDOUR::LuaScriptParamList&);
65 std::string name () { return _name_entry.get_text (); }
66 bool need_interation () const;
69 void update_sensitivity ();
70 bool parameters_ok () const;
71 void active_changed (int, Gtk::CheckButton*, Gtk::Entry*);
72 void value_changed (int, Gtk::Entry*);
74 Gtk::Entry _name_entry;
76 const std::vector<std::string> &_existing_names;
77 ARDOUR::LuaScriptParamList& _lsp;