Kanzi  3.9.9
Kanzi Engine C++ API
kanzi::Activity3D Class Reference

An Activity is a part of application UI that is responsible for a task. More...

#include <kanzi/ui/node/activity3d.hpp>

Inheritance diagram for kanzi::Activity3D:
[legend]

Public Types

using ConceptClass = ActivityConceptImpl< ContentLayout3D, Activity3D >
 Activity 3D concept used to implement this class. More...
 
- Public Types inherited from kanzi::Node3D
typedef ChildContainer::const_iterator ChildConstIterator
 
typedef ChildContainer::const_reverse_iterator ChildConstReverseIterator
 
typedef vector< Node3DSharedPtrChildContainer
 Iterators for child nodes. More...
 
typedef Matrix4x4 LayoutMatrixType
 
typedef Vector3 LayoutVectorType
 
using RenderEntryParameterContainer = vector< RenderEntryParameters >
 The type to use to return render entries from nodes. More...
 
enum  RenderMode { RenderModeNone, RenderModeDefault, RenderModeCustom }
 Specifies the rendering modes available for a 3D node. More...
 
- Public Types inherited from kanzi::Node
enum  ContentStretch {
  ContentStretchNone, ContentStretchFill, ContentStretchUniform, ContentStretchUniformToFill,
  ContentStretchRepeat
}
 Content stretch option. More...
 
enum  DepthAlignment { DepthAlignmentBack, DepthAlignmentFront, DepthAlignmentCenter, DepthAlignmentStretch }
 Depth alignment options. More...
 
enum  HorizontalAlignment { HorizontalAlignmentLeft, HorizontalAlignmentRight, HorizontalAlignmentCenter, HorizontalAlignmentStretch }
 Horizontal alignment options. More...
 
typedef InputManipulatorContainer::const_iterator InputManipulatorConstIterator
 
typedef vector< InputManipulatorBaseSharedPtrInputManipulatorContainer
 Gets the input manipulator iterator. More...
 
typedef InputManipulatorContainer::iterator InputManipulatorIterator
 
typedef kanzi::vector< Node::MessageSubscriptionTokenMessageSubscriptionTokenVector
 
typedef NodeComponentContainer::const_iterator NodeComponentConstIterator
 
typedef vector< NodeComponentEntryNodeComponentContainer
 Gets the node component iterator. More...
 
typedef NodeComponentContainer::iterator NodeComponentIterator
 
enum  VerticalAlignment { VerticalAlignmentBottom, VerticalAlignmentTop, VerticalAlignmentCenter, VerticalAlignmentStretch }
 Vertical alignment options. More...
 
typedef function< VisitorResult(Node &)> Visitor
 Defines the type of the function that Kanzi executes for each node when visiting a node tree. More...
 
enum  VisitorOrder { VisitorPreOrder, VisitorPostOrder }
 Defines the order in which Kanzi visits the nodes in a node tree. More...
 
enum  VisitorResult { VisitorAbort, VisitorContinue, VisitorContinueSibling }
 Defines the return type of the Node::Visitor function. More...
 
- Public Types inherited from kanzi::PropertyObject
typedef PropertyStorageContainer::const_iterator PropertyStorageConstIterator
 
typedef vector< PropertyStoragePtrPropertyStorageContainer
 
typedef PropertyStorageContainer::iterator PropertyStorageIterator
 
typedef intrusive_ptr< AbstractPropertyTypeDescriptor::PropertyStoragePropertyStoragePtr
 
typedef PropertyStorageContainer::reverse_iterator PropertyStorageReverseIterator
 
- Public Types inherited from kanzi::BindingHostConcept
using BindingHostConceptSharedPtr = shared_ptr< BindingHostConcept >
 Binding host concept shared pointer type. More...
 
using BindingRuntimeConstIterator = BindingRuntimeContainer::const_iterator
 Const iterator for binding runtimes. More...
 
using BindingRuntimeContainer = vector< AbstractBindingRuntimeSharedPtr >
 Container for binding runtimes. More...
 
using BindingRuntimeIterator = BindingRuntimeContainer::iterator
 Iterator for binding runtimes. More...
 
- Public Types inherited from kanzi::ActivityConcept
enum  Status { Status::Active, Status::Inactive, Status::Activating, Status::Deactivating }
 Defines possible states of an Activity. More...
 

Static Public Member Functions

static Activity3DSharedPtr create (Domain *domain, string_view name)
 Creates a 3D activity node. More...
 
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 
- Static Public Member Functions inherited from kanzi::ContentLayout3D
static ContentLayout3DSharedPtr create (Domain *domain, string_view name)
 Creates a Content Layout 3D node. More...
 
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 Provides the Kanzi Studio editor metadata for the ContentLayout3D. More...
 
- Static Public Member Functions inherited from kanzi::ContentLayoutConceptImpl< Node3D, ContentLayout3D >
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 
- Static Public Member Functions inherited from kanzi::Node3D
static bool isUnboundedLayoutSize (Vector3 layoutSize)
 Returns whether a layout size is an unbounded layout size. More...
 
static bool isValidLayoutSize (Vector3 size)
 Returns whether a given size is a valid layout size. More...
 
static float layoutUp ()
 Returns the direction toward which the y axis of a 3D node grows. More...
 
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 
static Vector3 replaceUnboundedLayoutSize (Vector3 layoutSize, Vector3 resetSize)
 Replaces any elements in an unbounded layout size with the corresponding elements of a given size. More...
 
static Vector3 replaceUnboundedLayoutSizeWithZero (Vector3 layoutSize)
 Replaces any elements in an unbounded layout size with zero. More...
 
static Vector3 unboundedLayoutSize ()
 Returns an unbounded layout size. More...
 
- Static Public Member Functions inherited from kanzi::Node
static bool isUnboundedLayoutValue (float layoutValue)
 Indicates whether a value is an unbound layout value. More...
 
static bool isValidLayoutValue (float value)
 Indicates whether a value is valid layout value. More...
 
static float replaceUnboundedLayoutValue (float layoutValue, float resetValue)
 Replaces layout value with the specified value if it is unbounded and returns it. More...
 
static float replaceUnboundedLayoutValueWithZero (float layoutValue)
 Replaces layout value with zero if it is unbounded layout value and returns it. More...
 
static float unboundedLayoutValue ()
 Returns an unbounded layout value. More...
 
- Static Public Member Functions inherited from kanzi::Object
static const MetaclassgetStaticMetaclass ()
 Returns the metaclass of Object class. More...
 
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 Default implementation that returns empty editor info. More...
 
- Static Public Member Functions inherited from kanzi::MetaObject
static const MetaclassgetStaticMetaclass ()
 Returns the metaclass of Object class. More...
 
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 Default implementation that returns empty editor info. More...
 
- Static Public Member Functions inherited from kanzi::ContentLayoutConcept
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 Provides the Kanzi Studio editor metadata for the ContentLayoutConcept. More...
 
- Static Public Member Functions inherited from kanzi::ActivityElement
static string getFirstElement (string_view activationSequence)
 Gets the first element of the activation sequence. More...
 
static string getRestToForward (string_view activationSequence)
 Gets the remainder of the activation sequence. More...
 
template<typename Type >
static bool isActivityElement (const Type &object)
 Returns whether an object is an ActivityElement. More...
 
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 
- Static Public Member Functions inherited from kanzi::ActivityConcept
template<typename Type >
static bool isActivity (const Type &object)
 Returns whether an object is an Activity. More...
 
static bool isActivityMetaclass (const Metaclass *metaclass)
 Checks whether the given Metaclass is an ActivityConcept metaclass or contains it as a mixin metaclass. More...
 
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 

Protected Member Functions

 Activity3D (Domain *domain, string_view name)
 Constructor. More...
 
- Protected Member Functions inherited from kanzi::ActivityConceptImpl< ContentLayout3D, Activity3D >
 ActivityConceptImpl (Domain *domain, string_view name)
 Constructor. More...
 
void initialize ()
 Initializes this activity. More...
 
void onAttached () override
 Node::onAttached implementation. More...
 
void onDetached () override
 Node::onDetached implementation. More...
 
void onInputOutsideOverlay (FocusManager::InputOutsideOverlayMessageArguments &args)
 Message handler for InputOutsideOverlayMessage message. More...
 
void registerInParentActivityElement () final
 ActivityElement::registerInParentActivityElement implementation. More...
 
void unregisterInParentActivityElement () final
 ActivityElement::registerInParentActivityElement implementation. More...
 
 ~ActivityConceptImpl () override=default
 Destructor. More...
 
- Protected Member Functions inherited from kanzi::ActivityElementImpl< ContentLayout3D, Activity3D >
 ActivityElementImpl (Domain *domain, string_view name)
 Constructor. More...
 
void initialize ()
 Initializes the activity element. More...
 
void onAttached () override
 Node::onAttached implementation. More...
 
virtual void onAttachedOverride ()
 Overrides the onAttached method. More...
 
void onDetached () override
 Node::onDetached implementation. More...
 
void onNodePropertyChanged (AbstractPropertyType propertyType, PropertyNotificationReason reason) override
 Node::onNodePropertyChanged implementation. More...
 
 ~ActivityElementImpl () override=default
 Destructor. More...
 
- Protected Member Functions inherited from kanzi::ContentLayout3D
void arrangeOverride (Vector3 actualSize) override
 Node3D::arrangeOverride() implementation. More...
 
 ContentLayout3D (Domain *domain, string_view name)
 Constructor. More...
 
Vector3 measureOverride (Vector3 availableSize) override
 Node3D::measureOverride() implementation. More...
 
- Protected Member Functions inherited from kanzi::ContentLayoutConceptImpl< Node3D, ContentLayout3D >
 ContentLayoutConceptImpl (Domain *domain, string_view name)
 Constructor. More...
 
