Kanzi 3.9.10
kanzi::TextInputManipulator Class Reference

The text input manipulator handles key gestures used with TextBox nodes to move the cursor, select text, and delete text, and provides the basics of text editing capabilities in Kanzi. More...

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

Inheritance diagram for kanzi::TextInputManipulator:
[legend]

Classes

class  CursorMovedMessageArguments
 Message arguments used by the CursorMovedMessage. More...
 
class  InputMethodActionMessageArguments
 Message argument used by the InputMethodActionMessage. More...
 
class  InputMethodAvailableChangedMessageArguments
 Message argument used by the InputMethodAvailableChangedMessage. More...
 
class  InputMethodsDisconnectedMessageArguments
 Message argument used by the InputMethodsDisconnectedMessage. More...
 
class  InputTypeChangedMessageArguments
 Message argument used by the InputTypeChangedMessage. More...
 
class  ReadOnlyStateChangedMessageArguments
 Message argument used by the ReadOnlyStateChangedMessage. More...
 
class  SelectionChangedMessageArguments
 Message arguments used by the SelectionChangedMessage. More...
 
class  TextChangedMessageArguments
 Message argument used by the TextChangedMessage. More...
 
class  TextCompositionStateMessageArguments
 Message argument used by the CompositionTextChangedMessage, CompositionTextCommittedMessage and TextCompositionCanceledMessage. More...
 

Public Types

enum class  SelectionState { NoSelection , Started , Updated , Cleared }
 States of text selection. More...
 
- Public Types inherited from kanzi::InputManipulator
enum  EventRoutingMode { RoutingBubbling , RoutingTunneling }
 Enumeration for the available input event routing modes. More...
 
enum class  ManipulatorType { TouchInputHandler , KeyInputHandler }
 Enumeration for the input manipulator type. More...
 
enum  State {
  StateReady , StatePossible , StateBegin , StateChange ,
  StateEnd , StateFail , StateDelayed , StateCanceled
}
 Enumeration for possible input manipulator states during touch, mouse, or key input sequence. More...
 
using TouchEventRoutingMode
 Enumeration for the available touch event routing modes.
 
using TouchPointsConstIterator
 
using TouchPointsContainer
 
- Public Types inherited from kanzi::PropertyObject
typedef PropertyStorageContainer::const_iterator PropertyStorageConstIterator
 
typedef vector< PropertyStoragePtrPropertyStorageContainer
 
typedef PropertyStorageContainer::iterator PropertyStorageIterator
 
typedef intrusive_ptr< AbstractPropertyTypeDescriptor::PropertyStoragePropertyStoragePtr
 
typedef PropertyStorageContainer::reverse_iterator PropertyStorageReverseIterator
 

Public Member Functions

void activateInput ()
 Activates the input on an input manipulator.
 
void deactivateInput ()
 Deactivates the input on an input manipulator.
 
void ensureInputMethodsAvailable ()
 Ensures that the connected input methods are available.
 
TextKeyNavigationDirection getTextKeyNavigationDirection () const
 Returns the direction of key navigation.
 
void setEchoMode (EchoMode echoMode)
 Sets the echo mode to use to format the display text of the text buffer of the input manipulator.
 
void setInputLayout (TextInputLayout &layout)
 
void setInputMethodAction (InputMethodAction action)
 Sets the input method action of the text input methods.
 
void setInputType (InputType inputType)
 Sets the input type of the input methods.
 
void setPasswordMaskingCharacter (string_view passwordMask)
 Sets the password masking character of the text buffer of the input manipulator.
 
void setReadOnly (bool readOnly)
 Sets whether the user input can modify the text of a TextInputManipulator.
 
void setTextKeyNavigationDirection (TextKeyNavigationDirection direction)
 Sets the direction of key navigation.
 
Content handling
size_t getMaximumTextLength () const
 Returns the maximum text buffer length constraint.
 
void setMaximumTextLength (size_t maxLength)
 Sets the maximum text length constraint.
 
void setText (string_view text)
 Sets the UTF-8 text.
 
void insertText (size_t position, string_view text)
 Moves the cursor to a given position and inserts text to that position.
 
void deleteText (size_t begin, size_t end)
 Moves the cursor to position begin and erases from a text buffer UTF-8 characters between positions begin and end.
 
void deleteAtCursor ()
 Deletes a character using delete.
 
void backspaceAtCursor ()
 Deletes a character using backspace.
 
void deleteWordAtCursor ()
 Deletes the characters between the cursor position and the word boundary that follows the cursor.
 
void backspaceWordAtCursor ()
 Deletes the characters between the cursor position and the closest word boundary using backspace.
 
Cursor positioning
size_t getCursorPosition () const
 Returns the position of the cursor.
 
void setCursorPosition (size_t position)
 Sets the position of the cursor in the text buffer of a TextInputConcept.
 
void moveCursorForward (size_t characterCount)
 Moves the cursor forward by a given number of characters in the text buffer of a TextInputConcept.
 
void moveCursorForward ()
 Moves the cursor forward by one character.
 
void moveCursorBackward (size_t characterCount)
 Moves the cursor backward by a given number of characters in the text buffer of a TextInputConcept.
 
void moveCursorBackward ()
 Moves the cursor backward by one character.
 
void moveCursorToEnd ()
 Moves the cursor to the end of the text buffer of a TextInputConcept.
 
void moveCursorHome ()
 Moves the cursor to the beginning of the text buffer of a TextInputConcept.
 
void moveCursorToNextWord ()
 Moves the cursor to the next word.
 
void moveCursorToPreviousWord ()
 Moves the cursor to the previous word.
 
Text selection
bool hasSelection () const
 Checks whether any text is selected.
 
void selectText (size_t start, size_t end)
 Selects the text between the given start and end positions.
 
size_t getSelectionStart () const
 Returns the starting point of the selected text.
 
void setSelectionStart (size_t position)
 Sets the start of the text selection at the position given as argument.
 
size_t getSelectionEnd () const
 Returns the ending point of the selected text.
 
void setSelectionEnd (size_t position)
 Sets the end of the text selection at the position given as argument.
 
void clearSelection ()
 Clears the text selection.
 
void selectAll ()
 Selects all content in a Text Box node.
 
void moveSelectionStartForward (size_t characterCount)
 Moves the start of text selection forward by a given characterCount in the text buffer of a Text Box node.
 
void moveSelectionStartBackward (size_t characterCount)
 Moves the end of text selection a given characterCount backward in the text buffer of a Text Box node.
 
void moveSelectionEndForward (size_t characterCount)
 Moves the end of text selection a given characterCount forward in the text buffer of a Text Box node.
 
void moveSelectionEndBackward (size_t characterCount)
 Moves the end of text selection a given characterCount backward in the text buffer of a Text Box node.
 
void moveSelectionStartForward ()
 Moves the start of the text selection forward by one character.
 
void moveSelectionStartBackward ()
 Moves the start of the text selection backward by one character.
 
void moveSelectionEndForward ()
 Moves the end of the text selection forward by one character.
 
void moveSelectionEndBackward ()
 Moves the end of the text selection backward by one character.
 
void moveSelectionStartToNextWord ()
 Moves the start of the text selection forward to the next word.
 
void moveSelectionStartToPreviousWord ()
 Moves the start of the text selection backward to the previous word.
 
void moveSelectionEndToNextWord ()
 Moves the end of the text selection forward to the next word.
 
void moveSelectionEndToPreviousWord ()
 Moves the end of the text selection backward to the previous word.
 
Automatic manipulation of the endpoint of text selection

Kanzi provides text selection methods that automatically choose the text selection endpoint to update.

