-bool Actor::DoConnectSignal(BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor)
-{
- bool connected(true);
- Actor* actor = static_cast<Actor*>(object); // TypeRegistry guarantees that this is the correct type.
-
- std::string_view name(signalName);
-
- if(name == SIGNAL_HOVERED)
- {
- actor->HoveredSignal().Connect(tracker, functor);
- }
- else if(signalName == SIGNAL_WHEEL_EVENT)
- {
- actor->WheelEventSignal().Connect(tracker, functor);
- }
- else if(name == SIGNAL_ON_SCENE)
- {
- actor->OnSceneSignal().Connect(tracker, functor);
- }
- else if(name == SIGNAL_OFF_SCENE)
- {
- actor->OffSceneSignal().Connect(tracker, functor);
- }
- else if(name == SIGNAL_ON_RELAYOUT)
- {
- actor->OnRelayoutSignal().Connect(tracker, functor);
- }
- else if(name == SIGNAL_TOUCHED)
- {
- actor->TouchedSignal().Connect(tracker, functor);
- }
- else if(name == SIGNAL_VISIBILITY_CHANGED)
- {
- actor->VisibilityChangedSignal().Connect(tracker, functor);
- }
- else if(name == SIGNAL_LAYOUT_DIRECTION_CHANGED)
- {
- actor->LayoutDirectionChangedSignal().Connect(tracker, functor);
- }
- else if(name == SIGNAL_CHILD_ADDED)
- {
- actor->ChildAddedSignal().Connect(tracker, functor);
- }
- else if(name == SIGNAL_CHILD_REMOVED)
- {
- actor->ChildRemovedSignal().Connect(tracker, functor);
- }
- else
- {
- // signalName does not match any signal
- connected = false;
- }
-
- return connected;
-}
-