Kanzi 3.9.10
kanzi::ManualBindingSource Class Reference

Manual binding source. More...

#include <kanzi/core.ui/binding/manual_binding_source.hpp>

Inheritance diagram for kanzi::ManualBindingSource:
[legend]

Public Member Functions

string getPath () const
 Gets the source object path.
 
PropertyField getPropertyField () const
 Gets the source property field.
 
AbstractPropertyType getPropertyType () const
 Gets the source property type.
 
- Public Member Functions inherited from kanzi::BindingSource
BindingSourceRuntimePtr createRuntime ()
 Creates binding source runtime.
 
virtual ~BindingSource ()
 Destructor.
 

Static Public Member Functions

static BindingSourcePtr create (string_view path, AbstractPropertyType propertyType, PropertyField field)
 Creates a manual binding source.
 

Protected Member Functions

BindingSourceRuntimePtr createRuntimeOverride () override
 BindingSource::createRuntime implementation.
 
 ManualBindingSource (string_view path, AbstractPropertyType propertyType, PropertyField field)
 Constructor.
 
- Protected Member Functions inherited from kanzi::BindingSource
 BindingSource ()
 Constructor.
 

Protected Attributes

PropertyField m_field
 Source property field.
 
string m_path
 Path to object.
 
AbstractPropertyType m_propertyType
 Source property type.
 

Detailed Description

Manual binding source.

ManualBindingSource works like ObjectPropertyBindingSource, reading values from Node or RenderPass objects, but does not connect or install any listeners. Property changes cannot cause the binding to be executed.

Kanzi Engine uses ManualBindingSource internally with actions and triggers, utilizing ManualBinding.

Creating a manual binding source

To create a manual binding source:

// Create a manual binding source.
BindingSourcePtr manualSource = ManualBindingSource::create("../siblingNode", Node2D::OpacityProperty, PropertyFieldWhole);

Because property changes do not cause the binding to be executed, ManualBindingSourceRuntime would only read the value once when used with regular bindings - when the binding runtime is first attached. When used with ManualBinding, it would only read values when the binding runtime is explicitly updated.

Since
Kanzi 3.7.0

Constructor & Destructor Documentation

◆ ManualBindingSource()

kanzi::ManualBindingSource::ManualBindingSource ( string_view path,
AbstractPropertyType propertyType,
PropertyField field )
inlineprotected

Constructor.

Parameters
pathPath to object.
propertyTypeProperty type to listen to.
fieldProperty field to read.

Member Function Documentation

◆ create()

static BindingSourcePtr kanzi::ManualBindingSource::create ( string_view path,
AbstractPropertyType propertyType,
PropertyField field )
static

Creates a manual binding source.

Parameters
pathPath to object.
propertyTypeProperty type to listen to.
fieldProperty field to read.

◆ getPath()

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

Gets the source object path.

Returns
Path to object.

◆ getPropertyType()

AbstractPropertyType kanzi::ManualBindingSource::getPropertyType ( ) const
inline

Gets the source property type.

Returns
Property type.

◆ getPropertyField()

PropertyField kanzi::ManualBindingSource::getPropertyField ( ) const
inline

Gets the source property field.

Returns
Property field.

◆ createRuntimeOverride()

BindingSourceRuntimePtr kanzi::ManualBindingSource::createRuntimeOverride ( )
overrideprotectedvirtual

Member Data Documentation

◆ m_path

string kanzi::ManualBindingSource::m_path
protected

Path to object.

◆ m_propertyType

AbstractPropertyType kanzi::ManualBindingSource::m_propertyType
protected

Source property type.

◆ m_field

PropertyField kanzi::ManualBindingSource::m_field
protected

Source property field.


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