TextBoxConceptImpl is an abstract class for implementing the Text Box node concept. More...
#include <kanzi/ui/node/concept/text_box.hpp>
Public Member Functions | |
void | backspaceAtCursor () |
Deletes a character using backspace. More... | |
void | backspaceWordAtCursor () |
Deletes the characters between the cursor position and the closest word boundary using backspace. More... | |
void | cancelTextComposition () |
Tells a Text Box node to cancel text composition. More... | |
void | clearSelection () |
Clears the current selection. More... | |
void | commitCompositionText () |
Tells a Text Box node to commit the composition text. More... | |
void | deleteAtCursor () |
Deletes a character using delete. More... | |
void | deleteSelection () |
Erases selected text. More... | |
void | deleteText (size_t begin, size_t end) |
Moves the cursor to position begin and erases UTF-8 characters between positions a\ begin and end. More... | |
void | deleteWordAtCursor () |
Deletes the characters between the cursor position and the word boundary that follows the cursor. More... | |
void | enterEditingState () |
Tells a Text Box node to enter the editing state. More... | |
string | getCompositionText () const |
Returns the composition text. More... | |
string | getDisplayText () const |
Returns a displayable text that Kanzi constructs from the text buffer of the input manipulator owned by the Text Box node, using the kanzi::EchoMode of the Text Box. More... | |
float | getLineHeight () |
Returns the line height of the font that the Text Box node uses. More... | |
string | getSelectedText () |
Returns the text that is currently selected in the Text Box node. More... | |
size_t | getSelectionEnd () const |
Returns the end index for the current selection. More... | |
optional< size_t > | getSelectionStart () const |
Returns the start index for the current text selection, or nullopt if no text is selected. More... | |
bool | hasSelection () const |
Returns whether any of the text in a Text Box node is selected. More... | |
void | insertText (size_t position, string_view text) |
Moves the cursor to a given position and inserts text to that position. More... | |
void | insertTextAtCursor (string_view text) |
Inserts text in a Text Box node at the cursor position and moves the cursor forward. More... | |
void | leaveEditingState () |
Tells a Text Box node to leave the editing state. More... | |
void | moveCursorBackward (size_t distance) |
Moves the cursor backward in the text buffer of a Text Box node. More... | |
void | moveCursorBackward () |
Moves the cursor backward by one character. More... | |
void | moveCursorForward (size_t distance) |
Moves the cursor forward in the text buffer of a Text Box node. More... | |
void | moveCursorForward () |
Moves the cursor forward by one character. More... | |
void | moveCursorHome () |
Moves the cursor to the beginning of the text buffer of a Text Box node. More... | |
void | moveCursorToEnd () |
Moves the cursor to the end of the text buffer of a Text Box node. More... | |
void | moveCursorToNextWord () |
Moves the cursor to the next word. More... | |
void | moveCursorToPreviousWord () |
Moves the cursor to the previous word. More... | |
void | moveSelectionEndBackward (size_t distance) |
Moves the end of text selection backward by a given number of characters in the text buffer of a Text Box node. More... | |
void | moveSelectionEndBackward () |
Moves the end of the text selection backward by one character. More... | |
void | moveSelectionEndForward (size_t distance) |
Moves the end of text selection forward by a given number of characters in the text buffer of a Text Box node. More... | |
void | moveSelectionEndForward () |
Moves the end of the text selection forward by one character. More... | |
void | moveSelectionEndpointBackward (size_t steps) |
Moves the active selection end-point backward with steps passed as argument. More... | |
void | moveSelectionEndpointForward (size_t steps) |
Moves the active selection end-point forward with steps passed as argument. More... | |
void | moveSelectionEndpointToBack () |
Moves the active selection end-point to the end of the text. More... | |
void | moveSelectionEndpointToFront () |
Moves the active selection end-point to the front. More... | |
void | moveSelectionEndpointToNextWord () |
Moves the active selection end-point forward to the previous word boundary. More... | |
void | moveSelectionEndpointToPreviousWord () |
Moves the active selection end-point backward to the previous word boundary. More... | |
void | moveSelectionEndToNextWord () |
Moves the end of the text selection forward to the next word. More... | |
void | moveSelectionEndToPreviousWord () |
Moves the end of the text selection backward to the previous word. More... | |
void | moveSelectionStartBackward (size_t distance) |
Moves the start of text selection backward by a given number of characters in the text buffer of a Text Box node. More... | |
void | moveSelectionStartBackward () |
Moves the beginning of the text selection backward by one character. More... | |
void | moveSelectionStartForward (size_t distance) |
Moves the selection start forward in the text buffer of a Text Box node. More... | |
void | moveSelectionStartForward () |
Moves the beginning of the text selection forward by one character. More... | |
void | moveSelectionStartToNextWord () |
Moves the beginning of the text selection forward to the next word. More... | |
void | moveSelectionStartToPreviousWord () |
Moves the beginning of the text selection backward to the previous word. More... | |
void | notifyPostPrepareTextFormat (bool completeRelayoutingExecuted) |
Kanzi calls this function every time it successfully completes the prepareTextFormat function. More... | |
void | selectAll () |
Selects all the content in a Text Box node. More... | |
void | selectText (size_t from, size_t to) |
Selects the text between given indexes (cursor positions). More... | |
void | selectWordAt (size_t characterPosition) |
Selects the word at the specified character position. More... | |
void | selectWordAtCursor () |
Selects the word at the current cursor position. More... | |
void | setSelectionEnd (size_t index) |
Sets the end index for the current selection. More... | |
void | setSelectionStart (size_t index) |
Sets the start index for the current selection. More... | |
Properties | |
BrushSharedPtr | getSelectionBackgroundBrush () const |
Returns the value of the SelectionBackgroundBrushProperty. More... | |
void | setSelectionBackgroundBrush (BrushSharedPtr value) |
Sets the value of the SelectionBackgroundBrushProperty. More... | |
BrushSharedPtr | getSelectionForegroundBrush () const |
Returns the value of the SelectionForegroundBrushProperty. More... | |
void | setSelectionForegroundBrush (BrushSharedPtr value) |
Sets the value of the SelectionForegroundBrushProperty. More... | |
BrushSharedPtr | getCompositionBackgroundBrush () const |
Returns the value of the CompositionTextBackgroundBrushProperty. More... | |
void | setCompositionBackgroundBrush (BrushSharedPtr value) |
Sets the value of the CompositionTextBackgroundBrushProperty. More... | |
BrushSharedPtr | getCompositionForegroundBrush () const |
Returns the value of the CompositionTextForegroundBrushProperty. More... | |
void | setCompositionForegroundBrush (BrushSharedPtr value) |
Sets the value of the CompositionTextForegroundBrushProperty. More... | |
size_t | getCursorPosition () |
Returns the value of the CursorPositionProperty. More... | |
void | setCursorPosition (size_t value) |
Sets the value of the CursorPositionProperty. More... | |
bool | isReadOnly () const |
Returns the value of the ReadOnlyProperty. More... | |
void | setReadOnly (bool value) |
Sets the value of the ReadOnlyProperty. More... | |
size_t | getMaximumTextLength () const |
Returns the value of the MaximumTextLengthProperty. More... | |
void | setMaximumTextLength (size_t value) |
Sets the value of the MaximumTextLengthProperty. More... | |
PrefabTemplateSharedPtr | getCursorPrefab () const |
Returns the value of the CursorPrefabProperty. More... | |
void | setCursorPrefab (const PrefabTemplateSharedPtr &prefab) |
Sets the value of the CursorPrefabProperty. More... | |
PrefabTemplateSharedPtr | getSelectionStartPrefab () const |
Returns the value of the SelectionStartPrefabProperty. More... | |
void | setSelectionStartPrefab (const PrefabTemplateSharedPtr &prefab) |
Sets the value of the SelectionStartPrefabProperty. More... | |
PrefabTemplateSharedPtr | getSelectionEndPrefab () const |
Returns the value of the SelectionEndPrefabProperty. More... | |
void | setSelectionEndPrefab (const PrefabTemplateSharedPtr &prefab) |
Sets the value of the SelectionEndPrefabProperty. More... | |
PrefabTemplateSharedPtr | getTextHintPrefab () const |
Returns the value of the TextHintPrefabProperty. More... | |
void | setTextHintPrefab (const PrefabTemplateSharedPtr &prefab) |
Sets the value of the TextHintPrefabProperty. More... | |
bool | isHideTextHintWhenFocused () const |
Returns the value of the HideTextHintWhenEditingProperty. More... | |
void | setHideTextHintWhenFocused (bool value) |
Sets the value of the HideTextHintWhenEditingProperty. More... | |
EchoMode | getEchoMode () const |
Returns the value of the EchoModeProperty. More... | |
void | setEchoMode (const EchoMode &mode) |
Sets the value of the EchoModeProperty. More... | |
InputType | getInputType () const |
Returns the value of the InputTypeProperty. More... | |
void | setInputType (const InputType &inputType) |
Sets the value of the InputTypeProperty. More... | |
EditMode | getEditMode () const |
Returns the value of the EditModeProperty. More... | |
void | setEditMode (const EditMode &mode) |
Sets the value of the EditModeProperty. More... | |
bool | isEditing () const |
Returns the value of the IsEditingProperty. More... | |
bool | isComposingText () const |
Returns the value of the IsComposingTextProperty. More... | |
size_t | getCharacterCount () |
Returns the value of the CharacterCountProperty. More... | |
size_t | getWordCount () |
Returns the value of the WordCountProperty. More... | |
int | getPasswordEchoTimeout () const |
Returns the value of the PasswordEchoTimeoutProperty. More... | |
void | setPasswordEchoTimeout (int timeout) |
Sets the value of the PasswordEchoTimeoutProperty. More... | |
string | getPasswordMaskingCharacter () const |
Returns the value of the PasswordMaskingCharacterProperty. More... | |
void | setPasswordMaskingCharacter (string_view passwordMask) |
Sets the value of the PasswordMaskingCharacterProperty. More... | |
InputMethodAction | getInputMethodAction () const |
Returns the value of the InputMethodActionProperty. More... | |
void | setInputMethodAction (InputMethodAction label) |
Sets the value of the InputMethodActionProperty. More... | |
TextKeyNavigationDirection | getTextKeyNavigationDirection () const |
Returns the value of the TextKeyNavigationDirectionProperty. More... | |
void | setTextKeyNavigationDirection (TextKeyNavigationDirection direction) |
Sets the value of the TextKeyNavigationDirectionProperty. More... | |
Public Member Functions inherited from kanzi::TextBoxConcept | |
KZ_METACLASS_PROPERTY_TYPE (CompositionTextProperty) | |
Public Member Functions inherited from kanzi::TextConceptImpl< TDerivedClass > | |
ColorRGBA | getFontColor () const |
Gets the value of the FontColorProperty. More... | |
MaterialSharedPtr | getFontMaterial () const |
Gets the value of the FontMaterialProperty. More... | |
bool | getHorizontalFit () const |
Gets the value of the HorizontalFitProperty. More... | |
Vector2 | getHorizontalFitScaleLimits () const |
Gets the value of the HorizontalFitScaleLimitsProperty. More... | |
Vector2 | getHorizontalPadding () const |
Gets the value of HorizontalPaddingProperty. More... | |
string | getOverflow () const |
Gets the value of the OverflowProperty. More... | |
bool | getRemoveSideBearings () const |
Gets the value of the RemoveSideBearingsProperty. More... | |
string | getText () const |
Gets the value of TextProperty. More... | |
TextFormat::TextHorizontalAlignment | getTextHorizontalAlignment () const |
Gets the value of the TextHorizontalAlignmentProperty. More... | |
TextFormat::TextVerticalAlignment | getTextVerticalAlignment () const |
Gets the value of the TextVerticalAlignmentProperty. More... | |
TextFormat::Truncation | getTruncation () const |
Gets the value of the TruncationProperty. More... | |
TextFormat::TruncationDirection | getTruncationDirection () const |
Gets the value of the TruncationDirectionProperty. More... | |
Vector2 | getVerticalPadding () const |
Gets the value of VerticalPaddingProperty. More... | |
void | setFontColor (ColorRGBA value) |
Sets the value of the FontColorProperty. More... | |
void | setFontMaterial (MaterialSharedPtr value) |
Sets the value of the FontMaterialProperty. More... | |
void | setHorizontalFit (bool value) |
Sets the value of the HorizontalFitProperty. More... | |
void | setHorizontalFitScaleLimits (Vector2 value) |
Sets the value of the HorizontalFitScaleLimitsProperty. More... | |
void | setHorizontalPadding (Vector2 value) |
Sets the value of HorizontalPaddingProperty. More... | |
void | setOverflow (string_view value) |
Sets the value of the OverflowProperty. More... | |
void | setRemoveSideBearings (bool value) |
Sets the value of the RemoveSideBearingsProperty. More... | |
void | setText (string value) |
Sets the value of TextProperty. More... | |
void | setTextHorizontalAlignment (TextFormat::TextHorizontalAlignment value) |
Sets the value of the TextHorizontalAlignmentProperty. More... | |
void | setTextVerticalAlignment (TextFormat::TextVerticalAlignment value) |
Sets the value of the TextVerticalAlignmentProperty. More... | |
void | setTruncation (TextFormat::Truncation value) |
Sets the value of the TruncationProperty. More... | |
void | setTruncationDirection (TextFormat::TruncationDirection value) |
Sets the value of the TruncationDirectionProperty. More... | |
void | setVerticalPadding (Vector2 value) |
Sets the value of VerticalPaddingProperty. More... | |
virtual | ~TextConceptImpl ()=default |
Destructor. More... | |
Public Member Functions inherited from kanzi::TextConcept | |
virtual | ~TextConcept ()=default |
Destructor. More... | |
Public Member Functions inherited from kanzi::FontStyleConceptImpl< TDerivedClass > | |
float | getCharacterSpacing () const |
Gets the value of the FontStyleConcept::CharacterSpacingProperty property. More... | |
float | getFixedCharacterWidth () const |
Gets the value of the FontStyleConcept::FixedCharacterWidthProperty property. More... | |
float | getFontSize () const |
Gets the value of the FontStyleConcept::SizeProperty property. More... | |
FontStyle | getFontStyle () const |
Gets the value of the FontStyleConcept::StyleProperty property. More... | |
FontWeight | getFontWeight () const |
Gets the value of the FontStyleConcept::WeightProperty property. More... | |
bool | getFractionalCharacterWidth () const |
Gets the value of the FontStyleConcept::FractionalCharacterWidthProperty property. More... | |
FontHintingPreference | getHintingPreference () const |
Gets the value of HintingPreferenceProperty. More... | |
float | getLineSpacing () const |
Gets the value of the FontStyleConcept::LineSpacingProperty property. More... | |
FontRuntimeSharedPtr | getRuntimeFont () |
Gets the runtime font. More... | |
bool | getSnapCharacterToPixel () const |
Gets the value of the FontStyleConcept::SnapCharacterToPixelProperty property. More... | |
void | releaseRuntimeFont () |
Releases the runtime font that is held by FontStyleConceptImpl. More... | |
void | setCharacterSpacing (float value) |
Sets the value of the FontStyleConcept::CharacterSpacingProperty property. More... | |
void | setFixedCharacterWidth (float value) |
Sets the value of the FontStyleConcept::FixedCharacterWidthProperty property. More... | |
void | setFontSize (float value) |
Sets the value of the FontStyleConcept::SizeProperty property. More... | |
void | setFontStyle (FontStyle style) |
Sets the value of the FontStyleConcept::StyleProperty property. More... | |
void | setFontWeight (FontWeight weight) |
Sets the value of the FontStyleConcept::WeightProperty property. More... | |
void | setFractionalCharacterWidth (bool enable) |
Sets the value of the FontStyleConcept::FractionalCharacterWidthProperty property. More... | |
void | setHintingPreference (FontHintingPreference hintingPreference) |
Sets the value of HintingPreferenceProperty. More... | |
void | setLineSpacing (float value) |
Sets the value of the FontStyleConcept::LineSpacingProperty property. More... | |
void | setSnapCharacterToPixel (bool enable) |
Sets the value of the FontStyleConcept::SnapCharacterToPixelProperty property. More... | |
bool | updateRuntimeFont () |
Updates the runtime font. More... | |
Static Public Member Functions | |
static PropertyTypeEditorInfoSharedPtr | makeEditorInfo () |
Static Public Member Functions inherited from kanzi::TextBoxConcept | |
static PropertyTypeEditorInfoSharedPtr | makeEditorInfo () |
Static Public Member Functions inherited from kanzi::TextConceptImpl< TDerivedClass > | |
static PropertyTypeEditorInfoSharedPtr | makeEditorInfo () |
Static Public Member Functions inherited from kanzi::TextConcept | |
static PropertyTypeEditorInfoSharedPtr | makeEditorInfo () |
Static Public Member Functions inherited from kanzi::FontStyleConcept | |
static PropertyTypeEditorInfoSharedPtr | makeEditorInfo () |
Static Protected Member Functions | |
static Rectangle< float > | transformRect (const Matrix3x3 &m, Rectangle< float > rect) |
Transforms a given rectangle with a given matrix. More... | |
static Rectangle< float > | transformRect (const Matrix4x4 &m, Rectangle< float > rect) |
Transforms a given rectangle with a given matrix. More... | |
Protected Attributes | |
ClassPropertyDefaultValue< bool > | m_classValueFocusable |
Default value for the Focusable property. More... | |
ClassPropertyDefaultValue< bool > | m_classValueHitTestable |
Default value for the Hit Testable property. More... | |
bool | m_contentChanged |
Helper flag for editing started and finished messages. More... | |
shared_ptr< TBaseClass > | m_cursorNode |
Stores the prefab template instantiated from the CursorPrefabProperty. More... | |
bool | m_draggingBegin |
The drag state of the selection cursor for the start selection cursor. More... | |
bool | m_draggingEnd |
The drag state of the selection cursor for the end selection cursor. More... | |
bool | m_draggingInverted |
Indicates whether the selection start index is after the selection end index in x coordinates when either m_draggingBegin or m_draggingEnd is set to true. More... | |
TextInputManipulatorSharedPtr | m_inputManipulator |
The TextInputManipulator attached to the TextBox. More... | |
TextInputLayout | m_layoutInfo |
vector< Node::MessageSubscriptionToken > | m_messageTokens |
The following MessageSubscriptionTokens are used for controlling the message subscription while a TextBox is in editing state. More... | |
bool | m_panOngoing |
Helper flag for selection change messages. More... | |
MainLoopTimerToken | m_passwordEchoTimeoutToken |
Timer subscription token for password echo timeout. More... | |
bool | m_revealLastInsertedCharacter |
Whether to show, instead of censoring, the last inserted character in password echo mode. More... | |
shared_ptr< TBaseClass > | m_selectionEndNode |
Stores the prefab template instantiated from the SelectionEndPrefabProperty. More... | |
shared_ptr< TBaseClass > | m_selectionStartNode |
Stores the prefab template instantiated from the SelectionStartPrefabProperty. More... | |
shared_ptr< TBaseClass > | m_textHintNode |
Stores the prefab template instantiated from the TextHintPrefabProperty. More... | |
Protected Attributes inherited from kanzi::TextConceptImpl< TDerivedClass > | |
TextFormatPtr | m_textFormat |
The text format for the text that this node displays. More... | |
Additional Inherited Members | |
Public Types inherited from kanzi::TextBoxConcept | |
enum | EditMode { EditMode::Automatic, EditMode::Triggered } |
The edit modes. More... | |
Static Public Attributes inherited from kanzi::TextBoxConcept | |
static MessageType< TextCompositionStateMessageArguments > | CompositionTextChangedMessage |
Text Box dispatches this message when the composition text is updated by the input methods. More... | |
static MessageType< TextCompositionStateMessageArguments > | CompositionTextCommittedMessage |
Text Box dispatches this message when the composition text is committed to the cached text. More... | |
static MessageType< CursorPositionMessageArguments > | CursorMovedMessage |
Text Box node dispatches this message when the application user moves the cursor in that Text Box node. More... | |
static MessageType< TextChangedMessageArguments > | EditingFinishedMessage |
Text Box node dispatches this message when it leaves the editing state after the application user modifies the text content. More... | |
static MessageType< TextChangedMessageArguments > | EditingStartedMessage |
Text Box node dispatches this message when the application user makes the first modification to the text in that Text Box node. More... | |
static MessageType< EditingStateChangedMessageArguments > | EnteredEditingStateMessage |
Text Box node dispatches this message when it enters the editing state. More... | |
static MessageType< InputMethodActionMessageArguments > | InputMethodActionMessage |
Text Box node dispatches this message when an input method executes the input action assigned to the text box. More... | |
static MessageType< InputMethodAvailableMessageArguments > | InputMethodAvailableMessage |
Text Box node dispatches this message when an input method becomes available. More... | |
static MessageType< InputMethodAvailableMessageArguments > | InputMethodUnavailableMessage |
Text Box node dispatches this message when the composing input method becomes unavailable. More... | |
static MessageType< EditingStateChangedMessageArguments > | LeftEditingStateMessage |
Text Box node dispatches this message when it leaves the editing state. More... | |
static MessageType< SelectedTextMessageArguments > | SelectionChangedMessage |
Text Box node dispatches this message when the application user changes the text selection in that Text Box node. More... | |
static MessageType< CursorPositionMessageArguments > | SelectionClearedMessage |
Text Box node dispatches this message when the application user clears or resets the text selection in that Text Box node. More... | |
static MessageType< SelectedTextMessageArguments > | SelectionStartedMessage |
Text Box node dispatches this message when the application user starts selecting text in that Text Box node. More... | |
static MessageType< TextChangedMessageArguments > | TextChangedMessage |
Text Box node dispatches this message when the application user changes the text in that Text Box node. More... | |
static MessageType< TextCompositionStateMessageArguments > | TextCompositionCanceledMessage |
Text Box dispatches this message when the text composition is canceled. More... | |
static PropertyType< string > | DisplayTextProperty |
Reports the text displayed in a Text Box. More... | |
static PropertyType< string > | CompositionTextProperty |
Reports the text that the user composes in a Text Box using an input method editor (IME). More... | |
static PropertyType< ResourceSharedPtr > | SelectionBackgroundBrushProperty |
Sets the brush that highlights selected text. More... | |
static PropertyType< ResourceSharedPtr > | SelectionForegroundBrushProperty |
Sets the brush for rendering the selected text. More... | |
static PropertyType< ResourceSharedPtr > | CompositionTextBackgroundBrushProperty |
Sets the brush that highlights the text that the user composes using an input method editor (IME). More... | |
static PropertyType< ResourceSharedPtr > | CompositionTextForegroundBrushProperty |
Sets the brush that fills the text that the user composes using an input method editor (IME). More... | |
static PropertyType< int > | CursorPositionProperty |
Sets the position of the cursor in the text buffer of a Text Box node. More... | |
static PropertyType< int > | SelectionStartCursorPositionProperty |
Reports the position of the cursor that marks the beginning of text selection in the text buffer of a Text Box node. More... | |
static PropertyType< int > | SelectionEndCursorPositionProperty |
Reports the position of the cursor that marks the end of text selection in the text buffer of a Text Box node. More... | |
static PropertyType< bool > | HasSelectionProperty |
Reports whether any of the text in a Text Box node is selected. More... | |
static PropertyType< bool > | ReadOnlyProperty |
Sets whether the Text Box node accepts user input. More... | |
static PropertyType< int > | MaximumTextLengthProperty |
Sets the maximum allowed text length in a Text Box node. More... | |
static PropertyType< ResourceSharedPtr > | CursorPrefabProperty |
Sets the prefab template that defines the appearance of the cursor, instead of using the default cursor. More... | |
static PropertyType< ResourceSharedPtr > | SelectionStartPrefabProperty |
Sets the prefab template that defines the appearance of the selection handle at the beginning of text selection, instead of using the default handle. More... | |
static PropertyType< ResourceSharedPtr > | SelectionEndPrefabProperty |
Sets the prefab template that defines the appearance of the selection handle at the end of text selection, instead of using the default handle. More... | |
static PropertyType< ResourceSharedPtr > | TextHintPrefabProperty |
Sets the prefab template that a Text Box node uses to show placeholder content when there is no text content in that Text Box node. More... | |
static PropertyType< bool > | HideTextHintWhenEditingProperty |
Sets whether Kanzi hides the placeholder content, which you set using the TextHintPrefabProperty, either: More... | |
static PropertyType< EchoMode > | EchoModeProperty |
Sets how a Text Box node shows text. More... | |
static PropertyType< InputType > | InputTypeProperty |
Sets the input type of the input methods that provide the input for a Text Box. More... | |
static PropertyType< EditMode > | EditModeProperty |
Sets the edit mode of a Text Box node. The default value is EditMode::Automatic. More... | |
static PropertyType< bool > | IsEditingProperty |
Reports the editing state of a Text Box node. More... | |
static PropertyType< bool > | IsComposingTextProperty |
Reports the text composition state of a Text Box node. More... | |
static PropertyType< int > | CharacterCountProperty |
Contains the number of characters in a Text Box node. More... | |
static PropertyType< int > | WordCountProperty |
Contains the number of words in a Text Box node. More... | |
static PropertyType< int > | PasswordEchoTimeoutProperty |
Sets the time in milliseconds that Kanzi shows an inserted character before masking it when using the EchoMode::Password echo mode. More... | |
static PropertyType< string > | PasswordMaskingCharacterProperty |
Sets the UTF-8 character that masks each password character when using EchoMode::Password. More... | |
static PropertyType< InputMethodAction > | InputMethodActionProperty |
Sets the label of the user action button on the on-screen keyboard. More... | |
static PropertyType< TextKeyNavigationDirection > | TextKeyNavigationDirectionProperty |
Sets the direction of key navigation for the Text Box node. More... | |
static MessageType< TextContentMessageArguments > | InsertTextAtCursorMessage |
Dispatch this message to insert given text at the cursor position. More... | |
static MessageType< EraseCharactersMessageArguments > | BackspaceAtCursorMessage |
Dispatch this message to erase at the cursor position the previous character in the text string. More... | |
static MessageType< EraseCharactersMessageArguments > | BackspaceWordAtCursorMessage |
Dispatch this message to erase the characters between the cursor position and the previous word boundary in the text string. More... | |
static MessageType< EraseCharactersMessageArguments > | DeleteAtCursorMessage |
Dispatch this message to erase at the cursor position the next character in the text string. More... | |
static MessageType< EraseCharactersMessageArguments > | DeleteWordAtCursorMessage |
Dispatch this message to erase the characters between the cursor position and the next word boundary in the text string. More... | |
static MessageType< MoveCursorMessageArguments > | MoveCursorBackwardMessage |
Dispatch this message to move the cursor backward in a text string. More... | |
static MessageType< MoveCursorMessageArguments > | MoveCursorForwardMessage |
Dispatch this message to move the cursor forward in the text string. More... | |
static MessageType< MoveCursorMessageArguments > | MoveCursorToPreviousWordMessage |
Dispatch this message to move the cursor to the previous word boundary in the text string. More... | |
static MessageType< MoveCursorMessageArguments > | MoveCursorToNextWordMessage |
Dispatch this message to move the cursor to the next word boundary in the text string. More... | |
static MessageType< MoveCursorMessageArguments > | MoveCursorHomeMessage |
Dispatch this message to move the cursor to the beginning of the text string. More... | |
static MessageType< MoveCursorMessageArguments > | MoveCursorToEndMessage |
Dispatch this message to move the cursor to the end of the text string. More... | |
static MessageType< ModifySelectionMessageArguments > | MoveSelectionStartForwardMessage |
Dispatch this message to move the handle at the start of text selection forward by one character in the text string. More... | |
static MessageType< ModifySelectionMessageArguments > | MoveSelectionStartBackwardMessage |
Dispatch this message to move the handle at the start of text selection backward by one character in the text string. More... | |
static MessageType< ModifySelectionMessageArguments > | MoveSelectionStartToNextWordMessage |
Dispatch this message to move the handle at the start of text selection forward to the start of the next word in the text string. More... | |
static MessageType< ModifySelectionMessageArguments > | MoveSelectionStartToPreviousWordMessage |
Dispatch this message to move the handle at the start of text selection backward to the start of the previous word in the text string. More... | |
static MessageType< ModifySelectionMessageArguments > | MoveSelectionEndForwardMessage |
Dispatch this message to move the handle at the end of text selection forward by one character in the text string. More... | |
static MessageType< ModifySelectionMessageArguments > | MoveSelectionEndBackwardMessage |
Dispatch this message to move the handle at the end of text selection backward by one character in the text string. More... | |
static MessageType< ModifySelectionMessageArguments > | MoveSelectionEndToNextWordMessage |
Dispatch this message to move the handle at the end of text selection forward to the start of the next word in the text string. More... | |
static MessageType< ModifySelectionMessageArguments > | MoveSelectionEndToPreviousWordMessage |
Dispatch this message to move the handle at the end of text selection backward to the start of the previous word in the text string. More... | |
static MessageType< TextRangeMessageArguments > | SelectTextMessage |
Dispatch this message to select the text between two character indexes in the current text string. More... | |
static MessageType< TextRangeMessageArguments > | DeleteTextMessage |
Dispatch this message to delete the text between two character indexes in the current text string. More... | |
static MessageType< DeleteSelectionMessageArguments > | DeleteSelectionMessage |
Dispatch this message to erase any currently selected text. More... | |
static MessageType< TextInsertionMessageArguments > | InsertTextMessage |
Dispatch this message to insert given text at a given position. More... | |
static MessageType< ModifySelectionMessageArguments > | SelectToHomeMessage |
Dispatch this message to select the text from the beginning of the text string to the cursor position. More... | |
static MessageType< ModifySelectionMessageArguments > | SelectToEndMessage |
Dispatch this message to select the text from the cursor position to the end of the text string. More... | |
static MessageType< ModifySelectionMessageArguments > | ClearSelectionMessage |
Dispatch this message to clear the current text selection. More... | |
static MessageType< ModifySelectionMessageArguments > | SelectAllMessage |
Dispatch this message to select all text. More... | |
static MessageType< ModifySelectionMessageArguments > | SelectWordAtCursorMessage |
Dispatch this message to select the word at the current cursor position. More... | |
static MessageType< ModifyEditingStateMessageArguments > | EnterEditingStateMessage |
Dispatch this message to make a Text Box node enter the editing state. More... | |
static MessageType< ModifyEditingStateMessageArguments > | LeaveEditingStateMessage |
Dispatch this message to make a Text Box node leave the editing state. More... | |
static MessageType< TextCompositionStateMessageArguments > | CommitCompositionTextMessage |
Dispatch this message to make a Text Box commit the composition text. More... | |
static MessageType< TextCompositionStateMessageArguments > | CancelTextCompositionMessage |
Dispatch this message to make a Text Box cancel the text composition. More... | |
Static Public Attributes inherited from kanzi::TextConcept | |
static PropertyType< ColorRGBA > | FontColorProperty |
Sets the text color for the default font material and for the materials with a fragment shader that uses the FontColor uniform. More... | |
static PropertyType< ResourceSharedPtr > | FontMaterialProperty |
Sets the material whose shader is used to render the text in a text node. More... | |
static PropertyType< Vector2 > | HorizontalPaddingProperty |
Sets the padding spaces between the content and the left and right boundaries of a text node. More... | |
static PropertyType< bool > | RemoveSideBearingsProperty |
Sets the position of the leftmost characters of left-aligned text and rightmost characters of right-aligned text exactly within the boundary of the text node. More... | |
static PropertyType< string > | TextProperty |
Sets the text content that a text node renders. More... | |
static PropertyType< TextFormat::TextHorizontalAlignment > | TextHorizontalAlignmentProperty |
Sets the horizontal alignment of the text in a text node. More... | |
static PropertyType< TextFormat::TextVerticalAlignment > | TextVerticalAlignmentProperty |
Sets the vertical alignment of the text in a text node. More... | |
static PropertyType< Vector2 > | VerticalPaddingProperty |
Sets the padding spaces between the content and the top and bottom boundaries of a text node. More... | |
static PropertyType< string > | OverflowProperty |
Sets the characters that represent the truncated text when the text string to be rendered is too long to fit in a text node. More... | |
static PropertyType< bool > | HorizontalFitProperty |
Allows a Text Block to scale glyphs horizontally when the text string is too long to fit in that Text Block. More... | |
static PropertyType< Vector2 > | HorizontalFitScaleLimitsProperty |
Sets the scale range that the HorizontalFitProperty can use when it scales the text horizontally. More... | |
static PropertyType< TextFormat::TruncationDirection > | TruncationDirectionProperty |
Sets which part of the text to truncate when the text string to be rendered is too long to fit in a node. More... | |
static PropertyType< TextFormat::Truncation > | TruncationProperty |
Sets how to truncate the text when the text string to be rendered is too long to fit in a node. More... | |
Static Public Attributes inherited from kanzi::FontStyleConcept | |
static PropertyType< float > | SizeProperty |
Sets the size for the font in pixels. More... | |
static PropertyType< FontStyle > | StyleProperty |
Sets the style for the font. More... | |
static PropertyType< FontWeight > | WeightProperty |
Sets the weight for the font. More... | |
static PropertyType< float > | CharacterSpacingProperty |
Sets the character spacing in pixels. More... | |
static PropertyType< float > | FixedCharacterWidthProperty |
Overrides the font advance widths and makes each character take a fixed amount of space specified in pixels. More... | |
static PropertyType< float > | LineSpacingProperty |
Sets the line spacing in multiples of the normal line height of the selected font. More... | |
static PropertyType< bool > | FractionalCharacterWidthProperty |
Sets whether Kanzi uses fractional or rounded character widths to lay out text. More... | |
static PropertyType< bool > | SnapCharacterToPixelProperty |
Sets whether Kanzi positions characters in 2D rendering to the nearest pixel: More... | |
static PropertyType< FontHintingPreference > | HintingPreferenceProperty |
Sets the hinting preference of the selected font. More... | |
TextBoxConceptImpl is an abstract class for implementing the Text Box node concept.
The derived TextBox2D and TextBox3D classes supply the rendering of the text input content in 2D and 3D environment.
|
explicitprotected |
Constructor.
domain | The UI domain to which the new node belongs. |
name | The name of the node. |
|
static |
|
inline |
Returns the value of the SelectionBackgroundBrushProperty.
|
inline |
Sets the value of the SelectionBackgroundBrushProperty.
value | The brush used to highlight selected text. |
|
inline |
Returns the value of the SelectionForegroundBrushProperty.
|
inline |
Sets the value of the SelectionForegroundBrushProperty.
value | The brush used for rendering the selected text. |
|
inline |
Returns the value of the CompositionTextBackgroundBrushProperty.
|
inline |
Sets the value of the CompositionTextBackgroundBrushProperty.
value | The brush to use to highlight text that the user composes using an input method editor (IME). |
|
inline |
Returns the value of the CompositionTextForegroundBrushProperty.
|
inline |
Sets the value of the CompositionTextForegroundBrushProperty.
value | The brush to use to fill the text that the user composes using an input method editor (IME). |
|
inline |
Returns the value of the CursorPositionProperty.
|
inline |
Sets the value of the CursorPositionProperty.
The function adjusts the cursor position if that falls inside a multi-character glyph.
value | The position of the cursor in the text buffer of a Text Box node. |
|
inline |
Returns the value of the ReadOnlyProperty.
|
inline |
Sets the value of the ReadOnlyProperty.
value | True if a Text Box node is in read-only state. |
|
inline |
Returns the value of the MaximumTextLengthProperty.
|
inline |
Sets the value of the MaximumTextLengthProperty.
value | The maximum allowed text length as UTF-8 characters for a Text Box node. To remove the limit, use 0. |
|
inline |
Returns the value of the CursorPrefabProperty.
|
inline |
Sets the value of the CursorPrefabProperty.
prefab | The prefab template you want to use as the cursor. |
|
inline |
Returns the value of the SelectionStartPrefabProperty.
|
inline |
Sets the value of the SelectionStartPrefabProperty.
prefab | The prefab template that you want to use as the marker at the start of the selected text. |
|
inline |
Returns the value of the SelectionEndPrefabProperty.
|
inline |
Sets the value of the SelectionEndPrefabProperty.
prefab | The prefab template that you want to use as the marker at the end of the selected text. |
|
inline |
Returns the value of the TextHintPrefabProperty.
|
inline |
Sets the value of the TextHintPrefabProperty.
prefab | The prefab template that you want to show as placeholder content when the Text Box node is empty. |
|
inline |
Returns the value of the HideTextHintWhenEditingProperty.
|
inline |
Sets the value of the HideTextHintWhenEditingProperty.
value | To hide the placeholder content when the Text Box node is empty and is in editing state, use true. To hide the placeholder content only when the user enters text in the Text Box node, use false. |
|
inline |
Returns the value of the EchoModeProperty.
|
inline |
Sets the value of the EchoModeProperty.
mode | The echo mode to be set. |
|
inline |
Returns the value of the InputTypeProperty.
|
inline |
Sets the value of the InputTypeProperty.
inputType | The input type to set. |
|
inline |
Returns the value of the EditModeProperty.
|
inline |
Sets the value of the EditModeProperty.
mode | The edit mode to set. |
|
inline |
Returns the value of the IsEditingProperty.
|
inline |
Returns the value of the IsComposingTextProperty.
|
inline |
Returns the value of the CharacterCountProperty.
|
inline |
Returns the value of the WordCountProperty.
|
inline |
Returns the value of the PasswordEchoTimeoutProperty.
|
inline |
Sets the value of the PasswordEchoTimeoutProperty.
timeout | The time in milliseconds that an inserted character is visible before being censored when using the EchoMode::Password echo mode. |
|
inline |
Returns the value of the PasswordMaskingCharacterProperty.
|
inline |
Sets the value of the PasswordMaskingCharacterProperty.
passwordMask | The character to use to mask the password when using EchoMode::Password echo mode. |
|
inline |
Returns the value of the InputMethodActionProperty.
|
inline |
Sets the value of the InputMethodActionProperty.
label | The input action label value to set. |
|
inline |
Returns the value of the TextKeyNavigationDirectionProperty.
|
inline |
Sets the value of the TextKeyNavigationDirectionProperty.
direction | The text key navigation direction to set. |
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::insertText | ( | size_t | position, |
string_view | text | ||
) |
Moves the cursor to a given position and inserts text to that position.
After inserting the text, the cursor is in the end of the inserted text.
position | The position to which you want to insert the text. |
text | The text to insert. |
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::moveCursorForward | ( | size_t | distance | ) |
Moves the cursor forward in the text buffer of a Text Box node.
distance | The number of characters to move the cursor in a Text Box node. |
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::moveCursorBackward | ( | size_t | distance | ) |
Moves the cursor backward in the text buffer of a Text Box node.
distance | The number of characters to move the cursor in a Text Box node. |
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::moveCursorToEnd | ( | ) |
Moves the cursor to the end of the text buffer of a Text Box node.
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::moveCursorHome | ( | ) |
Moves the cursor to the beginning of the text buffer of a Text Box node.
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::moveSelectionStartForward | ( | size_t | distance | ) |
Moves the selection start forward in the text buffer of a Text Box node.
distance | The number of characters to move the selection in a Text Box node. |
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::moveSelectionStartBackward | ( | size_t | distance | ) |
Moves the start of text selection backward by a given number of characters in the text buffer of a Text Box node.
distance | The number of characters by which to move the start of text selection backward. |
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::moveSelectionEndForward | ( | size_t | distance | ) |
Moves the end of text selection forward by a given number of characters in the text buffer of a Text Box node.
distance | The number of characters by which to move the end of text selection forward. |
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::moveSelectionEndBackward | ( | size_t | distance | ) |
Moves the end of text selection backward by a given number of characters in the text buffer of a Text Box node.
distance | The number of characters by which to move the end of text selection backward. |
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::selectWordAtCursor | ( | ) |
Selects the word at the current cursor position.
Word selection is character-based, so cursor position is interpreted to mean character following the cursor. This means that the function can fail, if the cursor is at end of text.
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::selectWordAt | ( | size_t | characterPosition | ) |
Selects the word at the specified character position.
characterPosition | Index of the character from which to start the selection. Selection expands both ways until the function reaches a word break. |
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::selectText | ( | size_t | from, |
size_t | to | ||
) |
Selects the text between given indexes (cursor positions).
from | Start of selection. |
to | End of selection. If selection is successful, the cursor ends up here. |
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::selectAll | ( | ) |
Selects all the content in a Text Box node.
This method places the selection start and end cursors at the front and end of the text data.
bool kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::hasSelection | ( | ) | const |
Returns whether any of the text in a Text Box node is selected.
string kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::getSelectedText | ( | ) |
Returns the text that is currently selected in the Text Box node.
optional< size_t > kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::getSelectionStart | ( | ) | const |
Returns the start index for the current text selection, or nullopt if no text is selected.
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::setSelectionStart | ( | size_t | index | ) |
Sets the start index for the current selection.
index | The selection start index. |
size_t kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::getSelectionEnd | ( | ) | const |
Returns the end index for the current selection.
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::setSelectionEnd | ( | size_t | index | ) |
Sets the end index for the current selection.
index | The selection end index. Selection end always matches the cursor position. |
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::clearSelection | ( | ) |
Clears the current selection.
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::deleteText | ( | size_t | begin, |
size_t | end | ||
) |
Moves the cursor to position begin and erases UTF-8 characters between positions a\ begin and end.
begin | The first UTF-8 character to be erased. |
end | The first UTF-8 character not erased. |
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::deleteSelection | ( | ) |
Erases selected text.
float kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::getLineHeight | ( | ) |
Returns the line height of the font that the Text Box node uses.
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::insertTextAtCursor | ( | string_view | text | ) |
Inserts text in a Text Box node at the cursor position and moves the cursor forward.
text | The text to insert. |
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::deleteAtCursor | ( | ) |
Deletes a character using delete.
For example, in text that uses a left-to-right script this function deletes the character on the right side of the cursor.
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::deleteWordAtCursor | ( | ) |
Deletes the characters between the cursor position and the word boundary that follows the cursor.
Functionally equivalent to the Control + Delete keys.
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::backspaceAtCursor | ( | ) |
Deletes a character using backspace.
For example, in text that uses a left-to-right script this function deletes the character on the left side of the cursor.
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::backspaceWordAtCursor | ( | ) |
Deletes the characters between the cursor position and the closest word boundary using backspace.
For example, in text that uses a left-to-right script this function deletes the characters between the cursor and the word boundary on its left side. Functionally equivalent to the Control + Backspace keys.
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::moveCursorForward | ( | ) |
Moves the cursor forward by one character.
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::moveCursorBackward | ( | ) |
Moves the cursor backward by one character.
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::moveSelectionStartForward | ( | ) |
Moves the beginning of the text selection forward by one character.
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::moveSelectionStartBackward | ( | ) |
Moves the beginning of the text selection backward by one character.
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::moveSelectionEndForward | ( | ) |
Moves the end of the text selection forward by one character.
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::moveSelectionEndBackward | ( | ) |
Moves the end of the text selection backward by one character.
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::moveCursorToNextWord | ( | ) |
Moves the cursor to the next word.
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::moveCursorToPreviousWord | ( | ) |
Moves the cursor to the previous word.
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::moveSelectionStartToNextWord | ( | ) |
Moves the beginning of the text selection forward to the next word.
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::moveSelectionStartToPreviousWord | ( | ) |
Moves the beginning of the text selection backward to the previous word.
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::moveSelectionEndToNextWord | ( | ) |
Moves the end of the text selection forward to the next word.
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::moveSelectionEndToPreviousWord | ( | ) |
Moves the end of the text selection backward to the previous word.
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::moveSelectionEndpointBackward | ( | size_t | steps | ) |
Moves the active selection end-point backward with steps passed as argument.
steps | The steps to move the active selection end-point backward. If the selection is initiated when you call this function, the selection start position becomes the active selection end-point. |
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::moveSelectionEndpointForward | ( | size_t | steps | ) |
Moves the active selection end-point forward with steps passed as argument.
steps | The steps to move the active selection end-point forward. If the selection is initiated when you call this function, the selection end position becomes the active selection end-point. |
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::moveSelectionEndpointToPreviousWord | ( | ) |
Moves the active selection end-point backward to the previous word boundary.
If the selection is initiated when you call this function, the selection start position becomes the active selection end-point.
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::moveSelectionEndpointToNextWord | ( | ) |
Moves the active selection end-point forward to the previous word boundary.
If the selection is initiated when you call this function, the selection end position becomes the active selection end-point.
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::moveSelectionEndpointToFront | ( | ) |
Moves the active selection end-point to the front.
If the selection is initiated when you call this function, the selection start position becomes the active selection end-point.
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::moveSelectionEndpointToBack | ( | ) |
Moves the active selection end-point to the end of the text.
If the selection is initiated when you call this function, the selection end position becomes the active selection end-point.
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::notifyPostPrepareTextFormat | ( | bool | completeRelayoutingExecuted | ) |
Kanzi calls this function every time it successfully completes the prepareTextFormat function.
completeRelayoutingExecuted | Indicates whether a complete relayouting of the glyphs was required while preparing the text format. |
string kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::getDisplayText | ( | ) | const |
Returns a displayable text that Kanzi constructs from the text buffer of the input manipulator owned by the Text Box node, using the kanzi::EchoMode of the Text Box.
string kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::getCompositionText | ( | ) | const |
Returns the composition text.
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::enterEditingState | ( | ) |
Tells a Text Box node to enter the editing state.
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::leaveEditingState | ( | ) |
Tells a Text Box node to leave the editing state.
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::commitCompositionText | ( | ) |
Tells a Text Box node to commit the composition text.
void kanzi::TextBoxConceptImpl< TBaseClass, TDerivedClass, TTextBoxTraits >::cancelTextComposition | ( | ) |
Tells a Text Box node to cancel text composition.
|
protected |
TextBoxConceptImpl specific initialization.
|
overrideprotected |
Overrides Node::onDetached().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Handles TextInputManipulator::InputMethodDeactivatedMessage.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
overrideprotected |
Node::onPropertyChanged implementation.
|
protected |
Handles the update of the TextProperty.
|
protected |
Handles the change of the kanzi::EchoMode.
|
protected |
Handles the change of the kanzi::InputType.
|
protected |
Updates the value of the DisplayTextProperty.
|
protected |
Updates the value of the CompositionTextProperty.
|
protected |
Moves the cursor to a given point.
point | (X,Y) coordinates of the point to which to move the cursor. |
|
protected |
Handles the multi-click gesture on a node.
Selects the word at cursor.
clickPoint | The click point where the gesture occurred. |
|
protected |
Handles the pan gesture, to drag the cursors including the selection cursors.
point | The active point of a pan gesture. |
|
protected |
Handles the click begin.
This handles the single click to grab focus and to position the cursor to the click point. A Text Box node gets the focus independent of its edit mode.
clickPoint | The click point where the gesture occurred. |
|
protected |
Handles pan finishing.
|
protected |
Handler for FocusManager::AboutToLoseFocusMessage.
args | The pre-focus message arguments. |
|
protected |
Handler for FocusManager::FocusGainedMessage.
args | The post focus message arguments. |
|
protected |
Handler for FocusManager::FocusLostMessage.
args | The post focus message arguments. |
|
protected |
Handler for TextBoxConcept::InsertTextAtCursorMessage.
args | The text content message arguments. |
|
protected |
Handler for TextBoxConcept::BackspaceAtCursorMessage.
args | The erase characters message arguments. |
|
protected |
Handler for TextBoxConcept::BackspaceWordAtCursorMessage.
args | The erase characters message arguments. |
|
protected |
Handler for TextBoxConcept::DeleteAtCursorMessage.
args | The erase characters message arguments. |
|
protected |
Handler for TextBoxConcept::DeleteWordAtCursorMessage.
args | The erase characters message arguments. |
|
protected |
Handler for TextBoxConcept::MoveCursorBackwardMessage.
args | The move cursor message arguments. |
|
protected |
Handler for TextBoxConcept::MoveCursorForwardMessage.
args | The move cursor message arguments. |
|
protected |
Handler for TextBoxConcept::MoveCursorToPreviousWordMessage.
args | The move cursor message arguments. |
|
protected |
Handler for TextBoxConcept::MoveCursorToNextWordMessage.
args | The move cursor message arguments. |
|
protected |
Handler for TextBoxConcept::MoveCursorHomeMessage.
args | The move cursor message arguments. |
|
protected |
Handler for TextBoxConcept::MoveCursorToEndMessage.
args | The move cursor message arguments. |
|
protected |
Handler for TextBoxConcept::MoveSelectionStartForwardMessage.
args | The modify selection message arguments. |
|
protected |
Handler for TextBoxConcept::MoveSelectionStartBackwardMessage.
args | The modify selection message arguments. |
|
protected |
Handler for TextBoxConcept::MoveSelectionStartToNextWordMessage.
args | The modify selection message arguments. |
|
protected |
Handler for TextBoxConcept::MoveSelectionStartToPreviousWordMessage.
args | The modify selection message arguments. |
|
protected |
Handler for TextBoxConcept::MoveSelectionEndForwardMessage.
args | The modify selection message arguments. |
|
protected |
Handler for TextBoxConcept::MoveSelectionEndBackwardMessage.
args | The modify selection message arguments. |
|
protected |
Handler for TextBoxConcept::MoveSelectionEndToNextWordMessage.
args | The modify selection message arguments. |
|
protected |
Handler for TextBoxConcept::MoveSelectionEndToPreviousWordMessage.
args | The modify selection message arguments. |
|
protected |
Handler for TextBoxConcept::SelectTextMessage.
args | The text selection message arguments. |
|
protected |
Handler for TextBoxConcept::DeleteTextMessage.
args | The text selection message arguments. |
|
protected |
Handler for TextBoxConcept::DeleteSelectionMessage.
args | The erase selection message arguments. |
|
protected |
Handler for TextBoxConcept::InsertTextMessage.
args | The text insertion message arguments. |
|
protected |
Handler for TextBoxConcept::SelectToHomeMessage.
args | The modify selection message arguments. |
|
protected |
Handler for TextBoxConcept::SelectToEndMessage.
args | The modify selection message arguments. |
|
protected |
Handler for TextBoxConcept::ClearSelectionMessage.
args | The modify selection message arguments. |
|
protected |
Handler for TextBoxConcept::SelectAllMessage.
args | The modify selection message arguments. |
|
protected |
Handler for TextBoxConcept::SelectWordAtCursorMessage.
args | The modify selection message arguments. |
|
protected |
Handler for TextBoxConcept::EnterEditingStateMessage.
args | The enter editing message arguments. |
|
protected |
Handler for TextBoxConcept::LeaveEditingStateMessage.
args | The exit editing message arguments. |
|
protected |
Handler for TextBoxConcept::CommitCompositionTextMessage.
args | The commit composition text message arguments. |
|
protected |
Handler for TextBoxConcept::CancelTextCompositionMessage.
args | The commit composition text message arguments. |
|
protected |
Checks whether the point is on the selection starting point surroundings.
|
protected |
Checks whether the point is on the selection ending point surroundings.
|
protected |
Checks whether the point is positioned after the point where text selection ends.
|
protected |
Checks whether the point is positioned ahead of the point where text selection starts.
|
protected |
Reloads from the CursorPrefabProperty the prefab template that defines the appearance of the cursor.
|
protected |
Reloads from the SelectionStartPrefabProperty the prefab template that defines the appearance of the selection handle at the beginning of text selection.
|
protected |
Reloads from the SelectionEndPrefabProperty the prefab template that defines the appearance of the selection handle at the end of text selection.
|
protected |
Reloads from the TextHintPrefabProperty the prefab template for showing placeholder content when the TextBox node is empty.
|
protected |
Updates the value of the CharacterCountProperty.
|
protected |
Updates the value of the WordCountProperty.
|
staticprotected |
Transforms a given rectangle with a given matrix.
If the matrix includes rotation the result is the smallest rectangle without the rotation containing the transformed rectangle.
m | Matrix used to transform the rectangle. |
rect | Rectangle to transform. |
|
staticprotected |
Transforms a given rectangle with a given matrix.
If the matrix includes rotation the result is the smallest rectangle without the rotation containing the transformed rectangle.
m | Matrix used to transform the rectangle. |
rect | Rectangle to transform. |
|
protected |
Tells a Text Box node to enter the editing state.
|
protected |
Refresh text hint visibility.
|
protected |
Censors the revealed character in password echo mode.
Updates display text. Kanzi uses the method as a timer callback function when password echo timer completes.
|
protected |
Deletes a given number of characters at cursor position.
count | Number of characters to delete. To delete forwards use positive values, to delete backwards use negative values. |
|
protected |
Calculates the individual selection coordinates of a given Text Box node state.
|
protected |
Calculates the individual composition text highlight coordinates of a given Text Box node state.
|
protected |
Returns the selection end point coordinates from the given Text Box node state.
It takes the effective selection start and end points on mixed directional text buffer content.
|
protected |
Sets whether to reveal the last inserted character in password echo mode.
Some actions, such as erasing text, reset this to false.
reveal | To show the last inserted character, pass true. |
|
protected |
Returns the m_displayText with added explicit directionality marker if it is a password text.
|
protected |
Updates the dragging flags:
Call this method after any update to the selection start or end indices.
|
protected |
Creates the parameters that are needed for initializing the TextFormat of a Text Box node.
width | The available width. |
height | The available height. |
|
protected |
Whether to show, instead of censoring, the last inserted character in password echo mode.
|
protected |
Default value for the Hit Testable property.
|
protected |
Default value for the Focusable property.
|
protected |
Stores the prefab template instantiated from the CursorPrefabProperty.
|
protected |
Stores the prefab template instantiated from the SelectionStartPrefabProperty.
|
protected |
Stores the prefab template instantiated from the SelectionEndPrefabProperty.
|
protected |
Stores the prefab template instantiated from the TextHintPrefabProperty.
|
protected |
The TextInputManipulator attached to the TextBox.
|
protected |
The drag state of the selection cursor for the start selection cursor.
|
protected |
The drag state of the selection cursor for the end selection cursor.
|
protected |
Indicates whether the selection start index is after the selection end index in x coordinates when either m_draggingBegin or m_draggingEnd is set to true.
|
protected |
Helper flag for selection change messages.
|
protected |
Helper flag for editing started and finished messages.
|
protected |
The following MessageSubscriptionTokens are used for controlling the message subscription while a TextBox is in editing state.
The subscription tokens are initialized by addMessageHandler and released by removeMessageHandlers.
|
protected |
|
protected |
Timer subscription token for password echo timeout.