- Protected Member Functions inherited from kanzi::Node3D
NodeSharedPtr findAbstractChildOverride (string_view name) override
 
virtual const RenderEntryParameterContainergenerateRenderStatesOverride (DrawObjectsRenderPass &drawPass)
 Node-specific render state generation. More...
 
void initialize ()
 
 Node3D (Domain *domain, string_view name)
 
virtual void registerDrawPassOverride (DrawObjectsRenderPassSharedPtr drawPass)
 Node-specific implementation of draw pass registration. More...
 
virtual void renderOverride (Renderer3D &renderer, RenderEntry3D &renderEntry)
 Node-specific rendering implementation. More...
 
void setPrimitiveLayout (bool primitive)
 Sets primitive layout flag. More...
 
VisitorResult visitAbstractChildOverride (const Visitor &visitor, VisitorOrder order) override
 
- Protected Member Functions inherited from kanzi::Node
void attach ()
 Attaches the object node. More...
 
void detach ()
 Detaches the object node. More...
 
void initialize ()
 Node-specific initialization. More...
 
 Node (Domain *domain, string_view name)
 Constructor. More...
 
void notifyPropertyHandlers (PropertyStoragePtr &propertyStorage, PropertyNotificationReason reason) override
 Notifies all property handlers on a property storage. More...
 
void updatePropertiesForConnectedNode ()
 Invokes property notifications for inherited properties during node tree connections. More...
 
void updatePropertiesForDisconnectedNode (Node *oldParent)
 Invokes property notifications for inherited properties during node tree disconnections. More...
 
void updateResourceReferences ()
 
void updateResourceReferences (AbstractPropertyType propertyType)
 
void updateResourceReferencesRecursive ()
 
void updateResourceReferencesRecursive (const ResourceID &resourceID)
 
- Protected Member Functions inherited from kanzi::Object
void initialize ()
 
void onCopy (const Object &other)
 
- Protected Member Functions inherited from kanzi::MetaObject
void initialize ()
 
 MetaObject ()
 
- Protected Member Functions inherited from kanzi::PropertyObject
AbstractPropertyTypeDescriptor::ValueSourceEntryacquireLocalValueSourceEntry (AbstractPropertyTypeDescriptor &descriptor, PropertyStoragePtr &propertyStorage)
 Acquires a local value source entry that is free for the assignment of a value. More...
 
AbstractPropertyTypeDescriptor::ModifierStorageacquireModifierStorage (AbstractPropertyTypeDescriptor &descriptor, AbstractPropertyTypeDescriptor::PropertyStorage &propertyStorage)
 
AbstractPropertyTypeDescriptor::NotificationStorageacquireNotificationStorage (AbstractPropertyTypeDescriptor &descriptor)
 
PropertyStoragePtr acquirePropertyStorage (AbstractPropertyTypeDescriptor &descriptor)
 
template<typename DataType >
void addPropertyModifierBase (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::ModifierCallback callback, void *owner, bool notify)
 Adds a property modifier entry to the property modifier stack and validates them. More...
 
void addPropertyValueSource (AbstractPropertyTypeDescriptor &descriptor, AbstractPropertyTypeDescriptor::ValueSource *valueSource, PropertyValuePrecedence precedence, void *ownerPointer)
 Internally adds a property value source. More...
 
void addPropertyValueSource (AbstractPropertyTypeDescriptor &descriptor, AbstractPropertyTypeDescriptor::ValueSource *valueSource, PropertyValuePrecedence precedence, AbstractPropertyTypeDescriptor::ValueSourceOwner *owner)
 Internally adds a property value source. More...
 
AbstractPropertyTypeDescriptor::ValueSourceEntryconstructLocalValueSourceEntry (AbstractPropertyTypeDescriptor &descriptor, AbstractPropertyTypeDescriptor::PropertyStorage &propertyStorage)
 
PropertyStoragePtr constructPropertyStorage (AbstractPropertyTypeDescriptor &descriptor)
 
void copyLocalValue (const AbstractPropertyTypeDescriptor::PropertyStorage &otherPropertyStorage)
 Copy local value from property storage. More...
 
AbstractPropertyTypeDescriptor::ModifierStoragefindModifierStorage (AbstractPropertyTypeDescriptor &descriptor)
 
AbstractPropertyTypeDescriptor::NotificationStoragefindNotificationStorage (AbstractPropertyTypeDescriptor &descriptor) const
 
AbstractPropertyTypeDescriptor::PropertyStoragefindPropertyStorage (AbstractPropertyTypeDescriptor &descriptor) const
 Gets the property storage for given property type descriptor. More...
 
PropertyStoragePtr findPropertyStoragePtr (AbstractPropertyTypeDescriptor &descriptor) const
 Gets property storage intrusive pointer which you can use to hold a reference until the end of the operation. More...
 
AbstractPropertyTypeDescriptorfindPropertyTypeDescriptorByNameAndDataType (string_view name, PropertyDataType dataType) const
 Finds a property type descriptor by name and data type. More...
 
AbstractPropertyTypeDescriptorfindPropertyTypeDescriptorByQualifiedNameAndDataType (string_view qualifiedName, PropertyDataType dataType) const
 Like findPropertyTypeDescriptorByNameAndDataType, but only searches by matching with qualified names. More...
 
AbstractPropertyTypeDescriptorfindPropertyTypeDescriptorByUnqualifiedNameAndDataType (string_view unqualifiedName, PropertyDataType dataType) const
 Like findPropertyTypeDescriptorByNameAndDataType, but only searches by matching with unqualified names. More...
 
AbstractPropertyTypeDescriptor::ValueSourcegetClassValueSource (AbstractPropertyTypeDescriptor &descriptor) const
 
AbstractPropertyTypeDescriptor::ValueSourcegetFinalValueSource (AbstractPropertyTypeDescriptor &descriptor) const
 
AbstractPropertyTypeDescriptor::ValueSourcegetNonClassValueSource (AbstractPropertyTypeDescriptor &descriptor) const
 
AbstractPropertyTypeDescriptor::ValueSourcegetTopValueSource (AbstractPropertyTypeDescriptor &descriptor) const
 Gets the top-level value source for a given property descriptor. More...
 
void onCopy (const PropertyObject &other)
 
void removeLocalValue (AbstractPropertyTypeDescriptor &descriptor, PropertyStoragePtr &propertyStorage)
 Removes a local value from the given property storage. More...
 
void removePropertyValueSource (AbstractPropertyTypeDescriptor &descriptor, AbstractPropertyTypeDescriptor::ValueSource *valueSource, void *owner)
 Removes a property value source. More...
 
void validatePropertyModifiers (PropertyStoragePtr &propertyStorage)
 Validates property modifiers without notifying handlers. More...
 
void validatePropertyModifiersAndNotifyHandlers (PropertyStoragePtr &propertyStorage)
 Validates property modifiers and notifies handlers. More...
 
- Protected Member Functions inherited from kanzi::BindingHostConceptImpl< Node >
NodegetThisObject ()
 Internal accessor for the Curiously Recurring Template Pattern. More...
 
const NodegetThisObject () const
 Internal accessor for the Curiously Recurring Template Pattern. More...
 
- Protected Member Functions inherited from kanzi::BindingHostConcept
void attachBindings ()
 Attach all bindings stored in this object. More...
 
void detachBindings ()
 Detach bindings. More...
 
- Protected Member Functions inherited from kanzi::ActivityElement
optional< ActivityBrowserController::ActivityIDgetActivityID () const
 Gets the unique ID that is used by the implementation of the Activity Browser. More...
 
string getPathInParent ()
 Gets the activation path of this activity element relative to its parent. More...
 
void initialize ()
 Initializes the activity element. More...
 
bool isRootActivityElement () const
 Returns whether an ActivityElement is the root Activity Host node of the Screen node. More...
 
virtual void notifyChildrenNodeTreeAvailable ()
 Notifies child activity elements that node info tree is available. More...
 
void onForceTrigger (const ActivityBrowserController::ForceTriggerMessageArguments &args)
 Message handler for ActivityBrowserController::ForceTriggerMessage. More...
 
void onNodeInfoTreeAvailable (const ActivityBrowserController::NodeInfoTreeAvailableArguments &)
 Message handler for ActivityBrowserController::NodeInfoTreeAvailableMessage. More...
 
void registerChildHost (string_view hostPath)
 Registers a child host in this activity element. More...
 
void setActivityID (optional< ActivityBrowserController::ActivityID > activityID)
 Sets the unique ID that is used by the implementation of the Activity Browser. More...
 
void unregisterChildHost (string_view hostName)
 Unregisters a child host from this activity element. More...
 
void updateActivityBrowserProperties ()
 Triggers the Activity Browser to update the properties of the Activity Element. More...
 

Additional Inherited Members

- Public Member Functions inherited from kanzi::ActivityConceptImpl< ContentLayout3D, Activity3D >
bool collectActivatingDescendantActivities () override
 Implements ActivityConcept::collectActivatingDescendantActivities. More...
 
void enableFocusGain (bool enable) override
 Overrides ActivityConcept::enableFocusGain(). More...
 
void enableFocusRecovery (bool enable) override
 Overrides ActivityConcept::enableFocusRecovery(). More...
 
void enableInput (bool enable) override
 Overrides ActivityConcept::enableInput(). More...
 
NodegetNode () override
 Gets the underlying Node object. More...
 
const NodegetNode () const override
 Gets the underlying Node object. More...
 
ActivityConceptgetParentActivity () override
 ActivityConcept::getParentActivity implementation. More...
 
bool isAutoClosingBecauseFocusMove () const override
 Overrides ActivityConcept::isAutoClosingBecauseFocusMove(). More...
 
