1.26.2.1
Gameface
cohtml::ITextInputHandler Class Reference

Notifies of changes to input elements. More...

Public Member Functions

 ITextInputHandler ()
 
virtual ~ITextInputHandler ()
 
virtual void OnSelectionChanged (IInputProxy *proxy, TextInput::Selection selection)
 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)
 Notifies that the text in an input element has changed. More...
 
virtual void OnFocus (IInputProxy *proxy)
 Called when the element is focused. More...
 
virtual void OnBlur (IInputProxy *proxy)
 Called when the element loses focus proxy the affected element. More...
 

Detailed Description

Notifies of changes to input elements.

Constructor & Destructor Documentation

◆ ITextInputHandler()

cohtml::ITextInputHandler::ITextInputHandler ( )

◆ ~ITextInputHandler()

virtual cohtml::ITextInputHandler::~ITextInputHandler ( )
virtual

Member Function Documentation

◆ OnBlur()

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

Called when the element loses focus proxy the affected element.

◆ OnFocus()

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

Called when the element is focused.

Parameters
proxythe affected element

◆ OnSelectionChanged()

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

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 
)
inlinevirtual

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