Kanzi  3.9.4
Kanzi Engine API
kanzi::Node Class Referenceabstract

Base class for Kanzi nodes. More...

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

Inheritance diagram for kanzi::Node:
[legend]

Classes

class  MessageSubscriptionToken
 Message subscription token for nodes. More...
 
struct  NodeComponentEntry
 Object node component entry. More...
 

Public Types

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 Member Functions

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 the resource dictionary of the node. More...
 
virtual bool addAbstractChildOverride (NodeSharedPtr child)=0
 
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)
 Add a nested resource dictionary to the resource dictionary of the 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 an object node and its children recursively. 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...
 
virtual size_t getAbstractChildCountOverride ()=0
 
virtual size_t getAbstractChildIndexOverride (const Node &node)=0
 
virtual NodeSharedPtr getAbstractChildOverride (size_t index)=0
 
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...
 
FocusScopegetFocusScopeInfo () const
 Returns the information about the focus scope for a node. 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
 Gets the resource dictionary of the node, if the node has one. 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 and its ancestor focus scope nodes are 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...
 
virtual bool moveAbstractChildToPositionOverride (NodeSharedPtr child, size_t index)=0
 Moves a child node to a given position in the list of child nodes. More...
 
void notifyResourceDictionaryModified ()
 Forces the re-evaluation of resource IDs in a node tree. More...
 
virtual bool removeAbstractChildOverride (Node &child)=0
 
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 the node. 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...
 
- 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 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)
 
void validatePropertyModifiers (AbstractPropertyType propertyType)
 
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...
 
AbstractBindingRuntimeSharedPtr setBinding (AbstractBindingSharedPtr binding, shared_ptr< Node > templateRoot, AbstractPropertyType propertyType, PropertyField field, PropertyValuePrecedence precedence)
 Wrapper for setting a binding. More...
 
AbstractBindingRuntimeSharedPtr setBinding (AbstractBindingSharedPtr binding, shared_ptr< Node > templateRoot, AbstractPropertyType propertyType, PropertyField field)
 Wrapper for setting a binding. More...
 
AbstractBindingRuntimeSharedPtr setBinding (AbstractBindingSharedPtr binding, shared_ptr< Node > templateRoot, AbstractPropertyType propertyType, PropertyValuePrecedence precedence)
 Wrapper for setting a binding. More...
 
AbstractBindingRuntimeSharedPtr setBinding (AbstractBindingSharedPtr binding, AbstractPropertyType propertyType, PropertyField field, PropertyValuePrecedence precedence)
 Wrapper for setting a binding. More...
 
AbstractBindingRuntimeSharedPtr setBinding (AbstractBindingSharedPtr binding, AbstractPropertyType propertyType, PropertyField field)
 Wrapper for setting a binding. More...
 
AbstractBindingRuntimeSharedPtr setBinding (AbstractBindingSharedPtr binding, AbstractPropertyType propertyType, PropertyValuePrecedence precedence)
 Wrapper for setting a binding. More...
 
AbstractBindingRuntimeSharedPtr setBinding (AbstractBindingSharedPtr binding, AbstractPropertyType propertyType)
 Wrapper for setting a binding. More...
 
AbstractBindingRuntimeSharedPtr setBinding (AbstractBindingSharedPtr binding, shared_ptr< Node > templateRoot)
 Sets a binding with no target. More...
 
AbstractBindingRuntimeSharedPtr setBinding (AbstractBindingSharedPtr binding)
 Wrapper for setting a binding with no target. More...
 
AbstractBindingRuntimeSharedPtr 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...
 
AbstractBindingRuntimeSharedPtr setBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner, AbstractPropertyType propertyType, PropertyField field, PropertyValuePrecedence precedence)
 Wrapper for setting a binding with owner. More...
 
AbstractBindingRuntimeSharedPtr setBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner, AbstractPropertyType propertyType)
 Wrapper for setting a binding with owner. More...
 
AbstractBindingRuntimeSharedPtr setBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner, shared_ptr< Node > templateRoot)
 Sets a binding with no target. More...
 
AbstractBindingRuntimeSharedPtr setBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner)
 Wrapper for setting a binding with no target. More...
 
AbstractBindingRuntimeSharedPtr setModifierBinding (AbstractBindingSharedPtr binding, shared_ptr< Node > templateRoot, AbstractPropertyType propertyType, PropertyField field)
 Wrapper for setting a modifier binding. More...
 
AbstractBindingRuntimeSharedPtr setModifierBinding (AbstractBindingSharedPtr binding, AbstractPropertyType propertyType, PropertyField field)
 Wrapper for setting a modifier binding. More...
 
AbstractBindingRuntimeSharedPtr setModifierBinding (AbstractBindingSharedPtr binding, AbstractPropertyType propertyType)
 Wrapper for setting a modifier binding. More...
 
AbstractBindingRuntimeSharedPtr setModifierBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner, shared_ptr< Node > templateRoot, AbstractPropertyType propertyType, PropertyField field)
 Sets a modifier binding. More...
 
AbstractBindingRuntimeSharedPtr setModifierBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner, AbstractPropertyType propertyType, PropertyField field)
 Wrapper for setting a modifier binding. More...
 
AbstractBindingRuntimeSharedPtr 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 (AbstractBindingRuntime &bindingRuntime)
 Removes a binding runtime added earlier. More...
 
void removeBindingsWithOwner (shared_ptr< void > owner)
 Removes all binding runtimes with the specified owner. More...
 

Static Public Member Functions

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...
 

Protected Member Functions

void attach ()
 Attaches the object node. More...
 
void detach ()
 Detaches the object node. More...
 
virtual NodeSharedPtr findAbstractChildOverride (string_view name)=0
 
void initialize ()
 Node-specific initialization. More...
 
 Node (Domain *domain, string_view name)
 Constructor. More...
 
void notifyPropertyHandlers (PropertyStoragePtr &propertyStorage, PropertyNotificationReason reason) override
 
virtual void onAttached ()
 Called when an object node becomes attached. More...
 
virtual void onDetached ()
 Called when an object node becomes detached. More...
 
virtual void onNodePropertyChanged (AbstractPropertyType propertyType, PropertyNotificationReason reason)
 Method executed on node property change. More...
 
virtual void updateFocusScopeInfo (FocusScopePtr &nodeScopeInfo)
 Updates the overlay scope information that is attached to the root node of an overlay scope. 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)
 
virtual VisitorResult visitAbstractChildOverride (const Visitor &visitor, VisitorOrder order)=0
 
- 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)
 
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 validatePropertyModifiersAndNotifyHandlers (PropertyStoragePtr &propertyStorage)
 
- Protected Member Functions inherited from kanzi::BindingHostConceptImpl< Node >
BindingTargetRuntimePtr createModifierBindingTarget (shared_ptr< Node > templateRoot, AbstractPropertyType propertyType, PropertyField field)
 Creates a property modifier binding target for given combination of property type and field. More...
 
BindingTargetRuntimePtr createValueSourceBindingTarget (shared_ptr< Node > templateRoot, AbstractPropertyType propertyType, PropertyField field, PropertyValuePrecedence precedence, bool reuseAllowed)
 Creates a value source binding target for given combination of property type and field. More...
 
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...
 

Static Protected Member Functions

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...
 

Friends

class InputManager
 

Properties

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 keyboard 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...
 
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...
 

Additional Inherited Members

- Protected Types inherited from kanzi::Object
typedef vector< AppliedStyleEntrySharedPtrAppliedStyleContainer
 Applied style container. 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...
 

Detailed Description

Base class for Kanzi nodes.

Kanzi messages

Use the interface provided by Node to dispatch messages and enable the nodes in the node tree to react to messages.

When you dispatch a message it travels in two phases: first tunneling, then bubbling. During the tunneling phase the message travels from the root node to the node where the message originated. From there the message bubbles back to the root node.

When you want a node to react to a message when that message passes, add message handlers or filters to those nodes. A message filter intercepts messages from any node while a message handler listens only to messages from a specific source node. To register message handlers and filters that react to:

To remove all types of handlers and filters use Node::removeMessageHandler().

To dispatch a single message, use Node::dispatchMessage().

Examples

To define a simple example node, one message type, two callbacks which are suitable for message handlers and a counting mechanism to verify the callback invocations:

// Counts how many times the callbacks are invoked to verify that the calls occur.
static int callCount = 0;
// Define an example node, which presents a message type and a callback method.
class ExampleNode : public EmptyNode2D
{
public:
// An example message type.
static MessageType<MessageArguments> exampleMessageType;
// Create the node.
static ExampleNodeSharedPtr create(Domain* domain, string_view name)
{
ExampleNodeSharedPtr node = make_polymorphic_shared_ptr<EmptyNode2D>(new ExampleNode(domain, name));
node->initialize();
return node;
}
// An example callback method.
void exampleNodeCallback(MessageArguments& message)
{
// To let the message continue moving in the node tree, set the message to not handled.
message.setHandled(false);
++callCount;
}
private:
// Construct the node.
explicit ExampleNode(Domain* domain, string_view name) :
EmptyNode2D(domain, name)
{
}
};
// An example callback function.
void exampleCallback(MessageArguments& message)
{
message.setHandled(false);
++callCount;
}
// The message type definition.
MessageType<MessageArguments> ExampleNode::exampleMessageType(kzMakeFixedString("ExampleNode.exampleMessageType"), nullptr);

To add a handler that consumes the messages sent by the node itself with Node::addMessageHandler():

// Initialize a node.
ExampleNodeSharedPtr node = ExampleNode::create(domain, "node");
// Add a message handler that intercepts messages dispatched from the node itself.
Node::MessageSubscriptionToken token = node->addMessageHandler(ExampleNode::exampleMessageType, &exampleCallback);

To remove the handler with Node::removeMessageHandler():

// Remove the handler that intercepts messages dispatched from the node itself.
node->removeMessageHandler(token);

To add a bubbling handler with Node::addMessageHandler():

// Initialize a child node.
EmptyNode2DSharedPtr child = EmptyNode2D::create(domain, "child");
// Set the node you created earlier to be the parent of the child node.
node->addChild(child);
// Add a bubbling message handler that accepts messages from the child node.
Node::MessageSubscriptionToken bubblingToken = node->addMessageHandler(ExampleNode::exampleMessageType, function<void(MessageArguments&)>(&exampleCallback), child.get());

To remove a bubbling handler with Node::removeMessageHandler():

// Remove the bubbling handler.
node->removeMessageHandler(bubblingToken);

To add a tunneling filter with Node::addTunnelingFilter():

// Add a message filter that intercepts tunneling messages.
Node::MessageSubscriptionToken tunnelingToken = node->addTunnelingFilter(ExampleNode::exampleMessageType, node.get(), &ExampleNode::exampleNodeCallback);

To remove a tunneling filter with Node::removeMessageHandler():

// Remove the tunneling filter.
node->removeMessageHandler(tunnelingToken);

To dispatch a message use Node::dispatchMessage():

