Add Lua bindings to set toggle-actions
This commit is contained in:
parent
bbc8c1354e
commit
cba622cdce
@ -1132,7 +1132,7 @@ Editor::deferred_control_scroll (framepos_t /*target*/)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::access_action (std::string action_group, std::string action_item)
|
||||
Editor::access_action (const std::string& action_group, const std::string& action_item)
|
||||
{
|
||||
if (!_session) {
|
||||
return;
|
||||
@ -1148,6 +1148,12 @@ Editor::access_action (std::string action_group, std::string action_item)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::set_toggleaction (const std::string& action_group, const std::string& action_item, bool s)
|
||||
{
|
||||
ActionManager::set_toggleaction_state (action_group.c_str(), action_item.c_str(), s);
|
||||
}
|
||||
|
||||
void
|
||||
Editor::on_realize ()
|
||||
{
|
||||
|
@ -1114,7 +1114,8 @@ private:
|
||||
void control_scroll (float);
|
||||
void control_select (boost::shared_ptr<ARDOUR::Stripable>, Selection::Operation);
|
||||
void control_unselect ();
|
||||
void access_action (std::string,std::string);
|
||||
void access_action (const std::string&, const std::string&);
|
||||
void set_toggleaction (const std::string&, const std::string&, bool);
|
||||
bool deferred_control_scroll (framepos_t);
|
||||
sigc::connection control_scroll_connection;
|
||||
|
||||
|
@ -847,6 +847,7 @@ LuaInstance::register_classes (lua_State* L)
|
||||
#endif
|
||||
|
||||
.addFunction ("access_action", &PublicEditor::access_action)
|
||||
.addFunction ("set_toggleaction", &PublicEditor::set_toggleaction)
|
||||
.endClass ()
|
||||
|
||||
/* ArdourUI enums */
|
||||
|
@ -448,7 +448,8 @@ public:
|
||||
virtual void abort_reversible_command () = 0;
|
||||
virtual void commit_reversible_command () = 0;
|
||||
|
||||
virtual void access_action (std::string,std::string) = 0;
|
||||
virtual void access_action (const std::string&, const std::string&) = 0;
|
||||
virtual void set_toggleaction (const std::string&, const std::string&, bool) = 0;
|
||||
|
||||
virtual MouseCursors const * cursors () const = 0;
|
||||
virtual VerboseCursor * verbose_cursor () const = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user