Base class for Activity Host classes.
More...
#include <kanzi/ui/node/concept/activity/activity_host_concept.hpp>
Base class for Activity Host classes.
This class defines common types, properties and messages for Activity Host classes.
- See also
- ExclusiveActivityHost2D, ExclusiveActivityHost3D, ParallelActivityHost2D, ParallelActivityHost3D.
◆ ActivityInfoContainer
◆ ActivationStatus
Specifies possible stages for internal tracking of activation of an activity.
Enumerator |
---|
PreparingForActivation | The activity is preparing for the activation sequence.
For example, resources can be loaded at this stage.
|
ParallelAnimation | The activity is in animation stage parallel to another activity.
|
ExclusiveAnimation | The activity is in exclusive animation stage.
|
◆ DeactivationStatus
Specifies possible stages for internal tracking of deactivation of an activity.
Enumerator |
---|
ExclusiveAnimation | The activity is in exclusive animation stage.
|
ParallelAnimation | The activity is in animation stage parallel to another activity.
|
WaitingForRelease | The activity has finished all possible actions during the deactivation.
|
◆ FocusLostFlag
An Activity Host uses this enum to keep track of whether it has lost focus during Activity switching.
In case an Activity Host has lost focus, the Activity Host uses the value of this enum to try and restore the focus.
For example, when an Activity Host activates an Activity that used to have focus, and if the activated Activity has resources or dynamic content, such as an Activity Host with other Activities, which are loaded asynchronously, Kanzi cannot correctly restore the focus. In such cases, the Activity Host uses this enum to decide whether to restore the focus.
- Since
- Kanzi 3.9.0
Enumerator |
---|
FocusLossObserved | The Activity Host has observed a focus loss during Activity switching.
|
NoFocusLossObserved | The Activity Host has not observed a focus loss during Activity switching or the focus has been restored.
|
◆ ~ActivityHostConcept()
virtual kanzi::ActivityHostConcept::~ActivityHostConcept |
( |
| ) |
|
|
virtualdefault |
◆ makeEditorInfo()
◆ isActivityHost()
template<typename Type >
static bool kanzi::ActivityHostConcept::isActivityHost |
( |
const Type & |
object | ) |
|
|
inlinestatic |
Determines if an object is an ActivityHost.
- Parameters
-
- Returns
- Returns true if the object is an ActivityHost, false otherwise.
◆ setActivationModifier()
virtual void kanzi::ActivityHostConcept::setActivationModifier |
( |
string_view |
activityName, |
|
|
BindingTokenWeakPtr |
weakModifier |
|
) |
| |
|
pure virtual |
Sets a property modifier to apply activation to a child Activity Node of an Activity Host.
The created modifier is a BindingToken for the property that keeps a child Activity node activated for as long as the token is alive. ApplyActivationAction uses this method to apply activation to an Activity Node, upon invocation.
For ParallelActivityHost:
For ExclusiveActivityHost:
- Parameters
-
activityName | The name of the Activity node that the ApplyActivationAction activates. |
weakModifier | A BindingToken owned by the ApplyActivationAction. For ParallelActivityHost, Kanzi waits until the child Activity node prefab is instantiated. Only after the prefab is instantiated can Kanzi set the property modifier binding on the child Activity node. For ExclusiveActivityHost Kanzi does not have to wait for prefab to instantiate because it sets the property modifier directly on the Activity Host and not on its child Activity nodes. |
- Since
- Kanzi 3.9.0
Implemented in kanzi::ParallelActivityHostImpl< TBaseClass, TDerivedClass >, kanzi::ParallelActivityHostImpl< ContentLayout3D, ParallelActivityHost3D >, kanzi::ParallelActivityHostImpl< ContentLayout2D, ParallelActivityHost2D >, kanzi::ExclusiveActivityHostBaseImpl< TBaseClass, TDerivedClass >, kanzi::ExclusiveActivityHostBaseImpl< ContentLayout2D, DataDrivenExclusiveActivityHost2D >, kanzi::ExclusiveActivityHostBaseImpl< ContentLayout3D, DataDrivenExclusiveActivityHost3D >, kanzi::ExclusiveActivityHostBaseImpl< ContentLayout2D, ExclusiveActivityHost2D >, and kanzi::ExclusiveActivityHostBaseImpl< ContentLayout3D, ExclusiveActivityHost3D >.
◆ onActivateActivityOverride()
virtual void kanzi::ActivityHostConcept::onActivateActivityOverride |
( |
string_view |
activationPath | ) |
|
|
pure virtual |
◆ ActivateActivityMessage
You can send ActivateActivity to the host to activate an activity.
Exclusive Activity host deactivates the previously active activity at the same time.
◆ DeactivateActivityMessage
You can send DeactivateActivity to the host to deactivate an activity.
Exclusive Activity host ignores this message.
◆ RegisterHostInternalMessage
Internal message sent by an activity host to its parent activity or activity host to register the host in the parent.
◆ UnregisterHostInternalMessage
Internal message sent by an activity host to its parent activity or activity host to unregister the host from the parent.
◆ RestoreFocusInternalMessage
Internal message sent by an Activity Host to its ancestor parent Activity Hosts to trigger the focus resolving.
- Since
- Kanzi 3.9.0
The documentation for this class was generated from the following file: