Pinch input manipulator. More...
#include <kanzi/input/pinch_manipulator.hpp>
Classes | |
class | FinishedMessageArguments |
class | MovedMessageArguments |
class | StartedMessageArguments |
Public Member Functions | |
virtual kzsError | notifyTouchInside (const TouchInfo &touchInfo) KZ_OVERRIDE |
Touch inside implementation for pinch manipulator. More... | |
virtual kzsError | notifyTouchOutside (const TouchInfo &touchInfo) KZ_OVERRIDE |
Touch outside implementation for pinch manipulator. More... | |
void | setScaleRecognitionThreshold (float threshold) |
Set the threshold the fingers have to move away from each other before scale is recognized. More... | |
void | setRotationRecognitionThreshold (float threshold) |
Set the threshold the fingers have to rotate around the midpoint before rotation is recognized. More... | |
![]() | |
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... | |
KzuInputManipulatorState | getState () const |
Get the state of a manipulator. More... | |
kzsError | setState (KzuInputManipulatorState state) |
Set the state of a manipulator. More... | |
Node * | getObjectNode () 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... | |
InputManipulator * | getFailManipulator () const |
Gets the fail manipulator. More... | |
InputManipulator * | getDependManipulator () 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... | |
KzuInputManager * | getInputManager () 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... | |
![]() | |
Object (Domain *domain) | |
virtual | ~Object () |
Domain * | getDomain () const |
Returns the domain the object belongs to. More... | |
KzuPropertyManager * | getPropertyManager () const |
Returns the property manager of the object. More... | |
KzuTaskScheduler * | getTaskScheduler () const |
Returns the task scheduler of the object. More... | |
KzuMessageDispatcher * | getMessageDispatcher () const |
Returns the message dispatcher of the object. More... | |
ResourceManager * | getResourceManager () const |
Returns the resource manager of the object. More... | |
virtual const Metaclass * | getDynamicMetaclass () 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... | |
AppliedStyleEntry * | applyObjectStyle (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... | |
Static Public Member Functions | |
static PropertyTypeEditorInfoSharedPtr | makeEditorInfo () |
static PinchManipulatorSharedPtr | create (Domain *domain, string_view="") |
![]() | |
static const Metaclass * | getStaticMetaclass () |
Returns the metaclass of Object class. More... | |
static PropertyTypeEditorInfoSharedPtr | makeEditorInfo () |
Default implementation that returns empty editor info. More... | |
Public Attributes | |
float | scaleThreshold |
Scale threshold. More... | |
float | rotateThreshold |
Rotate threshold. More... | |
unsigned int | touchIdA |
First touch ID. More... | |
unsigned int | touchIdB |
Second touch ID. More... | |
kzBool | scaling |
Is scaling. More... | |
kzBool | rotating |
Is rotating. More... | |
struct KzcVector2 | normalizedReferenceVector |
Reference direction vector for the difference between the touch points. More... | |
float | referenceScale |
Reference scale of the difference between the touch points. More... | |
![]() | |
Node * | m_node |
Object node reference. More... | |
KzuInputManager * | m_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... | |
InputManipulator * | m_failManipulator |
The input manipulator that has to fail for this manipulator to succeed. More... | |
InputManipulator * | m_dependManipulator |
The input manipulator that will be notified in case this manipulator fails. More... | |
NodeWeakPtr | m_referenceNode |
Static Public Attributes | |
static MessageType < StartedMessageArguments > | StartedMessage |
static MessageType < MovedMessageArguments > | MovedMessage |
static MessageType < FinishedMessageArguments > | FinishedMessage |
Protected Member Functions | |
PinchManipulator (Domain *domain) | |
virtual kzsError | onReset () KZ_OVERRIDE |
Reset implementation for pinch input manipulator. More... | |
![]() | |
virtual kzsError | onAttach () |
Attach function for input manipulators. More... | |
virtual kzsError | onDetach () |
Detach function for input manipulators. More... | |
virtual kzsError | onCancel () |
Cancel function for input manipulators. More... | |
virtual kzsError | onFail () |
Fail function for input manipulators. More... | |
![]() | |
void | initialize () |
void | onCopy (const Object &other) |
Additional Inherited Members | |
![]() | |
typedef vector < AppliedStyleEntry * > | AppliedStyleContainer |
Applied style container. More... | |
![]() | |
static PropertyTypeEditorInfoSharedPtr | makeEditorInfo () |
![]() | |
AppliedStyleContainer | m_appliedStyles |
Listing of applied styles applied to this object. More... | |
Pinch input manipulator.
|
explicitprotected |
Touch inside implementation for pinch manipulator.
Reimplemented from kanzi::InputManipulator.
Touch outside implementation for pinch manipulator.
Reimplemented from kanzi::InputManipulator.
void kanzi::PinchManipulator::setScaleRecognitionThreshold | ( | float | threshold | ) |
Set the threshold the fingers have to move away from each other before scale is recognized.
Default is 5 screen units.
void kanzi::PinchManipulator::setRotationRecognitionThreshold | ( | float | threshold | ) |
Set the threshold the fingers have to rotate around the midpoint before rotation is recognized.
Default is 5 screen units along the circle.
|
static |
|
inlinestatic |
|
protectedvirtual |
Reset implementation for pinch input manipulator.
Reimplemented from kanzi::InputManipulator.
|
static |
|
static |
|
static |
float kanzi::PinchManipulator::scaleThreshold |
Scale threshold.
float kanzi::PinchManipulator::rotateThreshold |
Rotate threshold.
unsigned int kanzi::PinchManipulator::touchIdA |
First touch ID.
unsigned int kanzi::PinchManipulator::touchIdB |
Second touch ID.
kzBool kanzi::PinchManipulator::scaling |
Is scaling.
kzBool kanzi::PinchManipulator::rotating |
Is rotating.
struct KzcVector2 kanzi::PinchManipulator::normalizedReferenceVector |
Reference direction vector for the difference between the touch points.
float kanzi::PinchManipulator::referenceScale |
Reference scale of the difference between the touch points.