void notifyPendingActivationBeforeFocusFinished (string_view activityName) override
 Implements ActivityConcept::notifyPendingActivationBeforeFocusFinished. More...
 
void notifyReadyForFocus ()
 
void restoreLastFocusedNode () final
 ActivityConcept::restoreLastFocusedNode implementation. More...
 
string serialize () override
 ActivityElement::serialize implementation. More...
 
void setLastFocusedNodePath () final
 ActivityConcept::setLastFocusedNodePath implementation. More...
 
void tryRestoreLastFocusedPathCompletely (const Node *candidateChild) final
 ActivityConcept::tryRestoreLastFocusedPathCompletely implementation. More...
 
void updateFocusScopeInfo (FocusScopePtr &nodeScopeInfo) override
 Overrides Node::updateFocusScopeInfo(). More...
 
- Public Member Functions inherited from kanzi::ActivityElementImpl< ContentLayout3D, Activity3D >
NodegetNode () override
 Gets the underlying Node object. More...
 
const NodegetNode () const override
 Gets the underlying Node object. More...
 
- Public Member Functions inherited from kanzi::ContentLayoutConceptImpl< Node3D, ContentLayout3D >
Vector2 getDepthPadding () const
 Returns the value of DepthPaddingProperty. More...
 
Vector2 getHorizontalPadding () const
 Returns the value of HorizontalPaddingProperty. More...
 
Vector2 getVerticalPadding () const
 Returns the value of VerticalPaddingProperty. More...
 
void setDepthPadding (Vector2 value)
 Sets the value of DepthPaddingProperty. More...
 
void setHorizontalPadding (Vector2 value)
 Sets the value of HorizontalPaddingProperty. More...
 
void setVerticalPadding (Vector2 value)
 Sets the value of VerticalPaddingProperty. More...
 
- Public Member Functions inherited from kanzi::Node3D
bool addAbstractChildOverride (NodeSharedPtr child) override
 
void addChild (const Node3DSharedPtr &child)
 Adds a child node to a 3D node. More...
 
void arrange ()
 Performs layout arrangement on a 3D node. More...
 
void arrangeIterate ()
 Initial scene arrange. More...
 
void arrangeIterateLayout (bool propagateArrange)
 
void arrangeIterateLayoutChild (bool propagateArrange)
 
ChildConstIterator beginChildren () const
 
void centeredArrange (Vector3 actualSize) const
 Default implementation of arrange for a layout that accommodates all children at its center. More...
 
Vector3 centeredMeasure (Vector3 availableSize) const
 Default implementation of measure for a layout that accommodates all children at its center. More...
 
ChildConstIterator endChildren () const
 
const RenderEntryParameterContainergenerateRenderStates (DrawObjectsRenderPass &drawPass)
 Gets a listing of render entry parameters to use to generate render states. More...
 
size_t getAbstractChildCountOverride () override
 
size_t getAbstractChildIndexOverride (const Node &node) override
 
NodeSharedPtr getAbstractChildOverride (size_t index) override
 
Vector3 getActualSize () const
 Returns the actual size of a 3D node. More...
 
Vector3 getAllocatedOffset () const
 Returns the allocated offset of a 3D node. More...
 
Vector3 getAllocatedSize () const
 Returns the allocated size of a 3D node. More...
 
Matrix4x4 getArrangeTransformation () const
 Returns the layout transformation of a 3D node. More...
 
virtual optional< BoxgetBoundingBox () const
 Gets the bounding box of a 3D node. More...
 
Node3DSharedPtr getChild (size_t index) const
 Gets a child node at a given index. More...
 
size_t getChildCount () const
 Gets the number of child nodes in a 3D node. More...
 
size_t getChildIndex (const Node &child) const
 Gets the index of a child node. More...
 
Vector3 getCoreDesiredSize () const
 Returns the core desired size of a 3D node. More...
 
Vector3 getDesiredSize () const
 Returns the desired size of a 3D node. More...
 
Node3DSharedPtr getFaceToCameraTarget () const
 
void getLayoutBoundingBoxSize (Vector3 &bboxMin, Vector3 &bboxMax) const
 Returns the size of the bounding box of a 3D node. More...
 
Node3DSharedPtr getLookAtTarget () const
 
Vector3 getMaximumBoundingBoxCoordinates () const
 Returns the maximum coordinates for the bounding volume of a 3D node. More...
 
Vector3 getMinimumBoundingBoxCoordinates () const
 Returns the minimum coordinates for the bounding volume of a 3D node. More...
 
Node3DSharedPtr getOrientationConstraintTarget () const
 
Vector3 getPivotOffset () const
 Returns the pivot offset of a 3D node. More...
 
Node3DSharedPtr getPositionConstraintTarget () const
 
RenderMode getRenderMode () const
 Returns the render mode. More...
 
Vector3 getSize () const
 Returns the size of a 3D node. More...
 
Vector3 getStretchScale () const
 Returns the stretch scale of a 3D node. More...
 
bool hasChild (const Node &child) const
 Returns whether a child node exists. More...
 
virtual pair< NodeSharedPtr, float > hitTestContent (const Ray &ray)
 Default hit test implementation of Node3D content. More...
 
void insertChild (size_t index, const Node3DSharedPtr &child)
 Adds to a 3D node a child node at a given index. More...
 
bool isPrimitiveLayout () const
 Indicates whether a 3D node has primitive layout behavior. More...
 
void layout ()
 Calculates the layouts in a scene recursively. Calls the measure and arrange functions of every 3D node in the scene. More...
 
void measure (const Vector3 &availableSize)
 Performs the default measure step. More...
 
void measureIterate ()
 Initial scene measure. More...
 
virtual bool measureRecursive ()
 Performs layout measurement for a 3D node. More...
 
bool moveAbstractChildToPositionOverride (NodeSharedPtr child, size_t index) override
 Node::moveAbstractChildToPosition() implementation. More...
 
void moveChildToPosition (Node3DSharedPtr child, size_t index)
 Moves a child node to a given position in the list of child nodes. More...
 
void moveToBack ()
 Repositions a 3D node to the beginning of the list of child nodes of its parent node, so that Kanzi draws the node first. More...
 
void moveToFront ()
 Repositions a 3D node to the end of the list of child nodes of its parent node, so that Kanzi draws the node last. More...
 
virtual void onTransform ()
 Per-node step performed on transform, after Kanzi calculates the final transformation. More...
 
ChildConstReverseIterator rbeginChildren () const
 
void registerDrawPass (DrawObjectsRenderPassSharedPtr drawPass)
 Registers a DrawObjectsRenderPass that renders a 3D node. More...
 
bool removeAbstractChildOverride (Node &child) override
 
void removeAllChildren ()
 Removes all child nodes from a 3D node. More...
 
void removeChild (const Node &child)
 Removes a child node from a 3D node. More...
 
void removeChild (size_t index)
 Removes from a 3D node a child node at a given index. More...
 
ChildConstReverseIterator rendChildren () const
 
void render (Renderer3D &renderer, RenderEntry3D &renderEntry)
 Renders a 3D node using a given render state. More...
 
void setActualSize (const Vector3 &actualSize)
 Sets the actual size of a 3D node. More...
 
void setAllocatedOffset (const Vector3 &allocatedOffset)
 Sets the allocated offset of a 3D node. More...
 
void setAllocatedSize (const Vector3 &layoutSize)
 Sets the allocated size of a 3D node. More...
 
void setArrangeTransformation (const Matrix4x4 &value)
 Sets the layout transformation of a 3D node. More...
 
void setAutoDepth ()
 Sets a node to determine its depth automatically. More...
 
void setAutoHeight ()
 Sets a node to determine its height automatically. More...
 
void setAutoSize ()
 Sets a node to determine its width, height, and depth automatically. More...
 
void setAutoWidth ()
 Sets a node to determine its width automatically. More...
 
void setCoreDesiredSize (const Vector3 &coreDesiredSize)
 Sets the core desired size of a 3D node. More...
 
void setDesiredSize (const Vector3 &desiredSize)
 Sets the desired size of a 3D node. More...
 
void setLayoutBoundingBoxSize (const Vector3 &bboxMin, const Vector3 &bboxMax)
 Sets the size of the bounding box of a 3D node. More...
 
void setPivotOffset (const Vector3 &pivotOffset)
 Sets the pivot offset of a 3D node. More...
 
void setRenderMode (RenderMode mode)
 Sets the render mode. More...
 
void setSize (float width, float height, float depth)
 Sets the dimensions of a node. More...
 
void setSize (Vector3 size)
 Sets the dimensions of a node. More...
 
void setStretchScale (const Vector3 &stretchScale)
 Sets the stretch scale of a 3D node. More...
 
 ~Node3D () override
 
Matrix4x4 getFinalTransformation () const
 Gets the value of the FinalTransformationProperty. More...
 
void setFinalTransformation (Matrix4x4 value)
 Sets the value of the FinalTransformationProperty. More...
 
float getFrustumCullMargin () const
 Gets the value of the FrustumCullMarginProperty. More...
 
void setFrustumCullMargin (float value)
 Sets the value of the FrustumCullMarginProperty. More...
 
SRTValue3D getRenderTransformation () const
 Gets the value of the RenderTransformationProperty. More...
 
void setRenderTransformation (SRTValue3D value)
 Sets the value of the RenderTransformationProperty. More...
 
SRTValue3D getLayoutTransformation () const
 Gets the value of the LayoutTransformationProperty. More...
 
void setLayoutTransformation (SRTValue3D value)
 Sets the value of the LayoutTransformationProperty. More...
 
- Public Member Functions inherited from kanzi::Node
ResourceSharedPtr acquireResource (const ResourceID &id) const
 Acquires a resource from the node or the node's closest ancestor having the resource id in the resource dictionary. More...
 