When you select text in a Text Box node by double-tapping or by calling the selectText() or selectTextAtCursor() methods, the active selection endpoint is set to the selection end position. When you modify the selection using the methods listed below, the selection end position changes. When you modify the selection end position, and that passes over the selection start position, Kanzi makes the selection start position the active selection endpoint. Kanzi continues to update the selection start position until the selection start position passes over the selection end position, at which point Kanzi makes the active selection endpoint the selection end position.

void moveSelectionEndpointBackward (size_t steps)
 Moves the endpoint of the active text selection backward with steps passed as argument.
 
void moveSelectionEndpointBackward ()
 Overload of moveSelectionEndpointBackward(), moves the endpoint of the active text selection one step backward.
 
void moveSelectionEndpointForward (size_t steps)
 Moves the endpoint of the active text selection forward by steps passed as argument.
 
void moveSelectionEndpointForward ()
 Overload of moveSelectionEndpointForward(), moves the endpoint of the active text selection one step forward.
 
void moveSelectionEndpointToPreviousWord ()
 Moves the endpoint of the active text selection backward to the previous word boundary.
 
void moveSelectionEndpointToNextWord ()
 Moves the endpoint of the active text selection forward to the previous word boundary.
 
void moveSelectionEndpointToFront ()
 Moves the active selection end-point to the beginning of the text string.
 
void moveSelectionEndpointToBack ()
 Moves the endpoint of the active text selection to the end of the text string.
 
- Public Member Functions inherited from kanzi::InputManipulator
void attach (Node &node)
 Attaches an input manipulator to a node.
 
void cancel ()
 Notify manipulator of touch canceling.
 
void detach ()
 Detaches an input manipulator.
 
NodegetAttachedNode () const
 Gets the node to which the input manipulator is attached.
 
InputManipulatorgetDependantManipulator () const
 Gets the dependant input manipulator.
 
EventRoutingMode getEventRoutingMode ()
 Returns the current input event routing mode.
 
InputManipulatorWeakPtr getFailManipulator () const
 Gets the fail manipulator.
 
State getState () const
 Get the state of an input manipulator.
 
KZ_DEPRECATED TouchEventRoutingMode getTouchEventRoutingMode ()
 Returns the current touch event routing mode.
 
ManipulatorType getType () const
 Returns the type of the input manipulator.
 
bool isActive () const
 Checks whether an input manipulator is in active state.
 
bool isAttached () const
 Tells whether the input manipulator is attached to a node.
 
bool isCancelable () const
 Returns whether an input manipulator is in a cancelable state.
 
bool isResettable () const
 Returns whether an input manipulator is in a resettable state.
 
void requireToFail (InputManipulatorWeakPtr manipulatorToFail)
 Sets the input manipulator that must fail before Kanzi can recognize this input manipulator.
 
void reset ()
 Reset the manipulator.
 
void setEventRoutingMode (EventRoutingMode mode)
 Sets the input event routing mode that you want the input manager to use when distributing the input event data to manipulators.
 
void setReferenceNode (NodeWeakPtr referenceNode)
 Override the attached node as the hit test reference node.
 
void setState (State state)
 Set the state of an input manipulator.
 
KZ_DEPRECATED void setTouchEventRoutingMode (TouchEventRoutingMode mode)
 Sets the touch event routing mode that you want the input manager to use when distributing the touch points to input manipulators.
 
 ~InputManipulator () override
 Destructor.
 
- Public Member Functions inherited from kanzi::Object
AppliedStyleEntrySharedPtr applyObjectStyle (kanzi::StyleSharedPtr style)
 Applies a style to an object.
 
void applyObjectStyles ()
 Apply all styles for an object node.
 
DomaingetDomain () const
 Returns the domain the object belongs to.
 
const MetaclassgetDynamicMetaclass () const override
 Returns the metaclass of the dynamic type of the object.
 
MainLoopSchedulergetMainLoopScheduler () const
 Returns the MainLoopScheduler instance of the associated Domain.
 
detail::MessageDispatcher * getMessageDispatcher () const
 Returns the message dispatcher of the object.
 
ResourceManagergetResourceManager () const
 Returns the resource manager of the object.
 
ScriptingContextSharedPtr getScriptingContext () const
 Gets the scripting context of the object.
 
 Object (Domain *domain)
 
void setScriptingContext (ScriptingContextSharedPtr context)
 Sets the scripting context of the object.
 
void unapplyObjectStyle (AppliedStyleEntrySharedPtr appliedStyleEntry)
 
void unapplyObjectStyles ()
 Unapplies and removes all applied styles.
 
 ~Object () override
 
- Public Member Functions inherited from kanzi::MetaObject
bool isTypeOf (const Metaclass *objectType) const
 Determines if the type of this object is the given type or derived from it.
 
virtual ~MetaObject ()
 
- Public Member Functions inherited from kanzi::PropertyObject
template<typename DataType >
void addPropertyModifier (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::ModifierCallback callback, void *owner)
 
template<typename DataType >
void addPropertyModifierWithoutNotifyingHandlers (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::ModifierCallback callback, void *owner)
 Adds a property modifier without notifying handlers.
 
template<typename DataType >
void addPropertyNotificationHandler (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::NotificationCallback callback, void *owner)
 
template<typename DataType >
void addPropertyValueSource (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::TypedValueSource *valueSource, PropertyValuePrecedence precedence, AbstractPropertyTypeDescriptor::ValueSourceOwner *owner)
 
template<typename DataType >
void addPropertyValueSource (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::TypedValueSource *valueSource, PropertyValuePrecedence precedence, void *ownerPointer)
 
PropertyStorageContainer::iterator beginPropertyStorage ()
 Returns the begin iterator to the internal property storage container.
 
PropertyStorageContainer::const_iterator beginPropertyStorage () const
 Returns the begin iterator to the internal property storage container.
 
void clearPropertyFlag (AbstractPropertyType propertyType, uint32_t flag)
 
void copyLocalValue (const PropertyObject &other, AbstractPropertyType propertyType)
 Copies local value of single property from another object.
 
void copyLocalValues (const PropertyObject &other)
 Copies all local values from another object.
 
PropertyStorageContainer::iterator endPropertyStorage ()
 Returns the end iterator to the internal property storage container.
 
PropertyStorageContainer::const_iterator endPropertyStorage () const
 Returns the end iterator to the internal property storage container.
 
template<typename DataType >
PropertyType< DataType >::Traits::ReturnType getAbstractProperty (AbstractPropertyType abstractPropertyType) const
 
template<typename DataType >
PropertyType< DataType >::Traits::ReturnType getAbstractPropertyBase (AbstractPropertyType abstractPropertyType) const
 
template<typename DataType >
optional< typename PropertyType< DataType >::Traits::ReturnType > getOptionalAbstractProperty (AbstractPropertyType abstractPropertyType) const
 
template<typename DataType >
optional< typename PropertyType< DataType >::Traits::ReturnType > getOptionalProperty (const PropertyType< DataType > &propertyType) 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.
 
template<typename DataType >
optional< typename PropertyType< DataType >::Traits::ReturnType > getOptionalPropertyBase (const PropertyType< DataType > &propertyType) const
 Returns the current value of a property disregarding modifiers, but does not default to the value in property metadata if there are no inputs to the property value.
 
template<typename DataType >
PropertyType< DataType >::Traits::ReturnType getProperty (const PropertyType< DataType > &propertyType) const
 Returns the current value of a property type.
 
template<typename DataType >
PropertyType< DataType >::Traits::ReturnType getPropertyBase (const PropertyType< DataType > &propertyType) const
 Returns the current value of a property disregarding modifiers.
 
template<typename DataType >
size_t getPropertyNotificationHandlerCount (const PropertyType< DataType > &propertyType) const
 Gets number of current notification handlers for given property type.
 
bool hasBaseValue (AbstractPropertyType propertyType) const
 Evaluates whether there are any inputs into the property value, disregarding modifiers.
 
