Add some convenient public editor methods (for lua-bindings)
[ardour.git] / gtk2_ardour / luawindow.h
index 8faec694a5035c5aef3e8d5a0692c4bc123903d9..33d7fd151755ae7e237b7a7e46cb206a5000c8f1 100644 (file)
@@ -53,6 +53,7 @@ class LuaWindow :
 
        void show_window ();
        bool hide_window (GdkEventAny *ev);
+       void edit_script (const std::string&, const std::string&);
 
        void set_session (ARDOUR::Session* s);
 
@@ -85,7 +86,7 @@ class LuaWindow :
        LuaWindow ();
        static LuaWindow* _instance;
 
-       LuaState lua;
+       LuaState *lua;
        bool _visible;
 
        Gtk::Menu* _menu_scratch;
@@ -103,6 +104,7 @@ class LuaWindow :
        ArdourButton _btn_open;
        ArdourButton _btn_save;
        ArdourButton _btn_delete;
+       ArdourButton _btn_revert;
 
        ArdourDropdown script_select;
 
@@ -114,6 +116,7 @@ class LuaWindow :
 
        void session_going_away ();
        void update_title ();
+       void reinit_lua ();
 
        void setup_buffers ();
        void refresh_scriptlist ();
@@ -121,7 +124,7 @@ class LuaWindow :
        uint32_t count_scratch_buffers () const;
 
        void script_changed ();
-       void script_selection_changed (ScriptBufferPtr n);
+       void script_selection_changed (ScriptBufferPtr n, bool force = false);
        void update_gui_state ();
 
        void append_text (std::string s);
@@ -132,6 +135,7 @@ class LuaWindow :
 
        void new_script ();
        void delete_script ();
+       void revert_script ();
        void import_script ();
        void save_script ();
 };