template<typename T >
shared_ptr< TacquireResource (const ResourceID &id) const
 Acquires a resource from the node or the node's closest ancestor having the resource id in the resource dictionary, and casts the resource to given type. More...
 
ResourceManager::AcquireTaskSharedPtr acquireResourceAsync (const ResourceID &key, ResourceManager::AsyncAcquireFinishedCallback func) const
 Posts an asynchronous task to acquire a resource. More...
 
ResourceDictionarySharedPtr acquireResourceDictionary ()
 Gets a resource dictionary of a node. More...
 
void addAnonymousResource (ResourceSharedPtr resource)
 Adds alias resource to an object node. More...
 
void addInputManipulator (InputManipulatorBaseSharedPtr inputManipulator)
 Transfers the ownership and attaches an input manipulator to an object node. More...
 
template<typename TMessageType , typename TClass , typename TClassMethod >
MessageSubscriptionToken addMessageFilter (TMessageType &messageType, TClass *messageHandlerObject, TClassMethod method)
 Adds a message filter where the filter is a method that is invoked on an object. More...
 
template<typename TMessageType >
MessageSubscriptionToken addMessageFilter (const TMessageType &messageType, typename TMessageType::FunctionType function)
 Adds a message filter where the filter is a function. More...
 
template<typename TMessageType , typename TClass , typename TClassMethod >
MessageSubscriptionToken addMessageHandler (TMessageType &messageType, TClass *messageHandlerObject, TClassMethod method)
 Adds a message handler where the handler is a method that is invoked on an object. More...
 
template<typename TMessageType >
MessageSubscriptionToken addMessageHandler (const TMessageType &messageType, typename TMessageType::FunctionType function)
 Adds a message handler where the handler is a function. More...
 
template<typename TMessageType >
MessageSubscriptionToken addMessageHandler (const TMessageType &messageType, typename TMessageType::FunctionType function, Node *messageSourceFilter)
 Adds a message handler where the handler is a function and you explicitly define the accepted source. More...
 
void addNodeComponent (NodeComponentSharedPtr nodeComponent)
 Transfers the ownership of a node component to an object node. More...
 
void addNodeComponentWithOwner (NodeComponentSharedPtr nodeComponent, const void *owner)
 Transfers the ownership of a node component to an object node and sets the owner of the node component. More...
 
void addNodeReference (AbstractPropertyType propertyType, AbstractNodeReference *reference)
 
void addResource (const ResourceID &resourceId, string_view resourceUrl)
 Adds a resource manager resource to an object node. If resourceID already exists in object, removes the existing entry. If resourceURL is NULL, error is thrown. */. More...
 
void addResourceDictionary (ResourceDictionarySharedPtr resourceDictionary)
 Adds a nested resource dictionary to the resource dictionary of a node. More...
 
void addResourceReference (AbstractPropertyType propertyType, AbstractResourceReference *reference)
 This is a helper for automatic resource tracking in ResourceReference. More...
 
template<typename TMessageType >
MessageSubscriptionToken addTunnelingFilter (const TMessageType &messageType, typename TMessageType::FunctionType function)
 Adds a message filter where the filter is a function. More...
 
template<typename TMessageType , typename TClass , typename TClassMethod >
MessageSubscriptionToken addTunnelingFilter (const TMessageType &messageType, TClass *messageHandlerObject, TClassMethod method)
 Adds a message filter where the filter is a method that is invoked on an object. More...
 
template<typename TMessageType >
MessageSubscriptionToken addTunnelingHandler (const TMessageType &messageType, typename TMessageType::FunctionType function, Node *messageSourceFilter)
 Adds a message handler where the handler is a function and you explicitly define the accepted source. More...
 
AppliedStyleEntrySharedPtr applyManualStyle (StyleSharedPtr style)
 Applies a style to an object node. More...
 
AppliedStyleEntrySharedPtr applyStyle (StyleSharedPtr style)
 Applies a style to an object node. More...
 
void applyStyles ()
 Apply all styles for an object node. More...
 
void applyStylesRecursive ()
 Applies styles recursively. More...
 
void attachRecursive ()
 Attaches an object node and its children recursively. More...
 
InputManipulatorConstIterator beginInputManipulators () const
 
NodeComponentConstIterator beginNodeComponents () const
 
void clearChangeFlag (uint32_t flag)
 Clears a change flag. More...
 
void clearChildChangeFlag (uint32_t flag)
 Clears a child change flag. More...
 
bool containsResource (const ResourceID &resourceID) const
 Returns if object node resource dictionary contains the resource with given ID. Resource can be any type: style, alias or resource manager resource. */. More...
 
BindingLookupContextPtr createLookupContext (NodeSharedPtr templateRoot)
 Creates a lookup context for the node. More...
 
void detachRecursive ()
 Detaches a node and its descendants. More...
 
void dispatchAbstractMessage (const AbstractMessageType &messageType, MessageArguments &messageArguments)
 Dispatches a message from this node with specified arguments. More...
 
template<typename TArgumentsType >
void dispatchMessage (const MessageType< TArgumentsType > &messageType, typename MessageType< TArgumentsType >::ArgumentsType &messageArguments)
 Dispatches a message from this node with specified arguments. More...
 
InputManipulatorConstIterator endInputManipulators () const
 
NodeComponentConstIterator endNodeComponents () const
 
template<typename TNodeType >
shared_ptr< TNodeType > findAbstractChild (string_view name)
 Find a child by name. Finds direct children as well as children connected indirectly for example Viewport->Scene. More...
 
optional< string > findResourceURL (const ResourceID &resourceId) const
 Tries to find Resource URL for Resource ID from this node. More...
 
template<typename DataType >
DataType getAbstractProperty (AbstractPropertyType abstractPropertyType) const
 
uint32_t getChangeFlags () const
 Get current change flags. More...
 
uint32_t getChildChangeFlags () const
 Get current child change flags. More...
 
FocusManagergetFocusManager () const
 Returns the Focus Manager associated with the Screen node to which this node belongs. More...
 
FocusScopegetFocusScopeInfo () const
 Returns the information about the focus scope for a node. More...
 
InputManagergetInputManager () const
 Returns the Input Manager associated with the Screen node to which this node belongs. More...
 
AbstractPropertyTypeDescriptor::ValueSourcegetNodeFinalValueSource (AbstractPropertyTypeDescriptor &descriptor) const
 
template<typename DataType >
optional< typename PropertyType< DataType >::DataType > getOptionalAbstractProperty (AbstractPropertyType abstractPropertyType) const
 
template<typename DataType >
optional< typename PropertyType< DataType >::Traits::ReturnType > getOptionalProperty (const PropertyType< DataType > &propertyType) const
 Evaluates the property value in the same way as the overload above but does not default to the value in property metadata if there are no inputs to the property value. More...
 
NodegetParent () const
 Returns the parent of the node. More...
 
template<typename DataType >
PropertyType< DataType >::Traits::ReturnType getProperty (const PropertyType< DataType > &propertyType) const
 Returns the current value of a property. More...
 
ResourceDictionarySharedPtr getResourceDictionary () const
 If a node has a resource dictionary, returns the resource dictionary of that node. More...
 
ScreengetScreen () const
 Returns the Screen node to which this node belongs. More...
 
NodeSharedPtr getTemplateRoot () const
 Gets the template root of this node. More...
 
void invalidateArrange ()
 Invalidates arrange. More...
 
void invalidateDraw ()
 Invalidates draw flag for the node. More...
 
void invalidateFinalTransform ()
 Invalidates final transform for node. More...
 
void invalidateMeasure ()
 Invalidates measure for the node. More...
 
void invalidateRender ()
 Invalidates render for node. More...
 
bool isAnyChangeFlagSet (uint32_t flag) const
 Checks if any of given flags is set. More...
 
bool isAnyChildChangeFlagSet (uint32_t flag) const
 Checks if any child change flags (corresponding to given mask) are set. More...
 
bool isAttached () const
 Returns true if the node is attached to a screen or one of its descendants. More...
 
bool isAttaching () const
 Returns true if node is in the process of attaching, false otherwise. More...
 
bool isChangeFlagSet (uint32_t flag) const
 Checks if a change flag is set. More...
 
bool isChildChangeFlagSet (uint32_t flag) const
 Checks if child change flags match. More...
 
bool isDetaching () const
 Returns true if the node currently detaching. More...
 
bool isEffectivelyFocusable () const
 Returns whether a node is focusable. More...
 
bool isEffectivelyVisible () const
 Returns whether a node and its ancestor nodes are visible. More...
 
bool isInitialized () const
 Returns true if initialize() has been called, false otherwise. More...
 
bool isInvalidArrange () const
 Checks if the node needs arrange. More...
 
bool isInvalidDraw ()
 Tells if node draw flag is invalid. More...
 
bool isInvalidFinalTransform () const
 Tells if final transform flag is invalid for node. More...
 
bool isInvalidMeasure () const
 Check if the node needs measure. More...
 
bool isInvalidRender () const
 Returns if node render flag is invalid. More...
 
bool isNamed (string_view name) const
 
 KZ_METACLASS_PROPERTY_TYPE (FontFamilyProperty)
 
template<typename Type >
shared_ptr< Type > lookupNode (string_view pathOrKey)
 Returns a node of specified type by looking it up with specified path or alias. More...
 
template<typename Type >
shared_ptr< Type > lookupNodeComponent (string_view name)
 Returns a node component of specified type by looking it up with specified name. More...
 
NodelookupNodeRaw (string_view relativePath)
 Get an object node by another node and a relative path. More...
 
ObjectSharedPtr lookupObject (string_view relativePath)
 Lookup for an object from a node. More...
 
