Kanzi  3.9.6
Kanzi Engine API
kanzi::KeyGestureInfo Struct Reference

This class defines the elements that compose a key gesture, key values, and key modifiers. More...

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

Inheritance diagram for kanzi::KeyGestureInfo:
[legend]

Public Member Functions

void grab ()
 Grabs the key gesture, increases the grab count by 1. More...
 
bool isGrabbed () const
 Returns whether the key gesture is grabbed. More...
 
 KeyGestureInfo ()=default
 Default constructor. More...
 
 KeyGestureInfo (LogicalKey key, KeyModifier modifier, CapsLockState capsLockState)
 Constructor. More...
 
 KeyGestureInfo (LogicalKey key, CapsLockState capsLockState)
 Constructor. More...
 
 KeyGestureInfo (LogicalKey key, KeyModifier modifier)
 Constructor. More...
 
 KeyGestureInfo (LogicalKey key)
 Constructor. More...
 
void ungrab ()
 Resets the grab count of the key gesture. More...
 

Public Attributes

CapsLockState capsLockState
 Holds the required Caps Lock state for the key gesture. More...
 
size_t grabCount
 Holds the grab count of the key gesture. More...
 
bool isCapsLockGrabbed
 Holds the Caps Lock state at the time Kanzi grabs the key gesture. More...
 
LogicalKey key
 The logical key value. More...
 
KeyModifier modifier
 The key modifier. More...
 
size_t repeatCount
 Holds the key press repetition count. More...
 

Detailed Description

This class defines the elements that compose a key gesture, key values, and key modifiers.

A key value is one of the LogicalKey values. A key modifier is a combination of KeyModifier enum values.

Since
Kanzi 3.9.0

Constructor & Destructor Documentation

◆ KeyGestureInfo() [1/5]

kanzi::KeyGestureInfo::KeyGestureInfo ( )
explicitdefault

Default constructor.

◆ KeyGestureInfo() [2/5]

kanzi::KeyGestureInfo::KeyGestureInfo ( LogicalKey  key,
KeyModifier  modifier,
CapsLockState  capsLockState 
)
inlineexplicit

Constructor.

Parameters
keyThe logical key of the key gesture.
modifierThe key modifier of the key gesture.
capsLockStateThe Caps lock state of the key gesture.

◆ KeyGestureInfo() [3/5]

kanzi::KeyGestureInfo::KeyGestureInfo ( LogicalKey  key,
CapsLockState  capsLockState 
)
inlineexplicit

Constructor.

Parameters
keyThe logical key of the key gesture.
capsLockStateThe Caps lock state of the key gesture.

◆ KeyGestureInfo() [4/5]

kanzi::KeyGestureInfo::KeyGestureInfo ( LogicalKey  key,
KeyModifier  modifier 
)
inlineexplicit

Constructor.

Parameters
keyThe logical key of the key gesture.
modifierThe key modifier of the key gesture.

◆ KeyGestureInfo() [5/5]

kanzi::KeyGestureInfo::KeyGestureInfo ( LogicalKey  key)
inlineexplicit

Constructor.

Parameters
keyThe logical key of the key gesture.

Member Function Documentation

◆ grab()

void kanzi::KeyGestureInfo::grab ( )
inline

Grabs the key gesture, increases the grab count by 1.

◆ ungrab()

void kanzi::KeyGestureInfo::ungrab ( )
inline

Resets the grab count of the key gesture.

◆ isGrabbed()

bool kanzi::KeyGestureInfo::isGrabbed ( ) const
inline

Returns whether the key gesture is grabbed.

A key gesture is grabbed when its grab count is greater than 0.

Returns
If the key gesture is grabbed, returns true, otherwise false.

Member Data Documentation

◆ repeatCount

size_t kanzi::KeyGestureInfo::repeatCount

Holds the key press repetition count.

◆ grabCount

size_t kanzi::KeyGestureInfo::grabCount

Holds the grab count of the key gesture.

◆ key

LogicalKey kanzi::KeyGestureInfo::key

The logical key value.

◆ modifier

KeyModifier kanzi::KeyGestureInfo::modifier

The key modifier.

◆ capsLockState

CapsLockState kanzi::KeyGestureInfo::capsLockState

Holds the required Caps Lock state for the key gesture.

◆ isCapsLockGrabbed

bool kanzi::KeyGestureInfo::isCapsLockGrabbed

Holds the Caps Lock state at the time Kanzi grabs the key gesture.


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