// Initialize the message that you want to dispatch.
MessageArguments message;
// Dispatch the created message from the child node. If the message dispatcher has any handlers
// or filters added for ExampleNode::exampleMessageType, Kanzi invokes their callbacks immediately.
child->dispatchMessage(ExampleNode::exampleMessageType, message);

Property types

Examples

To set node properties:

// Create node and set its properties
Node3DSharedPtr objectNode;
objectNode = EmptyNode3D::create(domain, "TestNode");
objectNode->setProperty(Node::NameProperty, "NewTestNodeName");
objectNode->setProperty(Node::WidthProperty, 25);
objectNode->setProperty(Node::HorizontalMarginProperty, Vector2(5, 7));
objectNode->setProperty(Node::VisibleProperty, false);
objectNode->setProperty(Node::FontFamilyProperty, localFontFamily);
string name = objectNode->getProperty(Node::NameProperty);
float width = objectNode->getProperty(Node::WidthProperty);
Vector2 hMargin = objectNode->getProperty(Node::HorizontalMarginProperty);
bool visible = objectNode->getProperty(Node::VisibleProperty);
ResourceSharedPtr resource = objectNode->getProperty(Node::FontFamilyProperty);

To introduce new message types and use them:

template<typename ArgType>
class MyMessageArguments : public MessageArguments
{
public:
// Register message arguments class in the engine.
KZ_MESSAGE_ARGUMENTS_METACLASS_BEGIN(MyMessageArguments<ArgType>, MessageArguments, "Kanzi.TestObjectNode.MyMessageArguments<ArgType>")
static PropertyType<ArgType> ArgumentType;
};
// Construct static property types.
template<> PropertyType<int> MyMessageArguments<int>::ArgumentType(kzMakeFixedString("int argument"));
template<> PropertyType<bool> MyMessageArguments<bool>::ArgumentType(kzMakeFixedString("bool argument"));
template<> PropertyType<Vector2> MyMessageArguments<Vector2>::ArgumentType(kzMakeFixedString("Vector2 argument"));
template<> PropertyType<Matrix3x3> MyMessageArguments<Matrix3x3>::ArgumentType(kzMakeFixedString("Matrix3x3 argument"));
template<> PropertyType<Matrix4x4> MyMessageArguments<Matrix4x4>::ArgumentType(kzMakeFixedString("Matrix4x4 argument"));
class MyNode : public Node2D
{
public:
KZ_METACLASS_BEGIN(MyNode, Node2D, "Kanzi.TestObjectNode.MyNode")
// Register property types in the engine.
KZ_METACLASS_PROPERTY_TYPE(MyMessageArguments<int>::ArgumentType)
KZ_METACLASS_PROPERTY_TYPE(MyMessageArguments<bool>::ArgumentType)
KZ_METACLASS_PROPERTY_TYPE(MyMessageArguments<Vector2>::ArgumentType)
KZ_METACLASS_PROPERTY_TYPE(MyMessageArguments<Matrix3x3>::ArgumentType)
KZ_METACLASS_PROPERTY_TYPE(MyMessageArguments<Matrix4x4>::ArgumentType)
// Register message types in the engine.
KZ_METACLASS_MESSAGE_TYPE(MyVector2Message)
KZ_METACLASS_MESSAGE_TYPE(MyMatrix3x3Message)
KZ_METACLASS_MESSAGE_TYPE(MyMatrix4x4Message)
static shared_ptr<MyNode> create(Domain* domain, string_view name)
{
shared_ptr<MyNode> node = shared_ptr<MyNode>(new MyNode(domain, name));
node->initialize();
return node;
}
void onAttached() override
{
// Register handler for each message.
// Message handler gets called when this object sends a message of certain type.
MessageSubscriptionToken intToken = addMessageHandler(MyIntMessage, this, &MyNode::intMessageHandler);
// Message filter gets called when any object sends a message of certain type.
addMessageFilter(MyIntMessage, this, &MyNode::intMessageFilter);
MessageSubscriptionToken boolToken = addMessageHandler(MyBoolMessage, this, &MyNode::boolMessageHandler);
addMessageFilter(MyBoolMessage, this, &MyNode::boolMessageFilter);
MessageSubscriptionToken vector2Token = addMessageHandler(MyVector2Message, this, &MyNode::vector2MessageHandler);
addMessageFilter(MyVector2Message, this, &MyNode::vector2MessageFilter);
MessageSubscriptionToken matrix3x3Token = addMessageHandler(MyMatrix3x3Message, this, &MyNode::matrix3x3MessageHandler);
addMessageFilter(MyMatrix3x3Message, this, &MyNode::matrix3x3MessageFilter);
MessageSubscriptionToken matrix4x4Token = addMessageHandler(MyMatrix4x4Message, this, &MyNode::matrix4x4MessageHandler);
addMessageFilter(MyMatrix4x4Message, this, &MyNode::matrix4x4MessageFilter);
// Optional: send test messages.
MyMessageArguments<int> intMessage;
intMessage.setArgument(intMessage.ArgumentType, 123);
// Send the message. The message handler and filter are called immediately.
dispatchMessage(MyIntMessage, intMessage);
MyMessageArguments<bool> boolMessage;
boolMessage.setArgument(boolMessage.ArgumentType, true);
dispatchMessage(MyBoolMessage, boolMessage);
MyMessageArguments<Vector2> vector2Message;
vector2Message.setArgument(vector2Message.ArgumentType, Vector2(123.0f, 321.0f));
dispatchMessage(MyVector2Message, vector2Message);
MyMessageArguments<Matrix3x3> matrix3x3Message;
matrix3x3Message.setArgument(matrix3x3Message.ArgumentType, Matrix3x3());
dispatchMessage(MyMatrix3x3Message, matrix3x3Message);
MyMessageArguments<Matrix4x4> matrix4x4Message;
matrix4x4Message.setArgument(matrix4x4Message.ArgumentType, Matrix4x4());
dispatchMessage(MyMatrix4x4Message, matrix4x4Message);
assertEquals(10u, m_callCounter);
// Remove the message handlers. If this is not done, the message handler is valid until the object is destroyed.
removeMessageHandler(vector2Token);
removeMessageHandler(matrix3x3Token);
removeMessageHandler(matrix4x4Token);
}
void intMessageHandler(MyMessageArguments<int>& args)
{
assertEquals(args.getArgument(args.ArgumentType), 123);
++m_callCounter;
// Messages are marked handled by default. This allows the filter to receive it.
args.setHandled(false);
}
void intMessageFilter(MyMessageArguments<int>& args)
{
assertEquals(args.getArgument(args.ArgumentType), 123);
++m_callCounter;
}
void boolMessageHandler(MyMessageArguments<bool>& args)
{
assertTrue(args.getArgument(args.ArgumentType));
++m_callCounter;
args.setHandled(false);
}
void boolMessageFilter(MyMessageArguments<bool>& args)
{
assertTrue(args.getArgument(args.ArgumentType));
++m_callCounter;
}
void vector2MessageHandler(MyMessageArguments<Vector2>& args)
{
Vector2 argument = args.getArgument(args.ArgumentType);
assertEquals(argument[0], 123.0f);
assertEquals(argument[1], 321.0f);
++m_callCounter;
args.setHandled(false);
}
void vector2MessageFilter(MyMessageArguments<Vector2>& args)
{
Vector2 argument = args.getArgument(args.ArgumentType);
assertEquals(argument[0], 123.0f);
assertEquals(argument[1], 321.0f);
++m_callCounter;
}
void matrix3x3MessageHandler(MyMessageArguments<Matrix3x3>& args)
{
Matrix3x3 identity = Matrix3x3::createIdentity();
Matrix3x3 argument = args.getArgument(args.ArgumentType);
for (int i = 0; i < 9; ++i)
{
assertEquals(argument[i], identity[i]);
}
++m_callCounter;
args.setHandled(false);
}
void matrix3x3MessageFilter(MyMessageArguments<Matrix3x3>& args)
{
Matrix3x3 identity = Matrix3x3::createIdentity();
Matrix3x3 argument = args.getArgument(args.ArgumentType);
for (int i = 0; i < 9; ++i)
{
assertEquals(argument[i], identity[i]);
}
++m_callCounter;
}
void matrix4x4MessageHandler(MyMessageArguments<Matrix4x4>& args)
{
Matrix4x4 identity = Matrix4x4::createIdentity();
Matrix4x4 argument = args.getArgument(args.ArgumentType);
for (int i = 0; i < 16; ++i)
{
assertEquals(argument[i], identity[i]);
}
++m_callCounter;
args.setHandled(false);
}
void matrix4x4MessageFilter(MyMessageArguments<Matrix4x4>& args)
{
Matrix4x4 identity = Matrix4x4::createIdentity();
Matrix4x4 argument = args.getArgument(args.ArgumentType);
for (int i = 0; i < 16; ++i)
{
assertEquals(argument[i], identity[i]);
}
++m_callCounter;
}
static MessageType<MyMessageArguments<int> > MyIntMessage;
static MessageType<MyMessageArguments<bool> > MyBoolMessage;
static MessageType<MyMessageArguments<Vector2> > MyVector2Message;
static MessageType<MyMessageArguments<Matrix3x3> > MyMatrix3x3Message;
static MessageType<MyMessageArguments<Matrix4x4> > MyMatrix4x4Message;
private:
explicit MyNode(Domain* domain, string_view name):
Node2D(domain, name),
m_callCounter(0)
{
}
unsigned int m_callCounter;
};
// Construct static message types.
MessageType<MyMessageArguments<int> > MyNode::MyIntMessage(kzMakeFixedString("IntMessage"), nullptr);
MessageType<MyMessageArguments<bool> > MyNode::MyBoolMessage(kzMakeFixedString("BoolMessage"), nullptr);
MessageType<MyMessageArguments<Vector2> > MyNode::MyVector2Message(kzMakeFixedString("Vector2Message"), nullptr);
MessageType<MyMessageArguments<Matrix3x3> > MyNode::MyMatrix3x3Message(kzMakeFixedString("Matrix3x3Message"), nullptr);
MessageType<MyMessageArguments<Matrix4x4> > MyNode::MyMatrix4x4Message(kzMakeFixedString("Matrix4x4Message"), nullptr);

Member Typedef Documentation

◆ MessageSubscriptionTokenVector

◆ Visitor

Defines the type of the function that Kanzi executes for each node when visiting a node tree.

◆ InputManipulatorContainer

Gets the input manipulator iterator.

◆ InputManipulatorIterator

typedef InputManipulatorContainer::iterator kanzi::Node::InputManipulatorIterator

◆ InputManipulatorConstIterator

typedef InputManipulatorContainer::const_iterator kanzi::Node::InputManipulatorConstIterator

◆ NodeComponentContainer

Gets the node component iterator.

◆ NodeComponentIterator

typedef NodeComponentContainer::iterator kanzi::Node::NodeComponentIterator

◆ NodeComponentConstIterator

typedef NodeComponentContainer::const_iterator kanzi::Node::NodeComponentConstIterator