template<typename Type >
shared_ptr< Type > lookupObject (string_view relativePath)
 Lookup for an object from a node. More...
 
tuple< NodeSharedPtr, AbstractPropertyTypelookupObjectForStateManager (string_view relativePath)
 Lookup for an node and possible object from within the node for state manager. More...
 
void notifyResourceDictionaryModified ()
 Forces the re-evaluation of resource IDs in a node tree. More...
 
void removeAnonymousResource (const Resource &resource)
 Removes anonymous resource from object node resources. More...
 
void removeInputManipulator (InputManipulator &inputManipulator)
 Removes the ownership and detaches an input manipulator from an object node. More...
 
void removeKZBData (flat_set< AbstractPropertyType > *keepProperties)
 Destroys all object node data loaded from KZB, including properties, bindings, node components, resources etc. More...
 
void removeKZBData ()
 Destroys all object node data loaded from KZB. More...
 
void removeMessageHandler (MessageSubscriptionToken token)
 Removes a message subscription. More...
 
void removeNodeComponent (NodeComponent &nodeComponent)
 Removes the ownership of a node component from an object node. More...
 
void removeNodeComponentWithOwner (const void *owner)
 Removes all bindings with the specified owner. More...
 
void removeNodeReference (const AbstractNodeReference &reference)
 
void removeResource (const ResourceID &resourceId)
 Removes a resource with given ID from object node resource dictionary. Does not do anything if resourceID was not found. */. More...
 
void removeResourceReference (const AbstractResourceReference &reference)
 This is a helper for automatic resource tracking in ResourceReference. More...
 
virtual void restoreResources ()
 Reattaches an object node after potential resource change. More...
 
void setChangeFlag (uint32_t flag)
 Sets a change flag. More...
 
void setChildChangeFlag (uint32_t flag)
 Sets a child change flag. More...
 
void setParent (Node *parent)
 Kanzi uses this method internally to set the parent of a node. More...
 
void setResourceDictionary (ResourceDictionarySharedPtr resourceDictionary)
 Replaces the resource dictionary of a node. More...
 
void setScreen (Screen *screen)
 Sets the Screen node to which this node belongs. More...
 
void setTemplateRoot (NodeSharedPtr templateRoot)
 Sets the template root of this node. More...
 
ResourceSharedPtr tryAcquireResource (const ResourceID &id) const
 Acquires a resource from the node or the node's closest ancestor having the resource id in the resource dictionary. More...
 
template<typename T >
shared_ptr< TtryAcquireResource (const ResourceID &id) const
 Acquires a resource from the node or the node's closest ancestor having the resource and casts the resource to given type. More...
 
KZ_DEPRECATED NodeSharedPtr trySetActiveFocus ()
 Tries to move the focus on this node. More...
 
NodeSharedPtr trySetFocus ()
 Tries to move the focus to this node. More...
 
NodeSharedPtr trySetFocus (FocusFallback fallbackOption)
 Tries to set the focus to the newFocusNode using FocusManager::trySetFocus() but with a fallback behavior in case the node does not gain focus. More...
 
void unapplyStyle (AppliedStyleEntrySharedPtr appliedStyleEntry)
 Unapplies a style from an object node. More...
 
void unapplyStyles ()
 Unapplies and removes all applied styles. More...
 
void unapplyStylesRecursive ()
 Unapplies styles recursively. More...
 
void validateArrange ()
 Validates arrange. More...
 
void validateDraw ()
 Validates draw flags for the node. More...
 
void validateDrawForChildrenRecursive ()
 Recursively validates draw for the children from this 2D node onwards. More...
 
void validateMeasure ()
 Validates measure for the node. More...
 
void validateRender ()
 Validates render for node. More...
 
VisitorResult visit (const Visitor &visitor, VisitorOrder order)
 Visits a node and its descendants. More...
 
VisitorResult visitDescendants (const Visitor &visitor, VisitorOrder order)
 Visits the descendants of a node. More...
 
 ~Node () override
 Destructor. More...
 
string getName () const
 Gets the value of NameProperty. More...
 
void setName (string_view value)
 Sets the value of NameProperty. More...
 
string getPath () const
 Gets the value of PathProperty. More...
 
void setPath (string value)
 Sets the value of PathProperty. More...
 
string getLocale () const
 Gets the value of LocaleProperty. More...
 
void setLocale (string value)
 Sets the value of LocaleProperty. More...
 
bool isHitTestable () const
 Gets the value of HitTestableProperty. More...
 
void setHitTestable (bool value)
 Sets the value of HitTestableProperty. More...
 
bool isHitTestableContainer () const
 Gets the value of HitTestableContainerProperty. More...
 
void setHitTestableContainer (bool value)
 Sets the value of HitTestableContainerProperty. More...
 
bool isVisible () const
 Gets the value of VisibleProperty. More...
 
void setVisible (bool value)
 Sets the value of VisibleProperty. More...
 
bool isEnabled () const
 Returns the value of the EnabledProperty. More...
 
void setEnabled (bool value)
 Sets the value of the EnabledProperty. More...
 
bool isEffectivelyEnabled () const
 Returns the value of EffectivelyEnabledProperty. More...
 
bool isFocusable () const
 Gets the value of the FocusableProperty. More...
 
void setFocusable (bool value)
 Sets the value of the FocusableProperty. More...
 
bool isFocused () const
 Gets the value of the FocusedProperty. More...
 
void setFocused (bool value)
 Sets the value of the FocusedProperty. More...
 
FocusState getFocusState () const
 Gets the value of the FocusStateProperty. More...
 
void setFocusState (FocusState state)
 Sets the value of the FocusStateProperty. More...
 
FontFamilySharedPtr getFontFamily () const
 Gets the font family the node uses. More...
 
void setFontFamily (FontFamilySharedPtr value)
 Sets the font family the node uses. More...
 
float getVisibleAmountInParent () const
 Gets the value of VisibleAmountInParentProperty. More...
 
void setVisibleAmountInParent (float value)
 Sets the value of VisibleAmountInParentProperty. More...
 
float getProjection2DTo3DScale () const
 Gets the value of Projection2DTo3DScaleProperty. More...
 
void setProjection2DTo3DScale (float value)
 Sets the value of Projection2DTo3DScaleProperty. More...
 
ResourceSharedPtr getStyle () const
 Gets the value of StyleProperty. More...
 
void setStyle (ResourceSharedPtr value)
 Sets the value of StyleProperty. More...
 
ResourceSharedPtr getStateManager () const
 Gets the value of StateManagerProperty. More...
 
void setStateManager (ResourceSharedPtr value)
 Sets the value of StateManagerProperty. More...
 
float getWidth () const
 Gets the value of WidthProperty. More...
 
void setWidth (float value)
 Sets the value of WidthProperty. More...
 
float getHeight () const
 Gets the value of HeightProperty. More...
 
void setHeight (float value)
 Sets the value of HeightProperty. More...
 
float getDepth () const
 Gets the value of DepthProperty. More...
 
void setDepth (float value)
 Sets the value of DepthProperty. More...
 
float getActualWidth () const
 Gets the value of ActualWidthProperty. More...
 
void setActualWidth (float value)
 Sets the value of ActualWidthProperty. More...
 
float getActualHeight () const
 Gets the value of ActualHeightProperty. More...
 
void setActualHeight (float value)
 Sets the value of ActualHeightProperty. More...
 
float getActualDepth () const
 Gets the value of ActualDepthProperty. More...
 
void setActualDepth (float value)
 Sets the value of ActualDepthProperty. More...
 
Node::HorizontalAlignment getHorizontalAlignment () const
 Gets the value of HorizontalAlignmentProperty. More...
 
void setHorizontalAlignment (Node::HorizontalAlignment value)
 Sets the value of HorizontalAlignmentProperty. More...
 
Node::VerticalAlignment getVerticalAlignment () const
 Gets the value of VerticalAlignmentProperty. More...
 
void setVerticalAlignment (Node::VerticalAlignment value)
 Sets the value of VerticalAlignmentProperty. More...
 
Node::DepthAlignment getDepthAlignment () const
 Gets the value of DepthAlignmentProperty. More...
 
void setDepthAlignment (Node::DepthAlignment value)
 Sets the value of DepthAlignmentProperty. More...
 
Vector2 getHorizontalMargin () const
 Gets the value of HorizontalMarginProperty. More...
 
void setHorizontalMargin (Vector2 value)
 Sets the value of HorizontalMarginProperty. More...
 
Vector2 getVerticalMargin () const
 Gets the value of VerticalMarginProperty. More...
 
void setVerticalMargin (Vector2 value)
 Sets the value of VerticalMarginProperty. More...
 
Vector2 getDepthMargin () const
 Gets the value of DepthMarginProperty. More...
 
void setDepthMargin (Vector2 value)
 Sets the value of DepthMarginProperty. More...
 
Node::ContentStretch getContentStretch () const
 Gets the value of ContentStretchProperty. More...
 
void setContentStretch (Node::ContentStretch value)
 Sets the value of ContentStretchProperty. More...
 
float getOpacity () const
 Gets the value of OpacityProperty. More...
 
void setOpacity (float value)
 Sets the value of OpacityProperty. More...
 
bool isHover () const
 Returns whether the node has HoverProperty set to true. More...
 
bool isClipChildren () const
 Gets the value of ClipChildrenProperty. More...
 
void setClipChildren (bool value)
 Sets the value of ClipChildrenProperty. More...
 
- Public Member Functions inherited from kanzi::Object
AppliedStyleEntrySharedPtr applyObjectStyle (kanzi::StyleSharedPtr style)
 Applies a style to an object. More...
 
void applyObjectStyles ()
 Apply all styles for an object node. More...
 
DomaingetDomain () const
 Returns the domain the object belongs to. More...
 