bool hasLocalValue (AbstractPropertyType propertyType) const
 Evaluates whether there is a local value set for the property.
 
bool hasNonClassValue (AbstractPropertyType propertyType) const
 Evaluates whether there is a value of any precedence higher than class default value set for the property.
 
bool hasValue (AbstractPropertyType propertyType) const
 Evaluates whether there are any inputs into the property value.
 
bool isPropertyFlagSet (AbstractPropertyType propertyType, uint32_t flag) const
 
virtual void onPropertyChanged (AbstractPropertyType propertyType, PropertyNotificationReason reason)
 Virtual function to handle property change notifications.
 
 PropertyObject ()
 
void removeKzbProperties ()
 Remove all KZB properties.
 
void removeKzbProperties (flat_set< AbstractPropertyType > *keepProperties)
 Remove all KZB properties that are not included in a given set.
 
template<typename DataType >
void removeLocalPropertyValueSource (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::TypedValueSource *valueSource, void *ownerPointer)
 
void removeLocalValue (AbstractPropertyType propertyType)
 Removes the local value associated with the property.
 
template<typename DataType >
void removePropertyModifier (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::ModifierCallback callback, void *owner)
 
template<typename DataType >
void removePropertyNotificationHandler (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::NotificationCallback callback, void *owner)
 
template<typename DataType >
void removePropertyValueSource (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::TypedValueSource *valueSource, void *ownerPointer)
 
template<typename DataType >
void setAbstractProperty (AbstractPropertyType abstractPropertyType, typename PropertyType< DataType >::Traits::ParameterType value)
 
template<typename DataType >
void setProperty (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Traits::ParameterType value)
 Sets the local value of a property type.
 
void setPropertyFlag (AbstractPropertyType propertyType, uint32_t flag)
 
KZ_DEPRECATED void validatePropertyModifiers (AbstractPropertyType propertyType)
 Validates property modifiers and notifies handlers.
 
void validatePropertyModifiersAndNotifyHandlers (AbstractPropertyType propertyType)
 Validates property modifiers and notifies handlers.
 
virtual ~PropertyObject ()
 
- Public Member Functions inherited from kanzi::InputMethodListener
void cancelTextComposition ()
 Tells the input method, which provides the text composition, to cancel the text composition.
 
void commitCompositionText ()
 Commits the composition text.
 
bool isComposingText () const
 Returns the text composition state of the input method listener.
 
bool isInputMethodAvailable (InputMethod &source) const
 Returns whether the input method is available.
 
void onCompositionTextCommitted (InputMethod &source)
 The input method source tells the input method listener to add the composition text received by previous calls of onCompositionTextUpdated() into the cached text.
 
void onCompositionTextUpdated (InputMethod &source, string_view text)
 The input method source tells the input method listener to update the composition text.
 
void onCursorMoved (InputMethod &source, size_t position)
 The input method source tells the input method listener to update the cursor position.
 
void onExecuteInputMethodAction (InputMethod &source)
 The input method source tells the input method listener to execute the input method action.
 
void onInputMethodAvailable (InputMethod &source, bool available)
 The input method source informs its active input method listener about the available state.
 
bool onInputMethodDisconnected (InputMethod &source)
 The input method source tells its active input method listener that it disconnected itself from the input method listener.
 
void onInputTypeChanged (InputMethod &source, InputType inputType)
 The input method source tells the input method listener to update its input type.
 
void onSelectionChanged (InputMethod &source, size_t start, size_t end)
 The input method source tells the input method listener to update the cursor positions at the start and end of the text selection.
 
void onTextAdded (InputMethod &source, size_t position, string_view text)
 The input method source tells the input method listener to add a text to its cached text.
 
void onTextChanged (InputMethod &source, string_view text)
 The input method source tells the input method listener to replace its cached text with the content passed in the text argument.
 
void onTextCompositionCanceled (InputMethod &source)
 The input method source tells the input method listener to cancel the text composition, and remove the composition text from the content.
 
void onTextCompositionStarted (InputMethod &source)
 The input method source tells the input method listener to enter the text composition state at the current cursor position.
 
void onTextDeleted (InputMethod &source, size_t start, size_t end)
 The input method source tells the input method listener to remove the text between the start and end positions.
 
virtual ~InputMethodListener ()
 Destructor.
 
const TextEditBuffergetText () const
 Returns the text buffer that holds edited UTF-8 content.
 
InputType getInputType () const
 Returns the input type used by the text input methods.
 
InputMethodAction getInputMethodAction () const
 Returns the input method action of the text input methods.
 
bool isReadOnly () const
 Returns whether the text of the TextEditBuffer of an InputMethodListener is unaffected by user input.
 

Static Public Member Functions

static TextInputManipulatorSharedPtr create (Domain *domain, string_view name="")
 Creates a TextInputManipulator instance.
 
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 
- Static Public Member Functions inherited from kanzi::Object
static const MetaclassgetStaticMetaclass ()
 Returns the metaclass of Object class.
 
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 Default implementation that returns empty editor info.
 
- Static Public Member Functions inherited from kanzi::MetaObject
static const MetaclassgetStaticMetaclass ()
 Returns the metaclass of Object class.
 
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 Default implementation that returns empty editor info.
 

Static Public Attributes

Messages
static MessageType< TextChangedMessageArgumentsTextChangedMessage
 Kanzi dispatches this message to the attached node when the user changes the text content by adding or removing characters, when committing the IME composition text, or when the entire text is replaced.
 
static MessageType< CursorMovedMessageArgumentsCursorMovedMessage
 Kanzi dispatches this message to the attached node when the user changes the cursor position by navigating with the arrow keys.
 
static MessageType< SelectionChangedMessageArgumentsSelectionChangedMessage
 Kanzi dispatches this message to the attached node when the user changes the text selection by navigating with the arrow keys.
 
static MessageType< ReadOnlyStateChangedMessageArgumentsReadOnlyStateChangedMessage
 Kanzi dispatches this message to the attached node when the user changes the read-only state.
 
static MessageType< InputTypeChangedMessageArgumentsInputTypeChangedMessage
 Kanzi dispatches this message to the attached node when the input method updates the input type.
 
static MessageType< InputMethodActionMessageArgumentsInputMethodActionMessage
 Kanzi dispatches this message to the attached node when the input action event is handled.
 
static MessageType< TextCompositionStateMessageArgumentsCompositionTextChangedMessage
 Kanzi dispatches this message to the attached node when the input method updates the composition text.
 
static MessageType< TextCompositionStateMessageArgumentsCompositionTextCommittedMessage
 Kanzi dispatches this message to the attached node when the input method commits the composition text.
 
static MessageType< TextCompositionStateMessageArgumentsTextCompositionCanceledMessage
 Kanzi dispatches this message to the attached node when the input method cancels the text composition.
 
static MessageType< InputMethodsDisconnectedMessageArgumentsInputMethodsDisconnectedMessage
 Kanzi dispatches this message to the attached node when the input methods of the input manipulator are disconnected.
 
static MessageType< InputMethodAvailableChangedMessageArgumentsInputMethodAvailableChangedMessage
 Kanzi dispatches this message to the attached node when the availability of an input method of the input manipulator changes.
 

Protected Member Functions

void handleControlLeftArrowGesture ()
 Handles the Control + Left Arrow key gesture.
 
void handleControlRightArrowGesture ()
 Handles the Control + Right Arrow key gesture.
 
void handleLeftArrowGesture ()
 Handles the Left Arrow key gesture.
 
void handleRightArrowGesture ()
 Handles the Right Arrow key gesture.
 
void handleShiftControlLeftArrowGesture ()
 Handles the Shift + Control + Left Arrow key gesture.
 
void handleShiftControlRightArrowGesture ()
 Handles the Shift + Control + Right Arrow key gesture.
 
