Expose Stripable Color & Ordering API to Lua

We can't easily use C++ references with Lua closures, so
new API (pointer to PresentationInfo) was added.
This commit is contained in:
Robin Gareus 2016-08-15 16:37:44 +02:00
parent e2466621bc
commit 46cbb9084e
2 changed files with 10 additions and 0 deletions

View File

@ -73,6 +73,7 @@ class LIBARDOUR_API Stripable : public SessionObject {
PresentationInfo const & presentation_info () const { return _presentation_info; }
PresentationInfo& presentation_info () { return _presentation_info; }
PresentationInfo* presentation_info_ptr () { return &_presentation_info; }
/* set just the order */

View File

@ -587,6 +587,12 @@ LuaBindings::common (lua_State* L)
// stub RouteGroup* is needed for new_audio_track()
.endClass ()
.deriveClass <PresentationInfo, PBD::Stateful> ("PresentationInfo")
.addFunction ("color", &PresentationInfo::color)
.addFunction ("set_color", &PresentationInfo::set_color)
.addFunction ("order", &PresentationInfo::order)
.endClass ()
.deriveWSPtrClass <Stripable, SessionObject> ("Stripable")
.addCast<Route> ("to_route")
.addFunction ("is_auditioner", &Stripable::is_auditioner)
@ -603,6 +609,9 @@ LuaBindings::common (lua_State* L)
.addFunction ("trim_control", &Stripable::trim_control)
.addFunction ("rec_enable_control", &Stripable::rec_enable_control)
.addFunction ("rec_safe_control", &Stripable::rec_safe_control)
.addFunction ("set_presentation_order", &Stripable::set_presentation_order)
.addFunction ("presentation_info_ptr", &Stripable::presentation_info_ptr)
.endClass ()
.deriveWSPtrClass <Route, Stripable> ("Route")