Kanzi Engine API
kanzi::WindowsIme Class Reference

#include <kanzi/core.ui/platform/input/win32/windows_ime.hpp>

Inheritance diagram for kanzi::WindowsIme:
[legend]

Public Member Functions

bool processMessages (HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam, EventQueue *queue)
 
 WindowsIme (Domain *domain)
 
- Public Member Functions inherited from kanzi::InputMethod
void connect (InputMethodListener &listener, Node &attachedNode, string_view text, size_t cursorPosition, size_t selectionStart, size_t selectionEnd)
 Connects an input method listener to this input method. More...
 
void disconnect (InputMethodListener &listener)
 Disconnects the listener passed as argument. More...
 
InputMethodListenergetListener () const
 Returns the active listener of the input method. More...
 
bool isBlocked () const
 Checks whether the input method is blocked by another input method that is in the text composition state. More...
 
void notifyCompositionEnd (InputMethodListener &listener)
 Notifies the input method that text composition is completed or canceled on the listener. More...
 
void notifyCompositionStart (InputMethodListener &listener)
 Notifies the input method that text composition is started on the listener. More...
 
void notifyCursorMove (InputMethodListener &listener, size_t position)
 Notifies the input method about the cursor position change in a listener. More...
 
void notifyEnterKeyCancel (InputMethodListener &listener)
 Notifies the input method that the input method listener cancels the Enter key event. More...
 
void notifyEnterKeyLabelChange (InputMethodListener &listener, EnterKeyLabel label)
 Notifies the input method that the label of the Enter key associated with the input method listener changed. More...
 
void notifyEnterKeyPress (InputMethodListener &listener)
 Notifies the input method that the input method listener handles the Enter key press event. More...
 
void notifyEnterKeyRelease (InputMethodListener &listener)
 Notifies the input method that the input method listener handles the Enter key release event. More...
 
bool notifyInputTypeAttributesChange (InputMethodListener &listener, EchoMode echoMode, InputType inputType)
 Notifies the input method that the input type attributes of the listener changed. More...
 
void notifyReadOnlyChange (InputMethodListener &listener, bool readOnly)
 Notifies the input method that the input method listener read-only state is changed. More...
 
void notifySelectionChange (InputMethodListener &listener, size_t start, size_t end)
 Notifies the input method about changes in text selection in a listener. More...
 
void notifyTextChange (InputMethodListener &listener, string_view text, size_t position)
 Notifies the input method about the text change in a listener passed as argument. More...
 
virtual ~InputMethod ()=default
 Destructor. More...
 

Protected Member Functions

void activate ()
 
void connectOverride (string_view text, size_t cursorPosition, size_t selectionStart, size_t selectionEnd) override
 To store the current state of the active input method listener, override this method. More...
 
void deactivate ()
 
void disconnectOverride () override
 To clear the state of the input method from previously active input method listener, override this method. More...
 
void notifyCompositionEndOverride () override
 To handle the completion or cancellation of the text composition on an active input method listener, override this method. More...
 
void notifyCompositionStartOverride () override
 To handle the start of the text composition on an active input method listener, override this method. More...
 
void notifyCursorMoveOverride (size_t position) override
 To handle the cursor position change in an active input method listener, override this method. More...
 
void notifyEnterKeyCancelOverride () override
 Notifies the input method that the active input method listener cancels the Enter key event. More...
 
void notifyEnterKeyPressOverride () override
 Notifies the input method that the active input method listener handles the Enter key press event. More...
 
void notifyEnterKeyReleaseOverride () override
 Notifies the input method that the active input method listener handles the Enter key release event. More...
 
void notifySelectionChangeOverride (size_t start, size_t end) override
 To handle the changes in text selection in an active input method listener, override this method. More...
 
void notifyTextChangeOverride (string_view text, size_t position) override
 To handle the text change in an active input method listener, override this method. More...
 
- Protected Member Functions inherited from kanzi::InputMethod
NodeSharedPtr getAttachedNode () const
 Returns the node to which the input method is attached. More...
 
 InputMethod ()=default
 Default constructor. More...
 
virtual bool notifyInputTypeAttributesChangeOverride (EchoMode echoMode, InputType inputType)
 To handle the change in the input type of the active input method listener, override this method. More...
 
virtual void notifyReadOnlyChangeOverride (bool readOnly)
 To handle the change in the read-only state of the active input method listener, override this method. More...
 
virtual void notifyEnterKeyLabelChangeOverride (EnterKeyLabel label)
 Notifies the active input method that the label of the Enter key associated with the input method listener changed. More...
 
bool disconnectListener ()
 To disconnect the input method from its active input method listener, call this method. More...
 
void setText (string_view text)
 Tells the active input method listener to replace its cached text with the content passed in the text argument. More...
 
void insertText (size_t position, string_view text)
 Tells the active input method listener to add a text to its cached text. More...
 
void deleteText (size_t start, size_t end)
 Tells the active input method listener to remove the text between the start and end positions. More...
 
void startTextComposition ()
 Tells the active input method listener to enter text composition state at the current cursor position. More...
 
void updateCompositionText (string_view text)
 Tells the active input method listener to update the composition text at a given position. More...
 
void commitCompositionText ()
 Tells the active input method listener to add the composition text received by previous calls of updateCompositionText() into the cached text. More...
 
void cancelTextComposition ()
 Tells the active input method listener to cancel the text composition and discard the composition text. More...
 
void moveCursor (size_t position)
 Tells the active input method listener to update the cursor position. More...
 
void updateSelection (size_t start, size_t end)
 Tells the active input method listener to update the cursor positions at the start and end of the text selection. More...
 
void updateInputType (InputType inputType)
 Tells the active input method listener to update its input type. More...
 
void pressEnterKey ()
 Informs the active input method listener that the Enter key is pressed. More...
 
void releaseEnterKey ()
 Informs the active input method listener that the Enter key is released. More...
 
void cancelEnterKey ()
 Informs the active input method listener that the Enter key event is canceled. More...
 

Detailed Description

Since
Kanzi 3.9.0

Constructor & Destructor Documentation

kanzi::WindowsIme::WindowsIme ( Domain domain)

Member Function Documentation

bool kanzi::WindowsIme::processMessages ( HWND  hwnd,
UINT  message,
WPARAM  wparam,
LPARAM  lparam,
EventQueue queue 
)
void kanzi::WindowsIme::connectOverride ( string_view  text,
size_t  cursorPosition,
size_t  selectionStart,
size_t  selectionEnd 
)
overrideprotectedvirtual

To store the current state of the active input method listener, override this method.

The state includes text and cursor positions used in the listener.

Parameters
textThe text in the listener.
cursorPositionThe position of the cursor.
selectionStartThe position of the start of text selection.
selectionEndThe position of the end of text selection.
See also
connect()

Implements kanzi::InputMethod.

void kanzi::WindowsIme::disconnectOverride ( )
overrideprotectedvirtual

To clear the state of the input method from previously active input method listener, override this method.

Do not call getListener() or getAttachedNode() inside disconnectOverride(). Kanzi can be already destroying the attached node and previously active listener.

See also
disconnect()

Implements kanzi::InputMethod.

void kanzi::WindowsIme::notifyTextChangeOverride ( string_view  text,
size_t  position 
)
overrideprotectedvirtual

To handle the text change in an active input method listener, override this method.

Parameters
textThe text in the input method listener to update.
positionThe cursor position in the input method listener.
See also
notifyTextChange()

Implements kanzi::InputMethod.

void kanzi::WindowsIme::notifyCompositionStartOverride ( )
overrideprotectedvirtual

To handle the start of the text composition on an active input method listener, override this method.

See also
notifyCompositionStart()

Implements kanzi::InputMethod.

void kanzi::WindowsIme::notifyCompositionEndOverride ( )
overrideprotectedvirtual

To handle the completion or cancellation of the text composition on an active input method listener, override this method.

See also
notifyCompositionEnd()

Implements kanzi::InputMethod.

void kanzi::WindowsIme::notifyCursorMoveOverride ( size_t  position)
overrideprotectedvirtual

To handle the cursor position change in an active input method listener, override this method.

Parameters
positionThe cursor position in the input method listener.
See also
notifyCursorMove()

Implements kanzi::InputMethod.

void kanzi::WindowsIme::notifySelectionChangeOverride ( size_t  start,
size_t  end 
)
overrideprotectedvirtual

To handle the changes in text selection in an active input method listener, override this method.

If both the start and the end position have the same value, Kanzi clears the selection.

Parameters
startThe position of the start of text selection in the input method listener.
endThe position of the end of text selection in the input method listener.
See also
notifySelectionChange()

Implements kanzi::InputMethod.

void kanzi::WindowsIme::notifyEnterKeyPressOverride ( )
overrideprotectedvirtual

Notifies the input method that the active input method listener handles the Enter key press event.

Reimplemented from kanzi::InputMethod.

void kanzi::WindowsIme::notifyEnterKeyReleaseOverride ( )
overrideprotectedvirtual

Notifies the input method that the active input method listener handles the Enter key release event.

Reimplemented from kanzi::InputMethod.

void kanzi::WindowsIme::notifyEnterKeyCancelOverride ( )
overrideprotectedvirtual

Notifies the input method that the active input method listener cancels the Enter key event.

Reimplemented from kanzi::InputMethod.

void kanzi::WindowsIme::activate ( )
protected
void kanzi::WindowsIme::deactivate ( )
protected

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