Member Enumeration Documentation

◆ HorizontalAlignment

Horizontal alignment options.

Enumerator
HorizontalAlignmentLeft 
HorizontalAlignmentRight 
HorizontalAlignmentCenter 
HorizontalAlignmentStretch 

◆ VerticalAlignment

Vertical alignment options.

Enumerator
VerticalAlignmentBottom 
VerticalAlignmentTop 
VerticalAlignmentCenter 
VerticalAlignmentStretch 

◆ DepthAlignment

Depth alignment options.

Enumerator
DepthAlignmentBack 
DepthAlignmentFront 
DepthAlignmentCenter 
DepthAlignmentStretch 

◆ ContentStretch

Content stretch option.

Enumerator
ContentStretchNone 
ContentStretchFill 

Content is displayed unstretched in the middle of area.

ContentStretchUniform 

Content encompasses full area.

ContentStretchUniformToFill 

Content stretched to fill as much of area as possible. If aspect ratios do not match, leave area undrawn.

ContentStretchRepeat 

Content stretched to fill full area. If aspect ratios do not match, clip excess area.

◆ VisitorOrder

Defines the order in which Kanzi visits the nodes in a node tree.

Enumerator
VisitorPreOrder 

When visiting the descendants of a node, Kanzi visits each node before visiting its descendants.

VisitorPostOrder 

When visiting the descendants of a node, Kanzi visits each node after visiting its descendants.

◆ VisitorResult

Defines the return type of the Node::Visitor function.

See also
Node::Visitor, visit(), visitDescendants()
Enumerator
VisitorAbort 

Returned by the visitor function to abort the visiting of a node tree.

VisitorContinue 

Returned by the visitor function to continue the visiting of a node tree.

VisitorContinueSibling 

Returned by the visitor function to continue the node tree visiting in a sibling node of the currently visited node.

Constructor & Destructor Documentation

◆ ~Node()

kanzi::Node::~Node ( )
override

Destructor.

◆ Node()

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

Constructor.

Member Function Documentation

◆ getName()

string kanzi::Node::getName ( ) const
inline

Gets the value of NameProperty.

See also
setName()

◆ setName()

void kanzi::Node::setName ( string_view  value)
inline

Sets the value of NameProperty.

See also
getName()

◆ getPath()

string kanzi::Node::getPath ( ) const
inline

Gets the value of PathProperty.

See also
setPath()

◆ setPath()

void kanzi::Node::setPath ( string  value)
inline

Sets the value of PathProperty.

See also
getPath()

◆ getLocale()

string kanzi::Node::getLocale ( ) const
inline

Gets the value of LocaleProperty.

See also
setLocale()

◆ setLocale()

void kanzi::Node::setLocale ( string  value)
inline

Sets the value of LocaleProperty.

See also
getLocale()

◆ isHitTestable()

bool kanzi::Node::isHitTestable ( ) const
inline

Gets the value of HitTestableProperty.

See also
setHitTestable()

◆ setHitTestable()

void kanzi::Node::setHitTestable ( bool  value)
inline

Sets the value of HitTestableProperty.

See also
isHitTestable()

◆ isHitTestableContainer()

bool kanzi::Node::isHitTestableContainer ( ) const
inline

◆ setHitTestableContainer()

void kanzi::Node::setHitTestableContainer ( bool  value)
inline

◆ isVisible()

bool kanzi::Node::isVisible ( ) const
inline

Gets the value of VisibleProperty.

See also
setVisible()

◆ setVisible()

void kanzi::Node::setVisible ( bool  value)
inline

Sets the value of VisibleProperty.

See also
isVisible()

◆ isEnabled()

bool kanzi::Node::isEnabled ( ) const
inline

Returns the value of the EnabledProperty.

See also
setEnabled()

◆ setEnabled()

void kanzi::Node::setEnabled ( bool  value)
inline

Sets the value of the EnabledProperty.

See also
isEnabled()

◆ isEffectivelyEnabled()

bool kanzi::Node::isEffectivelyEnabled ( ) const
inline

Returns the value of EffectivelyEnabledProperty.

Since
Kanzi 3.9.0

◆ isFocusable()

bool kanzi::Node::isFocusable ( ) const
inline

Gets the value of the FocusableProperty.

See also
setFocusable()

◆ setFocusable()

void kanzi::Node::setFocusable ( bool  value)
inline

Sets the value of the FocusableProperty.

Parameters
valueTo enable a node to get focus and participate in focus chain navigation, set to true, otherwise false.
See also
isFocusable()

◆ isFocused()

bool kanzi::Node::isFocused ( ) const
inline

Gets the value of the FocusedProperty.

See also
setFocused()

◆ setFocused()

void kanzi::Node::setFocused ( bool  value)
inline

Sets the value of the FocusedProperty.

Parameters
valueTo set focus, set to true. To clear focus, set to false.
See also
isFocused(), FocusManager::trySetFocus()

◆ getFocusState()

FocusState kanzi::Node::getFocusState ( ) const
inline

Gets the value of the FocusStateProperty.

Returns
Focus state of the node.
Since
Kanzi 3.9.2

◆ setFocusState()

void kanzi::Node::setFocusState ( FocusState  state)
inline

Sets the value of the FocusStateProperty.

Parameters
stateFocus state of the node.
Since
Kanzi 3.9.2

◆ getFontFamily()

FontFamilySharedPtr kanzi::Node::getFontFamily ( ) const

Gets the font family the node uses.

See also
setFontFamily()
Since
Kanzi 3.8.0

◆ setFontFamily()

void kanzi::Node::setFontFamily ( FontFamilySharedPtr  value)

Sets the font family the node uses.

See also
getFontFamily()
Since
Kanzi 3.8.0

◆ getVisibleAmountInParent()

float kanzi::Node::getVisibleAmountInParent ( ) const
inline

◆ setVisibleAmountInParent()

void kanzi::Node::setVisibleAmountInParent ( float  value)
inline

◆ getProjection2DTo3DScale()

float kanzi::Node::getProjection2DTo3DScale ( ) const
inline

◆ setProjection2DTo3DScale()

void kanzi::Node::setProjection2DTo3DScale ( float  value)
inline

◆ getStyle()

ResourceSharedPtr kanzi::Node::getStyle ( ) const
inline

Gets the value of StyleProperty.

See also
setStyle()

◆ setStyle()

void kanzi::Node::setStyle ( ResourceSharedPtr  value)
inline

Sets the value of StyleProperty.

See also
getStyle()

◆ getStateManager()

ResourceSharedPtr kanzi::Node::getStateManager ( ) const
inline

Gets the value of StateManagerProperty.

See also
setStateManager()

◆ setStateManager()

void kanzi::Node::setStateManager ( ResourceSharedPtr  value)
inline

Sets the value of StateManagerProperty.

See also
getStateManager()

◆ getWidth()

float kanzi::Node::getWidth ( ) const
inline

Gets the value of WidthProperty.

See also
setWidth()

◆ setWidth()

void kanzi::Node::setWidth ( float  value)
inline

Sets the value of WidthProperty.

See also
getWidth()

◆ getHeight()

float kanzi::Node::getHeight ( ) const
inline

Gets the value of HeightProperty.

See also
setHeight()

◆ setHeight()

void kanzi::Node::setHeight ( float  value)
inline

Sets the value of HeightProperty.

See also
getHeight()

◆ getDepth()

float kanzi::Node::getDepth ( ) const
inline

Gets the value of DepthProperty.

See also
setDepth()

◆ setDepth()

void kanzi::Node::setDepth ( float  value)
inline

Sets the value of DepthProperty.

See also
getDepth()

◆ getActualWidth()

float kanzi::Node::getActualWidth ( ) const
inline

Gets the value of ActualWidthProperty.

See also
setActualWidth()

◆ setActualWidth()

void kanzi::Node::setActualWidth ( float  value)
inline

Sets the value of ActualWidthProperty.

See also
getActualWidth()

◆ getActualHeight()

float kanzi::Node::getActualHeight ( ) const
inline

Gets the value of ActualHeightProperty.

See also
setActualHeight()

◆ setActualHeight()

void kanzi::Node::setActualHeight ( float  value)
inline

Sets the value of ActualHeightProperty.

See also
getActualHeight()

◆ getActualDepth()

float kanzi::Node::getActualDepth ( ) const
inline

Gets the value of ActualDepthProperty.

See also
setActualDepth()

◆ setActualDepth()

void kanzi::Node::setActualDepth ( float  value)
inline

Sets the value of ActualDepthProperty.

See also
getActualDepth()

◆ getHorizontalAlignment()

Node::HorizontalAlignment kanzi::Node::getHorizontalAlignment ( ) const
inline

◆ setHorizontalAlignment()

void kanzi::Node::setHorizontalAlignment ( Node::HorizontalAlignment  value)
inline

◆ getVerticalAlignment()

Node::VerticalAlignment kanzi::Node::getVerticalAlignment ( ) const
inline

◆ setVerticalAlignment()

void kanzi::Node::setVerticalAlignment ( Node::VerticalAlignment  value)
inline

◆ getDepthAlignment()

Node::DepthAlignment kanzi::Node::getDepthAlignment ( ) const
inline

Gets the value of DepthAlignmentProperty.

See also
setDepthAlignment()

◆ setDepthAlignment()

void kanzi::Node::setDepthAlignment ( Node::DepthAlignment  value)
inline

Sets the value of DepthAlignmentProperty.

See also
getDepthAlignment()

◆ getHorizontalMargin()

Vector2 kanzi::Node::getHorizontalMargin ( ) const
inline

Gets the value of HorizontalMarginProperty.

See also
setHorizontalMargin()

◆ setHorizontalMargin()

void kanzi::Node::setHorizontalMargin ( Vector2  value)
inline

Sets the value of HorizontalMarginProperty.

See also
getHorizontalMargin()

◆ getVerticalMargin()

Vector2 kanzi::Node::getVerticalMargin ( ) const
inline

Gets the value of VerticalMarginProperty.

See also
setVerticalMargin()

◆ setVerticalMargin()

void kanzi::Node::setVerticalMargin ( Vector2  value)
inline

Sets the value of VerticalMarginProperty.

See also
getVerticalMargin()

◆ getDepthMargin()

Vector2 kanzi::Node::getDepthMargin ( ) const
inline

Gets the value of DepthMarginProperty.

See also
setDepthMargin()

◆ setDepthMargin()

void kanzi::Node::setDepthMargin ( Vector2  value)
inline

Sets the value of DepthMarginProperty.

See also
getDepthMargin()

◆ getContentStretch()

Node::ContentStretch kanzi::Node::getContentStretch ( ) const
inline

Gets the value of ContentStretchProperty.

See also
setContentStretch()

◆ setContentStretch()

void kanzi::Node::setContentStretch ( Node::ContentStretch  value)
inline

Sets the value of ContentStretchProperty.

See also
getContentStretch()

◆ getOpacity()

float kanzi::Node::getOpacity ( ) const
inline

Gets the value of OpacityProperty.

See also
setOpacity()

