Interface ITextInputController
interface ITextInputController
Extends com.amazon.apmf.IStandard
Interface to input method framework for interacting with editable text and keyboard.
Methods
setInputFilters()
Sets a series of filters that will be called in succession whenever the text of this EditableView is changed.voidsetInputFilters(IInputFilter*[]filters)
Parameters
filters
IInputFilter*[] — Required
Array of IInputFilter.
getInputFilters()
Returns the array of input filters that are currently applied to the current EditableView.IInputFilter*[]getInputFilters()
Returns
IInputFilter*[]
Array of IInputFilter..
setSecureTextStrategy()
Sets the password hide strategy to transform raw text to hidden text.voidsetSecureTextStrategy(SecureTextStrategy*strategy)
Parameters
strategy
SecureTextStrategy* — Required
The strategy used to hide text.
addTextChangedListener()
Adds a listener for the text changed.com.amazon.apmf.ISubscription*addTextChangedListener(ITextChangedListener*listener)
Parameters
listener
ITextChangedListener* — Required
Pointer to an instance of ITextChangedListener.
Returns
com.amazon.apmf.ISubscription*
ISubscription object related to the listener.
addInputActionListener()
Adds a listener for the on input action changed.com.amazon.apmf.ISubscription*addInputActionListener(IInputActionListener*listener)
Parameters
listener
IInputActionListener* — Required
Pointer to an instance of IInputActionListener.
Returns
com.amazon.apmf.ISubscription*
ISubscription object related to the listener.
setAttributedText()
Sets the attributed text of thevoidsetAttributedText(com.amazon.kepler.uitoolkit.graphics.IAttributedText*attributedText)
ITextInputController.
Parameters
attributedText
com.amazon.kepler.uitoolkit.graphics.IAttributedText* — Required
The IAttributedText object to set the text of ITextInputController.
getAttributedText()
Returns the current attributed text displayed on thecom.amazon.kepler.uitoolkit.graphics.IAttributedText*getAttributedText()
ITextInputController.
Returns
com.amazon.kepler.uitoolkit.graphics.IAttributedText*
IAttributedText object of the ITextInputController.
insert()
Inserts text into the current position.voidinsert(com.amazon.kepler.uitoolkit.graphics.IAttributedText*attributedText)
Parameters
attributedText
com.amazon.kepler.uitoolkit.graphics.IAttributedText* — Required
Pointer to IAttributedText object to set the text of ITextInputController.
remove()
Removes the selected characters if selected, otherwise removes one character next or previous depending on the input parameter.voidremove(boolnextCharacter)
Parameters
nextCharacter
bool — Required
If false, then remove the previous character of the current position, otherwise remove the next character.
replace()
Replaces the selected characters if selected, otherwise replaces the entire text ofvoidreplace(com.amazon.kepler.uitoolkit.graphics.IAttributedText*attributedText)
ITextInputController with the new attributed text.
Parameters
attributedText
com.amazon.kepler.uitoolkit.graphics.IAttributedText* — Required
The IAttributedText object to replace the old text of ITextInputController.
isSecure()
bool isSecure()
Returns true if the ITextInputController text is secure.
Returns
bool
bool True if the text is secure, else False.
invalidate()
void invalidate()
Invalidates the current state of ITextInputController to trigger a repaint.
begin()
u32 begin()
Returns the starting position of the current selection.
Returns
u32
Begin of the current selection.
end()
u32 end()
Returns the ending position of the current selection.
Returns
u32
End of the current selection.
setPosition()
Sets the position and an empty selection.voidsetPosition(u32position)
Parameters
position
u32 — Required
New position.
getPosition()
u32 getPosition()
Gets the position and an empty selection.
Returns
u32
Current position of the cursor.
setSelection()
Sets the text selection bounds using the start and end input. The default selection is 0,0.voidsetSelection(u32start,u32end)
Parameters
start
u32 — Required
Index to start the selection from.
end
u32 — Required
Index to stop the selection at.