const MetaclassgetDynamicMetaclass () const override
 Returns the metaclass of the dynamic type of the object. More...
 
MainLoopSchedulergetMainLoopScheduler () const
 Returns the MainLoopScheduler instance of the associated Domain. More...
 
detail::MessageDispatcher * getMessageDispatcher () const
 Returns the message dispatcher of the object. More...
 
ResourceManagergetResourceManager () const
 Returns the resource manager of the object. More...
 
ScriptingContextSharedPtr getScriptingContext () const
 Gets the scripting context of the object. More...
 
 Object (Domain *domain)
 
void setScriptingContext (ScriptingContextSharedPtr context)
 Sets the scripting context of the object. More...
 
void unapplyObjectStyle (AppliedStyleEntrySharedPtr appliedStyleEntry)
 
void unapplyObjectStyles ()
 Unapplies and removes all applied styles. More...
 
 ~Object () override
 
- Public Member Functions inherited from kanzi::MetaObject
bool isTypeOf (const Metaclass *objectType) const
 Determines if the type of this object is the given type or derived from it. More...
 
virtual ~MetaObject ()
 
- Public Member Functions inherited from kanzi::PropertyObject
template<typename DataType >
void addPropertyModifier (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::ModifierCallback callback, void *owner)
 
template<typename DataType >
void addPropertyModifierWithoutNotifyingHandlers (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::ModifierCallback callback, void *owner)
 Adds a property modifier without notifying handlers. More...
 
template<typename DataType >
void addPropertyNotificationHandler (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::NotificationCallback callback, void *owner)
 
template<typename DataType >
void addPropertyValueSource (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::TypedValueSource *valueSource, PropertyValuePrecedence precedence, void *ownerPointer)
 
template<typename DataType >
void addPropertyValueSource (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::TypedValueSource *valueSource, PropertyValuePrecedence precedence, AbstractPropertyTypeDescriptor::ValueSourceOwner *owner)
 
PropertyStorageContainer::iterator beginPropertyStorage ()
 Returns the begin iterator to the internal property storage container. More...
 
PropertyStorageContainer::const_iterator beginPropertyStorage () const
 Returns the begin iterator to the internal property storage container. More...
 
void clearPropertyFlag (AbstractPropertyType propertyType, uint32_t flag)
 
void copyLocalValue (const PropertyObject &other, AbstractPropertyType propertyType)
 Copies local value of single property from another object. More...
 
void copyLocalValues (const PropertyObject &other)
 Copies all local values from another object. More...
 
PropertyStorageContainer::iterator endPropertyStorage ()
 Returns the end iterator to the internal property storage container. More...
 
PropertyStorageContainer::const_iterator endPropertyStorage () const
 Returns the end iterator to the internal property storage container. More...
 
template<typename DataType >
PropertyType< DataType >::Traits::ReturnType getAbstractProperty (AbstractPropertyType abstractPropertyType) const
 
template<typename DataType >
PropertyType< DataType >::Traits::ReturnType getAbstractPropertyBase (AbstractPropertyType abstractPropertyType) const
 
template<typename DataType >
optional< typename PropertyType< DataType >::Traits::ReturnType > getOptionalAbstractProperty (AbstractPropertyType abstractPropertyType) const
 
template<typename DataType >
optional< typename PropertyType< DataType >::Traits::ReturnType > getOptionalProperty (const PropertyType< DataType > &propertyType) const
 Evaluates the property value in the same way as the overload above but does not default to the value in property metadata if there are no inputs to the property value. More...
 
template<typename DataType >
optional< typename PropertyType< DataType >::Traits::ReturnType > getOptionalPropertyBase (const PropertyType< DataType > &propertyType) const
 Returns the current value of a property disregarding modifiers, but does not default to the value in property metadata if there are no inputs to the property value. More...
 
template<typename DataType >
PropertyType< DataType >::Traits::ReturnType getProperty (const PropertyType< DataType > &propertyType) const
 Returns the current value of a property type. More...
 
template<typename DataType >
PropertyType< DataType >::Traits::ReturnType getPropertyBase (const PropertyType< DataType > &propertyType) const
 Returns the current value of a property disregarding modifiers. More...
 
template<typename DataType >
size_t getPropertyNotificationHandlerCount (const PropertyType< DataType > &propertyType) const
 Gets number of current notification handlers for given property type. More...
 
bool hasBaseValue (AbstractPropertyType propertyType) const
 Evaluates whether there are any inputs into the property value, disregarding modifiers. More...
 
bool hasLocalValue (AbstractPropertyType propertyType) const
 Evaluates whether there is a local value set for the property. More...
 
bool hasNonClassValue (AbstractPropertyType propertyType) const
 Evaluates whether there is a value of any precedence higher than class default value set for the property. More...
 
bool hasValue (AbstractPropertyType propertyType) const
 Evaluates whether there are any inputs into the property value. More...
 
bool isPropertyFlagSet (AbstractPropertyType propertyType, uint32_t flag) const
 
 PropertyObject ()
 
void removeKzbProperties (flat_set< AbstractPropertyType > *keepProperties)
 Remove all KZB properties that are not included in a given set. More...
 
void removeKzbProperties ()
 Remove all KZB properties. More...
 
template<typename DataType >
void removeLocalPropertyValueSource (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::TypedValueSource *valueSource, void *ownerPointer)
 
void removeLocalValue (AbstractPropertyType propertyType)
 Removes the local value associated with the property. More...
 
template<typename DataType >
void removePropertyModifier (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::ModifierCallback callback, void *owner)
 
template<typename DataType >
void removePropertyNotificationHandler (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::NotificationCallback callback, void *owner)
 
template<typename DataType >
void removePropertyValueSource (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::TypedValueSource *valueSource, void *ownerPointer)
 
template<typename DataType >
void setAbstractProperty (AbstractPropertyType abstractPropertyType, typename PropertyType< DataType >::Traits::ParameterType value)
 
template<typename DataType >
void setProperty (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Traits::ParameterType value)
 Sets the local value of a property type. More...
 
void setPropertyFlag (AbstractPropertyType propertyType, uint32_t flag)
 
KZ_DEPRECATED void validatePropertyModifiers (AbstractPropertyType propertyType)
 Validates property modifiers and notifies handlers. More...
 
void validatePropertyModifiersAndNotifyHandlers (AbstractPropertyType propertyType)
 Validates property modifiers and notifies handlers. More...
 
virtual ~PropertyObject ()
 
- Public Member Functions inherited from kanzi::BindingHostConceptImpl< Node >
void addBindingRuntime (AbstractBindingRuntimeSharedPtr entry, shared_ptr< void > owner)
 Adds an already-created binding runtime to this binding host. More...
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding, shared_ptr< Node > templateRoot, AbstractPropertyType propertyType, PropertyField field, PropertyValuePrecedence precedence)
 Wrapper for setting a binding. More...
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding, shared_ptr< Node > templateRoot, AbstractPropertyType propertyType, PropertyField field)
 Wrapper for setting a binding. More...
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding, shared_ptr< Node > templateRoot, AbstractPropertyType propertyType, PropertyValuePrecedence precedence)
 Wrapper for setting a binding. More...
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding, AbstractPropertyType propertyType, PropertyField field, PropertyValuePrecedence precedence)
 Wrapper for setting a binding. More...
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding, AbstractPropertyType propertyType, PropertyField field)
 Wrapper for setting a binding. More...
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding, AbstractPropertyType propertyType, PropertyValuePrecedence precedence)
 Wrapper for setting a binding. More...
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding, AbstractPropertyType propertyType)
 Wrapper for setting a binding. More...
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding, shared_ptr< Node > templateRoot)
 Sets a binding with no target. More...
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding)
 Wrapper for setting a binding with no target. More...
 
BindingRuntimeHandle setBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner, shared_ptr< Node > templateRoot, AbstractPropertyType propertyType, PropertyField field, PropertyValuePrecedence precedence)
 Sets a binding to a certain property. More...
 
BindingRuntimeHandle setBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner, AbstractPropertyType propertyType, PropertyField field, PropertyValuePrecedence precedence)
 Wrapper for setting a binding with owner. More...
 
BindingRuntimeHandle setBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner, AbstractPropertyType propertyType)
 Wrapper for setting a binding with owner. More...
 
BindingRuntimeHandle setBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner, shared_ptr< Node > templateRoot)
 Sets a binding with no target. More...
 
BindingRuntimeHandle setBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner)
 Wrapper for setting a binding with no target. More...
 
BindingRuntimeHandle setModifierBinding (AbstractBindingSharedPtr binding, shared_ptr< Node > templateRoot, AbstractPropertyType propertyType, PropertyField field)
 Wrapper for setting a modifier binding. More...
 
BindingRuntimeHandle setModifierBinding (AbstractBindingSharedPtr binding, AbstractPropertyType propertyType, PropertyField field)
 Wrapper for setting a modifier binding. More...
 
BindingRuntimeHandle setModifierBinding (AbstractBindingSharedPtr binding, AbstractPropertyType propertyType)
 Wrapper for setting a modifier binding. More...
 
BindingRuntimeHandle setModifierBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner, shared_ptr< Node > templateRoot, AbstractPropertyType propertyType, PropertyField field)
 Sets a modifier binding. More...
 
BindingRuntimeHandle setModifierBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner, AbstractPropertyType propertyType, PropertyField field)
 Wrapper for setting a modifier binding. More...
 
BindingRuntimeHandle setModifierBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner, AbstractPropertyType propertyType)
 Wrapper for setting a modifier binding. More...
 
- Public Member Functions inherited from kanzi::BindingHostConcept
BindingRuntimeConstIterator beginBindingRuntimes () const
 Returns an iterator to the beginning of binding runtimes. More...
 
