mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 23:35:03 +01:00
Dialog to select and configure Lua Scripts
This commit is contained in:
parent
68a8b5613e
commit
292eac7f48
3 changed files with 304 additions and 0 deletions
73
gtk2_ardour/script_selector.h
Normal file
73
gtk2_ardour/script_selector.h
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
/*
|
||||
* Copyright (C) 2016 Robin Gareus <robin@gareus.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include <gtkmm.h>
|
||||
#include "ardour/luascripting.h"
|
||||
|
||||
#include "ardour_dialog.h"
|
||||
|
||||
class ScriptSelector : public ArdourDialog
|
||||
{
|
||||
public:
|
||||
ScriptSelector (std::string title, ARDOUR::LuaScriptInfo::ScriptType t);
|
||||
ARDOUR::LuaScriptInfoPtr script() const { return _script; }
|
||||
|
||||
private:
|
||||
void setup_list ();
|
||||
void refresh ();
|
||||
void script_combo_changed ();
|
||||
|
||||
Gtk::Button* _add;
|
||||
Gtk::ComboBoxText _script_combo;
|
||||
|
||||
Gtk::Label _type;
|
||||
Gtk::Label _author;
|
||||
Gtk::Label _description;
|
||||
|
||||
ARDOUR::LuaScriptList & _scripts;
|
||||
ARDOUR::LuaScriptInfoPtr _script;
|
||||
ARDOUR::LuaScriptInfo::ScriptType _script_type;
|
||||
sigc::connection _combocon;
|
||||
};
|
||||
|
||||
class SessionScriptManager : public ArdourDialog
|
||||
{
|
||||
public:
|
||||
SessionScriptManager (std::string title, const std::vector<std::string>&);
|
||||
std::string name () { return _names_combo.get_active_text (); }
|
||||
|
||||
private:
|
||||
Gtk::ComboBoxText _names_combo;
|
||||
};
|
||||
|
||||
class ScriptParameterDialog : public ArdourDialog
|
||||
{
|
||||
public:
|
||||
ScriptParameterDialog (std::string title, const ARDOUR::LuaScriptInfoPtr&, const std::vector<std::string>&, ARDOUR::LuaScriptParamList&);
|
||||
std::string name () { return _name_entry.get_text (); }
|
||||
|
||||
private:
|
||||
void update_sensitivity ();
|
||||
void active_changed (int, Gtk::CheckButton*, Gtk::Entry*);
|
||||
void value_changed (int, Gtk::Entry*);
|
||||
|
||||
Gtk::Entry _name_entry;
|
||||
Gtk::Button* _add;
|
||||
const std::vector<std::string> &_existing_names;
|
||||
ARDOUR::LuaScriptParamList& _lsp;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue