cohtml::ITextInputHandler
On this page
Notifies of changes to input elements.
#include <TextInputHandler.h>
Public Functions
Name | |
---|---|
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. |
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. |
virtual void | OnFocus(IInputProxy * proxy) Called when the element is focused. |
virtual void | OnBlur(IInputProxy * proxy) Called when the element loses focus proxy the affected element. |
Public Functions Documentation
function ITextInputHandler
ITextInputHandler()
function ~ITextInputHandler
virtual ~ITextInputHandler()
function OnSelectionChanged
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
function OnTextChanged
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
function OnFocus
inline virtual void OnFocus(
IInputProxy * proxy
)
Called when the element is focused.
Parameters:
- proxy the affected element
function OnBlur
inline virtual void OnBlur(
IInputProxy * proxy
)
Called when the element loses focus proxy the affected element.