void handleShiftLeftArrowGesture ()
 Handles the Shift + Left Arrow key gesture.
 
void handleShiftRightArrowGesture ()
 Handles the Shift + Right Arrow key gesture.
 
bool moveCursorTo (size_t position)
 Moves the cursor to the position given as argument.
 
void notifyCursorMoved ()
 Dispatches a CursorMovedMessage to the attached node.
 
void notifyInputTypeChanged ()
 Dispatches an InputTypeChangedMessage to the attached node.
 
bool notifyKeyInput (const KeyEvent &event) override
 Overrides InputManipulator::notifyKeyInput().
 
void notifyReadOnlyStateChanged ()
 Dispatches a ReadOnlyStateChangedMessage to the attached node.
 
void notifySelectionChanged ()
 Dispatches a SelectionChangedMessage to the attached node.
 
void notifyTextChanged ()
 Dispatches a TextChangedMessage to the attached node.
 
void onCancel () override
 Overrides InputManipulator::onCancel().
 
bool onCompositionTextCommittedOverride (InputMethod &source) override
 Overrides InputMethodListener::onCompositionTextCommittedOverride.
 
bool onCompositionTextUpdatedOverride (InputMethod &source, string_view text) override
 Overrides InputMethodListener::onCompositionTextUpdatedOverride.
 
bool onCursorMovedOverride (InputMethod &source, size_t position) override
 Overrides InputMethodListener::onCursorMovedOverride.
 
void onExecuteInputMethodActionOverride (InputMethod &) override
 Overrides InputMethodListener::onExecuteInputMethodActionOverride.
 
void onInputMethodAvailableOverride (InputMethod &source, bool available) override
 Overrides InputMethodListener::onInputMethodAvailableOverride.
 
bool onInputMethodDisconnectedOverride (InputMethod &source) override
 Overrides InputMethodListener::onInputMethodDisconnectedOverride.
 
void onInputTypeChangedOverride (InputMethod &source, InputType inputType) override
 Overrides InputMethodListener::onInputTypeChangedOverride.
 
void onKeyPressGesture (KeyGestureInfo &) override
 Overrides InputManipulator::onKeyPressGesture().
 
void onKeyReleaseGesture (KeyGestureInfo &) override
 Overrides InputManipulator::onKeyPressGesture().
 
void onPartialKeyPressGesture (KeyGestureInfo &) override
 Overrides InputManipulator::onPartialKeyPressGesture().
 
void onReset () override
 Overrides InputManipulator::onReset().
 
bool onSelectionChangedOverride (InputMethod &source, size_t start, size_t end) override
 Overrides InputMethodListener::onSelectionChanged.
 
bool onTextAddedOverride (InputMethod &source, size_t position, string_view text) override
 Overrides InputMethodListener::onTextAddedOverride.
 
bool onTextChangedOverride (InputMethod &source, string_view text) override
 Overrides InputMethodListener::onTextChangedOverride.
 
void onTextCompositionCanceledOverride (InputMethod &source) override
 Overrides InputMethodListener::onTextCompositionCanceledOverride.
 
bool onTextCompositionStartedOverride (InputMethod &source) override
 Overrides InputMethodListener::onTextCompositionStartedOverride.
 
bool onTextDeletedOverride (InputMethod &source, size_t start, size_t end) override
 Overrides InputMethodListener::onTextDeletedOverride.
 
 TextInputManipulator (Domain *domain)
 Constructor.
 
void updateSelectionState ()
 Updates the state of text selection.
 
- Protected Member Functions inherited from kanzi::InputManipulator
void addHitTestArguments (MessageArguments &message, const TouchPoint &touchPoint)
 Add hit test information arguments to the message from the touch point.
 
bool detectKeyGesture (const KeyEvent &event, KeyGestureInfo &gesture)
 Detects key gestures from the event that you pass as an argument.
 
Node2DfindNearestParent2D ()
 Find the 2D manipulator node for this input manipulator.
 
InputManagergetInputManager () const
 Get the attached input manager of an input manipulator.
 
 InputManipulator (Domain *domain, ManipulatorType type=ManipulatorType::TouchInputHandler)
 Constructor.
 
virtual bool isCancelableOverride () const
 Overridable check for the cancelable status of an input manipulator.
 
virtual bool isResettableOverride () const
 Overridable check for the resettable status of an input manipulator.
 
void markTouchPointConsumed (const TouchPoint &touchPoint)
 Marks the passed touch point handled.
 
virtual void notifyTouchInside (const TouchInfo &touchInfo)
 Notify an input manipulator about touch events that occur inside the subtree of the input manipulator.
 
virtual void notifyTouchOutside (const TouchInfo &touchInfo)
 Notify an input manipulator about touch events that occur outside the subtree of the input manipulator.
 
virtual void onAttach ()
 Attach function for input manipulators.
 
virtual void onDetach ()
 Detach function for input manipulators.
 
virtual void onFail ()
 Fail function for input manipulators.
 
- Protected Member Functions inherited from kanzi::Object
void initialize ()
 
void onCopy (const Object &other)
 
- Protected Member Functions inherited from kanzi::MetaObject
void initialize ()
 
 MetaObject ()
 
- Protected Member Functions inherited from kanzi::PropertyObject
AbstractPropertyTypeDescriptor::ValueSourceEntryacquireLocalValueSourceEntry (AbstractPropertyTypeDescriptor &descriptor, PropertyStoragePtr &propertyStorage)
 Acquires a local value source entry that is free for the assignment of a value.
 
AbstractPropertyTypeDescriptor::ModifierStorageacquireModifierStorage (AbstractPropertyTypeDescriptor &descriptor, AbstractPropertyTypeDescriptor::PropertyStorage &propertyStorage)
 
AbstractPropertyTypeDescriptor::NotificationStorageacquireNotificationStorage (AbstractPropertyTypeDescriptor &descriptor)
 
PropertyStoragePtr acquirePropertyStorage (AbstractPropertyTypeDescriptor &descriptor)
 
template<typename DataType >
void addPropertyModifierBase (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::ModifierCallback callback, void *owner, bool notify)
 Adds a property modifier entry to the property modifier stack and validates them.
 
void addPropertyValueSource (AbstractPropertyTypeDescriptor &descriptor, AbstractPropertyTypeDescriptor::ValueSource *valueSource, PropertyValuePrecedence precedence, AbstractPropertyTypeDescriptor::ValueSourceOwner *owner)
 Internally adds a property value source.
 
void addPropertyValueSource (AbstractPropertyTypeDescriptor &descriptor, AbstractPropertyTypeDescriptor::ValueSource *valueSource, PropertyValuePrecedence precedence, void *ownerPointer)
 Internally adds a property value source.
 
AbstractPropertyTypeDescriptor::ValueSourceEntryconstructLocalValueSourceEntry (AbstractPropertyTypeDescriptor &descriptor, AbstractPropertyTypeDescriptor::PropertyStorage &propertyStorage)
 
PropertyStoragePtr constructPropertyStorage (AbstractPropertyTypeDescriptor &descriptor)
 
void copyLocalValue (const AbstractPropertyTypeDescriptor::PropertyStorage &otherPropertyStorage)
 Copy local value from property storage.
 
AbstractPropertyTypeDescriptor::ModifierStoragefindModifierStorage (AbstractPropertyTypeDescriptor &descriptor)
 
AbstractPropertyTypeDescriptor::NotificationStoragefindNotificationStorage (AbstractPropertyTypeDescriptor &descriptor) const
 
AbstractPropertyTypeDescriptor::PropertyStoragefindPropertyStorage (AbstractPropertyTypeDescriptor &descriptor) const
 Gets the property storage for given property type descriptor.
 
PropertyStoragePtr findPropertyStoragePtr (AbstractPropertyTypeDescriptor &descriptor) const
 Gets property storage intrusive pointer which you can use to hold a reference until the end of the operation.
 