◆ setOpacity()

void kanzi::Node::setOpacity ( float  value)
inline

Sets the value of OpacityProperty.

See also
getOpacity()

◆ isHover()

bool kanzi::Node::isHover ( ) const
inline

Returns whether the node has HoverProperty set to true.

Returns
If the HoverProperty is set to true, true, otherwise false.

◆ isClipChildren()

bool kanzi::Node::isClipChildren ( ) const
inline

Gets the value of ClipChildrenProperty.

See also
setClipChildren()

◆ setClipChildren()

void kanzi::Node::setClipChildren ( bool  value)
inline

Sets the value of ClipChildrenProperty.

See also
isClipChildren()

◆ KZ_METACLASS_PROPERTY_TYPE()

kanzi::Node::KZ_METACLASS_PROPERTY_TYPE ( FontFamilyProperty  )

◆ getProperty()

template<typename DataType >
PropertyType<DataType>::Traits::ReturnType kanzi::Node::getProperty ( const PropertyType< DataType > &  propertyType) const
inline

Returns the current value of a property.

The value returned by this function is the result of the property system evaluating the inputs that can affect the values of properties. The final value is calculated by determining the base value of the property and applying existing modifiers to it.

Base value is affected by the following inputs where the highest entry in the list determines the base value:

  1. Local value set with setProperty or loaded from kzb
  2. Value set by a style affecting the property.
  3. Value defined by class metadata.

When the base value is determined the system applies modifiers to the value that can change the value or replace it completely. The following is the list of possible modifiers, where the order of evaluation is determined by the order the modifiers were added or applied.

  1. Values defined is states of state manager.
  2. Animations.

If the property metadata specifies that the property is inheritable and no inputs for the property value can be determined at the current node the system iterates the node tree to the root until inputs are found or the root is reached.

If no inputs to the property value can be established the system returns the value registered in the property type metadata.

Parameters
propertyTypeThe property type identifying the property to retrieve.
Returns
Returns the evaluated property value.

◆ getNodeFinalValueSource()

AbstractPropertyTypeDescriptor::ValueSource* kanzi::Node::getNodeFinalValueSource ( AbstractPropertyTypeDescriptor descriptor) const
inline

◆ getOptionalProperty()

template<typename DataType >
optional<typename PropertyType<DataType>::Traits::ReturnType> kanzi::Node::getOptionalProperty ( const PropertyType< DataType > &  propertyType) const
inline

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.

Parameters
propertyTypeThe property type identifying the property to retrieve.
Returns
Returns true if there are inputs into the property value, false otherwise.

◆ getAbstractProperty()

template<typename DataType >
DataType kanzi::Node::getAbstractProperty ( AbstractPropertyType  abstractPropertyType) const

◆ getOptionalAbstractProperty()

template<typename DataType >
optional<typename PropertyType<DataType>::DataType> kanzi::Node::getOptionalAbstractProperty ( AbstractPropertyType  abstractPropertyType) const

◆ addMessageHandler() [1/3]

template<typename TMessageType , typename TClass , typename TClassMethod >
MessageSubscriptionToken kanzi::Node::addMessageHandler ( TMessageType &  messageType,
TClass *  messageHandlerObject,
TClassMethod  method 
)

Adds a message handler where the handler is a method that is invoked on an object.

The handler is invoked when a message of messageType is signaled in the node the handler is added to.

Parameters
messageTypeThe message type to listen to.
messageHandlerObjectThe object that owns the method. A shared pointer must own this object.
methodThe method invoked when the node that owns the handler receives a matching message. The source of the message has to be the node itself.
Returns
The MessageSubscriptionToken which identifies the added handler.

◆ addMessageFilter() [1/2]

template<typename TMessageType , typename TClass , typename TClassMethod >
MessageSubscriptionToken kanzi::Node::addMessageFilter ( TMessageType &  messageType,
TClass *  messageHandlerObject,
TClassMethod  method 
)

Adds a message filter where the filter is a method that is invoked on an object.

The filter is invoked when a message of messageType bubbles through the node the filter is added to.

Parameters
messageTypeThe message type to listen to.
messageHandlerObjectThe object that owns the method. A shared pointer must own this object.
methodThe method invoked when the node that owns the filter receives a matching message.
Returns
The MessageSubscriptionToken which identifies the added filter.

◆ addMessageHandler() [2/3]

template<typename TMessageType >
MessageSubscriptionToken kanzi::Node::addMessageHandler ( const TMessageType &  messageType,
typename TMessageType::FunctionType  function 
)

Adds a message handler where the handler is a function.

The handler is invoked when a message of messageType is signaled in the node the handler is added to.

Parameters
messageTypeThe message type to listen to.
functionThe function invoked when the node that owns the handler receives a matching message. The source of the message has to be the node itself.
Returns
The MessageSubscriptionToken which identifies the added handler.

◆ addMessageFilter() [2/2]

template<typename TMessageType >
MessageSubscriptionToken kanzi::Node::addMessageFilter ( const TMessageType &  messageType,
typename TMessageType::FunctionType  function 
)

Adds a message filter where the filter is a function.

The filter is invoked when a message of messageType bubbles through the node the filter is added to.

Parameters
messageTypeThe message type to listen to.
functionThe function invoked when the node that owns the filter receives a matching message.
Returns
The MessageSubscriptionToken which identifies the added filter.

◆ addMessageHandler() [3/3]

template<typename TMessageType >
MessageSubscriptionToken kanzi::Node::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.

The handler is invoked when a message of messageType bubbles through the node to which you add the handler, but only when you dispatch it from the given source node.

Parameters
messageTypeThe message type to listen to.
functionThe function invoked when the node that owns the handler receives a matching message.
messageSourceFilterSource node of the messages.
Returns
The MessageSubscriptionToken which identifies the added handler.

◆ addTunnelingHandler()

template<typename TMessageType >
MessageSubscriptionToken kanzi::Node::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.

The handler is invoked when a message of messageType tunnels through the node to which you add the handler, but only when you dispatch it from the given source node.

Parameters
messageTypeThe message type to listen to.
functionThe function invoked when the node that owns the handler receives a matching message.
messageSourceFilterSource node of the messages.
Returns
The MessageSubscriptionToken which identifies the added handler.

◆ addTunnelingFilter() [1/2]

template<typename TMessageType >
MessageSubscriptionToken kanzi::Node::addTunnelingFilter ( const TMessageType &  messageType,
typename TMessageType::FunctionType  function 
)

Adds a message filter where the filter is a function.

The filter is invoked when a message of messageType tunnels through the node to which you add this filter.

Parameters
messageTypeThe message type to listen to.
functionThe function invoked when the node that owns the filter receives a matching message.
Returns
The MessageSubscriptionToken which identifies the added filter.

◆ addTunnelingFilter() [2/2]

template<typename TMessageType , typename TClass , typename TClassMethod >
MessageSubscriptionToken kanzi::Node::addTunnelingFilter ( const TMessageType &  messageType,
TClass *  messageHandlerObject,
TClassMethod  method 
)

Adds a message filter where the filter is a method that is invoked on an object.

The filter is invoked when a message of messageType tunnels through the node to which you add this filter.

Parameters
messageTypeThe message type to listen to.
messageHandlerObjectThe object that owns the method. A shared pointer must own this object.
methodThe method invoked when the node that owns the filter receives a matching message.
Returns
The MessageSubscriptionToken which identifies the added filter.

◆ removeMessageHandler()

void kanzi::Node::removeMessageHandler ( MessageSubscriptionToken  token)

Removes a message subscription.

Parameters
tokenThe message subscription token which identifies the handler or filter.

◆ dispatchMessage()

template<typename TArgumentsType >
void kanzi::Node::dispatchMessage ( const MessageType< TArgumentsType > &  messageType,
typename MessageType< TArgumentsType >::ArgumentsType &  messageArguments 
)

Dispatches a message from this node with specified arguments.

Parameters
messageTypeThe type of the dispatched message.
messageArgumentsThe arguments of the dispatched message.

◆ dispatchAbstractMessage()

void kanzi::Node::dispatchAbstractMessage ( const AbstractMessageType messageType,
MessageArguments messageArguments 
)

Dispatches a message from this node with specified arguments.

Parameters
messageTypeThe type of the dispatched message.
messageArgumentsThe arguments of the dispatched message.
Since
Kanzi 3.8.0

◆ addResource()

void kanzi::Node::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. */.

◆ removeResource()

void kanzi::Node::removeResource ( const ResourceID resourceId)

Removes a resource with given ID from object node resource dictionary. Does not do anything if resourceID was not found. */.

◆ containsResource()

bool kanzi::Node::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. */.

◆ findResourceURL()

optional<string> kanzi::Node::findResourceURL ( const ResourceID resourceId) const

Tries to find Resource URL for Resource ID from this node.

◆ acquireResource() [1/2]

ResourceSharedPtr kanzi::Node::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.

If the resource id maps to a resource url, but the url doesn't map to any resource, throws an exception.

Parameters
idName of the resource.
Returns
Shared pointer to the resource, or nullptr if the resource id doesn't map to any resource url.

◆ acquireResource() [2/2]

template<typename T >
shared_ptr<T> kanzi::Node::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, and casts the resource to given type.

If the cast fails, or the found resource url doesn't map to a resource, throws an exception.

Parameters
idName of the resource.
Returns
Shared pointer to the resource, or nullptr if the resource id doesn't map to any resource url.

◆ tryAcquireResource() [1/2]

ResourceSharedPtr kanzi::Node::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.

Parameters
idName of the resource.
Returns
Shared pointer to the resource, or nullptr if the resource id or resource url doesn't map to any resource.

◆ acquireResourceAsync()

ResourceManager::AcquireTaskSharedPtr kanzi::Node::acquireResourceAsync ( const ResourceID key,
ResourceManager::AsyncAcquireFinishedCallback  func 
) const

Posts an asynchronous task to acquire a resource.

Parameters
keyName of the resource.
funcCallback to execute upon completion of the task.
Returns
Task created or an empty shared pointer on failure.

◆ tryAcquireResource() [2/2]

