Kanzi  3.9.9
Kanzi Engine C++ API
kanzi::InputManipulator::KeyInputMessageArguments Class Reference

Represents base message arguments for key input messages. More...

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

Inheritance diagram for kanzi::InputManipulator::KeyInputMessageArguments:
[legend]

Public Member Functions

void addKeyGestureArguments (const KeyGestureInfo &gesture)
 Adds key gesture information arguments to the message. More...
 
bool getCapsLock () const
 Returns the value of the Caps Lock argument. More...
 
LogicalKey getKey () const
 Returns the value of the logical key argument. More...
 
KeyEventgetKeyEvent () const
 Returns the value of the Key Event argument. More...
 
KeyModifier getKeyModifiers () const
 Returns the value of the key modifiers argument. More...
 
bool hasAltModifier () const
 Checks whether the key modifiers argument has one of the Alt key modifiers set. More...
 
bool hasControlModifier () const
 Checks whether the key modifiers argument has one of the Control key modifiers set. More...
 
bool hasModifier (KeyModifier modifier) const
 Checks whether a modifier is set in the key modifiers argument. More...
 
bool hasShiftModifier () const
 Checks whether the key modifiers argument has one of the Shift key modifiers set. More...
 
void setCapsLock (bool value)
 Sets the value of the Caps Lock argument. More...
 
void setKey (LogicalKey value)
 Sets the value of the logical key argument. More...
 
void setKeyEvent (KeyEvent *value)
 Sets the value of the Key Event argument. More...
 
void setKeyModifiers (KeyModifier modifiers)
 Sets the value of the key modifiers argument. More...
 
- Public Member Functions inherited from kanzi::MessageArguments
bool getAbstractArgument (AbstractPropertyType argumentType, Variant &variant) const
 Returns the value of an argument using AbstractPropertyType. More...
 
template<typename TDataType >
TDataType getArgument (const PropertyType< TDataType > &argumentType) const
 Returns the value of an argument. More...
 
detail::MessageDispatcher * getDispatcher () const
 Returns the message dispatcher that dispatches a message. More...
 
template<typename TDataType >
optional< TDataType > getOptionalArgument (const PropertyType< TDataType > &argumentType) const
 Returns the value of an argument. More...
 
shared_ptr< NodegetSource () const
 Returns the source node for a message. More...
 
TimePoint getTimestamp () const
 Returns the timestamp of a message. More...
 
AbstractMessageType getType () const
 Returns the message type of these message arguments as an AbstractMessageType instance. More...
 
bool isFrom (const Node &source) const
 Returns whether a node is the source node of a message. More...
 
bool isHandled () const
 Returns whether the message is handled. More...
 
bool isValid () const
 Returns whether a message is valid. More...
 
 MessageArguments ()=default
 Constructor. More...
 
 MessageArguments (const MessageArguments &)=delete
 Deleted copy. More...
 
MessageArgumentsoperator= (const MessageArguments &)=delete
 Deleted assignment. More...
 
void setAbstractArgument (AbstractPropertyType argumentType, const Variant &variant)
 Sets the value of an argument using AbstractPropertyType. More...
 
template<typename TDataType >
void setArgument (const PropertyType< TDataType > &argumentType, typename PropertyType< TDataType >::DataType value)
 Sets the value of an argument. More...
 
void setDispatcher (detail::MessageDispatcher *dispatcher)
 Sets a dispatcher for a message. More...
 
void setHandled (bool handled)
 Sets the handling status for a message. More...
 
void setSource (Node *source)
 Sets the source node that dispatches a message. More...
 
void setTimestamp (TimePoint timestamp)
 Sets the timestamp of a message. More...
 
void setType (AbstractMessageType type)
 Sets the type of a message. More...
 
void setValid (bool valid)
 Sets the validity of a message. More...
 
 ~MessageArguments ()
 Destructor. More...
 

Static Public Attributes

Properties
static PropertyType< int > KeyProperty
 Holds the logical key presses and key released values. More...
 
static PropertyType< int > KeyModifiersProperty
 Holds the key modifiers attached to the key value. The default value is 0. More...
 
static PropertyType< bool > CapsLockProperty
 Indicates whether the Caps Lock key is on during the key event. More...
 
static PropertyType< void * > KeyEventProperty
 Holds the key event instance from which the key input message is translated. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from kanzi::MessageArguments
static size_t getArgumentAllocatorPoolSize ()
 Gets the current size of memory pool of argument entries. More...
 
