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. | |
void | deactivate (unique_ptr< ActivityHostConcept::ActiveActivity > currentlyActive) |
Deactivates an Activity node. | |
NodeWeakPtr | getActivating () const |
Returns the Activity node that the Activity Host node is currently activating. | |
string_view | getActivatingName () const |
Returns the name of the Activity node that the Activity Host node is currently activating. | |
string_view | getActivatingPath () const |
Returns the path of the Activity node that the Activity Host node is currently activating. | |
NodeWeakPtr | getDeactivating () const |
Returns the Activity node that the Activity Host node is currently deactivating. | |
string | getDeactivatingName () const |
Returns the name of the Activity node that the Activity Host node is currently deactivating. | |
void | notifyActivityRemoved (string_view name) |
Notifies about the removal of an Activity node. | |
void | onFinishedExclusiveDeactivatingAnimationInternal (const ActivityConcept::StatusChangedInternalMessageArguments &args) |
Message handler for the FinishedExclusiveDeactivatingAnimationInternal message. | |
void | onFinishedParallelActivatingAnimationInternal (const ActivityConcept::StatusChangedInternalMessageArguments &args) |
Message handler for FinishedParallelActivatingAnimationInternal message. | |
void | onFinishedParallelDeactivatingAnimationInternal (const ActivityConcept::StatusChangedInternalMessageArguments &args) |
Message handler for the FinishedParallelDeactivatingAnimationInternal message. | |
void | switchActivity (const ActivityHostConcept::ActivityInfo &activityToActivate, unique_ptr< ActivityHostConcept::ActiveActivity > currentlyActive, string_view continuationActivationPath) |
Switches to a new Activity node. | |
void | switchActivityNoAnimation (const ActivityHostConcept::ActivityInfo &activityToActivate, unique_ptr< ActivityHostConcept::ActiveActivity > currentlyActive, string_view continuationActivationPath) |
Switches to a new Activity node without any animations. | |
~ActivitySwitchingSynchronizer () | |
Destructor. | |
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.