Ardour  9.0-pre0-582-g084a23a80d
script_selector.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016-2017 Robin Gareus <robin@gareus.org>
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 along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #include <gtkmm/button.h>
20 #include <gtkmm/comboboxtext.h>
21 #include <gtkmm/label.h>
22 
23 #include "ardour/luascripting.h"
24 
25 #include "ardour_dialog.h"
26 
28 {
29 public:
32 
33 private:
34  void setup_list ();
35  void refresh ();
37  bool script_separator (const Glib::RefPtr<Gtk::TreeModel> &, const Gtk::TreeModel::iterator &i);
38 
41 
47 
51  sigc::connection _combocon;
52 };
53 
55 {
56 public:
57  SessionScriptManager (std::string title, const std::vector<std::string>&);
58  std::string name () { return _names_combo.get_active_text (); }
59 
60 private:
62 };
63 
65 {
66 public:
67  ScriptParameterDialog (std::string title, const ARDOUR::LuaScriptInfoPtr&, const std::vector<std::string>&, ARDOUR::LuaScriptParamList&);
68  std::string name () { return _name_entry.get_text (); }
69  bool need_interaction () const;
70 
71 private:
73  bool parameters_ok () const;
75  void value_changed (int, Gtk::Entry*);
76 
79  const std::vector<std::string> &_existing_names;
81 };
Glib::ustring get_active_text() const
Glib::ustring get_text() const
ScriptParameterDialog(std::string title, const ARDOUR::LuaScriptInfoPtr &, const std::vector< std::string > &, ARDOUR::LuaScriptParamList &)
void active_changed(int, Gtk::CheckButton *, Gtk::Entry *)
bool parameters_ok() const
const std::vector< std::string > & _existing_names
ARDOUR::LuaScriptParamList & _lsp
void value_changed(int, Gtk::Entry *)
bool need_interaction() const
sigc::connection _combocon
ARDOUR::LuaScriptInfo::ScriptType _script_type
ARDOUR::LuaScriptList _scripts
Gtk::ComboBoxText _script_combo
Gtk::Label _type
Gtk::Button * _add
Gtk::Label _author
ARDOUR::LuaScriptInfoPtr script() const
Gtk::Label _type_label
ScriptSelector(Gtk::Window &parent, std::string title, ARDOUR::LuaScriptInfo::ScriptType t)
void script_combo_changed()
ARDOUR::LuaScriptInfoPtr _script
Gtk::Label _description
Gtk::Label _author_label
bool script_separator(const Glib::RefPtr< Gtk::TreeModel > &, const Gtk::TreeModel::iterator &i)
Gtk::ComboBoxText _names_combo
SessionScriptManager(std::string title, const std::vector< std::string > &)
std::shared_ptr< LuaScriptInfo > LuaScriptInfoPtr
Definition: luascripting.h:103
std::vector< LuaScriptInfoPtr > LuaScriptList
Definition: luascripting.h:104
std::vector< LuaScriptParamPtr > LuaScriptParamList
Definition: luascripting.h:107