AbstractPropertyTypeDescriptorfindPropertyTypeDescriptorByNameAndDataType (string_view name, PropertyDataType dataType) const
 Finds a property type descriptor by name and data type.
 
AbstractPropertyTypeDescriptorfindPropertyTypeDescriptorByQualifiedNameAndDataType (string_view qualifiedName, PropertyDataType dataType) const
 Like findPropertyTypeDescriptorByNameAndDataType, but only searches by matching with qualified names.
 
AbstractPropertyTypeDescriptorfindPropertyTypeDescriptorByUnqualifiedNameAndDataType (string_view unqualifiedName, PropertyDataType dataType) const
 Like findPropertyTypeDescriptorByNameAndDataType, but only searches by matching with unqualified names.
 
AbstractPropertyTypeDescriptor::ValueSourcegetClassValueSource (AbstractPropertyTypeDescriptor &descriptor) const
 
AbstractPropertyTypeDescriptor::ValueSourcegetFinalValueSource (AbstractPropertyTypeDescriptor &descriptor) const
 
AbstractPropertyTypeDescriptor::ValueSourcegetNonClassValueSource (AbstractPropertyTypeDescriptor &descriptor) const
 
AbstractPropertyTypeDescriptor::ValueSourcegetTopValueSource (AbstractPropertyTypeDescriptor &descriptor) const
 Gets the top-level value source for a given property descriptor.
 
virtual void notifyPropertyHandlers (PropertyStoragePtr &storagePtr, PropertyNotificationReason reason)
 Notifies all property handlers on a property storage.
 
void onCopy (const PropertyObject &other)
 
void removeLocalValue (AbstractPropertyTypeDescriptor &descriptor, PropertyStoragePtr &propertyStorage)
 Removes a local value from the given property storage.
 
void removePropertyValueSource (AbstractPropertyTypeDescriptor &descriptor, AbstractPropertyTypeDescriptor::ValueSource *valueSource, void *owner)
 Removes a property value source.
 
void validatePropertyModifiers (PropertyStoragePtr &propertyStorage)
 Validates property modifiers without notifying handlers.
 
void validatePropertyModifiersAndNotifyHandlers (PropertyStoragePtr &propertyStorage)
 Validates property modifiers and notifies handlers.
 
- Protected Member Functions inherited from kanzi::InputMethodListener
void connectInputMethods (Node &attachedNode)
 Connects the input methods to this listener.
 
void disconnectInputMethods ()
 Disconnects the input methods from this listener.
 
 InputMethodListener (Domain *domain)
 Constructor.
 
bool isComposingText (InputMethod &inputMethod) const
 Checks whether the inputMethod is in the text composition state.
 
template<typename Method , typename... Arguments>
void updateInputMethods (InputMethod *excludeInputMethod, Method method, const Arguments &... arguments)
 Calls a method of each input method with the arguments passed.
 

Additional Inherited Members

- Protected Types inherited from kanzi::Object
typedef vector< AppliedStyleEntrySharedPtrAppliedStyleContainer
 Applied style container.
 
- Static Protected Member Functions inherited from kanzi::InputManipulator
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 
- Protected Attributes inherited from kanzi::Object
AppliedStyleContainer m_appliedStyles
 Listing of applied styles applied to this object.
 
- Protected Attributes inherited from kanzi::InputMethodListener
InputMethodWeakPtr m_composingInputMethod
 The input method that provides the text composition.
 
TextEditBuffer m_editBuffer
 The buffer where the text input is stored.
 
InputMethodAction m_inputMethodAction
 The label of the input action.
 
vector< pair< InputMethodSharedPtr, bool > > m_inputMethods
 The input method instances with which the input method listener interacts.
 
InputType m_inputType
 The input type.
 
bool m_isReadOnly
 The read-only state.
 

Detailed Description

The text input manipulator handles key gestures used with TextBox nodes to move the cursor, select text, and delete text, and provides the basics of text editing capabilities in Kanzi.

For example, you can enable the application user to:

  • Insert, replace, and erase text.
  • Manipulate the cursor.
  • Select text.

To move the cursor in a TextBox node the text input manipulator uses the Left Arrow, Right Arrow, Home, and End navigation keys, and the Control key modifier.

To modify the text selection in a TextBox node the text input manipulator uses the Left Arrow, Right Arrow, Home, and End navigation keys, and the Control and Shift key modifiers.

The text input manipulator recognizes only one navigation key gesture at a time. When Kanzi recognizes a key-pressed gesture for a navigation key, the manipulator grabs the key input and blocks any key input until Kanzi recognizes the key-released gesture for the pressed navigation key.

When the user presses a navigation key, Kanzi dispatches a message dedicated to that navigation key. When the user holds down a key, Kanzi uses the key-hold and key-repeat gestures to create the text cursor or text selection cursor messages for each navigation key. To configure the key-hold and key-repeat gestures, use the setKeyHoldTimeout() and setKeyRepeatInterval() methods. When focus changes, Kanzi cancels the manipulator, but the cancellation does not result in a separate text cursor or text selection cursor cancel message. You can cancel a key-pressed gesture for a text cursor or text selection navigation key with the cancel() method.

Since
Kanzi 3.9.0

Member Enumeration Documentation

◆ SelectionState

States of text selection.

Enumerator
NoSelection 

Specifies the state where no text is selected.

Started 

Specifies the state where selecting text starts.

Updated 

Specifies the state where the text selection is updated.

Cleared 

Specifies the state where the text selection is cleared.

Constructor & Destructor Documentation

◆ TextInputManipulator()

kanzi::TextInputManipulator::TextInputManipulator ( Domain * domain)
explicitprotected

Constructor.

Member Function Documentation

◆ makeEditorInfo()

static PropertyTypeEditorInfoSharedPtr kanzi::TextInputManipulator::makeEditorInfo ( )
inlinestatic

◆ create()

static TextInputManipulatorSharedPtr kanzi::TextInputManipulator::create ( Domain * domain,
string_view name = "" )
inlinestatic

Creates a TextInputManipulator instance.

Parameters
domainThe domain to which the TextInputManipulator instance belongs.
nameThe name of the input manipulator.

◆ setInputLayout()

void kanzi::TextInputManipulator::setInputLayout ( TextInputLayout & layout)

◆ getMaximumTextLength()

size_t kanzi::TextInputManipulator::getMaximumTextLength ( ) const

Returns the maximum text buffer length constraint.

Returns
The maximum length of the text buffer. If this value is 0, the length of the text buffer is not constrained.

◆ setMaximumTextLength()

void kanzi::TextInputManipulator::setMaximumTextLength ( size_t maxLength)

Sets the maximum text length constraint.

Parameters
maxLengthThe maximum allowed text length as UTF-8 characters for an input text buffer. To remove the constraint, use 0.
See also
getMaximumTextLength()

◆ setText()

void kanzi::TextInputManipulator::setText ( string_view text)

Sets the UTF-8 text.

Parameters
textThe text to set as content.

◆ insertText()

void kanzi::TextInputManipulator::insertText ( size_t position,
string_view text )

Moves the cursor to a given position and inserts text to that position.

After inserting the text, the cursor is in the end of the inserted text.

Parameters
positionThe position to which you want to insert the text.
textThe text to insert.
See also
setText()

◆ deleteText()

void kanzi::TextInputManipulator::deleteText ( size_t begin,
size_t end )

Moves the cursor to position begin and erases from a text buffer UTF-8 characters between positions begin and end.

Position begin must be smaller than position end.

Parameters
beginThe position of the first UTF-8 character to erase.
endThe position of the first UTF-8 character to not erase.

◆ deleteAtCursor()

void kanzi::TextInputManipulator::deleteAtCursor ( )

Deletes a character using delete.

For example, in text that uses a left-to-right script this function deletes the character on the right side of the cursor.

See also
deleteText(), backspaceAtCursor()

◆ backspaceAtCursor()

void kanzi::TextInputManipulator::backspaceAtCursor ( )

Deletes a character using backspace.

For example, in text that uses a left-to-right script this function deletes the character on the left side of the cursor.

See also
deleteText(), deleteAtCursor()

◆ deleteWordAtCursor()

void kanzi::TextInputManipulator::deleteWordAtCursor ( )

Deletes the characters between the cursor position and the word boundary that follows the cursor.

Functionally equivalent to the Control + Delete keys.

◆ backspaceWordAtCursor()

void kanzi::TextInputManipulator::backspaceWordAtCursor ( )

Deletes the characters between the cursor position and the closest word boundary using backspace.

For example, in text that uses a left-to-right script this function deletes the characters between the cursor and the word boundary on its left side. Functionally equivalent to the Control + Backspace keys.

◆ getCursorPosition()

size_t kanzi::TextInputManipulator::getCursorPosition ( ) const

Returns the position of the cursor.

Returns
The cursor position. If any text is selected, the cursor position marks the end point of the selected text.

◆ setCursorPosition()

void kanzi::TextInputManipulator::setCursorPosition ( size_t position)

Sets the position of the cursor in the text buffer of a TextInputConcept.

If any text is selected, the method clears the selected text.

Parameters
positionThe new position of the cursor.

◆ moveCursorForward() [1/2]

void kanzi::TextInputManipulator::moveCursorForward ( size_t characterCount)

Moves the cursor forward by a given number of characters in the text buffer of a TextInputConcept.

Parameters
characterCountThe number of characters by which to move the cursor forward.
See also
moveCursorToEnd(), moveCursorHome(), setCursorPosition(), moveCursorForward(), moveCursorBackward(), moveCursorToNextWord(), moveCursorToPreviousWord()

◆ moveCursorForward() [2/2]

void kanzi::TextInputManipulator::moveCursorForward ( )

Moves the cursor forward by one character.

See also
setCursorPosition(), moveCursorBackward(), moveCursorToNextWord(), moveCursorToPreviousWord()

◆ moveCursorBackward() [1/2]

void kanzi::TextInputManipulator::moveCursorBackward ( size_t characterCount)

Moves the cursor backward by a given number of characters in the text buffer of a TextInputConcept.

Parameters
characterCountThe number of characters by which to move the cursor backward.
See also
moveCursorToEnd(), moveCursorHome(), setCursorPosition(), moveCursorForward(), moveCursorBackward(), moveCursorToNextWord(), moveCursorToPreviousWord()

◆ moveCursorBackward() [2/2]

void kanzi::TextInputManipulator::moveCursorBackward ( )

Moves the cursor backward by one character.

See also
setCursorPosition(), moveCursorForward(), moveCursorToNextWord(), moveCursorToPreviousWord()

◆ moveCursorToEnd()

void kanzi::TextInputManipulator::moveCursorToEnd ( )

Moves the cursor to the end of the text buffer of a TextInputConcept.

See also
moveCursorHome(), setCursorPosition(), moveCursorForward(), moveCursorBackward(), moveCursorToNextWord(), moveCursorToPreviousWord()

◆ moveCursorHome()

void kanzi::TextInputManipulator::moveCursorHome ( )

Moves the cursor to the beginning of the text buffer of a TextInputConcept.

See also
moveCursorToEnd(), setCursorPosition(), moveCursorForward(), moveCursorBackward(), moveCursorToNextWord(), moveCursorToPreviousWord()

◆ moveCursorToNextWord()

void kanzi::TextInputManipulator::moveCursorToNextWord ( )

◆ moveCursorToPreviousWord()

void kanzi::TextInputManipulator::moveCursorToPreviousWord ( )

◆ hasSelection()

bool kanzi::TextInputManipulator::hasSelection ( ) const

Checks whether any text is selected.

Returns
If any text is selected, returns true, otherwise false.

◆ selectText()

void kanzi::TextInputManipulator::selectText ( size_t start,
size_t end )

Selects the text between the given start and end positions.

Parameters
startThe start position of the text selection.
endThe end position of the text selection. If the text selection is successful, the cursor ends up at this position.

◆ getSelectionStart()

size_t kanzi::TextInputManipulator::getSelectionStart ( ) const

Returns the starting point of the selected text.

Returns
The starting point of the selected text. If no text is selected, the method returns the cursor position.

◆ setSelectionStart()

void kanzi::TextInputManipulator::setSelectionStart ( size_t position)

Sets the start of the text selection at the position given as argument.

Parameters
positionThe position at which to start the text selection. This position cannot be larger than the cursor position.

◆ getSelectionEnd()

size_t kanzi::TextInputManipulator::getSelectionEnd ( ) const
inline

Returns the ending point of the selected text.

Returns
The ending point of the selected text, same as the cursor position.

◆ setSelectionEnd()

void kanzi::TextInputManipulator::setSelectionEnd ( size_t position)

Sets the end of the text selection at the position given as argument.

This is otherwise equivalent to moving the cursor to a given position, but it either starts a selection or modifies an existing selection.

Parameters
positionThe position at which to end the text selection. This position cannot be smaller than the position at which the text selection starts.
See also
getSelectionEnd(), getSelectionStart(), setSelectionStart(), setCursorPosition()

◆ clearSelection()

void kanzi::TextInputManipulator::clearSelection ( )

Clears the text selection.

◆ selectAll()

void kanzi::TextInputManipulator::selectAll ( )

Selects all content in a Text Box node.

This method places the text selection start and end cursors in front of and at the end of the text string.

◆ moveSelectionStartForward() [1/2]

void kanzi::TextInputManipulator::moveSelectionStartForward ( size_t characterCount)

Moves the start of text selection forward by a given characterCount in the text buffer of a Text Box node.

Parameters
characterCountThe number of characters by which to move the start of text selection forward.
See also
moveSelectionEndForward(), moveSelectionEndBackward(), selectText(), moveSelectionStartToNextWord(), moveSelectionStartToPreviousWord()

◆ moveSelectionStartBackward() [1/2]

void kanzi::TextInputManipulator::moveSelectionStartBackward ( size_t characterCount)

Moves the end of text selection a given characterCount backward in the text buffer of a Text Box node.

Parameters
characterCountThe number of characters to move the end of text selection backward.
See also
moveSelectionEndForward(), moveSelectionEndBackward(), selectText(), moveSelectionStartToNextWord(), moveSelectionStartToPreviousWord()

◆ moveSelectionEndForward() [1/2]

void kanzi::TextInputManipulator::moveSelectionEndForward ( size_t characterCount)

Moves the end of text selection a given characterCount forward in the text buffer of a Text Box node.

Parameters
characterCountThe number of characters to move the end of text selection forward.
See also
moveSelectionEndForward(), moveSelectionEndBackward(), selectText(), moveSelectionEndToNextWord(), moveSelectionEndToPreviousWord()

◆ moveSelectionEndBackward() [1/2]

void kanzi::TextInputManipulator::moveSelectionEndBackward ( size_t characterCount)

Moves the end of text selection a given characterCount backward in the text buffer of a Text Box node.

Parameters
characterCountThe number of characters to move the end of text selection backward.
See also
moveSelectionEndForward(), moveSelectionEndBackward(), selectText(), moveSelectionEndToNextWord(), moveSelectionEndToPreviousWord()

◆ moveSelectionStartForward() [2/2]

void kanzi::TextInputManipulator::moveSelectionStartForward ( )

Moves the start of the text selection forward by one character.

See also
selectText(), moveSelectionStartBackward(), moveSelectionStartToNextWord(), moveSelectionStartToPreviousWord()

◆ moveSelectionStartBackward() [2/2]

void kanzi::TextInputManipulator::moveSelectionStartBackward ( )

Moves the start of the text selection backward by one character.

See also
selectText(), moveSelectionStartForward(), moveSelectionStartToNextWord(), moveSelectionStartToPreviousWord()

◆ moveSelectionEndForward() [2/2]

void kanzi::TextInputManipulator::moveSelectionEndForward ( )

Moves the end of the text selection forward by one character.

See also
selectText(), moveSelectionEndBackward(), moveSelectionEndToNextWord(), moveSelectionEndToPreviousWord()

◆ moveSelectionEndBackward() [2/2]

void kanzi::TextInputManipulator::moveSelectionEndBackward ( )

Moves the end of the text selection backward by one character.

See also
selectText(), moveSelectionEndForward(), moveSelectionEndToNextWord(), moveSelectionEndToPreviousWord()

◆ moveSelectionStartToNextWord()

void kanzi::TextInputManipulator::moveSelectionStartToNextWord ( )

Moves the start of the text selection forward to the next word.

See also
moveSelectionStartToPreviousWord(), selectText(), moveSelectionStartForward(), moveSelectionStartBackward()

◆ moveSelectionStartToPreviousWord()

void kanzi::TextInputManipulator::moveSelectionStartToPreviousWord ( )

Moves the start of the text selection backward to the previous word.

See also
moveSelectionStartToNextWord(), selectText(), moveSelectionStartForward(), moveSelectionStartBackward()

◆ moveSelectionEndToNextWord()

void kanzi::TextInputManipulator::moveSelectionEndToNextWord ( )

Moves the end of the text selection forward to the next word.

See also
moveSelectionEndToNextWord(), selectText(), moveSelectionEndForward(), moveSelectionEndBackward()

◆ moveSelectionEndToPreviousWord()

void kanzi::TextInputManipulator::moveSelectionEndToPreviousWord ( )

Moves the end of the text selection backward to the previous word.

See also
moveSelectionEndToPreviousWord(), selectText(), moveSelectionEndForward(), moveSelectionEndBackward()

◆ moveSelectionEndpointBackward() [1/2]

void kanzi::TextInputManipulator::moveSelectionEndpointBackward ( size_t steps)

Moves the endpoint of the active text selection backward with steps passed as argument.

Parameters
stepsThe steps to move the active selection endpoint backward. If the selection is initiated when you call this function, the selection start position becomes the active selection endpoint.

◆ moveSelectionEndpointBackward() [2/2]

void kanzi::TextInputManipulator::moveSelectionEndpointBackward ( )
inline

Overload of moveSelectionEndpointBackward(), moves the endpoint of the active text selection one step backward.

◆ moveSelectionEndpointForward() [1/2]

void kanzi::TextInputManipulator::moveSelectionEndpointForward ( size_t steps)

Moves the endpoint of the active text selection forward by steps passed as argument.

Parameters
stepsThe steps to move the active selection endpoint forward. If the selection is initiated when you call this function, the selection end position becomes the active selection endpoint.

◆ moveSelectionEndpointForward() [2/2]

void kanzi::TextInputManipulator::moveSelectionEndpointForward ( )
inline

Overload of moveSelectionEndpointForward(), moves the endpoint of the active text selection one step forward.

◆ moveSelectionEndpointToPreviousWord()

void kanzi::TextInputManipulator::moveSelectionEndpointToPreviousWord ( )

Moves the endpoint of the active text selection backward to the previous word boundary.

If the selection is initiated when you call this function, the selection start position becomes the active selection endpoint.

◆ moveSelectionEndpointToNextWord()

void kanzi::TextInputManipulator::moveSelectionEndpointToNextWord ( )

Moves the endpoint of the active text selection forward to the previous word boundary.

If the selection is initiated when you call this function, the selection end position becomes the active selection endpoint.

◆ moveSelectionEndpointToFront()

void kanzi::TextInputManipulator::moveSelectionEndpointToFront ( )

Moves the active selection end-point to the beginning of the text string.

If the selection is initiated when you call this function, the selection start position becomes the active selection end-point.

◆ moveSelectionEndpointToBack()

void kanzi::TextInputManipulator::moveSelectionEndpointToBack ( )

Moves the endpoint of the active text selection to the end of the text string.

If the selection is initiated when you call this function, the selection end position becomes the active selection endpoint.

◆ setEchoMode()

void kanzi::TextInputManipulator::setEchoMode ( EchoMode echoMode)

Sets the echo mode to use to format the display text of the text buffer of the input manipulator.

Parameters
echoModeThe echo mode to use to format the display text.
See also
TextEditBuffer::getEchoMode(), TextEditBuffer::setEchoMode()

◆ setPasswordMaskingCharacter()

void kanzi::TextInputManipulator::setPasswordMaskingCharacter ( string_view passwordMask)

Sets the password masking character of the text buffer of the input manipulator.

Parameters
passwordMaskThe masking character to set.

◆ setReadOnly()

void kanzi::TextInputManipulator::setReadOnly ( bool readOnly)

Sets whether the user input can modify the text of a TextInputManipulator.

Parameters
readOnlyThe read-only state to set.
See also
isReadOnly(), ReadOnlyStateChangedMessage

◆ setInputMethodAction()

void kanzi::TextInputManipulator::setInputMethodAction ( InputMethodAction action)

Sets the input method action of the text input methods.

Parameters
actionThe input method action to set.

◆ setInputType()

void kanzi::TextInputManipulator::setInputType ( InputType inputType)

Sets the input type of the input methods.

Parameters
inputTypeThe input type to use in the input methods.

◆ activateInput()

void kanzi::TextInputManipulator::activateInput ( )

Activates the input on an input manipulator.

◆ deactivateInput()

void kanzi::TextInputManipulator::deactivateInput ( )

Deactivates the input on an input manipulator.

◆ ensureInputMethodsAvailable()

void kanzi::TextInputManipulator::ensureInputMethodsAvailable ( )

Ensures that the connected input methods are available.

For example, if the input method is an on-screen keyboard, shows the on-screen keyboard.

◆ getTextKeyNavigationDirection()

TextKeyNavigationDirection kanzi::TextInputManipulator::getTextKeyNavigationDirection ( ) const

Returns the direction of key navigation.

Returns
Key navigation direction.

◆ setTextKeyNavigationDirection()

void kanzi::TextInputManipulator::setTextKeyNavigationDirection ( TextKeyNavigationDirection direction)

Sets the direction of key navigation.

Parameters
directionFor left-to-right key navigation pass TextKeyNavigationDirection::LeftToRight. For right-to-left key navigation pass TextKeyNavigationDirection::LeftToRight.

◆ onPartialKeyPressGesture()

void kanzi::TextInputManipulator::onPartialKeyPressGesture ( KeyGestureInfo & )
overrideprotectedvirtual

◆ onKeyPressGesture()

void kanzi::TextInputManipulator::onKeyPressGesture ( KeyGestureInfo & )
overrideprotectedvirtual

◆ onKeyReleaseGesture()

void kanzi::TextInputManipulator::onKeyReleaseGesture ( KeyGestureInfo & )
overrideprotectedvirtual

◆ notifyKeyInput()

bool kanzi::TextInputManipulator::notifyKeyInput ( const KeyEvent & event)
overrideprotectedvirtual

◆ onCancel()

void kanzi::TextInputManipulator::onCancel ( )
overrideprotectedvirtual

Overrides InputManipulator::onCancel().

Reimplemented from kanzi::InputManipulator.

◆ onReset()

void kanzi::TextInputManipulator::onReset ( )
overrideprotectedvirtual

Overrides InputManipulator::onReset().

Reimplemented from kanzi::InputManipulator.

◆ onInputMethodAvailableOverride()

