1.4.1.2
Gameface
cohtml::ITextInputHandler Class Referenceabstract

Notifies of changes to input elements. More...

Public Member Functions

virtual void OnSelectionChanged (IInputProxy *proxy, TextInput::Selection selection)=0
 Notifies that the selection in an input element has changed, including change of the caret position. More...
 
virtual void OnTextChanged (IInputProxy *proxy, const char *addedChars, unsigned addedCount, const char *removedChars, unsigned removedCount, unsigned index)=0
 Notifies that the text in an input element has changed. More...
 
virtual void OnFocus (IInputProxy *proxy)=0
 Called when the element is focused. More...
 
virtual void OnBlur (IInputProxy *proxy)=0
 Called when the element loses focus proxy the affected element. More...
 

Detailed Description

Notifies of changes to input elements.

Member Function Documentation

◆ OnBlur()

virtual void cohtml::ITextInputHandler::OnBlur ( IInputProxy proxy)
pure virtual

Called when the element loses focus proxy the affected element.

◆ OnFocus()

virtual void cohtml::ITextInputHandler::OnFocus ( IInputProxy proxy)
pure virtual

Called when the element is focused.

Parameters
proxythe affected element

◆ OnSelectionChanged()

virtual void cohtml::ITextInputHandler::OnSelectionChanged ( IInputProxy proxy,
TextInput::Selection  selection 
)
pure virtual

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

Parameters
proxythe affected element
selectionthe new selection

◆ OnTextChanged()

virtual void cohtml::ITextInputHandler::OnTextChanged ( IInputProxy proxy,
const char *  addedChars,
unsigned  addedCount,
const char *  removedChars,
unsigned  removedCount,
unsigned  index 
)
pure virtual

Notifies that the text in an input element has changed.

Parameters
proxythe affected element
addedCharsthe newly added characters, can be nullptr
addedCountthe count of newly added characters
removedCharsthe newly removed/replaced characters, can be nullptr
removedCountcount the count of the newly removed/replaced characters
indexthe index at which the characters are added and/or removed