Ardour  9.0-pre0-582-g084a23a80d
lua_script_manager.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 #ifndef _gtk2_ardour_lua_script_manager_h_
20 #define _gtk2_ardour_lua_script_manager_h_
21 
22 #include <gtkmm/button.h>
23 #include <gtkmm/notebook.h>
24 #include <gtkmm/liststore.h>
25 #include <gtkmm/treemodel.h>
26 #include <gtkmm/treeview.h>
27 
28 #include "ardour/luascripting.h"
29 
30 #include "ardour_window.h"
31 #include "luainstance.h"
32 
34 {
35 public:
38 
39 protected:
41 
42 private:
44 
45  /* action scripts */
46  void setup_actions ();
48  void set_action_script_name (int, const std::string&);
49 
54 
56  {
57  public:
59  {
60  add (id);
61  add (action);
62  add (name);
63  add (enabled);
64  }
65 
70  };
71 
76 
77  Glib::RefPtr<Gtk::ListStore> _a_store;
80 
81  /* action callback hooks */
82  void setup_callbacks ();
84  void set_callback_script_name (PBD::ID, const std::string&, const ActionHook& ah);
85 
88 
90  {
91  public:
93  {
94  add (id);
95  add (name);
96  add (signals);
97  }
98 
102  };
103 
104  Glib::RefPtr<Gtk::ListStore> _c_store;
107 
110 
111  /* Session scripts */
114 
117 
119  {
120  public:
122  {
123  add (name);
124  }
125 
127  };
128 
129  Glib::RefPtr<Gtk::ListStore> _s_store;
132 
135 
137 };
138 
139 #endif /* _gtk2_ardour_lua_script_manager_h_ */
void add(TreeModelColumnBase &column)
Gtk::TreeModelColumn< std::string > name
Gtk::TreeModelColumn< std::string > action
Gtk::TreeModelColumn< std::string > name
Gtk::TreeModelColumn< std::string > signals
Gtk::TreeModelColumn< std::string > name
Glib::RefPtr< Gtk::ListStore > _c_store
LuaCallbackScriptModelColumns _c_model
void setup_callbacks()
Gtk::Button _s_del_button
void call_action_btn_clicked()
LuaActionScriptModelColumns _a_model
Gtk::TreeView _s_view
Gtk::Notebook pages
void action_selection_changed()
void session_going_away()
void callback_selection_changed()
Gtk::Button _a_del_button
Gtk::Button _a_set_button
Glib::RefPtr< Gtk::ListStore > _a_store
void set_action_script_name(int, const std::string &)
Gtk::Button _a_edit_button
void edit_action_btn_clicked()
Glib::RefPtr< Gtk::ListStore > _s_store
LuaCallbackScriptModelColumns _s_model
Gtk::TreeView _a_view
Gtk::Button _c_del_button
Gtk::Button _s_add_button
void set_session(ARDOUR::Session *)
void del_action_btn_clicked()
Gtk::Button _a_call_button
Gtk::TreeView _c_view
void setup_session_scripts()
void add_sess_btn_clicked()
void session_script_selection_changed()
PBD::ScopedConnection _session_script_connection
void add_callback_btn_clicked()
void del_callback_btn_clicked()
void set_action_btn_clicked()
Gtk::Button _c_add_button
void del_sess_btn_clicked()
void set_callback_script_name(PBD::ID, const std::string &, const ActionHook &ah)
Definition: id.h:34
std::bitset< LuaSignal::LAST_SIGNAL > ActionHook
Definition: luainstance.h:46