BindingRuntimeConstIterator endBindingRuntimes () const
 Returns an iterator to the end of binding runtimes. More...
 
AbstractBindingRuntimeSharedPtr getBindingRuntime (size_t idx)
 Gets binding by index. More...
 
size_t getBindingRuntimeCount () const
 Gets the number of binding runtimes added to this node. More...
 
void removeAllBindings ()
 Removes all binding runtimes. More...
 
void removeBinding (BindingRuntimeHandle &bindingRuntime)
 Removes a binding runtime added earlier. More...
 
void removeBindingsWithOwner (shared_ptr< void > owner)
 Removes all binding runtimes with the specified owner. More...
 
- Public Member Functions inherited from kanzi::ActivityElement
vector< NodeSharedPtr >::const_iterator beginChildHosts () const
 Returns the begin iterator to the registered child Activity Host. More...
 
virtual void deserialize (string_view data)
 Deserializes the activity element from a byte buffer. More...
 
vector< NodeSharedPtr >::const_iterator endChildHosts () const
 Returns the end iterator to the registered child Activity Host. More...
 
NodefindChildHost (string_view hostName)
 Finds a child Activity Host by name. More...
 
vector< string > getCommands () const
 Gets the list of commands handled by code behind of this activity element. More...
 
ActivityHistoryManagergetHistoryManager () const
 Gets the history manager of this activity element. More...
 
ActivityElementgetParentElement ()
 Gets the parent ActivityElement type node. More...
 
bool isLeafActivityNode () const
 Returns whether an ActivityElement has a child Activity Host. More...
 
void setCodeBehind (const Metaclass *metaclass)
 Instantiates and attaches a code behind object by specifying its metaclass. More...
 
void setCodeBehind (CodeBehindSharedPtr codeBehind)
 Attaches a code behind object. More...
 
virtual ~ActivityElement ()=default
 Destructor. More...
 
- Public Member Functions inherited from kanzi::ActivityConcept
void cancelWaitBeforeFocus ()
 Makes an Activity no longer wait for any pending activations. More...
 
optional< string > getPathToActivity (ActivityConcept *activity) const
 Returns a path from this Activity to a given Activity, if that Activity is a descendant node of this Activity. More...
 
bool isWaitingActivationsBeforeFocus () const
 Returns whether an Activity is waiting for its descendant Activities to activate before Kanzi applies the focus policy to the activated Activity. More...
 
bool isWaitingForActivation (ActivityConcept *activity) const
 Returns whether an Activity is waiting for the activation of a given Activity. More...
 
virtual ~ActivityConcept ()=default
 Destructor. More...
 
- Static Public Attributes inherited from kanzi::Node3D
static PropertyType< Matrix4x4FinalTransformationProperty
 Sets the final transformation of a 3D node. More...
 
static PropertyType< float > FrustumCullMarginProperty
 Sets the margin of the frustum cull radius of a 3D node. More...
 
static PropertyType< SRTValue3DRenderTransformationProperty
 Sets the render transformation of a 3D node. More...
 
static PropertyType< SRTValue3DLayoutTransformationProperty
 Sets the transformation of a 3D node relative to its parent node. More...
 
- Static Public Attributes inherited from kanzi::Node
static PropertyType< string > NameProperty
 Name property. More...
 
static PropertyType< string > PathProperty
 Path property. More...
 
static PropertyType< string > LocaleProperty
 Locale property. More...
 
static PropertyType< bool > CreatedFromKZBProperty
 CreatedFromKZB property. More...
 
static PropertyType< bool > HitTestableProperty
 HitTestable property. More...
 
static PropertyType< bool > HitTestableContainerProperty
 HitTestableContainer property. More...
 
static PropertyType< bool > VisibleProperty
 Visible property. More...
 
static PropertyType< bool > EnabledProperty
 Sets whether the node is enabled. More...
 
static PropertyType< bool > EffectivelyEnabledProperty
 Indicates whether the node and its ancestor nodes are enabled. More...
 
static PropertyType< bool > FocusableProperty
 Sets whether a node can get focus and can participate in the focus chain navigation. More...
 
static PropertyType< bool > FocusedProperty
 Sets whether a node is an focus node and can receive key messages. More...
 
static PropertyType< FocusStateFocusStateProperty
 Reports the focus state of a focusable node or focus scope node. More...
 
static PropertyType< ResourceSharedPtrFontFamilyProperty
 Sets the font family the node uses. More...
 
static PropertyType< float > VisibleAmountInParentProperty
 VisibleAmountInParent property. More...
 
static PropertyType< float > Projection2DTo3DScaleProperty
 Projection2DTo3DScale property. More...
 
static PropertyType< ResourceSharedPtrStyleProperty
 Style property. More...
 
static PropertyType< ResourceSharedPtrStateManagerProperty
 StateManager property. More...
 
static PropertyType< void * > PrefabTemplateSourceProperty
 PrefabTemplateSource property. More...
 
static PropertyType< float > WidthProperty
 Width property. More...
 
static PropertyType< float > HeightProperty
 Height property. More...
 
static PropertyType< float > DepthProperty
 Depth property. More...
 
static PropertyType< float > ActualWidthProperty
 ActualWidth property. More...
 
static PropertyType< float > ActualHeightProperty
 ActualHeight property. More...
 
static PropertyType< float > ActualDepthProperty
 ActualDepth property. More...
 
static PropertyType< Node::HorizontalAlignmentHorizontalAlignmentProperty
 HorizontalAlignment property. More...
 
static PropertyType< Node::VerticalAlignmentVerticalAlignmentProperty
 VerticalAlignment property. More...
 
static PropertyType< Node::DepthAlignmentDepthAlignmentProperty
 DepthAlignment property. More...
 
static PropertyType< Vector2HorizontalMarginProperty
 Sets the horizontal space between this node and other nodes that are adjacent to this node in a layout. More...
 
static PropertyType< Vector2VerticalMarginProperty
 Sets the vertical space between this node and other nodes that are adjacent to this node in a layout. More...
 
static PropertyType< Vector2DepthMarginProperty
 Sets the space in the depth direction between this node and other nodes that are adjacent to this node in a layout. More...
 
static PropertyType< Node::ContentStretchContentStretchProperty
 ContentStretch property. More...
 
static PropertyType< float > OpacityProperty
 Opacity property. More...
 
static PropertyType< bool > HoverProperty
 Kanzi updates the HoverProperty for a hit testable node to indicate whether the node is the foremost node under the cursor. More...
 
static PropertyType< bool > ClipChildrenProperty
 ClipChildren property. More...
 
static PropertyType< int > SceneGraphAddNodeChangeChildFlagsProperty
 SceneGraphAddNodeChangeChildFlags property. More...
 
static PropertyType< int > SceneGraphAddNodeChangeParentFlagsProperty
 SceneGraphAddNodeChangeParentFlags property. More...
 
static PropertyType< int > SceneGraphRemoveNodeChangeChildFlagsProperty
 SceneGraphRemoveNodeChangeChildFlags property. More...
 
static PropertyType< int > SceneGraphRemoveNodeChangeParentFlagsProperty
 SceneGraphRemoveNodeChangeParentFlags property. More...
 
- Static Public Attributes inherited from kanzi::ContentLayoutConcept
static PropertyType< Vector2HorizontalPaddingProperty
 Sets the padding spaces between the content and the left and right boundaries of a Content Layout node. More...
 
static PropertyType< Vector2VerticalPaddingProperty
 Sets the padding spaces between the content and the top and bottom boundaries of a Content Layout node. More...
 
static PropertyType< Vector2DepthPaddingProperty
 Sets the padding spaces between the content and the front and back boundaries of a Content Layout 3D node. More...
 
- Static Public Attributes inherited from kanzi::ActivityElement
static PropertyType< bool > AttachedProperty
 
static PropertyType< bool > PreserveHistoryProperty
 Enables the preservation of Activity property values when that Activity becomes inactive. More...
 
- Static Public Attributes inherited from kanzi::ActivityConcept
static NodeWeakPtr s_activationTargetActivity
 The Activity that is the activation target. More...
 
static PropertyType< StatusStatusProperty
 Specifies the status of this Activity. More...
 
static PropertyType< float > DummyStateManagerProperty
 Lack of a queuing mechanism for incoming messages from an Activity Host can cause Kanzi to enter a recursive call in the setProperty(). More...
 
static PropertyType< bool > ActivatedByActivationModifierProperty
 Specifies whether the activation of an Activity is requested by modifier bindings callbacks of an ApplyAction of a DataTrigger. More...
 
static PropertyType< bool > SaveLastFocusedNodeProperty
 Indicates whether to serialize the last focused child node of a focus scope Activity and restore the focus on deserialization. More...
 
static MessageType< StatusChangedMessageArgumentsStatusChangedMessage
 Subscribe to this message to receive notifications when the ActivityConcept::Status of this Activity changes. More...
 
static MessageType< ActivityMessageArgumentsActivityActivatingMessage
 Subscribe to this message to receive notifications when this Activity is in the activating state. More...
 
static MessageType< ActivityMessageArgumentsActivityActivatedMessage
 Subscribe to this message to receive notifications when this Activity is activated. More...
 
static MessageType< ActivityMessageArgumentsActivityDeactivatingMessage
 Subscribe to this message to receive notifications when this Activity is in the deactivating state. More...
 
static MessageType< ActivityMessageArgumentsActivityDeactivatedMessage
 Subscribe to this message to receive notifications when this Activity is deactivated. More...
 
static MessageType< StartActivationInternalMessageArgumentsStartActivationInternalMessage
 Internal message sent by an Activity Host to the Activity to initialize the resources of the Activity. More...
 
static MessageType< ActivityInternalMessageArgumentsStartDeactivationInternalMessage
 Internal message sent by an Activity Host to the Activity to deactivate the Activity. More...
 
