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

Use the ClickConcept properties to control how nodes handle click and double-click. More...

#include <kanzi/core.ui/input/click_concept.hpp>

Inheritance diagram for kanzi::ClickConcept:
[legend]

Static Public Member Functions

static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 

Static Public Attributes

static PropertyType< bool > DoubleClickEnabledProperty
 Enables the double-click gesture for a node. More...
 

Protected Attributes

ClickManipulatorSharedPtr m_clickManipulator
 The ClickManipulator. More...
 
MultiClickManipulatorSharedPtr m_multiClickManipulator
 Multi-Click manipulator. More...
 

Detailed Description

Use the ClickConcept properties to control how nodes handle click and double-click.

To enable the click and double-click gestures for an Image node:

// Clickable Image2D node.
class ClickableImage2D;
using ClickableImage2DSharedPtr = shared_ptr<ClickableImage2D>;
class ClickableImage2D : public ClickConceptImpl<Image2D, ClickableImage2D>
{
using ConceptClass = ClickConceptImpl<Image2D, ClickableImage2D>;
public:
static ClickableImage2DSharedPtr create(Domain* domain, string_view name)
{
auto node = make_polymorphic_shared_ptr<Node>(new ClickableImage2D(domain, name));
node->initialize();
return node;
}
// Metadata for the clickable Image2D node.
KZ_METACLASS_BEGIN(ClickableImage2D, ConceptClass, "Custom.ClickableImage2D")
{
metadata.displayName = "Clickable Image";
// Show the ClickConcept.DoubleClickEnabled property as a frequently used property.
metadata["override:ClickConcept.DoubleClickEnabled:host"] = "freq"; ));
}
protected:
explicit ClickableImage2D(Domain* domain, string_view name) :
ConceptClass(domain, name)
{
}
};
Since
Kanzi 3.9.0

Member Function Documentation

static PropertyTypeEditorInfoSharedPtr kanzi::ClickConcept::makeEditorInfo ( )
static

Member Data Documentation

PropertyType<bool> kanzi::ClickConcept::DoubleClickEnabledProperty
static

Enables the double-click gesture for a node.

When set to true, Kanzi attaches a MultiClickManipulator to the node and sets the manipulator to handle the double-click gesture. The default value is false.

ClickManipulatorSharedPtr kanzi::ClickConcept::m_clickManipulator
protected
MultiClickManipulatorSharedPtr kanzi::ClickConcept::m_multiClickManipulator
protected

Multi-Click manipulator.


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