void kanzi::TextInputManipulator::onInputMethodAvailableOverride ( InputMethod & source,
bool available )
overrideprotectedvirtual

◆ onInputMethodDisconnectedOverride()

bool kanzi::TextInputManipulator::onInputMethodDisconnectedOverride ( InputMethod & source)
overrideprotectedvirtual

◆ onTextAddedOverride()

bool kanzi::TextInputManipulator::onTextAddedOverride ( InputMethod & source,
size_t position,
string_view text )
overrideprotectedvirtual

◆ onTextDeletedOverride()

bool kanzi::TextInputManipulator::onTextDeletedOverride ( InputMethod & source,
size_t start,
size_t end )
overrideprotectedvirtual

◆ onTextChangedOverride()

bool kanzi::TextInputManipulator::onTextChangedOverride ( InputMethod & source,
string_view text )
overrideprotectedvirtual

◆ onTextCompositionStartedOverride()

bool kanzi::TextInputManipulator::onTextCompositionStartedOverride ( InputMethod & source)
overrideprotectedvirtual

◆ onCompositionTextUpdatedOverride()

bool kanzi::TextInputManipulator::onCompositionTextUpdatedOverride ( InputMethod & source,
string_view text )
overrideprotectedvirtual

◆ onCompositionTextCommittedOverride()

bool kanzi::TextInputManipulator::onCompositionTextCommittedOverride ( InputMethod & source)
overrideprotectedvirtual

◆ onTextCompositionCanceledOverride()

void kanzi::TextInputManipulator::onTextCompositionCanceledOverride ( InputMethod & source)
overrideprotectedvirtual

◆ onCursorMovedOverride()

bool kanzi::TextInputManipulator::onCursorMovedOverride ( InputMethod & source,
size_t position )
overrideprotectedvirtual

◆ onSelectionChangedOverride()

bool kanzi::TextInputManipulator::onSelectionChangedOverride ( InputMethod & source,
size_t start,
size_t end )
overrideprotectedvirtual

◆ onInputTypeChangedOverride()

void kanzi::TextInputManipulator::onInputTypeChangedOverride ( InputMethod & source,
InputType inputType )
overrideprotectedvirtual

◆ onExecuteInputMethodActionOverride()

void kanzi::TextInputManipulator::onExecuteInputMethodActionOverride ( InputMethod & )
overrideprotectedvirtual

◆ notifyTextChanged()

void kanzi::TextInputManipulator::notifyTextChanged ( )
protected

Dispatches a TextChangedMessage to the attached node.

◆ notifyCursorMoved()

void kanzi::TextInputManipulator::notifyCursorMoved ( )
protected

Dispatches a CursorMovedMessage to the attached node.

◆ notifySelectionChanged()

void kanzi::TextInputManipulator::notifySelectionChanged ( )
protected

Dispatches a SelectionChangedMessage to the attached node.

◆ notifyReadOnlyStateChanged()

void kanzi::TextInputManipulator::notifyReadOnlyStateChanged ( )
protected

Dispatches a ReadOnlyStateChangedMessage to the attached node.

◆ notifyInputTypeChanged()

void kanzi::TextInputManipulator::notifyInputTypeChanged ( )
protected

Dispatches an InputTypeChangedMessage to the attached node.

◆ moveCursorTo()

bool kanzi::TextInputManipulator::moveCursorTo ( size_t position)
protected

Moves the cursor to the position given as argument.

Parameters
positionThe new position of the cursor.

◆ updateSelectionState()

void kanzi::TextInputManipulator::updateSelectionState ( )
protected

Updates the state of text selection.

◆ handleLeftArrowGesture()

void kanzi::TextInputManipulator::handleLeftArrowGesture ( )
protected

Handles the Left Arrow key gesture.

◆ handleRightArrowGesture()

void kanzi::TextInputManipulator::handleRightArrowGesture ( )
protected

Handles the Right Arrow key gesture.

◆ handleControlLeftArrowGesture()

void kanzi::TextInputManipulator::handleControlLeftArrowGesture ( )
protected

Handles the Control + Left Arrow key gesture.

◆ handleControlRightArrowGesture()

void kanzi::TextInputManipulator::handleControlRightArrowGesture ( )
protected

Handles the Control + Right Arrow key gesture.

◆ handleShiftLeftArrowGesture()

void kanzi::TextInputManipulator::handleShiftLeftArrowGesture ( )
protected

Handles the Shift + Left Arrow key gesture.

◆ handleShiftRightArrowGesture()

void kanzi::TextInputManipulator::handleShiftRightArrowGesture ( )
protected

Handles the Shift + Right Arrow key gesture.

◆ handleShiftControlLeftArrowGesture()

void kanzi::TextInputManipulator::handleShiftControlLeftArrowGesture ( )
protected

Handles the Shift + Control + Left Arrow key gesture.

◆ handleShiftControlRightArrowGesture()

void kanzi::TextInputManipulator::handleShiftControlRightArrowGesture ( )
protected

Handles the Shift + Control + Right Arrow key gesture.

Member Data Documentation

◆ TextChangedMessage

MessageType<TextChangedMessageArguments> kanzi::TextInputManipulator::TextChangedMessage
static

Kanzi dispatches this message to the attached node when the user changes the text content by adding or removing characters, when committing the IME composition text, or when the entire text is replaced.

◆ CursorMovedMessage

MessageType<CursorMovedMessageArguments> kanzi::TextInputManipulator::CursorMovedMessage
static

Kanzi dispatches this message to the attached node when the user changes the cursor position by navigating with the arrow keys.

◆ SelectionChangedMessage

MessageType<SelectionChangedMessageArguments> kanzi::TextInputManipulator::SelectionChangedMessage
static

Kanzi dispatches this message to the attached node when the user changes the text selection by navigating with the arrow keys.

◆ ReadOnlyStateChangedMessage

MessageType<ReadOnlyStateChangedMessageArguments> kanzi::TextInputManipulator::ReadOnlyStateChangedMessage
static

Kanzi dispatches this message to the attached node when the user changes the read-only state.

◆ InputTypeChangedMessage

MessageType<InputTypeChangedMessageArguments> kanzi::TextInputManipulator::InputTypeChangedMessage
static

Kanzi dispatches this message to the attached node when the input method updates the input type.

◆ InputMethodActionMessage

MessageType<InputMethodActionMessageArguments> kanzi::TextInputManipulator::InputMethodActionMessage
static

Kanzi dispatches this message to the attached node when the input action event is handled.

◆ CompositionTextChangedMessage

MessageType<TextCompositionStateMessageArguments> kanzi::TextInputManipulator::CompositionTextChangedMessage
static

Kanzi dispatches this message to the attached node when the input method updates the composition text.

◆ CompositionTextCommittedMessage

MessageType<TextCompositionStateMessageArguments> kanzi::TextInputManipulator::CompositionTextCommittedMessage
static

Kanzi dispatches this message to the attached node when the input method commits the composition text.

◆ TextCompositionCanceledMessage

MessageType<TextCompositionStateMessageArguments> kanzi::TextInputManipulator::TextCompositionCanceledMessage
static

Kanzi dispatches this message to the attached node when the input method cancels the text composition.

◆ InputMethodsDisconnectedMessage

MessageType<InputMethodsDisconnectedMessageArguments> kanzi::TextInputManipulator::InputMethodsDisconnectedMessage
static

Kanzi dispatches this message to the attached node when the input methods of the input manipulator are disconnected.

◆ InputMethodAvailableChangedMessage

MessageType<InputMethodAvailableChangedMessageArguments> kanzi::TextInputManipulator::InputMethodAvailableChangedMessage
static

Kanzi dispatches this message to the attached node when the availability of an input method of the input manipulator changes.

When an input method is available, it produces text input. When an input method is not available, it does not produce text input, but is still connected to the input manipulator.


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