static MessageType< StatusChangedInternalMessageArgumentsReadyForActivationAnimationInternalMessage
 Internal message sent by the Activity to its parent Activity Host when the Activity has finished initializing its resources. More...
 
static MessageType< ActivityInternalMessageArgumentsStartParallelActivatingAnimationInternalMessage
 Internal message sent by an Activity Host to the Activity to start the parallel activation animation of the Activity. More...
 
static MessageType< StatusChangedInternalMessageArgumentsFinishedParallelActivatingAnimationInternalMessage
 Internal message sent by the Activity to its parent Activity Host when the Activity has finished the parallel activation animation of the Activity. More...
 
static MessageType< ActivityInternalMessageArgumentsStartExclusiveActivatingAnimationInternalMessage
 Internal message sent by an Activity Host to the Activity to start the exclusive activation animation of the Activity. More...
 
static MessageType< ActivityInternalMessageArgumentsStartExclusiveDeactivatingAnimationInternalMessage
 Internal message sent by an Activity Host to the Activity to start the exclusive deactivation animation of the Activity. More...
 
static MessageType< StatusChangedInternalMessageArgumentsFinishedExclusiveDeactivatingAnimationInternalMessage
 Internal message sent by the Activity to its parent Activity Host when the Activity has finished the exclusive deactivation animation of the Activity. More...
 
static MessageType< ActivityInternalMessageArgumentsStartParallelDeactivatingAnimationInternalMessage
 Internal message sent by an Activity Host to the Activity to start the parallel deactivation animation of the Activity. More...
 
static MessageType< StatusChangedInternalMessageArgumentsFinishedParallelDeactivatingAnimationInternalMessage
 Internal message sent by the Activity to its parent Activity Host when the Activity has finished the parallel deactivation animation of the Activity. More...
 
- Protected Types inherited from kanzi::Object
typedef vector< AppliedStyleEntrySharedPtrAppliedStyleContainer
 Applied style container. More...
 
- Static Protected Member Functions inherited from kanzi::ActivityConceptImpl< ContentLayout3D, Activity3D >
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 
- Static Protected Member Functions inherited from kanzi::Node
static VisitorResult applyStylesVisitor (Node &node, bool apply)
 
static VisitorResult attachVisitor (Node &node)
 
static VisitorResult detachVisitor (Node &node)
 
static bool processPropertyChanged (Node &node, AbstractPropertyType propertyType, const PropertyStoragePtr &nodePropertyStorage, AbstractPropertyTypeDescriptor::PropertyStorage *changedPropertyStorage, PropertyNotificationReason reason)
 Processes notification handlers for node and property storage. More...
 
static VisitorResult propertyChangedVisitor (Node &node, AbstractPropertyType propertyType, AbstractPropertyTypeDescriptor::PropertyStorage *propertyStorage, PropertyNotificationReason reason)
 
static VisitorResult updateAllResourcesVisitor (Node &node)
 
static VisitorResult updateResourceVisitor (Node &node, const ResourceID &id)
 
static VisitorResult validateDrawVisitor (Node &node)
 Visitor for validating draw. More...
 
- Protected Attributes inherited from kanzi::Object
AppliedStyleContainer m_appliedStyles
 Listing of applied styles applied to this object. More...
 
- Protected Attributes inherited from kanzi::BindingHostConcept
BindingRuntimeContainer m_bindingRuntimes
 Bindings in this object. More...
 
- Protected Attributes inherited from kanzi::ActivityConcept
vector< string > m_pendingActivationsBeforeFocus
 The paths of the activating Activities that this Activity is waiting to be activated. More...
 

Detailed Description

An Activity is a part of application UI that is responsible for a task.

For example, a media player application can have Activity nodes, such as radio, music player, and AUX. However, an Activity can also be a smaller task, such as an Activity for the popup volume indicator that appears only when the user changes the volume in a media player. An Activity can be visual, but does not have to be. For example, an Activity that is visual can instantiate a prefab to show a popup window, while an Activity that is not visual can be music playback which plays music in the background regardless of other Activity nodes.

Application UI structure and navigation

The Activity, Data-Driven Exclusive Activity Host, Exclusive Activity Host, and Parallel Activity Host nodes together enable you to create the UI that user can navigate in your application. You implement the navigation as a reaction to user interaction or changes to data coming to the application, by activating and deactivating Activity nodes to switch application views and to show different application layers, such as popup windows. That way you can control which parts of your application UI the user can see and interact with.

Use the Activity, Data-Driven Exclusive Activity Host, Exclusive Activity Host, and Parallel Activity Host nodes to form the navigation graph. Activity nodes define the content elements and the Activity Host nodes define the navigation pattern in your application UI. In each Activity Host node, use Activity nodes to create UI content within applications that an Activity Host represents. When you use these nodes in your application, you navigate application UI by sending to the Activity Host node the address of the Activity node to which you want to navigate. For example, with Activity Host and Activity nodes you can organize your UI to show a different views in your application, such as media player, contacts, and phone view, and to show content in popup windows.

Use Activity Host nodes to activate and deactivate Activity nodes:

  • When an Activity node is active, the Activity prefab is attached to the node tree, is visible, and the user can interact with its content.
  • When an Activity node is inactive, the Activity prefab is not attached to the node tree, is not visible, and the user cannot interact with its content.

The Activity and Activity Host nodes inherit from the ContentLayout class to lay out their content like a Content Layout node. See ContentLayout2D and ContentLayout3D.

See ParallelActivityHost2D, ParallelActivityHost3D, ExclusiveActivityHost2D, and ExclusiveActivityHost3D.

Status management of Activity nodes

Each Activity node has the Status property that indicates the status of that Activity. When an Activity becomes active or inactive, the Status property changes and in your application you can react to these changes. You can use the Is Initially Active property to set which Activity node in an Exclusive Activity Host or Parallel Activity Host node is active at application startup. However, only one Activity node can be active at a time in a Data-Driven Exclusive Activity Host and Exclusive Activity Host nodes.

When one Activity node (Activity A) is active and you decide to activate another Activity node (Activity B), this is how the Activity status changes:

  1. Activity A goes to exclusive deactivation and, if content of the Activity B prefab is not yet loaded, Activity Host node gets a request to load the Activity B prefab and asynchronously load the content of the Activity B prefab.
  2. When the Activity B prefab is loaded, Activity A goes to parallel deactivation. Once Kanzi loads the content of the Activity B prefab, Kanzi instantiates the Activity B prefab and goes into parallel activation.
  3. Activity A becomes inactive. Kanzi virtualizes the properties of Activity A.
  4. Activity B goes to exclusive activation.

Programming

See Code behind.

Creating transitions between Activity nodes

You can create transitions for status changes of Activity nodes.

To create transitions between Activity nodes:

  1. Create a state manager and set its Controller Property to the Status property.
  2. In Activity nodes set the Status Manager property to the state manager that you created in the previous step.
  3. Create the states that map to the different statuses of Activity nodes.
  4. In the state manager define the transitions that you want to use.

Data and logic programming of Activity nodes

For each Activity node you can define properties that are specific to that Activity node. For example, Activity node for a music player can switch music on and off, or change the volume level.

When you create a property for an Activity node, set the namespace of that property to ActivityProperty. You can create properties with int, bool, float, and enum data types. If you use code behind for an Activity, Kanzi adds the properties of that Activity to the code behind.

The values of these properties implement the state machine and logic of your Kanzi application, which is why Kanzi preserves the values of these properties even when an Activity is virtual. When Kanzi virtualizes an Activity, it serializes the properties of that Activity and when Kanzi devirtualizes that Activity, it deserializes the state of that Activity and restores its property values.

Code behind

Code behind is a workflow where you associate code with an instance of an Activity instead of a type. In Kanzi Studio in the Activity Browser window, you can generate a code behind stub for any Activity node. This stub is associated with that particular Activity and has access to the properties of that Activity. In code behind you can write code that you can associate with the view or controller parts of the model-view-controller pattern. For example, you can:

  • React to Activity status changes.
  • Connect to a remote service when the Activity is activated and save data and disconnect when an Activity is deactivated.
  • Install Kanzi command handlers and define their implementations, such as increase the volume when the user presses a button.
  • Implement complex UI interaction, such as drag-and-drop of data between UI elements.
  • React to changes of status of an Activity.

Virtualization

The main goal of Activity virtualization is to enable you to manage the memory consumption in your application. The navigation graph of the entire application can be large, which is why loading and keeping in memory the UI and assets of an application at all times is rarely feasible. When either an Exclusive Activity Host or Parallel Activity Host node is available, all the child Activity nodes of that Activity Host node are available so that you can activate them. However, only the content of the Activity nodes that you activate is loaded and visible, because only a part of the UI is needed at a time. You can configure each Activity prefab how you want to manage the memory it consumes.

When you activate a visual Activity, the Activity Host of that Activity dynamically loads the prefab and asynchronously loads the content of the prefab of that Activity. When an Activity is not active, that Activity prefab is not attached to the node tree.

Member Typedef Documentation

Activity 3D concept used to implement this class.

Constructor & Destructor Documentation

kanzi::Activity3D::Activity3D ( Domain domain,
string_view  name 
)
explicitprotected

Constructor.

Parameters
domainThe domain the new node belongs to.
nameThe name of the node.

Member Function Documentation

static Activity3DSharedPtr kanzi::Activity3D::create ( Domain domain,
string_view  name 
)
static

Creates a 3D activity node.

Parameters
domainThe domain the new node belongs to.
nameThe name of the node.
static PropertyTypeEditorInfoSharedPtr kanzi::Activity3D::makeEditorInfo ( )
static

The documentation for this class was generated from the following file: