Skip to content
SiteEmail

cohtml::ITextInputHandler

Notifies of changes to input elements.

#include <TextInputHandler.h>

Name
ITextInputHandler()
virtual~ITextInputHandler()
virtual voidOnSelectionChanged(IInputProxy * proxy, TextInput::Selection selection)
Notifies that the selection in an input element has changed, including change of the caret position.
virtual voidOnTextChanged(IInputProxy * proxy, const char * addedChars, unsigned addedCount, const char * removedChars, unsigned removedCount, unsigned index)
Notifies that the text in an input element has changed.
virtual voidOnFocus(IInputProxy * proxy)
Called when the element is focused.
virtual voidOnBlur(IInputProxy * proxy)
Called when the element loses focus proxy the affected element.
ITextInputHandler()
virtual ~ITextInputHandler()
inline virtual void OnSelectionChanged(
IInputProxy * proxy,
TextInput::Selection selection
)

Notifies that the selection in an input element has changed, including change of the caret position.

Parameters:

  • proxy the affected element
  • selection the new selection
inline virtual void OnTextChanged(
IInputProxy * proxy,
const char * addedChars,
unsigned addedCount,
const char * removedChars,
unsigned removedCount,
unsigned index
)

Notifies that the text in an input element has changed.

Parameters:

  • proxy the affected element
  • addedChars the newly added characters, can be nullptr
  • addedCount the count of newly added characters
  • removedChars the newly removed/replaced characters, can be nullptr
  • removedCount count the count of the newly removed/replaced characters
  • index the index at which the characters are added and/or removed
inline virtual void OnFocus(
IInputProxy * proxy
)

Called when the element is focused.

Parameters:

  • proxy the affected element
inline virtual void OnBlur(
IInputProxy * proxy
)

Called when the element loses focus proxy the affected element.