Encapsulates the synchronization of animations for activating and deactivating Activity nodes. More...
#include <kanzi/ui/node/concept/activity/activity_switching_synchronizer.hpp>
Public Member Functions | |
ActivitySwitchingSynchronizer (ExclusiveActivityHostConcept &activityHost) | |
Constructor. More... | |
void | deactivate (unique_ptr< ActivityHostConcept::ActiveActivity > currentlyActive) |
Deactivates an Activity node. More... | |
NodeWeakPtr | getActivating () const |
Returns the Activity node that the Activity Host node is currently activating. More... | |
string_view | getActivatingName () const |
Returns the name of the Activity node that the Activity Host node is currently activating. More... | |
string_view | getActivatingPath () const |
Returns the path of the Activity node that the Activity Host node is currently activating. More... | |
NodeWeakPtr | getDeactivating () const |
Returns the Activity node that the Activity Host node is currently deactivating. More... | |
string | getDeactivatingName () const |
Returns the name of the Activity node that the Activity Host node is currently deactivating. More... | |
void | notifyActivityRemoved (string_view name) |
Notifies about the removal of an Activity node. More... | |
void | onFinishedExclusiveDeactivatingAnimationInternal (const ActivityConcept::StatusChangedInternalMessageArguments &args) |
Message handler for the FinishedExclusiveDeactivatingAnimationInternal message. More... | |
void | onFinishedParallelActivatingAnimationInternal (const ActivityConcept::StatusChangedInternalMessageArguments &args) |
Message handler for FinishedParallelActivatingAnimationInternal message. More... | |
void | onFinishedParallelDeactivatingAnimationInternal (const ActivityConcept::StatusChangedInternalMessageArguments &args) |
Message handler for the FinishedParallelDeactivatingAnimationInternal message. More... | |
void | switchActivity (const ActivityHostConcept::ActivityInfo &activityToActivate, unique_ptr< ActivityHostConcept::ActiveActivity > currentlyActive, string_view continuationActivationPath) |
Switches to a new Activity node. More... | |
void | switchActivityNoAnimation (const ActivityHostConcept::ActivityInfo &activityToActivate, unique_ptr< ActivityHostConcept::ActiveActivity > currentlyActive, string_view continuationActivationPath) |
Switches to a new Activity node without any animations. More... | |
~ActivitySwitchingSynchronizer () | |
Destructor. More... | |
Encapsulates the synchronization of animations for activating and deactivating Activity nodes.
This is a helper class for the Exclusive Activity Host type classes.
|
explicit |
Constructor.
activityHost | Exclusive Activity Host node that is the owner of this object. |
kanzi::ActivitySwitchingSynchronizer::~ActivitySwitchingSynchronizer | ( | ) |
Destructor.
void kanzi::ActivitySwitchingSynchronizer::onFinishedParallelActivatingAnimationInternal | ( | const ActivityConcept::StatusChangedInternalMessageArguments & | args | ) |
Message handler for FinishedParallelActivatingAnimationInternal message.
args | Message arguments. |
void kanzi::ActivitySwitchingSynchronizer::onFinishedParallelDeactivatingAnimationInternal | ( | const ActivityConcept::StatusChangedInternalMessageArguments & | args | ) |
Message handler for the FinishedParallelDeactivatingAnimationInternal message.
args | Message arguments. |
void kanzi::ActivitySwitchingSynchronizer::onFinishedExclusiveDeactivatingAnimationInternal | ( | const ActivityConcept::StatusChangedInternalMessageArguments & | args | ) |
Message handler for the FinishedExclusiveDeactivatingAnimationInternal message.
args | Message arguments. |
void kanzi::ActivitySwitchingSynchronizer::switchActivityNoAnimation | ( | const ActivityHostConcept::ActivityInfo & | activityToActivate, |
unique_ptr< ActivityHostConcept::ActiveActivity > | currentlyActive, | ||
string_view | continuationActivationPath | ||
) |
Switches to a new Activity node without any animations.
activityToActivate | The information of the Activity node to switch to. |
currentlyActive | The Activity node to switch from. |
continuationActivationPath | The remainder of the activation path in the activation sequence. |
void kanzi::ActivitySwitchingSynchronizer::switchActivity | ( | const ActivityHostConcept::ActivityInfo & | activityToActivate, |
unique_ptr< ActivityHostConcept::ActiveActivity > | currentlyActive, | ||
string_view | continuationActivationPath | ||
) |
Switches to a new Activity node.
activityToActivate | The information of Activity node to switch to. |
currentlyActive | The Activity node to switch from. |
continuationActivationPath | The remainder of the activation path in the activation sequence. |
void kanzi::ActivitySwitchingSynchronizer::deactivate | ( | unique_ptr< ActivityHostConcept::ActiveActivity > | currentlyActive | ) |
Deactivates an Activity node.
currentlyActive | The Activity node to deactivate. |
void kanzi::ActivitySwitchingSynchronizer::notifyActivityRemoved | ( | string_view | name | ) |
Notifies about the removal of an Activity node.
Removing an Activity node during synchronization can get stuck, because messages used for synchronization are not sent by the removed Activity nodes. For this reason, to continue with the transition animation, Kanzi must inform the synchronizer that an Activity node was removed.
name | The name of the removed Activity node. |
NodeWeakPtr kanzi::ActivitySwitchingSynchronizer::getActivating | ( | ) | const |
Returns the Activity node that the Activity Host node is currently activating.
string_view kanzi::ActivitySwitchingSynchronizer::getActivatingName | ( | ) | const |
Returns the name of the Activity node that the Activity Host node is currently activating.
string_view kanzi::ActivitySwitchingSynchronizer::getActivatingPath | ( | ) | const |
Returns the path of the Activity node that the Activity Host node is currently activating.
NodeWeakPtr kanzi::ActivitySwitchingSynchronizer::getDeactivating | ( | ) | const |
Returns the Activity node that the Activity Host node is currently deactivating.
string kanzi::ActivitySwitchingSynchronizer::getDeactivatingName | ( | ) | const |
Returns the name of the Activity node that the Activity Host node is currently deactivating.