13
0

re-order inheritance

LuaBridge only allows one parent class, others need explicit casts.
Allowing RoutUI to be passed as Selectable argument is handy.
This commit is contained in:
Robin Gareus 2017-02-24 12:53:49 +01:00
parent febd1d5c88
commit 3780a9526e
2 changed files with 11 additions and 5 deletions

View File

@ -575,22 +575,28 @@ LuaInstance::register_classes (lua_State* L)
.addFunction ("_type", &ArdourMarker::type)
.endClass ()
#if 0
.beginClass <AxisView> ("AxisView")
.endClass ()
.deriveClass <TimeAxisView, AxisView> ("TimeAxisView")
.endClass ()
.deriveClass <RouteTimeAxisView, TimeAxisView> ("RouteTimeAxisView")
.endClass ()
#endif
.beginClass <Selectable> ("Selectable")
.endClass ()
.deriveClass <TimeAxisViewItem, Selectable> ("TimeAxisViewItem")
.endClass ()
.deriveClass <RegionView, TimeAxisViewItem> ("RegionView")
.endClass ()
.deriveClass <RouteUI, Selectable> ("RouteUI")
.endClass ()
.deriveClass <RouteTimeAxisView, RouteUI> ("RouteTimeAxisView")
.addCast<TimeAxisView> ("to_timeaxisview")
.endClass ()
.beginStdCPtrList <Selectable> ("SelectionList")
.endClass ()

View File

@ -74,7 +74,7 @@ class RoutePinWindowProxy : public WM::ProxyBase
PBD::ScopedConnection going_away_connection;
};
class RouteUI : public virtual ARDOUR::SessionHandlePtr, public virtual PBD::ScopedConnectionList, public virtual Selectable, public virtual sigc::trackable
class RouteUI : public virtual Selectable, public virtual ARDOUR::SessionHandlePtr, public virtual PBD::ScopedConnectionList, public virtual sigc::trackable
{
public:
RouteUI (ARDOUR::Session*);