template<typename T >
shared_ptr<T> kanzi::Node::tryAcquireResource ( 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.

Parameters
idName of the resource.
Returns
Shared pointer to the resource, or nullptr if the resource is not found.

◆ getResourceDictionary()

ResourceDictionarySharedPtr kanzi::Node::getResourceDictionary ( ) const

Gets the resource dictionary of the node, if the node has one.

Returns
The resource dictionary of the node, or nullptr if the node doesn't have a resource dictionary.

◆ acquireResourceDictionary()

ResourceDictionarySharedPtr kanzi::Node::acquireResourceDictionary ( )

Gets the resource dictionary of the node.

Creates the dictionary if it doesn't exist.

Returns
The resource dictionary of the node.

◆ notifyResourceDictionaryModified()

void kanzi::Node::notifyResourceDictionaryModified ( )

Forces the re-evaluation of resource IDs in a node tree.

If you modify a resource dictionary of a node that is already attached, you can use this to update the resource properties. Note that you need to use this function only if you modify the dictionary directly through getResourceDictionary or acquireResourceDictionary. If you use other Node class functions like addResource or setResourceDictionary, you don't need to call this.

◆ setResourceDictionary()

void kanzi::Node::setResourceDictionary ( ResourceDictionarySharedPtr  resourceDictionary)

Replaces the resource dictionary of the node.

Updates all the resource references of the child nodes.

Parameters
resourceDictionaryThe resource dictionary.

◆ addResourceDictionary()

void kanzi::Node::addResourceDictionary ( ResourceDictionarySharedPtr  resourceDictionary)

Add a nested resource dictionary to the resource dictionary of the node.

Updates all the resource references of the child nodes.

Parameters
resourceDictionaryThe nested resource dictionary.

◆ addAnonymousResource()

void kanzi::Node::addAnonymousResource ( ResourceSharedPtr  resource)

Adds alias resource to an object node.

Removes alias resource from an object node. Adds anonymous resource (such as style) for object node resources.

◆ removeAnonymousResource()

void kanzi::Node::removeAnonymousResource ( const Resource resource)

Removes anonymous resource from object node resources.

◆ isNamed()

bool kanzi::Node::isNamed ( string_view  name) const

◆ getParent()

Node* kanzi::Node::getParent ( ) const

Returns the parent of the node.

◆ setParent()

void kanzi::Node::setParent ( Node parent)

Kanzi uses this method internally to set the parent of a node.

Do not use this method directly to change the parent of a node. Instead, use the addAbstractChildOverride and removeAbstractChildOverride methods from the parent node.

Parameters
parentThe parent node to set.
See also
Node::removeAbstractChildOverride(), Node::addAbstractChildOverride()

◆ visit()

VisitorResult kanzi::Node::visit ( const Visitor visitor,
VisitorOrder  order 
)

Visits a node and its descendants.

Parameters
visitorThe visitor function to apply for the visited nodes.
orderThe visiting order.

◆ visitDescendants()

VisitorResult kanzi::Node::visitDescendants ( const Visitor visitor,
VisitorOrder  order 
)

Visits the descendants of a node.

Parameters
visitorThe visitor function to apply for the visited nodes.
orderThe visiting order.

◆ lookupNode()

template<typename Type >
shared_ptr<Type> kanzi::Node::lookupNode ( string_view  pathOrKey)

Returns a node of specified type by looking it up with specified path or alias.

◆ lookupNodeRaw()

Node* kanzi::Node::lookupNodeRaw ( string_view  relativePath)

Get an object node by another node and a relative path.

User should use lookupNode.

Parameters
relativePathPath to use for relative lookup.
Returns
Pointer to node.

◆ lookupObject() [1/2]

ObjectSharedPtr kanzi::Node::lookupObject ( string_view  relativePath)

Lookup for an object from a node.

Object found may be another node or a resource within a node.

Parameters
relativePathRelative path to use for lookup.
Returns
Shared pointer referencing object. May be empty if no object found.

◆ lookupObjectForStateManager()

tuple<NodeSharedPtr, AbstractPropertyType> kanzi::Node::lookupObjectForStateManager ( string_view  relativePath)

Lookup for an node and possible object from within the node for state manager.

If the path points to a resource within the node, the node, and the associated abstract property type will be returned.

Parameters
relativePathRelative path to use for lookup.
Returns
Tuple of node and possibly abstract property type.

◆ lookupObject() [2/2]

template<typename Type >
shared_ptr<Type> kanzi::Node::lookupObject ( string_view  relativePath)
inline

Lookup for an object from a node.

Object found may be another node or a resource within a node.

Parameters
relativePathRelative path to use for lookup.
Returns
Shared pointer referencing object. May be empty if no object found.

◆ findAbstractChild()

template<typename TNodeType >
shared_ptr<TNodeType> kanzi::Node::findAbstractChild ( string_view  name)

Find a child by name. Finds direct children as well as children connected indirectly for example Viewport->Scene.

◆ addAbstractChildOverride()

virtual bool kanzi::Node::addAbstractChildOverride ( NodeSharedPtr  child)
pure virtual

Implemented in kanzi::Node2D, and kanzi::Node3D.

◆ getAbstractChildCountOverride()

virtual size_t kanzi::Node::getAbstractChildCountOverride ( )
pure virtual

◆ getAbstractChildIndexOverride()

virtual size_t kanzi::Node::getAbstractChildIndexOverride ( const Node node)
pure virtual

◆ getAbstractChildOverride()

virtual NodeSharedPtr kanzi::Node::getAbstractChildOverride ( size_t  index)
pure virtual

◆ removeAbstractChildOverride()

virtual bool kanzi::Node::removeAbstractChildOverride ( Node child)
pure virtual

Implemented in kanzi::Node2D, and kanzi::Node3D.

◆ moveAbstractChildToPositionOverride()

virtual bool kanzi::Node::moveAbstractChildToPositionOverride ( NodeSharedPtr  child,
size_t  index 
)
pure virtual

Moves a child node to a given position in the list of child nodes.

Parameters
childChild node to reposition.
indexPosition at which to place the child node in the list of child nodes.
Returns
If the move was successful, true, otherwise false.
Since
Kanzi 3.9.3

Implemented in kanzi::Node2D, and kanzi::Node3D.

◆ addInputManipulator()

void kanzi::Node::addInputManipulator ( InputManipulatorBaseSharedPtr  inputManipulator)

Transfers the ownership and attaches an input manipulator to an object node.

Parameters
inputManipulatorThe input manipulator to add.

◆ removeInputManipulator()

void kanzi::Node::removeInputManipulator ( InputManipulator inputManipulator)

Removes the ownership and detaches an input manipulator from an object node.

Parameters
inputManipulatorThe input manipulator to remove.

◆ beginInputManipulators()

InputManipulatorConstIterator kanzi::Node::beginInputManipulators ( ) const

◆ endInputManipulators()

InputManipulatorConstIterator kanzi::Node::endInputManipulators ( ) const

◆ addNodeComponent()

void kanzi::Node::addNodeComponent ( NodeComponentSharedPtr  nodeComponent)

Transfers the ownership of a node component to an object node.

◆ addNodeComponentWithOwner()

void kanzi::Node::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.

◆ removeNodeComponent()

void kanzi::Node::removeNodeComponent ( NodeComponent nodeComponent)

Removes the ownership of a node component from an object node.

◆ removeNodeComponentWithOwner()

void kanzi::Node::removeNodeComponentWithOwner ( const void *  owner)

Removes all bindings with the specified owner.

◆ beginNodeComponents()

NodeComponentConstIterator kanzi::Node::beginNodeComponents ( ) const

◆ endNodeComponents()

NodeComponentConstIterator kanzi::Node::endNodeComponents ( ) const

◆ lookupNodeComponent()

template<typename Type >
shared_ptr<Type> kanzi::Node::lookupNodeComponent ( string_view  name)

Returns a node component of specified type by looking it up with specified name.

If name is not specified, then the first anonymous node component of specified type is returned.

◆ isEffectivelyVisible()

bool kanzi::Node::isEffectivelyVisible ( ) const

Returns whether a node and its ancestor nodes are visible.

◆ isEffectivelyFocusable()

bool kanzi::Node::isEffectivelyFocusable ( ) const

Returns whether a node and its ancestor focus scope nodes are focusable.

The ancestor focus scope lookup stops once an overlay focus scope is reached.

Returns
If the node is focusable, returns true. If the node is in a focus scope that is not focusable, or the node is not focusable, returns false.
Since
Kanzi 3.7.0

◆ getFocusScopeInfo()

FocusScope* kanzi::Node::getFocusScopeInfo ( ) const

Returns the information about the focus scope for a node.

Returns
The focus scope information attached to the root node of the focus scope. If the node is not the root of a focus scope, nullptr.
See also
FocusScope
Since
Kanzi 3.7.0

◆ getChangeFlags()

uint32_t kanzi::Node::getChangeFlags ( ) const
inline

Get current change flags.

Returns
Change flags directly.

◆ getChildChangeFlags()

uint32_t kanzi::Node::getChildChangeFlags ( ) const
inline

Get current child change flags.

Returns
Child change flags directly.

◆ setChangeFlag()

void kanzi::Node::setChangeFlag ( uint32_t  flag)

Sets a change flag.

◆ clearChangeFlag()

void kanzi::Node::clearChangeFlag ( uint32_t  flag)

Clears a change flag.

◆ isChangeFlagSet()

bool kanzi::Node::isChangeFlagSet ( uint32_t  flag) const

Checks if a change flag is set.

◆ isAnyChangeFlagSet()

bool kanzi::Node::isAnyChangeFlagSet ( uint32_t  flag) const

Checks if any of given flags is set.

◆ setChildChangeFlag()

void kanzi::Node::setChildChangeFlag ( uint32_t  flag)

Sets a child change flag.

◆ clearChildChangeFlag()

void kanzi::Node::clearChildChangeFlag ( uint32_t  flag)

Clears a child change flag.

◆ isChildChangeFlagSet()

bool kanzi::Node::isChildChangeFlagSet ( uint32_t  flag) const

Checks if child change flags match.

◆ isAnyChildChangeFlagSet()

bool kanzi::Node::isAnyChildChangeFlagSet ( uint32_t  flag) const

Checks if any child change flags (corresponding to given mask) are set.

◆ isInvalidMeasure()

bool kanzi::Node::isInvalidMeasure ( ) const

Check if the node needs measure.

◆ invalidateMeasure()

void kanzi::Node::invalidateMeasure ( )

Invalidates measure for the node.

◆ validateMeasure()

void kanzi::Node::validateMeasure ( )

Validates measure for the node.

◆ isInvalidArrange()

bool kanzi::Node::isInvalidArrange ( ) const

Checks if the node needs arrange.

◆ invalidateArrange()

void kanzi::Node::invalidateArrange ( )

Invalidates arrange.

◆ validateArrange()

void kanzi::Node::validateArrange ( )

Validates arrange.

◆ isInvalidRender()

bool kanzi::Node::isInvalidRender ( ) const

Returns if node render flag is invalid.

◆ validateRender()

void kanzi::Node::validateRender ( )

Validates render for node.

◆ invalidateRender()

void kanzi::Node::invalidateRender ( )

Invalidates render for node.

◆ isInvalidFinalTransform()

bool kanzi::Node::isInvalidFinalTransform ( ) const

Tells if final transform flag is invalid for node.

◆ invalidateFinalTransform()

void kanzi::Node::invalidateFinalTransform ( )

Invalidates final transform for node.

◆ isInvalidDraw()

bool kanzi::Node::isInvalidDraw ( )

Tells if node draw flag is invalid.

◆ invalidateDraw()

void kanzi::Node::invalidateDraw ( )

Invalidates draw flag for the node.

◆ validateDraw()

void kanzi::Node::validateDraw ( )

Validates draw flags for the node.

◆ validateDrawForChildrenRecursive()

void kanzi::Node::validateDrawForChildrenRecursive ( )

Recursively validates draw for the children from this 2D node onwards.

Called internally by the system in situations where draw does not otherwise descend to the node.

◆ isInitialized()

bool kanzi::Node::isInitialized ( ) const

Returns true if initialize() has been called, false otherwise.

◆ isAttached()

bool kanzi::Node::isAttached ( ) const

Returns true if the node is attached to a screen or one of its descendants.

◆ isAttaching()

bool kanzi::Node::isAttaching ( ) const

Returns true if node is in the process of attaching, false otherwise.

◆ isDetaching()

bool kanzi::Node::isDetaching ( ) const

Returns true if the node currently detaching.

◆ attachRecursive()

void kanzi::Node::attachRecursive ( )

Attaches an object node and its children recursively.

◆ detachRecursive()

void kanzi::Node::detachRecursive ( )

Detaches an object node and its children recursively.

◆ applyStyle()

AppliedStyleEntrySharedPtr kanzi::Node::applyStyle ( StyleSharedPtr  style)

Applies a style to an object node.

Returns a style entry that is used to unapply the style.

◆ applyManualStyle()

AppliedStyleEntrySharedPtr kanzi::Node::applyManualStyle ( StyleSharedPtr  style)

Applies a style to an object node.

Returns a style entry that is used to unapply the style. The style must be unapplied manually.

◆ unapplyStyle()

void kanzi::Node::unapplyStyle ( AppliedStyleEntrySharedPtr  appliedStyleEntry)

Unapplies a style from an object node.

Parameters
appliedStyleEntryStyle entry from a style applied earlier.

◆ applyStyles()

void kanzi::Node::applyStyles ( )

Apply all styles for an object node.

◆ unapplyStyles()

void kanzi::Node::unapplyStyles ( )

Unapplies and removes all applied styles.

◆ applyStylesRecursive()

void kanzi::Node::applyStylesRecursive ( )

Applies styles recursively.

◆ unapplyStylesRecursive()

void kanzi::Node::unapplyStylesRecursive ( )

Unapplies styles recursively.

◆ removeKZBData() [1/2]

void kanzi::Node::removeKZBData ( flat_set< AbstractPropertyType > *  keepProperties)

Destroys all object node data loaded from KZB, including properties, bindings, node components, resources etc.

It is possible to pass a set of properties as input. The local values of those properties will not be removed.

Parameters
keepPropertiesSet of properties to keep.

◆ removeKZBData() [2/2]

void kanzi::Node::removeKZBData ( )
inline

Destroys all object node data loaded from KZB.

All local values of properties will be removed.

◆ addResourceReference()

void kanzi::Node::addResourceReference ( AbstractPropertyType  propertyType,
AbstractResourceReference reference 
)

This is a helper for automatic resource tracking in ResourceReference.

Parameters
propertyTypeProperty type to listen changes on.
referenceReference to react on.

◆ removeResourceReference()

void kanzi::Node::removeResourceReference ( const AbstractResourceReference reference)

This is a helper for automatic resource tracking in ResourceReference.

Parameters
referenceReference to remove.

◆ addNodeReference()

void kanzi::Node::addNodeReference ( AbstractPropertyType  propertyType,
AbstractNodeReference reference 
)

◆ removeNodeReference()

void kanzi::Node::removeNodeReference ( const AbstractNodeReference reference)

◆ createLookupContext()

BindingLookupContextPtr kanzi::Node::createLookupContext ( NodeSharedPtr  templateRoot)

Creates a lookup context for the node.

Parameters
templateRootTemplate root for the node.
Returns
Newly created node lookup context.

◆ restoreResources()

virtual void kanzi::Node::restoreResources ( )
inlinevirtual

Reattaches an object node after potential resource change.

Reimplemented in kanzi::Node2D, kanzi::Viewport2D, kanzi::TextBox3D, kanzi::ProgressiveRenderingViewport2D, and kanzi::TextBlock3D.

◆ isValidLayoutValue()

static bool kanzi::Node::isValidLayoutValue ( float  value)
inlinestatic

Indicates whether a value is valid layout value.

Valid layout value is a non-negative floating point number. Valid layout value can be positive infinity (unbounded layout value).

Parameters
valueValue to test if it is unbound layout value.
Returns
true if the value if valid layout value, false otherwise.

◆ unboundedLayoutValue()

static float kanzi::Node::unboundedLayoutValue ( )
inlinestatic

Returns an unbounded layout value.

Returns
Unbounded layout value.

◆ isUnboundedLayoutValue()

static bool kanzi::Node::isUnboundedLayoutValue ( float  layoutValue)
inlinestatic

Indicates whether a value is an unbound layout value.

Parameters
layoutValueValue to test if it is unbound layout value.
Returns
true if the layoutValue is unbound layout value, false otherwise.

◆ replaceUnboundedLayoutValue()

static float kanzi::Node::replaceUnboundedLayoutValue ( float  layoutValue,
float  resetValue 
)
inlinestatic

Replaces layout value with the specified value if it is unbounded and returns it.

Parameters
layoutValueLayout value to test if it is unbounded layout value.
resetValueThe value which is returned if layoutValue is unbounded layout value.
Returns
resetValue if layoutValue is an unbounded layout value, layoutValue otherwise.

◆ replaceUnboundedLayoutValueWithZero()

static float kanzi::Node::replaceUnboundedLayoutValueWithZero ( float  layoutValue)
inlinestatic

Replaces layout value with zero if it is unbounded layout value and returns it.

Parameters
layoutValueLayout value to test if it is unbounded layout value.
Returns
Zero if layoutValue is an unbounded layout value, layoutValue otherwise.

◆ getTemplateRoot()

NodeSharedPtr kanzi::Node::getTemplateRoot ( ) const
inline

Gets the template root of this node.

Template root is used in template root bindings. This is an internal function.

◆ setTemplateRoot()

void kanzi::Node::setTemplateRoot ( NodeSharedPtr  templateRoot)
inline

Sets the template root of this node.

Template root is used in template root bindings. This is an internal function.

◆ trySetActiveFocus()

KZ_DEPRECATED NodeSharedPtr kanzi::Node::trySetActiveFocus ( )
inline

Tries to move the focus on this node.

If this node is a focus scope node, this method tries to focus the preserved focus of the focus scope, or tries to focus on the first focusable descendant node of this node. This is a convenience function of the FocusManager::trySetFocus(), that uses the node as target node.

Returns
If this method successfully moved focus, returns this node or a descendant node of this node. If this method did not move focus, returns nullptr.
Deprecated:
in Kanzi 3.9.0, use trySetFocus()

◆ trySetFocus() [1/2]

NodeSharedPtr kanzi::Node::trySetFocus ( )

Tries to move the focus to this node.

If this node is a focus scope node, this method tries to focus the preserved focus of the focus scope, or tries to focus on the first focusable descendant node of this node. This is a convenience function of the FocusManager::trySetFocus(), that uses the node as target node.

Returns
If this method successfully moved focus, returns this node or a descendant node of this node. If this method did not move focus, returns nullptr.

◆ trySetFocus() [2/2]

NodeSharedPtr kanzi::Node::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.

Parameters
fallbackOptionThe fallback behavior:
Returns
The node that has focus.

◆ initialize()

void kanzi::Node::initialize ( )
protected

Node-specific initialization.

Since initialization is called with the full knowledge of node type, inheriting classes may statically call the base class function.

◆ onAttached()

virtual void kanzi::Node::onAttached ( )
protectedvirtual

Called when an object node becomes attached.

Reimplemented in kanzi::Node3D, kanzi::TrajectoryListBox3D, kanzi::ListBoxConceptImpl< Node3D, GridListBox3D, GridListBox3DTraits >, kanzi::ListBoxConceptImpl< Node3D, TrajectoryListBox3D, TrajectoryListBox3DTraits >, kanzi::ListBoxConceptImpl< Node2D, GridListBox2D, GridListBox2DTraits >, kanzi::Light, kanzi::NinePatchImage2D, kanzi::ButtonConceptImpl< Node2D, Button2D >, kanzi::ButtonConceptImpl< Node3D, Button3D >, kanzi::ButtonConceptImpl< Node3D, ToggleButton3D >, kanzi::ButtonConceptImpl< Node2D, ToggleButton2D >, kanzi::Viewport2D, kanzi::Instantiator3D, kanzi::Screen, kanzi::Page, kanzi::TextBox3D, kanzi::PageHost, kanzi::Model3D, kanzi::TextBox2D, kanzi::ActivityConceptImpl< ContentLayout2D, Activity2D >, kanzi::ActivityConceptImpl< ContentLayout3D, Activity3D >, kanzi::ProgressiveRenderingViewport2D, kanzi::ClickConceptImpl< Node2D, Button2D >, kanzi::ClickConceptImpl< Node3D, Button3D >, kanzi::ClickConceptImpl< ContentLayout2D, ListBoxItemContainer2D >, kanzi::ClickConceptImpl< ContentLayout3D, ListBoxItemContainer3D >, kanzi::ClickConceptImpl< Node3D, ToggleButton3D >, kanzi::ClickConceptImpl< Node2D, ToggleButton2D >, kanzi::TextBlock2D, kanzi::Viewport3D, kanzi::ActivityElementImpl< ContentLayout2D, DataDrivenExclusiveActivityHost2D >, kanzi::ActivityElementImpl< ContentLayout3D, ParallelActivityHost3D >, kanzi::ActivityElementImpl< ContentLayout2D, ParallelActivityHost2D >, kanzi::ActivityElementImpl< ContentLayout3D, DataDrivenExclusiveActivityHost3D >, kanzi::ActivityElementImpl< ContentLayout2D, ExclusiveActivityHost2D >, kanzi::ActivityElementImpl< ContentLayout3D, ExclusiveActivityHost3D >, kanzi::ActivityElementImpl< ContentLayout2D, Activity2D >, and kanzi::ActivityElementImpl< ContentLayout3D, Activity3D >.

◆ onDetached()

virtual void kanzi::Node::onDetached ( )
protectedvirtual

Called when an object node becomes detached.

Reimplemented in kanzi::Node2D, kanzi::TextBoxConceptImpl< Node2D, TextBox2D, TextBox2DTraits >, kanzi::TextBoxConceptImpl< Node3D, TextBox3D, TextBox3DTraits >, kanzi::Node3D, kanzi::ListBoxConceptImpl< Node3D, GridListBox3D, GridListBox3DTraits >, kanzi::ListBoxConceptImpl< Node3D, TrajectoryListBox3D, TrajectoryListBox3DTraits >, kanzi::ListBoxConceptImpl< Node2D, GridListBox2D, GridListBox2DTraits >, kanzi::NinePatchImage2D, kanzi::ButtonConceptImpl< Node2D, Button2D >, kanzi::ButtonConceptImpl< Node3D, Button3D >, kanzi::ButtonConceptImpl< Node3D, ToggleButton3D >, kanzi::ButtonConceptImpl< Node2D, ToggleButton2D >, kanzi::Viewport2D, kanzi::Instantiator3D, kanzi::Screen, kanzi::TextBox3D, kanzi::Page, kanzi::PageHost, kanzi::Model3D, kanzi::TextBlock3D, kanzi::ProgressiveRenderingViewport2D, kanzi::ToggleButtonGroupConceptImpl< Node2D, ToggleButtonGroup2D >, kanzi::ToggleButtonGroupConceptImpl< Node3D, ToggleButtonGroup3D >, kanzi::ActivityConceptImpl< ContentLayout2D, Activity2D >, kanzi::ActivityConceptImpl< ContentLayout3D, Activity3D >, kanzi::ClickConceptImpl< Node2D, Button2D >, kanzi::ClickConceptImpl< Node3D, Button3D >, kanzi::ClickConceptImpl< ContentLayout2D, ListBoxItemContainer2D >, kanzi::ClickConceptImpl< ContentLayout3D, ListBoxItemContainer3D >, kanzi::ClickConceptImpl< Node3D, ToggleButton3D >, kanzi::ClickConceptImpl< Node2D, ToggleButton2D >, kanzi::ParallelActivityHostImpl< ContentLayout3D, ParallelActivityHost3D >, kanzi::ParallelActivityHostImpl< ContentLayout2D, ParallelActivityHost2D >, kanzi::TextBlock2D, kanzi::DataDrivenExclusiveActivityHostImpl< ContentLayout2D, DataDrivenExclusiveActivityHost2D >, kanzi::DataDrivenExclusiveActivityHostImpl< ContentLayout3D, DataDrivenExclusiveActivityHost3D >, kanzi::ExclusiveActivityHostImpl< ContentLayout2D, ExclusiveActivityHost2D >, kanzi::ExclusiveActivityHostImpl< ContentLayout3D, ExclusiveActivityHost3D >, kanzi::Viewport3D, kanzi::ExclusiveActivityHostBaseImpl< ContentLayout2D, DataDrivenExclusiveActivityHost2D >, kanzi::ExclusiveActivityHostBaseImpl< ContentLayout3D, DataDrivenExclusiveActivityHost3D >, kanzi::ExclusiveActivityHostBaseImpl< ContentLayout2D, ExclusiveActivityHost2D >, kanzi::ExclusiveActivityHostBaseImpl< ContentLayout3D, ExclusiveActivityHost3D >, kanzi::ActivityElementImpl< ContentLayout2D, DataDrivenExclusiveActivityHost2D >, kanzi::ActivityElementImpl< ContentLayout3D, ParallelActivityHost3D >, kanzi::ActivityElementImpl< ContentLayout2D, ParallelActivityHost2D >, kanzi::ActivityElementImpl< ContentLayout3D, DataDrivenExclusiveActivityHost3D >, kanzi::ActivityElementImpl< ContentLayout2D, ExclusiveActivityHost2D >, kanzi::ActivityElementImpl< ContentLayout3D, ExclusiveActivityHost3D >, kanzi::ActivityElementImpl< ContentLayout2D, Activity2D >, and kanzi::ActivityElementImpl< ContentLayout3D, Activity3D >.

◆ onNodePropertyChanged()

virtual void kanzi::Node::onNodePropertyChanged ( AbstractPropertyType  propertyType,
PropertyNotificationReason  reason 
)
protectedvirtual

Method executed on node property change.

Parameters
propertyTypeProperty that was changed in node.
reasonChange reason.

Reimplemented in kanzi::Node2D, kanzi::TextBoxConceptImpl< Node2D, TextBox2D, TextBox2DTraits >, kanzi::TextBoxConceptImpl< Node3D, TextBox3D, TextBox3DTraits >, kanzi::ScrollViewConceptImpl< Node3D, ScrollView3D >, kanzi::ScrollViewConceptImpl< Node2D, ScrollView2D >, kanzi::Node3D, kanzi::ListBoxConceptImpl< Node3D, GridListBox3D, GridListBox3DTraits >, kanzi::ListBoxConceptImpl< Node3D, TrajectoryListBox3D, TrajectoryListBox3DTraits >, kanzi::ListBoxConceptImpl< Node2D, GridListBox2D, GridListBox2DTraits >, kanzi::NinePatchImage2D, kanzi::ButtonConceptImpl< Node2D, Button2D >, kanzi::ButtonConceptImpl< Node3D, Button3D >, kanzi::ButtonConceptImpl< Node3D, ToggleButton3D >, kanzi::ButtonConceptImpl< Node2D, ToggleButton2D >, kanzi::TrajectoryLayoutConceptImpl< Node3D, TrajectoryLayout3D >, kanzi::TrajectoryLayoutConceptImpl< Node2D, TrajectoryLayout2D >, kanzi::Viewport2D, kanzi::GridLayoutConceptImpl< Node2D, GridLayout2D >, kanzi::GridLayoutConceptImpl< Node3D, GridLayout3D >, kanzi::Screen, kanzi::TextBox3D, kanzi::Instantiator3D, kanzi::PageHost, kanzi::Model3D, kanzi::PrefabViewConceptImpl< Node2D, PrefabView2D >, kanzi::PrefabViewConceptImpl< Node3D, PrefabView3D >, kanzi::TextBlock3D, kanzi::TextBox2D, kanzi::ToggleButtonGroupConceptImpl< Node2D, ToggleButtonGroup2D >, kanzi::ToggleButtonGroupConceptImpl< Node3D, ToggleButtonGroup3D >, kanzi::TextBlockConceptImpl< Node3D, TextBlock3D >, kanzi::TextBlockConceptImpl< Node2D, TextBlock2D >, kanzi::ClickConceptImpl< Node2D, Button2D >, kanzi::ClickConceptImpl< Node3D, Button3D >, kanzi::ClickConceptImpl< ContentLayout2D, ListBoxItemContainer2D >, kanzi::ClickConceptImpl< ContentLayout3D, ListBoxItemContainer3D >, kanzi::ClickConceptImpl< Node3D, ToggleButton3D >, kanzi::ClickConceptImpl< Node2D, ToggleButton2D >, kanzi::TextBlock2D, kanzi::ExclusiveActivityHostImpl< ContentLayout2D, ExclusiveActivityHost2D >, kanzi::ExclusiveActivityHostImpl< ContentLayout3D, ExclusiveActivityHost3D >, kanzi::Viewport3D, kanzi::ExclusiveActivityHostBaseImpl< ContentLayout2D, DataDrivenExclusiveActivityHost2D >, kanzi::ExclusiveActivityHostBaseImpl< ContentLayout3D, DataDrivenExclusiveActivityHost3D >, kanzi::ExclusiveActivityHostBaseImpl< ContentLayout2D, ExclusiveActivityHost2D >, kanzi::ExclusiveActivityHostBaseImpl< ContentLayout3D, ExclusiveActivityHost3D >, kanzi::DataDrivenExclusiveActivityHostImpl< ContentLayout2D, DataDrivenExclusiveActivityHost2D >, kanzi::DataDrivenExclusiveActivityHostImpl< ContentLayout3D, DataDrivenExclusiveActivityHost3D >, kanzi::ActivityElementImpl< ContentLayout2D, DataDrivenExclusiveActivityHost2D >, kanzi::ActivityElementImpl< ContentLayout3D, ParallelActivityHost3D >, kanzi::ActivityElementImpl< ContentLayout2D, ParallelActivityHost2D >, kanzi::ActivityElementImpl< ContentLayout3D, DataDrivenExclusiveActivityHost3D >, kanzi::ActivityElementImpl< ContentLayout2D, ExclusiveActivityHost2D >, kanzi::ActivityElementImpl< ContentLayout3D, ExclusiveActivityHost3D >, kanzi::ActivityElementImpl< ContentLayout2D, Activity2D >, and kanzi::ActivityElementImpl< ContentLayout3D, Activity3D >.

◆ findAbstractChildOverride()

virtual NodeSharedPtr kanzi::Node::findAbstractChildOverride ( string_view  name)
protectedpure virtual

◆ visitAbstractChildOverride()

virtual VisitorResult kanzi::Node::visitAbstractChildOverride ( const Visitor visitor,
VisitorOrder  order 
)
protectedpure virtual

◆ updateResourceVisitor()

static VisitorResult kanzi::Node::updateResourceVisitor ( Node node,
const ResourceID id 
)
staticprotected

◆ updateAllResourcesVisitor()

static VisitorResult kanzi::Node::updateAllResourcesVisitor ( Node node)
staticprotected

◆ applyStylesVisitor()

static VisitorResult kanzi::Node::applyStylesVisitor ( Node node,
bool  apply 
)
staticprotected

◆ attachVisitor()

static VisitorResult kanzi::Node::attachVisitor ( Node node)
staticprotected

◆ detachVisitor()

static VisitorResult kanzi::Node::detachVisitor ( Node node)
staticprotected

◆ validateDrawVisitor()

static VisitorResult kanzi::Node::validateDrawVisitor ( Node node)
staticprotected

Visitor for validating draw.

◆ processPropertyChanged()

static bool kanzi::Node::processPropertyChanged ( Node node,
AbstractPropertyType  propertyType,
const PropertyStoragePtr nodePropertyStorage,
AbstractPropertyTypeDescriptor::PropertyStorage changedPropertyStorage,
PropertyNotificationReason  reason 
)
staticprotected

Processes notification handlers for node and property storage.

Parameters
nodeNode to invoke change notification on.
propertyTypeChanged property type.
nodePropertyStorageProperty storage for the node being modified.
changedPropertyStorageProperty storage actually being changed (not necessarily from node).
reasonChange reason.
Returns
True of node still exists after notification handlers have been changed.

◆ propertyChangedVisitor()

static VisitorResult kanzi::Node::propertyChangedVisitor ( Node node,
AbstractPropertyType  propertyType,
AbstractPropertyTypeDescriptor::PropertyStorage propertyStorage,
PropertyNotificationReason  reason 
)
staticprotected

◆ updatePropertiesForConnectedNode()

void kanzi::Node::updatePropertiesForConnectedNode ( )
protected

Invokes property notifications for inherited properties during node tree connections.

◆ updatePropertiesForDisconnectedNode()

void kanzi::Node::updatePropertiesForDisconnectedNode ( Node oldParent)
protected

Invokes property notifications for inherited properties during node tree disconnections.

◆ updateResourceReferences() [1/2]

void kanzi::Node::updateResourceReferences ( )
protected

◆ updateResourceReferences() [2/2]

void kanzi::Node::updateResourceReferences ( AbstractPropertyType  propertyType)
protected

◆ updateResourceReferencesRecursive() [1/2]

void kanzi::Node::updateResourceReferencesRecursive ( )
protected

◆ updateResourceReferencesRecursive() [2/2]

void kanzi::Node::updateResourceReferencesRecursive ( const ResourceID resourceID)
protected

◆ attach()

void kanzi::Node::attach ( )
protected

Attaches the object node.

◆ detach()

void kanzi::Node::detach ( )
protected

Detaches the object node.

◆ updateFocusScopeInfo()

virtual void kanzi::Node::updateFocusScopeInfo ( FocusScopePtr nodeScopeInfo)
protectedvirtual

Updates the overlay scope information that is attached to the root node of an overlay scope.

See also
FocusScope

Reimplemented in kanzi::ActivityConceptImpl< ContentLayout2D, Activity2D >, and kanzi::ActivityConceptImpl< ContentLayout3D, Activity3D >.

◆ notifyPropertyHandlers()

void kanzi::Node::notifyPropertyHandlers ( PropertyStoragePtr propertyStorage,
PropertyNotificationReason  reason 
)
overrideprotectedvirtual

Reimplemented from kanzi::PropertyObject.

Friends And Related Function Documentation

◆ InputManager

friend class InputManager
friend

Member Data Documentation

◆ NameProperty

PropertyType<string> kanzi::Node::NameProperty
static

Name property.

The default value is "".

See also
setName(), getName()

◆ PathProperty

PropertyType<string> kanzi::Node::PathProperty
static

Path property.

The default value is "".

See also
setPath(), getPath()

◆ LocaleProperty

PropertyType<string> kanzi::Node::LocaleProperty
static

Locale property.

The default value is "".

See also
setLocale(), getLocale()

◆ CreatedFromKZBProperty

PropertyType<bool> kanzi::Node::CreatedFromKZBProperty
static

CreatedFromKZB property.

The default value is false.

See also
setCreatedFromKZB(), isCreatedFromKZB()

◆ HitTestableProperty

PropertyType<bool> kanzi::Node::HitTestableProperty
static

HitTestable property.

The default value is false.

See also
setHitTestable(), isHitTestable()

◆ HitTestableContainerProperty

PropertyType<bool> kanzi::Node::HitTestableContainerProperty
static

HitTestableContainer property.

The default value is false.

See also
setHitTestableContainer(), isHitTestableContainer()

◆ VisibleProperty

PropertyType<bool> kanzi::Node::VisibleProperty
static

Visible property.

The default value is true.

See also
setVisible(), isVisible()

◆ EnabledProperty

PropertyType<bool> kanzi::Node::EnabledProperty
static

Sets whether the node is enabled.

When you set the EnabledProperty to false for a node, also its descendant nodes in the same overlay scope are effectively disabled. Effectively disabling a node removes that node from the focus chain and cancels the active input manipulators. Use the EffectivelyEnabledProperty to observe whether a node is effectively enabled. The default value is true.

See also
Node::EffectivelyEnabledProperty, setEnabled(), isEnabled()

◆ EffectivelyEnabledProperty

PropertyType<bool> kanzi::Node::EffectivelyEnabledProperty
static

Indicates whether the node and its ancestor nodes are enabled.

To enable or disable a node, use the EnabledProperty. Use the EffectivelyEnabledProperty in state managers and bindings to observe whether a node is effectively enabled. When a node is effectively disabled:

  • When the node is focused, the node receives keyboard input until the focus moves to another node.
  • When the node is not focused, the node is not part of the focus chain and does not receive keyboard input.

The default value is true.

See also
Node::EnabledProperty, isEffectivelyEnabled()
Since
Kanzi 3.9.0

◆ FocusableProperty

PropertyType<bool> kanzi::Node::FocusableProperty
static

Sets whether a node can get focus and can participate in the focus chain navigation.

When the node is also a focus scope, this property sets whether the scope is a focus fence. The default value is false.

See also
setFocusable(), isFocusable()

◆ FocusedProperty

PropertyType<bool> kanzi::Node::FocusedProperty
static

Sets whether a node is an focus node and can receive keyboard messages.

In a Kanzi application only one node at a time can have focus. The default value is false.

See also
setFocused(), isFocused()

◆ FocusStateProperty

PropertyType<FocusState> kanzi::Node::FocusStateProperty
static

Reports the focus state of a focusable node or focus scope node.

To observe whether a node is the keyboard focus node, use isFocused() to get the value of the FocusedProperty.

See also
getFocusState(), isFocused()
Since
Kanzi 3.9.2

◆ FontFamilyProperty

PropertyType<ResourceSharedPtr> kanzi::Node::FontFamilyProperty
static

Sets the font family the node uses.

The default value is ResourceSharedPtr().

See also
setFontFamily(), getFontFamily()
Since
Kanzi 3.8.0

◆ VisibleAmountInParentProperty

PropertyType<float> kanzi::Node::VisibleAmountInParentProperty
static

VisibleAmountInParent property.

The default value is 1.0f.

See also
setVisibleAmountInParent(), getVisibleAmountInParent()

◆ Projection2DTo3DScaleProperty

PropertyType<float> kanzi::Node::Projection2DTo3DScaleProperty
static

Projection2DTo3DScale property.

The default value is 0.02f.

See also
setProjection2DTo3DScale(), getProjection2DTo3DScale()

◆ StyleProperty

PropertyType<ResourceSharedPtr> kanzi::Node::StyleProperty
static

Style property.

The default value is ResourceSharedPtr().

See also
setStyle(), getStyle()

◆ StateManagerProperty

PropertyType<ResourceSharedPtr> kanzi::Node::StateManagerProperty
static

StateManager property.

The default value is ResourceSharedPtr().

See also
setStateManager(), getStateManager()

◆ PrefabTemplateSourceProperty

PropertyType<void*> kanzi::Node::PrefabTemplateSourceProperty
static

PrefabTemplateSource property.

The default value is 0.

See also
setPrefabTemplateSource(), getPrefabTemplateSource()

◆ WidthProperty

PropertyType<float> kanzi::Node::WidthProperty
static

Width property.

The default value is 0.0f.

See also
setWidth(), getWidth()

◆ HeightProperty

PropertyType<float> kanzi::Node::HeightProperty
static

Height property.

The default value is 0.0f.

See also
setHeight(), getHeight()

◆ DepthProperty

PropertyType<float> kanzi::Node::DepthProperty
static

Depth property.

The default value is 0.0f.

See also
setDepth(), getDepth()

◆ ActualWidthProperty

PropertyType<float> kanzi::Node::ActualWidthProperty
static

ActualWidth property.

The default value is 0.0f.

See also
setActualWidth(), getActualWidth()

◆ ActualHeightProperty

PropertyType<float> kanzi::Node::ActualHeightProperty
static

ActualHeight property.

The default value is 0.0f.

See also
setActualHeight(), getActualHeight()

◆ ActualDepthProperty

PropertyType<float> kanzi::Node::ActualDepthProperty
static

ActualDepth property.

The default value is 0.0f.

See also
setActualDepth(), getActualDepth()

◆ HorizontalAlignmentProperty

PropertyType<Node::HorizontalAlignment> kanzi::Node::HorizontalAlignmentProperty
static

HorizontalAlignment property.

The default value is Node::HorizontalAlignmentCenter.

See also
setHorizontalAlignment(), getHorizontalAlignment()

◆ VerticalAlignmentProperty

PropertyType<Node::VerticalAlignment> kanzi::Node::VerticalAlignmentProperty
static

VerticalAlignment property.

The default value is Node::VerticalAlignmentCenter.

See also
setVerticalAlignment(), getVerticalAlignment()

◆ DepthAlignmentProperty

PropertyType<Node::DepthAlignment> kanzi::Node::DepthAlignmentProperty
static

DepthAlignment property.

The default value is Node::DepthAlignmentCenter.

See also
setDepthAlignment(), getDepthAlignment()

◆ HorizontalMarginProperty

PropertyType<Vector2> kanzi::Node::HorizontalMarginProperty
static

Sets the horizontal space between this node and other nodes that are adjacent to this node in a layout.

The X component sets the left margin and the Y component sets the right margin. The default value is Vector2(0.0f, 0.0f).

See also
setHorizontalMargin(), getHorizontalMargin()

◆ VerticalMarginProperty

PropertyType<Vector2> kanzi::Node::VerticalMarginProperty
static

Sets the vertical space between this node and other nodes that are adjacent to this node in a layout.

The X component sets the bottom margin and the Y component sets the top margin. The default value is Vector2(0.0f, 0.0f).

See also
setVerticalMargin(), getVerticalMargin()

◆ DepthMarginProperty

PropertyType<Vector2> kanzi::Node::DepthMarginProperty
static

Sets the space in the depth direction between this node and other nodes that are adjacent to this node in a layout.

The X component sets the back margin and the Y component sets the front margin. The default value is Vector2(0.0f, 0.0f).

See also
setDepthMargin(), getDepthMargin()

◆ ContentStretchProperty

PropertyType<Node::ContentStretch> kanzi::Node::ContentStretchProperty
static

ContentStretch property.

The default value is Node::ContentStretchUniform.

See also
setContentStretch(), getContentStretch()

◆ OpacityProperty

PropertyType<float> kanzi::Node::OpacityProperty
static

Opacity property.

The default value is 1.0f.

See also
setOpacity(), getOpacity()

◆ HoverProperty

PropertyType<bool> kanzi::Node::HoverProperty
static

Kanzi updates the HoverProperty for a hit testable node to indicate whether the node is the foremost node under the cursor.

Kanzi also sets HoverProperty to true for the all of the ancestors of the foremost hit testable node under the cursor.

See also
isHover()

◆ ClipChildrenProperty

PropertyType<bool> kanzi::Node::ClipChildrenProperty
static

ClipChildren property.

The default value is true.

See also
setClipChildren(), isClipChildren()

◆ SceneGraphAddNodeChangeChildFlagsProperty

PropertyType<int> kanzi::Node::SceneGraphAddNodeChangeChildFlagsProperty
static

SceneGraphAddNodeChangeChildFlags property.

The default value is PropertyTypeChangeFlagFinalTransformation | PropertyTypeChangeFlagMeasure.

See also
setSceneGraphAddNodeChangeChildFlags(), getSceneGraphAddNodeChangeChildFlags()

◆ SceneGraphAddNodeChangeParentFlagsProperty

PropertyType<int> kanzi::Node::SceneGraphAddNodeChangeParentFlagsProperty
static

SceneGraphAddNodeChangeParentFlags property.

The default value is PropertyTypeChangeFlagMeasure.

See also
setSceneGraphAddNodeChangeParentFlags(), getSceneGraphAddNodeChangeParentFlags()

◆ SceneGraphRemoveNodeChangeChildFlagsProperty

PropertyType<int> kanzi::Node::SceneGraphRemoveNodeChangeChildFlagsProperty
static

SceneGraphRemoveNodeChangeChildFlags property.

The default value is 0.

See also
setSceneGraphRemoveNodeChangeChildFlags(), getSceneGraphRemoveNodeChangeChildFlags()

◆ SceneGraphRemoveNodeChangeParentFlagsProperty

PropertyType<int> kanzi::Node::SceneGraphRemoveNodeChangeParentFlagsProperty
static

SceneGraphRemoveNodeChangeParentFlags property.

The default value is PropertyTypeChangeFlagMeasure.

See also
setSceneGraphRemoveNodeChangeParentFlags(), getSceneGraphRemoveNodeChangeParentFlags()

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