All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
kanzi::InputManipulator Class Reference

#include <kanzi/input/input_manipulator.hpp>

Inheritance diagram for kanzi::InputManipulator:
kanzi::Object kanzi::ClickManipulator kanzi::DragAndDropManipulator kanzi::LongPressManipulator kanzi::MultiClickManipulator kanzi::PanManipulator kanzi::PinchManipulator

Classes

class  InputMessageArguments
 
struct  TouchInfo
 

Public Member Functions

 InputManipulator (Domain *domain)
 Create base input manipulator. More...
 
virtual ~InputManipulator ()
 
kzsError attach (Node *objectNode)
 Attach an input manipulator to an object node. More...
 
kzsError detach ()
 Detach an input manipulator. More...
 
kzsError reset ()
 Reset manipulator. More...
 
kzsError cancel ()
 Notify manipulator of touch canceling. More...
 
virtual kzsError notifyTouchInside (const TouchInfo &touchInfo)
 Notify manipulator of touches happening inside the subtree of the manipulator. More...
 
virtual kzsError notifyTouchOutside (const TouchInfo &touchInfo)
 Notify manipulator of touches happening outside the subtree of the manipulator. More...
 
KzuInputManipulatorState getState () const
 Get the state of a manipulator. More...
 
kzsError setState (KzuInputManipulatorState state)
 Set the state of a manipulator. More...
 
NodegetObjectNode () const
 Get the object node an input manipulator is attached to. More...
 
void requireToFail (InputManipulator *manipulatorToFail)
 Sets the manipulator that is required to fail before this manipulator can succeed. More...
 
InputManipulatorgetFailManipulator () const
 Gets the fail manipulator. More...
 
InputManipulatorgetDependManipulator () const
 Gets the depend manipulator. More...
 
bool isHandled () const
 Get the change flag of a manipulator. More...
 
void setHandled (bool handled)
 Set the change flag of a manipulator. More...
 
kzsError setInputManager (KzuInputManager *inputManager)
 Attach or detach an input manager to a manipulator during recognition. More...
 
KzuInputManagergetInputManager () const
 Get the attached input manager of a manipulator. More...
 
bool isAttached () const
 Tells if the input manipulator is attached (has a valid node reference). More...
 
void setReferenceNode (NodeWeakPtr referenceNode)
 
kzsError addHitTestArguments (MessageArguments *message, const KzuInputTouchPoint *touchPoint)
 Add hit test information arguments to a message from a touch point. More...
 
- Public Member Functions inherited from kanzi::Object
 Object (Domain *domain)
 
virtual ~Object ()
 
DomaingetDomain () const
 Returns the domain the object belongs to. More...
 
KzuPropertyManager * getPropertyManager () const
 Returns the property manager of the object. More...
 
KzuTaskSchedulergetTaskScheduler () const
 Returns the task scheduler of the object. More...
 
KzuMessageDispatchergetMessageDispatcher () const
 Returns the message dispatcher of the object. More...
 
ResourceManagergetResourceManager () const
 Returns the resource manager of the object. More...
 
virtual const MetaclassgetDynamicMetaclass () const
 Returns the metaclass of the dynamic type of the object. More...
 
bool isTypeOf (const Metaclass *objectType) const
 Determines if the type of this object is the given type or derived from it. More...
 
template<typename DataType >
void setProperty (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::DataType value)
 Sets the local value of a property. More...
 
void setProperty (const PropertyType< ResourceID > &propertyType, ResourceSharedPtr value)
 Sets the local value of a resource id property with a resource pointer. More...
 
template<typename DataType >
DataType getProperty (const PropertyType< DataType > &propertyType) const
 Returns the current value of a property. More...
 
template<typename DataType >
bool getProperty (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::DataType &value) 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 >
void setAbstractProperty (AbstractPropertyType abstractPropertyType, typename PropertyType< DataType >::DataType value)
 
void setAbstractProperty (AbstractPropertyType abstractPropertyType, ResourceSharedPtr value)
 
template<typename DataType >
DataType getAbstractProperty (AbstractPropertyType abstractPropertyType) const
 
template<typename DataType >
bool getAbstractProperty (AbstractPropertyType abstractPropertyType, typename PropertyType< DataType >::DataType &value) const
 
bool hasValue (AbstractPropertyType propertyType) const
 Evaluates whether there are any inputs into the property value. More...
 
bool hasLocalValue (AbstractPropertyType propertyType) const
 Evaluates whether there is a local value set for the property. More...
 
void removeLocalValue (AbstractPropertyType propertyType)
 Removes the local value associated with the property. More...
 
void copyLocalValues (const Object &other)
 Copies all local values from another object. More...
 
virtual void onPropertyChanged (AbstractPropertyType propertyType, KzuPropertyNotificationReason reason)
 Virtual function to handle property change notifications. More...
 
AppliedStyleEntryapplyObjectStyle (kanzi::StyleSharedPtr style)
 Applies a style to an object. More...
 
void unapplyObjectStyle (AppliedStyleEntry *appliedStyleEntry)
 
void applyObjectStyles ()
 Apply all styles for an object node. More...
 
void unapplyObjectStyles ()
 Unapplies and removes all applied styles. More...
 

Public Attributes

Nodem_node
 Object node reference. More...
 
KzuInputManagerm_inputManager
 Input manager reference. More...
 
KzuInputManipulatorState m_state
 The state of the manipulator. More...
 
bool m_handled
 The handled flag to identify input phases. More...
 
InputManipulatorm_failManipulator
 The input manipulator that has to fail for this manipulator to succeed. More...
 
InputManipulatorm_dependManipulator
 The input manipulator that will be notified in case this manipulator fails. More...
 