static const MetaclassgetStaticMetaclass ()
 Initializes and returns static metadata of base MessageArguments class. More...
 
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 Initializes and returns the Kanzi Studio editor information. More...
 

Detailed Description

Represents base message arguments for key input messages.

Since
Kanzi 3.8.0

Member Function Documentation

LogicalKey kanzi::InputManipulator::KeyInputMessageArguments::getKey ( ) const

Returns the value of the logical key argument.

Returns
The value of the logical key argument.
See also
LogicalKey
void kanzi::InputManipulator::KeyInputMessageArguments::setKey ( LogicalKey  value)

Sets the value of the logical key argument.

Parameters
valueThe logical key value to set.
See also
LogicalKey
KeyModifier kanzi::InputManipulator::KeyInputMessageArguments::getKeyModifiers ( ) const

Returns the value of the key modifiers argument.

Returns
The value of the key modifiers argument.
See also
KeyModifier
void kanzi::InputManipulator::KeyInputMessageArguments::setKeyModifiers ( KeyModifier  modifiers)

Sets the value of the key modifiers argument.

Parameters
modifiersThe key modifiers value to set.
See also
KeyModifier
bool kanzi::InputManipulator::KeyInputMessageArguments::hasModifier ( KeyModifier  modifier) const

Checks whether a modifier is set in the key modifiers argument.

Parameters
modifierThe modifier to check.
Returns
If the modifier is set, true, otherwise false.
See also
KeyModifier
bool kanzi::InputManipulator::KeyInputMessageArguments::hasShiftModifier ( ) const

Checks whether the key modifiers argument has one of the Shift key modifiers set.

Returns
If the key modifiers argument has at least one of the Shift key modifiers set, true, otherwise false.
See also
KeyModifier, KeyModifier::Shift, KeyModifier::LeftShift, KeyModifier::RightShift
bool kanzi::InputManipulator::KeyInputMessageArguments::hasControlModifier ( ) const

Checks whether the key modifiers argument has one of the Control key modifiers set.

Returns
If the key modifiers argument has at least one of the Control key modifiers set, true, otherwise false.
See also
KeyModifier, KeyModifier::Control, KeyModifier::LeftControl, KeyModifier::RightControl
bool kanzi::InputManipulator::KeyInputMessageArguments::hasAltModifier ( ) const

Checks whether the key modifiers argument has one of the Alt key modifiers set.

Returns
If the key modifiers argument has at least one of the Alt key modifiers set, true, otherwise false.
See also
KeyModifier, KeyModifier::Alt, KeyModifier::LeftAlt, KeyModifier::RightAlt
bool kanzi::InputManipulator::KeyInputMessageArguments::getCapsLock ( ) const

Returns the value of the Caps Lock argument.

Returns
The value of the Caps Lock argument.
Since
Kanzi 3.9.0
void kanzi::InputManipulator::KeyInputMessageArguments::setCapsLock ( bool  value)

Sets the value of the Caps Lock argument.

Parameters
valueThe Caps Lock value to set.
Since
Kanzi 3.9.0
KeyEvent* kanzi::InputManipulator::KeyInputMessageArguments::getKeyEvent ( ) const

Returns the value of the Key Event argument.

Returns
The value of the Key Event argument.
Since
Kanzi 3.9.8
void kanzi::InputManipulator::KeyInputMessageArguments::setKeyEvent ( KeyEvent value)

Sets the value of the Key Event argument.

Parameters
valueThe Key Event value to set.
Since
Kanzi 3.9.8
void kanzi::InputManipulator::KeyInputMessageArguments::addKeyGestureArguments ( const KeyGestureInfo gesture)

Adds key gesture information arguments to the message.

Parameters
gestureThe key gesture.
Since
Kanzi 3.9.0

Member Data Documentation

PropertyType<int> kanzi::InputManipulator::KeyInputMessageArguments::KeyProperty
static

Holds the logical key presses and key released values.

The default value is 0.

See also
setKey(), getKey()
PropertyType<int> kanzi::InputManipulator::KeyInputMessageArguments::KeyModifiersProperty
static

Holds the key modifiers attached to the key value. The default value is 0.

PropertyType<bool> kanzi::InputManipulator::KeyInputMessageArguments::CapsLockProperty
static

Indicates whether the Caps Lock key is on during the key event.

The default value is false.

Since
Kanzi 3.9.0
PropertyType<void*> kanzi::InputManipulator::KeyInputMessageArguments::KeyEventProperty
static

Holds the key event instance from which the key input message is translated.

Since
Kanzi 3.9.8

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