NodeWeakPtr m_referenceNode
 

Protected Member Functions

virtual kzsError onAttach ()
 Attach function for input manipulators. More...
 
virtual kzsError onDetach ()
 Detach function for input manipulators. More...
 
virtual kzsError onReset ()
 Reset function for input manipulators. More...
 
virtual kzsError onCancel ()
 Cancel function for input manipulators. More...
 
virtual kzsError onFail ()
 Fail function for input manipulators. More...
 
- Protected Member Functions inherited from kanzi::Object
void initialize ()
 
void onCopy (const Object &other)
 

Static Protected Member Functions

static
PropertyTypeEditorInfoSharedPtr 
makeEditorInfo ()
 

Additional Inherited Members

- 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...
 
- Protected Types inherited from kanzi::Object
typedef vector
< AppliedStyleEntry * > 
AppliedStyleContainer
 Applied style container. More...
 
- Protected Attributes inherited from kanzi::Object
AppliedStyleContainer m_appliedStyles
 Listing of applied styles applied to this object. More...
 

Constructor & Destructor Documentation

kanzi::InputManipulator::InputManipulator ( Domain domain)
explicit

Create base input manipulator.

virtual kanzi::InputManipulator::~InputManipulator ( )
virtual

Member Function Documentation

kzsError kanzi::InputManipulator::attach ( Node objectNode)

Attach an input manipulator to an object node.

Called automatically when manipulator is added to an object node.

kzsError kanzi::InputManipulator::detach ( )

Detach an input manipulator.

Called automatically when manipulator is removed from an object node.

kzsError kanzi::InputManipulator::reset ( )

Reset manipulator.

kzsError kanzi::InputManipulator::cancel ( )

Notify manipulator of touch canceling.

virtual kzsError kanzi::InputManipulator::notifyTouchInside ( const TouchInfo touchInfo)
virtual

Notify manipulator of touches happening inside the subtree of the manipulator.

Reimplemented in kanzi::ClickManipulator, kanzi::PinchManipulator, kanzi::DragAndDropManipulator, kanzi::LongPressManipulator, kanzi::PanManipulator, and kanzi::MultiClickManipulator.

virtual kzsError kanzi::InputManipulator::notifyTouchOutside ( const TouchInfo touchInfo)
virtual

Notify manipulator of touches happening outside the subtree of the manipulator.

Reimplemented in kanzi::ClickManipulator, kanzi::PinchManipulator, kanzi::DragAndDropManipulator, kanzi::LongPressManipulator, kanzi::PanManipulator, and kanzi::MultiClickManipulator.

KzuInputManipulatorState kanzi::InputManipulator::getState ( ) const

Get the state of a manipulator.

kzsError kanzi::InputManipulator::setState ( KzuInputManipulatorState  state)

Set the state of a manipulator.

Node* kanzi::InputManipulator::getObjectNode ( ) const

Get the object node an input manipulator is attached to.

void kanzi::InputManipulator::requireToFail ( InputManipulator manipulatorToFail)

Sets the manipulator that is required to fail before this manipulator can succeed.

InputManipulator* kanzi::InputManipulator::getFailManipulator ( ) const

Gets the fail manipulator.

InputManipulator* kanzi::InputManipulator::getDependManipulator ( ) const

Gets the depend manipulator.

bool kanzi::InputManipulator::isHandled ( ) const

Get the change flag of a manipulator.

Used internally.

void kanzi::InputManipulator::setHandled ( bool  handled)

Set the change flag of a manipulator.

Used internally.

kzsError kanzi::InputManipulator::setInputManager ( KzuInputManager inputManager)

Attach or detach an input manager to a manipulator during recognition.

Used internally.

KzuInputManager* kanzi::InputManipulator::getInputManager ( ) const

Get the attached input manager of a manipulator.

Used internally.

bool kanzi::InputManipulator::isAttached ( ) const
inline

Tells if the input manipulator is attached (has a valid node reference).

void kanzi::InputManipulator::setReferenceNode ( NodeWeakPtr  referenceNode)
inline
virtual kzsError kanzi::InputManipulator::onAttach ( )
protectedvirtual

Attach function for input manipulators.

virtual kzsError kanzi::InputManipulator::onDetach ( )
protectedvirtual

Detach function for input manipulators.

virtual kzsError kanzi::InputManipulator::onReset ( )
protectedvirtual
virtual kzsError kanzi::InputManipulator::onCancel ( )
protectedvirtual

Cancel function for input manipulators.

virtual kzsError kanzi::InputManipulator::onFail ( )
protectedvirtual

Fail function for input manipulators.

Reimplemented in kanzi::ClickManipulator.

static PropertyTypeEditorInfoSharedPtr kanzi::InputManipulator::makeEditorInfo ( )
inlinestaticprotected
kzsError kanzi::InputManipulator::addHitTestArguments ( MessageArguments message,
const KzuInputTouchPoint touchPoint 
)

Add hit test information arguments to a message from a touch point.

Member Data Documentation

Node* kanzi::InputManipulator::m_node

Object node reference.

KzuInputManager* kanzi::InputManipulator::m_inputManager

Input manager reference.

KzuInputManipulatorState kanzi::InputManipulator::m_state

The state of the manipulator.

bool kanzi::InputManipulator::m_handled

The handled flag to identify input phases.

InputManipulator* kanzi::InputManipulator::m_failManipulator

The input manipulator that has to fail for this manipulator to succeed.

InputManipulator* kanzi::InputManipulator::m_dependManipulator

The input manipulator that will be notified in case this manipulator fails.

NodeWeakPtr kanzi::InputManipulator::m_referenceNode

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