Kanzi 3.9.10
kanzi::TextBox2D Class Reference

TextBox2D provides the required overrides to handle 2D rendering and gesture handling for the 2D text input. More...

#include <kanzi/ui/node/text_box2d.hpp>

Inheritance diagram for kanzi::TextBox2D:
[legend]

Public Types

using ConceptClass
 
- Public Types inherited from kanzi::Node2D
typedef ChildContainer::const_iterator ChildConstIterator
 Iterator type for children.
 
typedef ChildContainer::const_reverse_iterator ChildConstReverseIterator
 Reverse iterator type for children.
 
typedef vector< Node2DSharedPtrChildContainer
 Container type for children.
 
enum  ForegroundHint { ForegroundHintNone , ForegroundHintTranslucent , ForegroundHintOpaque }
 Hint for foreground handling of nodes. More...
 
typedef NodeSharedPtr(* HitTestVisitor) (Node2D &node, Vector2 nodePoint, void *userData)
 Hit test visitor function.
 
typedef Matrix3x3 LayoutMatrixType
 
typedef Vector2 LayoutVectorType
 
enum  PerspectiveTransformationMode { Screen , XFov , YFov }
 Node2D perspective transformation mode. More...
 
enum  PixelFormat { PixelFormatRgb , PixelFormatRgba }
 Pixel formats. More...
 
enum  RenderType { RenderTypeNone , RenderTypeTexture , RenderTypeManual , RenderTypeManualClipped }
 Node2D render type - affects elementary decisions about node rendering. More...
 
- Public Types inherited from kanzi::Node
enum  ContentStretch {
  ContentStretchNone , ContentStretchFill , ContentStretchUniform , ContentStretchUniformToFill ,
  ContentStretchRepeat
}
 Content stretch option. More...
 
enum  DepthAlignment { DepthAlignmentBack , DepthAlignmentFront , DepthAlignmentCenter , DepthAlignmentStretch }
 Depth alignment options. More...
 
enum  HorizontalAlignment { HorizontalAlignmentLeft , HorizontalAlignmentRight , HorizontalAlignmentCenter , HorizontalAlignmentStretch }
 Horizontal alignment options. More...
 
typedef InputManipulatorContainer::const_iterator InputManipulatorConstIterator
 
typedef vector< InputManipulatorBaseSharedPtrInputManipulatorContainer
 Gets the input manipulator iterator.
 
typedef InputManipulatorContainer::iterator InputManipulatorIterator
 
typedef kanzi::vector< Node::MessageSubscriptionTokenMessageSubscriptionTokenVector
 
typedef NodeComponentContainer::const_iterator NodeComponentConstIterator
 
typedef vector< NodeComponentEntryNodeComponentContainer
 Gets the node component iterator.
 
typedef NodeComponentContainer::iterator NodeComponentIterator
 
enum  VerticalAlignment { VerticalAlignmentBottom , VerticalAlignmentTop , VerticalAlignmentCenter , VerticalAlignmentStretch }
 Vertical alignment options. More...
 
typedef function< VisitorResult(Node &) Visitor)
 Defines the type of the function that Kanzi executes for each node when visiting a node tree.
 
enum  VisitorOrder { VisitorPreOrder , VisitorPostOrder }
 Defines the order in which Kanzi visits the nodes in a node tree. More...
 
enum  VisitorResult { VisitorAbort , VisitorContinue , VisitorContinueSibling }
 Defines the return type of the Node::Visitor function. More...
 
- Public Types inherited from kanzi::PropertyObject
typedef PropertyStorageContainer::const_iterator PropertyStorageConstIterator
 
typedef vector< PropertyStoragePtrPropertyStorageContainer
 
typedef PropertyStorageContainer::iterator PropertyStorageIterator
 
typedef intrusive_ptr< AbstractPropertyTypeDescriptor::PropertyStoragePropertyStoragePtr
 
typedef PropertyStorageContainer::reverse_iterator PropertyStorageReverseIterator
 
- Public Types inherited from kanzi::BindingHostConcept
using BindingHostConceptSharedPtr
 Binding host concept shared pointer type.
 
using BindingRuntimeConstIterator
 Const iterator for binding runtimes.
 
using BindingRuntimeContainer
 Container for binding runtimes.
 
using BindingRuntimeIterator
 Iterator for binding runtimes.
 
- Public Types inherited from kanzi::TextBoxConcept
enum class  EditMode { Automatic , Triggered }
 The edit modes. More...
 

Public Member Functions

Rectangle< floatlocalRectToScreen (Rectangle< float > rect) const
 Transforms a given rectangle from the local coordinate system to the screen coordinate system.
 
void onMultiClick (MultiClickManipulator::MultiClickMessageArguments &args)
 
void onPanFinished (PanManipulator::FinishedMessageArguments &args)
 
void onPanMoved (PanManipulator::MovedMessageArguments &args)
 
void onPanStarted (PanManipulator::StartedMessageArguments &args)
 
Rectangle< floatscreenRectToLocal (Rectangle< float > rect) const
 Transforms a given rectangle from the screen coordinate system to the local coordinate system.
 
- Public Member Functions inherited from kanzi::TextBoxConceptImpl< Node2D, TextBox2D, TextBox2DTraits >
void backspaceAtCursor ()
 Deletes a character using backspace.
 
void backspaceWordAtCursor ()
 Deletes the characters between the cursor position and the closest word boundary using backspace.
 
void cancelTextComposition ()
 Tells a Text Box node to cancel text composition.
 
void clearSelection ()
 Clears the current selection.
 
void commitCompositionText ()
 Tells a Text Box node to commit the composition text.
 
void deleteAtCursor ()
 Deletes a character using delete.
 
void deleteSelection ()
 Erases selected text.
 
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.
 
void deleteWordAtCursor ()
 Deletes the characters between the cursor position and the word boundary that follows the cursor.
 
void enterEditingState ()
 Tells a Text Box node to enter the editing state.
 
string getCompositionText () const
 Returns the composition text.
 
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.
 
float getLineHeight ()
 Returns the line height of the font that the Text Box node uses.
 
string getSelectedText ()
 Returns the text that is currently selected in the Text Box node.
 
size_t getSelectionEnd () const
 Returns the end index for the current selection.
 
optional< size_t > getSelectionStart () const
 Returns the start index for the current text selection, or nullopt if no text is selected.
 
bool hasSelection () const
 Returns whether any of the text in a Text Box node is selected.
 
void insertText (size_t position, string_view text)
 Moves the cursor to a given position and inserts text to that position.
 
void insertTextAtCursor (string_view text)
 Inserts text in a Text Box node at the cursor position and moves the cursor forward.
 
void leaveEditingState ()
 Tells a Text Box node to leave the editing state.
 
void moveCursorBackward ()
 Moves the cursor backward by one character.
 
void moveCursorBackward (size_t distance)
 Moves the cursor backward in the text buffer of a Text Box node.
 
void moveCursorForward ()
 Moves the cursor forward by one character.
 
void moveCursorForward (size_t distance)
 Moves the cursor forward in the text buffer of a Text Box node.
 
void moveCursorHome ()
 Moves the cursor to the beginning of the text buffer of a Text Box node.
 
void moveCursorToEnd ()
 Moves the cursor to the end of the text buffer of a Text Box node.
 
void moveCursorToNextWord ()
 Moves the cursor to the next word.
 
void moveCursorToPreviousWord ()
 Moves the cursor to the previous word.
 
void moveSelectionEndBackward ()
 Moves the end of the text selection backward by one character.
 
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.
 
void moveSelectionEndForward ()
 Moves the end of the text selection forward by one character.
 
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.
 
void moveSelectionEndpointBackward (size_t steps)
 Moves the active selection end-point backward with steps passed as argument.
 
void moveSelectionEndpointForward (size_t steps)
 Moves the active selection end-point forward with steps passed as argument.
 
void moveSelectionEndpointToBack ()
 Moves the active selection end-point to the end of the text.
 
void moveSelectionEndpointToFront ()
 Moves the active selection end-point to the front.
 
void moveSelectionEndpointToNextWord ()
 Moves the active selection end-point forward to the previous word boundary.
 
void moveSelectionEndpointToPreviousWord ()
 Moves the active selection end-point backward to the previous word boundary.
 
void moveSelectionEndToNextWord ()
 Moves the end of the text selection forward to the next word.
 
void moveSelectionEndToPreviousWord ()
 Moves the end of the text selection backward to the previous word.
 
void moveSelectionStartBackward ()
 Moves the beginning of the text selection backward by one character.
 
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.
 
void moveSelectionStartForward ()
 Moves the beginning of the text selection forward by one character.
 
void moveSelectionStartForward (size_t distance)
 Moves the selection start forward in the text buffer of a Text Box node.
 
void moveSelectionStartToNextWord ()
 Moves the beginning of the text selection forward to the next word.
 
void moveSelectionStartToPreviousWord ()
 Moves the beginning of the text selection backward to the previous word.
 
void notifyPostPrepareTextFormat (bool completeRelayoutingExecuted)
 Kanzi calls this function every time it successfully completes the prepareTextFormat function.
 
void selectAll ()
 Selects all the content in a Text Box node.
 
void selectText (size_t from, size_t to)
 Selects the text between given indexes (cursor positions).
 
void selectWordAt (size_t characterPosition)
 Selects the word at the specified character position.
 
void selectWordAtCursor ()
 Selects the word at the current cursor position.
 
void setSelectionEnd (size_t index)
 Sets the end index for the current selection.
 
void setSelectionStart (size_t index)
 Sets the start index for the current selection.
 
BrushSharedPtr getSelectionBackgroundBrush () const
 Returns the value of the SelectionBackgroundBrushProperty.
 
void setSelectionBackgroundBrush (BrushSharedPtr value)
 Sets the value of the SelectionBackgroundBrushProperty.
 
BrushSharedPtr getSelectionForegroundBrush () const
 Returns the value of the SelectionForegroundBrushProperty.
 
void setSelectionForegroundBrush (BrushSharedPtr value)
 Sets the value of the SelectionForegroundBrushProperty.
 
BrushSharedPtr getCompositionBackgroundBrush () const
 Returns the value of the CompositionTextBackgroundBrushProperty.
 
void setCompositionBackgroundBrush (BrushSharedPtr value)
 Sets the value of the CompositionTextBackgroundBrushProperty.
 
BrushSharedPtr getCompositionForegroundBrush () const
 Returns the value of the CompositionTextForegroundBrushProperty.
 
void setCompositionForegroundBrush (BrushSharedPtr value)
 Sets the value of the CompositionTextForegroundBrushProperty.
 
size_t getCursorPosition ()
 Returns the value of the CursorPositionProperty.
 
void setCursorPosition (size_t value)
 Sets the value of the CursorPositionProperty.
 
bool isReadOnly () const
 Returns the value of the ReadOnlyProperty.
 
void setReadOnly (bool value)
 Sets the value of the ReadOnlyProperty.
 
size_t getMaximumTextLength () const
 Returns the value of the MaximumTextLengthProperty.
 
void setMaximumTextLength (size_t value)
 Sets the value of the MaximumTextLengthProperty.
 
PrefabTemplateSharedPtr getCursorPrefab () const
 Returns the value of the CursorPrefabProperty.
 
void setCursorPrefab (const PrefabTemplateSharedPtr &prefab)
 Sets the value of the CursorPrefabProperty.
 
PrefabTemplateSharedPtr getSelectionStartPrefab () const
 Returns the value of the SelectionStartPrefabProperty.
 
void setSelectionStartPrefab (const PrefabTemplateSharedPtr &prefab)
 Sets the value of the SelectionStartPrefabProperty.
 
PrefabTemplateSharedPtr getSelectionEndPrefab () const
 Returns the value of the SelectionEndPrefabProperty.
 
void setSelectionEndPrefab (const PrefabTemplateSharedPtr &prefab)
 Sets the value of the SelectionEndPrefabProperty.
 
PrefabTemplateSharedPtr getTextHintPrefab () const
 Returns the value of the TextHintPrefabProperty.
 
void setTextHintPrefab (const PrefabTemplateSharedPtr &prefab)
 Sets the value of the TextHintPrefabProperty.
 
bool isHideTextHintWhenFocused () const
 Returns the value of the HideTextHintWhenEditingProperty.
 
void setHideTextHintWhenFocused (bool value)
 Sets the value of the HideTextHintWhenEditingProperty.
 
EchoMode getEchoMode () const
 Returns the value of the EchoModeProperty.
 
void setEchoMode (const EchoMode &mode)
 Sets the value of the EchoModeProperty.
 
InputType getInputType () const
 Returns the value of the InputTypeProperty.
 
void setInputType (const InputType &inputType)
 Sets the value of the InputTypeProperty.
 
EditMode getEditMode () const
 Returns the value of the EditModeProperty.
 
void setEditMode (const EditMode &mode)
 Sets the value of the EditModeProperty.
 
bool isEditing () const
 Returns the value of the IsEditingProperty.
 
bool isComposingText () const
 Returns the value of the IsComposingTextProperty.
 
size_t getCharacterCount ()
 Returns the value of the CharacterCountProperty.
 
size_t getWordCount ()
 Returns the value of the WordCountProperty.
 
int getPasswordEchoTimeout () const
 Returns the value of the PasswordEchoTimeoutProperty.
 
void setPasswordEchoTimeout (int timeout)
 Sets the value of the PasswordEchoTimeoutProperty.
 
string getPasswordMaskingCharacter () const
 Returns the value of the PasswordMaskingCharacterProperty.
 
void setPasswordMaskingCharacter (string_view passwordMask)
 Sets the value of the PasswordMaskingCharacterProperty.
 
InputMethodAction getInputMethodAction () const
 Returns the value of the InputMethodActionProperty.
 
void setInputMethodAction (InputMethodAction label)
 Sets the value of the InputMethodActionProperty.
 
TextKeyNavigationDirection getTextKeyNavigationDirection () const
 Returns the value of the TextKeyNavigationDirectionProperty.
 
void setTextKeyNavigationDirection (TextKeyNavigationDirection direction)
 Sets the value of the TextKeyNavigationDirectionProperty.
 
- Public Member Functions inherited from kanzi::Node2D
bool addAbstractChildOverride (NodeSharedPtr child) override
 Node::addAbstractChildOverride() implementation.
 
void addChild (Node2DSharedPtr child)
 Adds a child node.
 
void arrange ()
 Performs layout arrangement on a 2D node.
 
ChildConstIterator beginChildren () const
 
bool compositionRequiresAlpha () const
 Returns whether composition requires alpha.
 
bool compositionRequiresDepth () const
 Returns whether composition requires depth.
 
bool compositionRequiresStencil () const
 Returns whether composition requires stencil.
 
optional< Vector2containsGlobal (Vector2 point) const
 Checks whether a node area contains a point defined in screen space. If it does, writes the node-space coordinates into the outgoing point.
 
bool containsLocal (Vector2 point) const
 Returns whether a node area contains a point defined in the local space of the node.
 
ChildConstIterator endChildren () const
 
NodeSharedPtr findAbstractChildOverride (string_view name) override
 Node::findAbstractChildOverride() implementation.
 
size_t getAbstractChildCountOverride () override
 Node::getAbstractChildCountOverride() implementation.
 
size_t getAbstractChildIndexOverride (const Node &node) override
 
NodeSharedPtr getAbstractChildOverride (size_t index) override
 Node::getAbstractChildOverride() implementation.
 
Vector2 getActualSize () const
 Gets the actual size of a node.
 
Vector2 getAllocatedSize () const
 Gets the allocated size of a node.
 
Matrix3x3 getArrangeTransform () const
 Gets the arrange transform.
 
BrushSharedPtr getBackgroundBrush () const
 Gets value of BackgroundBrushProperty.
 
BrushRenderergetBackgroundBrushRenderer () const
 Get background brush renderer.
 
QuadDescription getBackgroundQuad () const
 Gets the background quad description.
 
Node2DSharedPtr getChild (size_t index) const
 Returns a child from given index from object node.
 
Matrix3x3 getChildCompositionSpaceTransform () const
 Gets the transform used for composition children of the 2D node.
 
size_t getChildCount () const
 Gets the number of children of the node.
 
size_t getChildIndex (const Node &child) const
 Returns the index of a child in an object node.
 
ClippingArea getClippingArea () const
 Gets the clipping area.
 
BrushSharedPtr getCompositionBrush () const
 Gets value of CompositionBrushProperty.
 
BrushRenderergetCompositionBrushRenderer () const
 Access cache result brush renderer.
 
CompositionManagergetCompositionManager () const
 Access composition manager.
 
TextureSharedPtr getCompositionTarget () const
 Gets the composition target used for compositing the node.
 
NodeCompositor2DgetCompositor () const
 Accesses the compositor component.
 
Vector2 getContentDesiredSize () const
 Gets the size desired by content.
 
Vector2 getDesiredSize () const
 Gets the desired size of a node.
 
NodeEffect2DSharedPtr getEffect () const
 Gets the value of EffectProperty.
 
NodeEffectPrefab2DSharedPtr getEffectPrefab () const
 Gets the value of EffectPrefabProperty.
 
NodeEffectRenderer2DgetEffectRenderer () const
 Gets the effect renderer.
 
BrushSharedPtr getForegroundBrush () const
 Gets value of ForegroundBrushProperty.
 
BrushRenderergetForegroundBrushRenderer () const
 Get foreground brush renderer.
 
float getLayoutOpacity () const
 Gets the opacity after propagation from layouting hierarchy.
 
SRTValue2D getLayoutTransformation () const
 Gets the value of the LayoutTransformationProperty.
 
TextureSharedPtr getManagedCompositionTarget () const
 Gets the managed composition target of a node.
 
Matrix3x3 getParentSpaceTransform () const
 Gets the parent space transform of the 2D node.
 
Matrix3x3 getPartialArrangeTransform () const
 Gets the partial arrange transform.
 
NodeEffect2DgetRenderableEffect () const
 Gets a pointer to the current effect if effect rendering is required.
 
Matrix3x3 getRenderQuadTransform () const
 Gets transformation used to render the 2D node.
 
TextureSharedPtr getRenderTarget () const
 Gets value of RenderTargetProperty.
 
SRTValue2D getRenderTransformation () const
 Gets the value of RenderTransformationProperty.
 
RenderType getRenderType () const
 Get render type.
 
Vector2 getSecondPassDesiredSize () const
 Gets the second pass desired size.
 
Vector2 getUserDesiredSize () const
 Gets the size desired by user.
 
NodeVisual2DgetVisual () const
 Access visual component.
 
Matrix3x3 getWorldTransform () const
 Gets the world transformation matrix.
 
optional< Vector2globalToLocal (Vector2 point) const
 
bool hasCenterClipArea () const
 Returns whether a 2D node has the center clip area (the area of foreground content).
 
bool hasChild (const Node &child) const
 Returns whether the given node is a child of this node.
 
bool hasCompositionTarget () const
 Indicates whether the node has a composition target.
 
bool hasEffect () const
 Whether an active effect is applied to this node.
 
bool hasManagedCompositionTarget () const
 Returns whether the node has a managed composition target.
 
bool hasOutsideClipArea () const
 Returns whether a 2D node has outside clipping area.
 
bool hasTranslucentForeground () const
 Returns whether the foreground of a 2D node has translucency.
 
NodeSharedPtr hitTest (Vector2 point)
 Performs a hit test to a 2D node and all its child nodes.
 
template<typename T >
shared_ptr< ThitTest (Vector2 point)
 Wrapper for hitTest(Vector2), casts the return value.
 
NodeSharedPtr hitTest (Vector2 point, const Metaclass *type)
 Performs a hit test to a 2D node and all its child nodes.
 
template<typename T >
shared_ptr< ThitTest (Vector2 point, const Metaclass *type)
 Wrapper for hitTest(Vector2, const Metaclass), casts the return value.
 
virtual tuple< NodeSharedPtr, Ray, floathitTestContent (Vector2 point)
 Default implementation of Node2D content hit test.
 
NodeSharedPtr hitTestIterate (Vector2 point, HitTestVisitor visitor, void *userData)
 Hit tests nodes recursively from this node downwards and calls visitor function on the hit nodes.
 
void insertChild (size_t index, Node2DSharedPtr child)
 Adds a child node for object node to given index.
 
bool isCacheValid () const
 Returns whether the children cache is valid.
 
bool isClearColorAllowed () const
 Returns whether this Node2D is allowed and should clear the color buffer of its own composition target.
 
bool isCompletelyClipped () const
 Returns whether a node is completely clipped and needs not be rendered.
 
bool isCompletelyTransparent () const
 Returns whether a node is completely transparent.
 
bool isCompositionPotentiallyRequired () const
 Tell if node itself is going to get rendered into a composition target.
 
bool isPerspectiveTransformActive () const
 Returns whether a node is being perspective transformed.
 
bool isRenderChildrenAllowed () const
 Returns whether rendering children is allowed.
 
bool isRenderSelfAllowed () const
 Returns whether render self is allowed.
 
bool isSelfInCompositionTarget () const
 Returns whether the node is going to get rendered into a composition target.
 
bool isVisibleForHitTesting () const
 Returns whether a 2D node is visible for hit testing.
 
void layout ()
 Does layout pass with no root transformation (identity).
 
void layout (optional< Matrix3x3 > rootTransform)
 Does a layout pass starting from this node and iterating recursively all of its children.
 
bool measure (const Vector2 *availableSize, bool handleStretch)
 Measures one node.
 
virtual bool measureRecursive ()
 Performs measure recursively.
 
bool moveAbstractChildToPositionOverride (NodeSharedPtr child, size_t index) override
 Node::moveAbstractChildToPosition() implementation.
 
void moveChildToPosition (Node2DSharedPtr child, size_t index)
 Moves a child node to a given position in the list of child nodes.
 
void moveToBack ()
 Repositions the node to the beginning of its parent's children, so that it is drawn first.
 
void moveToFront ()
 Repositions the node to the end of its parent's children, so that it is drawn last.
 
ChildConstReverseIterator rbeginChildren () const
 
bool removeAbstractChildOverride (Node &child) override
 Node::removeAbstractChildOverride() implementation.
 
void removeAllChildren ()
 Removes all child nodes.
 
void removeChild (const Node &child)
 Removes child node.
 
void removeChild (size_t index)
 Removes child node at specified index.
 
ChildConstReverseIterator rendChildren () const
 
void render (Renderer3D &renderer, CompositionStack &compositionStack)
 Render a node and its descendant nodes.
 
void render (Renderer3D &renderer, CompositionStack &compositionStack, const optional< Matrix3x3 > &baseTransform)
 Renders a node and its descendant nodes.
 
bool requiresBackgroundBrushRendering () const
 Returns whether background brush rendering is required.
 
bool requiresForegroundBrushRendering () const
 Returns whether foreground brush rendering is required.
 
bool requiresLocalTransformationScope () const
 Indicates whether local transformation scope is required.
 
bool requiresTilingUpdate () const
 Returns whether node geometry requires an update for the tiling.
 
void resetCache ()
 Resets cached content for complete content of a node, including the node and its children.
 
void setActualSize (float sizeX, float sizeY)
 Sets the actual size of a node.
 
void setActualSize (Vector2 actualSize)
 Sets the actual size of a node.
 
void setAllocatedSize (Vector2 allocatedSize)
 Sets the allocated size of a node.
 
void setArrangeTransform (Matrix3x3 transform)
 Sets the arrange transform.
 
void setAutoHeight ()
 Sets a node to determine its height automatically.
 
void setAutoSize ()
 Sets a node to determine its width and height automatically.
 
void setAutoWidth ()
 Sets a node to determine its width automatically.
 
void setBackgroundBrush (BrushSharedPtr value)
 Sets value of BackgroundBrushProperty.
 
void setClearColorAllowed (bool enabled)
 Sets clear color allowed.
 
void setCompositionBrush (BrushSharedPtr value)
 Sets value of CompositionBrushProperty.
 
void setCompositionRequested (bool enabled)
 Turns the composition request on or off.
 
void setCompositionRequiresAlpha (bool enabled)
 Turns the composition alpha requirement on or off.
 
void setCompositionRequiresDepth (bool enabled)
 Turns the composition depth requirement on or off.
 
void setCompositionRequiresStencil (bool enabled)
 Turns the composition stencil requirement on or off.
 
void setDesiredSize (Vector2 desiredSize)
 Sets the desired size of a node.
 
void setEffectPrefab (NodeEffectPrefab2DSharedPtr value)
 Sets the value of EffectPrefabProperty.
 
void setForegroundBrush (BrushSharedPtr value)
 Sets value of ForegroundBrushProperty.
 
void setForegroundIsTranslucent (bool enabled)
 Sets the status of the foreground translucency.
 
void setForegroundTranslucencyRequested (bool enabled)
 Enables or disables the foreground translucency request.
 
KZ_DEPRECATED void setLayoutSize (float width, float height)
 Sets size properties of the node.
 
void setLayoutTransformation (SRTValue2D value)
 Sets the value of the LayoutTransformationProperty.
 
void setPotentialCompositionBitViewport (bool enabled)
 Turns the potential composition flag for the viewport on or off.
 
void setRenderTarget (TextureSharedPtr texture)
 Sets value of RenderTargetProperty.
 
void setRenderTransformation (SRTValue2D value)
 Sets the value of RenderTransformationProperty.
 
void setRequiresLocalTransformationScope (bool enabled)
 Sets the local transformation scope requirement.
 
void setRequiresTilingUpdate (bool enabled)
 Sets the tiling update requirement.
 
void setSize (float width, float height)
 Sets the size of a node.
 
void setSize (Vector2 size)
 Sets the size of a node.
 
void transform ()
 Transforms a 2D node.
 
VisitorResult visitAbstractChildOverride (const Visitor &visitor, VisitorOrder order) override
 Node::visitAbstractChild implementation.
 
 ~Node2D () override
 
float getAspectRatio () const
 Gets the value of AspectRatioProperty.
 
void setAspectRatio (float value)
 Sets the value of AspectRatioProperty.
 
bool isForceComposition () const
 Gets the value of ForceCompositionProperty.
 
void setForceComposition (bool value)
 Sets the value of ForceCompositionProperty.
 
Node2D::ForegroundHint getForegroundHint () const
 Gets the value of ForegroundHintProperty.
 
void setForegroundHint (Node2D::ForegroundHint value)
 Sets the value of ForegroundHintProperty.
 
bool isOffscreenRendering () const
 Gets the value of OffscreenRenderingProperty.
 
void setOffscreenRendering (bool value)
 Sets the value of OffscreenRenderingProperty.
 
bool isDisableRenderTargetClear () const
 Gets the value of DisableRenderTargetClearProperty.
 
void setDisableRenderTargetClear (bool value)
 Sets the value of DisableRenderTargetClearProperty.
 
Node2D::PixelFormat getPixelFormat () const
 Gets the value of PixelFormatProperty.
 
void setPixelFormat (Node2D::PixelFormat value)
 Sets the value of PixelFormatProperty.
 
bool isRenderSelf () const
 Gets the value of RenderSelfProperty.
 
void setRenderSelf (bool value)
 Sets the value of RenderSelfProperty.
 
float getRenderTargetMinimumHeight () const
 Gets the value of RenderTargetMinimumHeightProperty.
 
void setRenderTargetMinimumHeight (float value)
 Sets the value of RenderTargetMinimumHeightProperty.
 
float getRenderTargetMinimumWidth () const
 Gets the value of RenderTargetMinimumWidthProperty.
 
void setRenderTargetMinimumWidth (float value)
 Sets the value of RenderTargetMinimumWidthProperty.
 
float getRenderTargetReallocationLimit () const
 Gets the value of RenderTargetReallocationLimitProperty.
 
void setRenderTargetReallocationLimit (float value)
 Sets the value of RenderTargetReallocationLimitProperty.
 
CachingMode getCachingMode () const
 Gets the value of CachingModeProperty.
 
void setCachingMode (CachingMode value)
 Sets the value of CachingModeProperty.
 
SRTValue3D getPerspectiveTransformation () const
 Gets the value of PerspectiveTransformationProperty.
 
void setPerspectiveTransformation (SRTValue3D value)
 Sets the value of PerspectiveTransformationProperty.
 
PerspectiveTransformationMode getPerspectiveTransformationMode () const
 Gets the value of PerspectiveTransformationModeProperty.
 
void setPerspectiveTransformationMode (PerspectiveTransformationMode value)
 Sets the value of PerspectiveTransformationModeProperty.
 
float getPerspectiveTransformationFov () const
 Gets the value of PerspectiveTransformationFovProperty.
 
void setPerspectiveTransformationFov (float value)
 Sets the value of PerspectiveTransformationProperty.
 
Vector3 getPerspectiveTransformationPivot () const
 Gets the value of PerspectiveTransformationPivotProperty.
 
void setPerspectiveTransformationPivot (Vector3 value)
 Sets the value of PerspectiveTransformationPivotProperty.
 
Vector3 getPerspectiveTransformationOrigin () const
 Gets the value of PerspectiveTransformationOriginProperty.
 
void setPerspectiveTransformationOrigin (Vector3 value)
 Sets the value of PerspectiveTransformationOriginProperty.
 
Vector2 getRenderTransformationOrigin () const
 Gets the value of RenderTransformationOriginProperty.
 
void setRenderTransformationOrigin (Vector2 value)
 Sets the value of RenderTransformationOriginProperty.
 
bool isSnapToPixel () const
 Gets the value of SnapToPixelProperty.
 
void setSnapToPixel (bool value)
 Sets the value of SnapToPixelProperty.
 
MultisampleCount getMultisampleLevel () const
 Gets the value of MultisampleLevelProperty.
 
void setMultisampleLevel (MultisampleCount value)
 Sets the value of MultisampleLevelProperty.
 
- Public Member Functions inherited from kanzi::Node
ResourceSharedPtr acquireResource (const ResourceID &id) const
 Acquires a resource from the node or the node's closest ancestor having the resource id in the resource dictionary.
 
template<typename T >
shared_ptr< TacquireResource (const ResourceID &id) const
 Acquires a resource from the node or the node's closest ancestor having the resource id in the resource dictionary, and casts the resource to given type.
 
ResourceManager::AcquireTaskSharedPtr acquireResourceAsync (const ResourceID &key, ResourceManager::AsyncAcquireFinishedCallback func) const
 Posts an asynchronous task to acquire a resource.
 
ResourceDictionarySharedPtr acquireResourceDictionary ()
 Gets a resource dictionary of a node.
 
void addAnonymousResource (ResourceSharedPtr resource)
 Adds alias resource to an object node.
 
void addInputManipulator (InputManipulatorBaseSharedPtr inputManipulator)
 Transfers the ownership and attaches an input manipulator to an object node.
 
template<typename TMessageType >
MessageSubscriptionToken addMessageFilter (const TMessageType &messageType, typename TMessageType::FunctionType function)
 Adds a message filter where the filter is a function.
 
template<typename TMessageType , typename TClass , typename TClassMethod >
MessageSubscriptionToken addMessageFilter (TMessageType &messageType, TClass *messageHandlerObject, TClassMethod method)
 Adds a message filter where the filter is a method that is invoked on an object.
 
template<typename TMessageType >
MessageSubscriptionToken addMessageHandler (const TMessageType &messageType, typename TMessageType::FunctionType function)
 Adds a message handler where the handler is a function.
 
template<typename TMessageType >
MessageSubscriptionToken addMessageHandler (const TMessageType &messageType, typename TMessageType::FunctionType function, Node *messageSourceFilter)
 Adds a message handler where the handler is a function and you explicitly define the accepted source.
 
template<typename TMessageType , typename TClass , typename TClassMethod >
MessageSubscriptionToken addMessageHandler (TMessageType &messageType, TClass *messageHandlerObject, TClassMethod method)
 Adds a message handler where the handler is a method that is invoked on an object.
 
void addNodeComponent (NodeComponentSharedPtr nodeComponent)
 Transfers the ownership of a node component to an object node.
 
void addNodeComponentWithOwner (NodeComponentSharedPtr nodeComponent, const void *owner)
 Transfers the ownership of a node component to an object node and sets the owner of the node component.
 
void addNodeReference (AbstractPropertyType propertyType, AbstractNodeReference *reference)
 
void addResource (const ResourceID &resourceId, string_view resourceUrl)
 Adds a resource manager resource to an object node. If resourceID already exists in object, removes the existing entry. If resourceURL is NULL, error is thrown. *‍/.
 
void addResourceDictionary (ResourceDictionarySharedPtr resourceDictionary)
 Adds a nested resource dictionary to the resource dictionary of a node.
 
void addResourceReference (AbstractPropertyType propertyType, AbstractResourceReference *reference)
 This is a helper for automatic resource tracking in ResourceReference.
 
template<typename TMessageType , typename TClass , typename TClassMethod >
MessageSubscriptionToken addTunnelingFilter (const TMessageType &messageType, TClass *messageHandlerObject, TClassMethod method)
 Adds a message filter where the filter is a method that is invoked on an object.
 
template<typename TMessageType >
MessageSubscriptionToken addTunnelingFilter (const TMessageType &messageType, typename TMessageType::FunctionType function)
 Adds a message filter where the filter is a function.
 
template<typename TMessageType >
MessageSubscriptionToken addTunnelingHandler (const TMessageType &messageType, typename TMessageType::FunctionType function, Node *messageSourceFilter)
 Adds a message handler where the handler is a function and you explicitly define the accepted source.
 
AppliedStyleEntrySharedPtr applyManualStyle (StyleSharedPtr style)
 Applies a style to an object node.
 
AppliedStyleEntrySharedPtr applyStyle (StyleSharedPtr style)
 Applies a style to an object node.
 
void applyStyles ()
 Apply all styles for an object node.
 
void applyStylesRecursive ()
 Applies styles recursively.
 
void attachRecursive ()
 Attaches an object node and its children recursively.
 
InputManipulatorConstIterator beginInputManipulators () const
 
NodeComponentConstIterator beginNodeComponents () const
 
void clearChangeFlag (uint32_t flag)
 Clears a change flag.
 
void clearChildChangeFlag (uint32_t flag)
 Clears a child change flag.
 
bool containsResource (const ResourceID &resourceID) const
 Returns if object node resource dictionary contains the resource with given ID. Resource can be any type: style, alias or resource manager resource. *‍/.
 
BindingLookupContextPtr createLookupContext (NodeSharedPtr templateRoot)
 Creates a lookup context for the node.
 
void detachRecursive ()
 Detaches a node and its descendants.
 
void dispatchAbstractMessage (const AbstractMessageType &messageType, MessageArguments &messageArguments)
 Dispatches a message from this node with specified arguments.
 
template<typename TArgumentsType >
void dispatchMessage (const MessageType< TArgumentsType > &messageType, typename MessageType< TArgumentsType >::ArgumentsType &messageArguments)
 Dispatches a message from this node with specified arguments.
 
InputManipulatorConstIterator endInputManipulators () const
 
NodeComponentConstIterator endNodeComponents () const
 
template<typename TNodeType >
shared_ptr< TNodeTypefindAbstractChild (string_view name)
 Find a child by name. Finds direct children as well as children connected indirectly for example Viewport->Scene.
 
optional< string > findResourceURL (const ResourceID &resourceId) const
 Tries to find Resource URL for Resource ID from this node.
 
template<typename DataType >
DataType getAbstractProperty (AbstractPropertyType abstractPropertyType) const
 
uint32_t getChangeFlags () const
 Get current change flags.
 
uint32_t getChildChangeFlags () const
 Get current child change flags.
 
FocusManagergetFocusManager () const
 Returns the Focus Manager associated with the Screen node to which this node belongs.
 
FocusScopegetFocusScopeInfo () const
 Returns the information about the focus scope for a node.
 
InputManagergetInputManager () const
 Returns the Input Manager associated with the Screen node to which this node belongs.
 
AbstractPropertyTypeDescriptor::ValueSourcegetNodeFinalValueSource (AbstractPropertyTypeDescriptor &descriptor) const
 
template<typename DataType >
optional< typename PropertyType< DataType >::DataType > getOptionalAbstractProperty (AbstractPropertyType abstractPropertyType) const
 
template<typename DataType >
optional< typename PropertyType< DataType >::Traits::ReturnType > getOptionalProperty (const PropertyType< DataType > &propertyType) const
 Evaluates the property value in the same way as the overload above but does not default to the value in property metadata if there are no inputs to the property value.
 
NodegetParent () const
 Returns the parent of the node.
 
template<typename DataType >
PropertyType< DataType >::Traits::ReturnType getProperty (const PropertyType< DataType > &propertyType) const
 Returns the current value of a property.
 
ResourceDictionarySharedPtr getResourceDictionary () const
 If a node has a resource dictionary, returns the resource dictionary of that node.
 
ScreengetScreen () const
 Returns the Screen node to which this node belongs.
 
NodeSharedPtr getTemplateRoot () const
 Gets the template root of this node.
 
void invalidateArrange ()
 Invalidates arrange.
 
void invalidateDraw ()
 Invalidates draw flag for the node.
 
void invalidateFinalTransform ()
 Invalidates final transform for node.
 
void invalidateMeasure ()
 Invalidates measure for the node.
 
void invalidateRender ()
 Invalidates render for node.
 
bool isAnyChangeFlagSet (uint32_t flag) const
 Checks if any of given flags is set.
 
bool isAnyChildChangeFlagSet (uint32_t flag) const
 Checks if any child change flags (corresponding to given mask) are set.
 
bool isAttached () const
 Returns true if the node is attached to a screen or one of its descendants.
 
bool isAttaching () const
 Returns true if node is in the process of attaching, false otherwise.
 
bool isChangeFlagSet (uint32_t flag) const
 Checks if a change flag is set.
 
bool isChildChangeFlagSet (uint32_t flag) const
 Checks if child change flags match.
 
bool isDetaching () const
 Returns true if the node currently detaching.
 
bool isEffectivelyFocusable () const
 Returns whether a node is focusable.
 
bool isEffectivelyVisible () const
 Returns whether a node and its ancestor nodes are visible.
 
bool isInitialized () const
 Returns true if initialize() has been called, false otherwise.
 
bool isInvalidArrange () const
 Checks if the node needs arrange.
 
bool isInvalidDraw ()
 Tells if node draw flag is invalid.
 
bool isInvalidFinalTransform () const
 Tells if final transform flag is invalid for node.
 
bool isInvalidMeasure () const
 Check if the node needs measure.
 
bool isInvalidRender () const
 Returns if node render flag is invalid.
 
bool isNamed (string_view name) const
 
 KZ_METACLASS_PROPERTY_TYPE (FontFamilyProperty)
 
template<typename Type >
shared_ptr< Type > lookupNode (string_view pathOrKey)
 Returns a node of specified type by looking it up with specified path or alias.
 
template<typename Type >
shared_ptr< Type > lookupNodeComponent (string_view name)
 Returns a node component of specified type by looking it up with specified name.
 
NodelookupNodeRaw (string_view relativePath)
 Get an object node by another node and a relative path.
 
ObjectSharedPtr lookupObject (string_view relativePath)
 Lookup for an object from a node.
 
template<typename Type >
shared_ptr< Type > lookupObject (string_view relativePath)
 Lookup for an object from a node.
 
tuple< NodeSharedPtr, AbstractPropertyTypelookupObjectForStateManager (string_view relativePath)
 Lookup for an node and possible object from within the node for state manager.
 
void notifyResourceDictionaryModified ()
 Forces the re-evaluation of resource IDs in a node tree.
 
void removeAnonymousResource (const Resource &resource)
 Removes anonymous resource from object node resources.
 
void removeInputManipulator (InputManipulator &inputManipulator)
 Removes the ownership and detaches an input manipulator from an object node.
 
void removeKZBData ()
 Destroys all object node data loaded from KZB.
 
void removeKZBData (flat_set< AbstractPropertyType > *keepProperties)
 Destroys all object node data loaded from KZB, including properties, bindings, node components, resources etc.
 
void removeMessageHandler (MessageSubscriptionToken token)
 Removes a message subscription.
 
void removeNodeComponent (NodeComponent &nodeComponent)
 Removes the ownership of a node component from an object node.
 
void removeNodeComponentWithOwner (const void *owner)
 Removes all bindings with the specified owner.
 
void removeNodeReference (const AbstractNodeReference &reference)
 
void removeResource (const ResourceID &resourceId)
 Removes a resource with given ID from object node resource dictionary. Does not do anything if resourceID was not found. *‍/.
 
void removeResourceReference (const AbstractResourceReference &reference)
 This is a helper for automatic resource tracking in ResourceReference.
 
void setChangeFlag (uint32_t flag)
 Sets a change flag.
 
void setChildChangeFlag (uint32_t flag)
 Sets a child change flag.
 
void setParent (Node *parent)
 Kanzi uses this method internally to set the parent of a node.
 
void setResourceDictionary (ResourceDictionarySharedPtr resourceDictionary)
 Replaces the resource dictionary of a node.
 
void setScreen (Screen *screen)
 Sets the Screen node to which this node belongs.
 
void setTemplateRoot (NodeSharedPtr templateRoot)
 Sets the template root of this node.
 
ResourceSharedPtr tryAcquireResource (const ResourceID &id) const
 Acquires a resource from the node or the node's closest ancestor having the resource id in the resource dictionary.
 
template<typename T >
shared_ptr< TtryAcquireResource (const ResourceID &id) const
 Acquires a resource from the node or the node's closest ancestor having the resource and casts the resource to given type.
 
KZ_DEPRECATED NodeSharedPtr trySetActiveFocus ()
 Tries to move the focus on this node.
 
NodeSharedPtr trySetFocus ()
 Tries to move the focus to this node.
 
NodeSharedPtr trySetFocus (FocusFallback fallbackOption)
 Tries to set the focus to the newFocusNode using FocusManager::trySetFocus() but with a fallback behavior in case the node does not gain focus.
 
void unapplyStyle (AppliedStyleEntrySharedPtr appliedStyleEntry)
 Unapplies a style from an object node.
 
void unapplyStyles ()
 Unapplies and removes all applied styles.
 
void unapplyStylesRecursive ()
 Unapplies styles recursively.
 
void validateArrange ()
 Validates arrange.
 
void validateDraw ()
 Validates draw flags for the node.
 
void validateDrawForChildrenRecursive ()
 Recursively validates draw for the children from this 2D node onwards.
 
void validateMeasure ()
 Validates measure for the node.
 
void validateRender ()
 Validates render for node.
 
VisitorResult visit (const Visitor &visitor, VisitorOrder order)
 Visits a node and its descendants.
 
VisitorResult visitDescendants (const Visitor &visitor, VisitorOrder order)
 Visits the descendants of a node.
 
 ~Node () override
 Destructor.
 
string getName () const
 Gets the value of NameProperty.
 
void setName (string_view value)
 Sets the value of NameProperty.
 
string getPath () const
 Gets the value of PathProperty.
 
void setPath (string value)
 Sets the value of PathProperty.
 
string getLocale () const
 Gets the value of LocaleProperty.
 
void setLocale (string value)
 Sets the value of LocaleProperty.
 
bool isHitTestable () const
 Gets the value of HitTestableProperty.
 
void setHitTestable (bool value)
 Sets the value of HitTestableProperty.
 
bool isHitTestableContainer () const
 Gets the value of HitTestableContainerProperty.
 
void setHitTestableContainer (bool value)
 Sets the value of HitTestableContainerProperty.
 
bool isVisible () const
 Gets the value of VisibleProperty.
 
void setVisible (bool value)
 Sets the value of VisibleProperty.
 
bool isEnabled () const
 Returns the value of the EnabledProperty.
 
void setEnabled (bool value)
 Sets the value of the EnabledProperty.
 
bool isEffectivelyEnabled () const
 Returns the value of EffectivelyEnabledProperty.
 
bool isFocusable () const
 Gets the value of the FocusableProperty.
 
void setFocusable (bool value)
 Sets the value of the FocusableProperty.
 
bool isFocused () const
 Gets the value of the FocusedProperty.
 
void setFocused (bool value)
 Sets the value of the FocusedProperty.
 
FocusState getFocusState () const
 Gets the value of the FocusStateProperty.
 
void setFocusState (FocusState state)
 Sets the value of the FocusStateProperty.
 
FontFamilySharedPtr getFontFamily () const
 Gets the font family the node uses.
 
void setFontFamily (FontFamilySharedPtr value)
 Sets the font family the node uses.
 
float getVisibleAmountInParent () const
 Gets the value of VisibleAmountInParentProperty.
 
void setVisibleAmountInParent (float value)
 Sets the value of VisibleAmountInParentProperty.
 
float getProjection2DTo3DScale () const
 Gets the value of Projection2DTo3DScaleProperty.
 
void setProjection2DTo3DScale (float value)
 Sets the value of Projection2DTo3DScaleProperty.
 
ResourceSharedPtr getStyle () const
 Gets the value of StyleProperty.
 
void setStyle (ResourceSharedPtr value)
 Sets the value of StyleProperty.
 
ResourceSharedPtr getStateManager () const
 Gets the value of StateManagerProperty.
 
void setStateManager (ResourceSharedPtr value)
 Sets the value of StateManagerProperty.
 
float getWidth () const
 Gets the value of WidthProperty.
 
void setWidth (float value)
 Sets the value of WidthProperty.
 
float getHeight () const
 Gets the value of HeightProperty.
 
void setHeight (float value)
 Sets the value of HeightProperty.
 
float getDepth () const
 Gets the value of DepthProperty.
 
void setDepth (float value)
 Sets the value of DepthProperty.
 
float getActualWidth () const
 Gets the value of ActualWidthProperty.
 
void setActualWidth (float value)
 Sets the value of ActualWidthProperty.
 
float getActualHeight () const
 Gets the value of ActualHeightProperty.
 
void setActualHeight (float value)
 Sets the value of ActualHeightProperty.
 
float getActualDepth () const
 Gets the value of ActualDepthProperty.
 
void setActualDepth (float value)
 Sets the value of ActualDepthProperty.
 
Node::HorizontalAlignment getHorizontalAlignment () const
 Gets the value of HorizontalAlignmentProperty.
 
void setHorizontalAlignment (Node::HorizontalAlignment value)
 Sets the value of HorizontalAlignmentProperty.
 
Node::VerticalAlignment getVerticalAlignment () const
 Gets the value of VerticalAlignmentProperty.
 
void setVerticalAlignment (Node::VerticalAlignment value)
 Sets the value of VerticalAlignmentProperty.
 
Node::DepthAlignment getDepthAlignment () const
 Gets the value of DepthAlignmentProperty.
 
void setDepthAlignment (Node::DepthAlignment value)
 Sets the value of DepthAlignmentProperty.
 
Vector2 getHorizontalMargin () const
 Gets the value of HorizontalMarginProperty.
 
void setHorizontalMargin (Vector2 value)
 Sets the value of HorizontalMarginProperty.
 
Vector2 getVerticalMargin () const
 Gets the value of VerticalMarginProperty.
 
void setVerticalMargin (Vector2 value)
 Sets the value of VerticalMarginProperty.
 
Vector2 getDepthMargin () const
 Gets the value of DepthMarginProperty.
 
void setDepthMargin (Vector2 value)
 Sets the value of DepthMarginProperty.
 
Node::ContentStretch getContentStretch () const
 Gets the value of ContentStretchProperty.
 
void setContentStretch (Node::ContentStretch value)
 Sets the value of ContentStretchProperty.
 
float getOpacity () const
 Gets the value of OpacityProperty.
 
void setOpacity (float value)
 Sets the value of OpacityProperty.
 
bool isHover () const
 Returns whether the node has HoverProperty set to true.
 
bool isClipChildren () const
 Gets the value of ClipChildrenProperty.
 
void setClipChildren (bool value)
 Sets the value of ClipChildrenProperty.
 
- Public Member Functions inherited from kanzi::Object
AppliedStyleEntrySharedPtr applyObjectStyle (kanzi::StyleSharedPtr style)
 Applies a style to an object.
 
void applyObjectStyles ()
 Apply all styles for an object node.
 
DomaingetDomain () const
 Returns the domain the object belongs to.
 
const MetaclassgetDynamicMetaclass () const override
 Returns the metaclass of the dynamic type of the object.
 
MainLoopSchedulergetMainLoopScheduler () const
 Returns the MainLoopScheduler instance of the associated Domain.
 
detail::MessageDispatcher * getMessageDispatcher () const
 Returns the message dispatcher of the object.
 
ResourceManagergetResourceManager () const
 Returns the resource manager of the object.
 
ScriptingContextSharedPtr getScriptingContext () const
 Gets the scripting context of the object.
 
 Object (Domain *domain)
 
void setScriptingContext (ScriptingContextSharedPtr context)
 Sets the scripting context of the object.
 
void unapplyObjectStyle (AppliedStyleEntrySharedPtr appliedStyleEntry)
 
void unapplyObjectStyles ()
 Unapplies and removes all applied styles.
 
 ~Object () override
 
- Public Member Functions inherited from kanzi::MetaObject
bool isTypeOf (const Metaclass *objectType) const
 Determines if the type of this object is the given type or derived from it.
 
virtual ~MetaObject ()
 
- Public Member Functions inherited from kanzi::PropertyObject
template<typename DataType >
void addPropertyModifier (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::ModifierCallback callback, void *owner)
 
template<typename DataType >
void addPropertyModifierWithoutNotifyingHandlers (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::ModifierCallback callback, void *owner)
 Adds a property modifier without notifying handlers.
 
template<typename DataType >
void addPropertyNotificationHandler (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::NotificationCallback callback, void *owner)
 
template<typename DataType >
void addPropertyValueSource (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::TypedValueSource *valueSource, PropertyValuePrecedence precedence, AbstractPropertyTypeDescriptor::ValueSourceOwner *owner)
 
template<typename DataType >
void addPropertyValueSource (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::TypedValueSource *valueSource, PropertyValuePrecedence precedence, void *ownerPointer)
 
PropertyStorageContainer::iterator beginPropertyStorage ()
 Returns the begin iterator to the internal property storage container.
 
PropertyStorageContainer::const_iterator beginPropertyStorage () const
 Returns the begin iterator to the internal property storage container.
 
void clearPropertyFlag (AbstractPropertyType propertyType, uint32_t flag)
 
void copyLocalValue (const PropertyObject &other, AbstractPropertyType propertyType)
 Copies local value of single property from another object.
 
void copyLocalValues (const PropertyObject &other)
 Copies all local values from another object.
 
PropertyStorageContainer::iterator endPropertyStorage ()
 Returns the end iterator to the internal property storage container.
 
PropertyStorageContainer::const_iterator endPropertyStorage () const
 Returns the end iterator to the internal property storage container.
 
template<typename DataType >
PropertyType< DataType >::Traits::ReturnType getAbstractProperty (AbstractPropertyType abstractPropertyType) const
 
template<typename DataType >
PropertyType< DataType >::Traits::ReturnType getAbstractPropertyBase (AbstractPropertyType abstractPropertyType) const
 
template<typename DataType >
optional< typename PropertyType< DataType >::Traits::ReturnType > getOptionalAbstractProperty (AbstractPropertyType abstractPropertyType) const
 
template<typename DataType >
optional< typename PropertyType< DataType >::Traits::ReturnType > getOptionalProperty (const PropertyType< DataType > &propertyType) const
 Evaluates the property value in the same way as the overload above but does not default to the value in property metadata if there are no inputs to the property value.
 
template<typename DataType >
optional< typename PropertyType< DataType >::Traits::ReturnType > getOptionalPropertyBase (const PropertyType< DataType > &propertyType) const
 Returns the current value of a property disregarding modifiers, but does not default to the value in property metadata if there are no inputs to the property value.
 
template<typename DataType >
PropertyType< DataType >::Traits::ReturnType getProperty (const PropertyType< DataType > &propertyType) const
 Returns the current value of a property type.
 
template<typename DataType >
PropertyType< DataType >::Traits::ReturnType getPropertyBase (const PropertyType< DataType > &propertyType) const
 Returns the current value of a property disregarding modifiers.
 
template<typename DataType >
size_t getPropertyNotificationHandlerCount (const PropertyType< DataType > &propertyType) const
 Gets number of current notification handlers for given property type.
 
bool hasBaseValue (AbstractPropertyType propertyType) const
 Evaluates whether there are any inputs into the property value, disregarding modifiers.
 
bool hasLocalValue (AbstractPropertyType propertyType) const
 Evaluates whether there is a local value set for the property.
 
bool hasNonClassValue (AbstractPropertyType propertyType) const
 Evaluates whether there is a value of any precedence higher than class default value set for the property.
 
bool hasValue (AbstractPropertyType propertyType) const
 Evaluates whether there are any inputs into the property value.
 
bool isPropertyFlagSet (AbstractPropertyType propertyType, uint32_t flag) const
 
 PropertyObject ()
 
void removeKzbProperties ()
 Remove all KZB properties.
 
void removeKzbProperties (flat_set< AbstractPropertyType > *keepProperties)
 Remove all KZB properties that are not included in a given set.
 
template<typename DataType >
void removeLocalPropertyValueSource (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::TypedValueSource *valueSource, void *ownerPointer)
 
void removeLocalValue (AbstractPropertyType propertyType)
 Removes the local value associated with the property.
 
template<typename DataType >
void removePropertyModifier (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::ModifierCallback callback, void *owner)
 
template<typename DataType >
void removePropertyNotificationHandler (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::NotificationCallback callback, void *owner)
 
template<typename DataType >
void removePropertyValueSource (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::TypedValueSource *valueSource, void *ownerPointer)
 
template<typename DataType >
void setAbstractProperty (AbstractPropertyType abstractPropertyType, typename PropertyType< DataType >::Traits::ParameterType value)
 
template<typename DataType >
void setProperty (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Traits::ParameterType value)
 Sets the local value of a property type.
 
void setPropertyFlag (AbstractPropertyType propertyType, uint32_t flag)
 
KZ_DEPRECATED void validatePropertyModifiers (AbstractPropertyType propertyType)
 Validates property modifiers and notifies handlers.
 
void validatePropertyModifiersAndNotifyHandlers (AbstractPropertyType propertyType)
 Validates property modifiers and notifies handlers.
 
virtual ~PropertyObject ()
 
- Public Member Functions inherited from kanzi::BindingHostConceptImpl< Node >
void addBindingRuntime (AbstractBindingRuntimeSharedPtr entry, shared_ptr< void > owner)
 Adds an already-created binding runtime to this binding host.
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding)
 Wrapper for setting a binding with no target.
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding, AbstractPropertyType propertyType)
 Wrapper for setting a binding.
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding, AbstractPropertyType propertyType, PropertyField field)
 Wrapper for setting a binding.
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding, AbstractPropertyType propertyType, PropertyField field, PropertyValuePrecedence precedence)
 Wrapper for setting a binding.
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding, AbstractPropertyType propertyType, PropertyValuePrecedence precedence)
 Wrapper for setting a binding.
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding, shared_ptr< Node > templateRoot)
 Sets a binding with no target.
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding, shared_ptr< Node > templateRoot, AbstractPropertyType propertyType, PropertyField field)
 Wrapper for setting a binding.
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding, shared_ptr< Node > templateRoot, AbstractPropertyType propertyType, PropertyField field, PropertyValuePrecedence precedence)
 Wrapper for setting a binding.
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding, shared_ptr< Node > templateRoot, AbstractPropertyType propertyType, PropertyValuePrecedence precedence)
 Wrapper for setting a binding.
 
BindingRuntimeHandle setBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner)
 Wrapper for setting a binding with no target.
 
BindingRuntimeHandle setBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner, AbstractPropertyType propertyType)
 Wrapper for setting a binding with owner.
 
BindingRuntimeHandle setBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner, AbstractPropertyType propertyType, PropertyField field, PropertyValuePrecedence precedence)
 Wrapper for setting a binding with owner.
 
BindingRuntimeHandle setBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner, shared_ptr< Node > templateRoot)
 Sets a binding with no target.
 
BindingRuntimeHandle setBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner, shared_ptr< Node > templateRoot, AbstractPropertyType propertyType, PropertyField field, PropertyValuePrecedence precedence)
 Sets a binding to a certain property.
 
BindingRuntimeHandle setModifierBinding (AbstractBindingSharedPtr binding, AbstractPropertyType propertyType)
 Wrapper for setting a modifier binding.
 
BindingRuntimeHandle setModifierBinding (AbstractBindingSharedPtr binding, AbstractPropertyType propertyType, PropertyField field)
 Wrapper for setting a modifier binding.
 
BindingRuntimeHandle setModifierBinding (AbstractBindingSharedPtr binding, shared_ptr< Node > templateRoot, AbstractPropertyType propertyType, PropertyField field)
 Wrapper for setting a modifier binding.
 
BindingRuntimeHandle setModifierBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner, AbstractPropertyType propertyType)
 Wrapper for setting a modifier binding.
 
BindingRuntimeHandle setModifierBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner, AbstractPropertyType propertyType, PropertyField field)
 Wrapper for setting a modifier binding.
 
BindingRuntimeHandle setModifierBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner, shared_ptr< Node > templateRoot, AbstractPropertyType propertyType, PropertyField field)
 Sets a modifier binding.
 
- Public Member Functions inherited from kanzi::BindingHostConcept
BindingRuntimeConstIterator beginBindingRuntimes () const
 Returns an iterator to the beginning of binding runtimes.
 
BindingRuntimeConstIterator endBindingRuntimes () const
 Returns an iterator to the end of binding runtimes.
 
AbstractBindingRuntimeSharedPtr getBindingRuntime (size_t idx)
 Gets binding by index.
 
size_t getBindingRuntimeCount () const
 Gets the number of binding runtimes added to this node.
 
void removeAllBindings ()
 Removes all binding runtimes.
 
void removeBinding (BindingRuntimeHandle &bindingRuntime)
 Removes a binding runtime added earlier.
 
void removeBindingsWithOwner (shared_ptr< void > owner)
 Removes all binding runtimes with the specified owner.
 
- 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.
 
MaterialSharedPtr getFontMaterial () const
 Gets the value of the FontMaterialProperty.
 
bool getHorizontalFit () const
 Gets the value of the HorizontalFitProperty.
 
Vector2 getHorizontalFitScaleLimits () const
 Gets the value of the HorizontalFitScaleLimitsProperty.
 
Vector2 getHorizontalPadding () const
 Gets the value of HorizontalPaddingProperty.
 
string getOverflow () const
 Gets the value of the OverflowProperty.
 
bool getRemoveSideBearings () const
 Gets the value of the RemoveSideBearingsProperty.
 
string getText () const
 Gets the value of TextProperty.
 
TextFormat::TextHorizontalAlignment getTextHorizontalAlignment () const
 Gets the value of the TextHorizontalAlignmentProperty.
 
TextFormat::TextVerticalAlignment getTextVerticalAlignment () const
 Gets the value of the TextVerticalAlignmentProperty.
 
TextFormat::Truncation getTruncation () const
 Gets the value of the TruncationProperty.
 
TextFormat::TruncationDirection getTruncationDirection () const
 Gets the value of the TruncationDirectionProperty.
 
Vector2 getVerticalPadding () const
 Gets the value of VerticalPaddingProperty.
 
void setFontColor (ColorRGBA value)
 Sets the value of the FontColorProperty.
 
void setFontMaterial (MaterialSharedPtr value)
 Sets the value of the FontMaterialProperty.
 
void setHorizontalFit (bool value)
 Sets the value of the HorizontalFitProperty.
 
void setHorizontalFitScaleLimits (Vector2 value)
 Sets the value of the HorizontalFitScaleLimitsProperty.
 
void setHorizontalPadding (Vector2 value)
 Sets the value of HorizontalPaddingProperty.
 
void setOverflow (string_view value)
 Sets the value of the OverflowProperty.
 
void setRemoveSideBearings (bool value)
 Sets the value of the RemoveSideBearingsProperty.
 
void setText (string value)
 Sets the value of TextProperty.
 
void setTextHorizontalAlignment (TextFormat::TextHorizontalAlignment value)
 Sets the value of the TextHorizontalAlignmentProperty.
 
void setTextVerticalAlignment (TextFormat::TextVerticalAlignment value)
 Sets the value of the TextVerticalAlignmentProperty.
 
void setTruncation (TextFormat::Truncation value)
 Sets the value of the TruncationProperty.
 
void setTruncationDirection (TextFormat::TruncationDirection value)
 Sets the value of the TruncationDirectionProperty.
 
void setVerticalPadding (Vector2 value)
 Sets the value of VerticalPaddingProperty.
 
virtual ~TextConceptImpl ()=default
 Destructor.
 
- Public Member Functions inherited from kanzi::TextConcept
virtual ~TextConcept ()=default
 Destructor.
 
- Public Member Functions inherited from kanzi::FontStyleConceptImpl< TDerivedClass >
float getCharacterSpacing () const
 Gets the value of the FontStyleConcept::CharacterSpacingProperty property.
 
float getFixedCharacterWidth () const
 Gets the value of the FontStyleConcept::FixedCharacterWidthProperty property.
 
float getFontSize () const
 Gets the value of the FontStyleConcept::SizeProperty property.
 
FontStyle getFontStyle () const
 Gets the value of the FontStyleConcept::StyleProperty property.
 
FontWeight getFontWeight () const
 Gets the value of the FontStyleConcept::WeightProperty property.
 
bool getFractionalCharacterWidth () const
 Gets the value of the FontStyleConcept::FractionalCharacterWidthProperty property.
 
FontHintingPreference getHintingPreference () const
 Gets the value of HintingPreferenceProperty.
 
float getLineSpacing () const
 Gets the value of the FontStyleConcept::LineSpacingProperty property.
 
FontRuntimeSharedPtr getRuntimeFont ()
 Gets the runtime font.
 
bool getSnapCharacterToPixel () const
 Gets the value of the FontStyleConcept::SnapCharacterToPixelProperty property.
 
void releaseRuntimeFont ()
 Releases the runtime font that is held by FontStyleConceptImpl.
 
void setCharacterSpacing (float value)
 Sets the value of the FontStyleConcept::CharacterSpacingProperty property.
 
void setFixedCharacterWidth (float value)
 Sets the value of the FontStyleConcept::FixedCharacterWidthProperty property.
 
void setFontSize (float value)
 Sets the value of the FontStyleConcept::SizeProperty property.
 
void setFontStyle (FontStyle style)
 Sets the value of the FontStyleConcept::StyleProperty property.
 
void setFontWeight (FontWeight weight)
 Sets the value of the FontStyleConcept::WeightProperty property.
 
void setFractionalCharacterWidth (bool enable)
 Sets the value of the FontStyleConcept::FractionalCharacterWidthProperty property.
 
void setHintingPreference (FontHintingPreference hintingPreference)
 Sets the value of HintingPreferenceProperty.
 
void setLineSpacing (float value)
 Sets the value of the FontStyleConcept::LineSpacingProperty property.
 
void setSnapCharacterToPixel (bool enable)
 Sets the value of the FontStyleConcept::SnapCharacterToPixelProperty property.
 
bool updateRuntimeFont ()
 Updates the runtime font.
 

Static Public Member Functions

static TextBox2DSharedPtr create (Domain *domain, string_view name)
 Creates a TextBox2D node.
 
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 
- Static Public Member Functions inherited from kanzi::TextBoxConceptImpl< Node2D, TextBox2D, TextBox2DTraits >
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 
- Static Public Member Functions inherited from kanzi::Node2D
static bool isUnboundedLayoutSize (Vector2 layoutSize)
 Returns whether a layout size is an unbound layout size.
 
static bool isValidLayoutSize (Vector2 size)
 Returns whether a size is a valid layout size.
 
static float layoutUp ()
 Returns the direction to which the y axis grows for this node type.
 
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 
static Vector2 replaceUnboundedLayoutSize (Vector2 layoutSize, Vector2 resetSize)
 Replaces any element of a layout size with appropriate element of the reset size if it is unbounded and returns the size.
 
static Vector2 replaceUnboundedLayoutSizeWithZero (Vector2 layoutSize)
 Replaces any element of a layout size with zero if it is unbounded and returns the size.
 
static Vector2 unboundedLayoutSize ()
 Returns an unbound layout size.
 
- Static Public Member Functions inherited from kanzi::Node
static bool isUnboundedLayoutValue (float layoutValue)
 Indicates whether a value is an unbound layout value.
 
static bool isValidLayoutValue (float value)
 Indicates whether a value is valid layout value.
 
static float replaceUnboundedLayoutValue (float layoutValue, float resetValue)
 Replaces layout value with the specified value if it is unbounded and returns it.
 
static float replaceUnboundedLayoutValueWithZero (float layoutValue)
 Replaces layout value with zero if it is unbounded layout value and returns it.
 
static float unboundedLayoutValue ()
 Returns an unbounded layout value.
 
- Static Public Member Functions inherited from kanzi::Object
static const MetaclassgetStaticMetaclass ()
 Returns the metaclass of Object class.
 
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 Default implementation that returns empty editor info.
 
- Static Public Member Functions inherited from kanzi::MetaObject
static const MetaclassgetStaticMetaclass ()
 Returns the metaclass of Object class.
 
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 Default implementation that returns empty editor info.
 
- 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 ()
 

Protected Member Functions

void arrangeOverride (Vector2 actualSize) override
 Layouting arrangement override.
 
Vector2 calculateAlignmentOffset () const
 
Vector2 calculateAlignmentOffset (const Vector2 actualSize) const
 
float calculateScrollingDistance ()
 Returns the distance of the last pointer event from either side of the editor.
 
float clampScrollPosition (float originalScrollPosition, TextFormat::TextHorizontalAlignment alignment, TextLayout *textLayout, float editorWidth)
 Clamps a scroll position to the visible area.
 
void ensureCompositionVisible ()
 Scrolls the text content so that the end position of the composition text is visible.
 
void ensureCursorVisible ()
 Scrolls the text content so that the cursor is visible.
 
void ensureMovingSelectionPointVisible ()
 Scrolls the text content so that the selection handle at the end of the text selection is visible.
 
float getTruncationOffsetWidth ()
 
void initialize ()
 TextBox2D specific initialization.
 
Vector2 measureOverride (Vector2 availableSize) override
 Layouting measurement override.
 
void onAttached () override
 Attachment override.
 
void onNodePropertyChanged (AbstractPropertyType propertyType, PropertyNotificationReason reason) override
 Node::onNodePropertyChanged implementation.
 
void renderComposition (Renderer3D &renderer, const Matrix3x3 &foregroundTransform)
 
void renderForegroundOverride (Renderer3D &renderer, CompositionStack &compositionStack, const Matrix3x3 &baseTransform) override
 Rendering foreground override.
 
void renderSelection (Renderer3D &renderer, const Matrix3x3 &foregroundTransform)
 
void resetScrollPosition ()
 Resets the scroll position according to the horizontal text alignment of the Text Box 3D node.
 
void scrollTimerTick ()
 Handles the scroll timer callback.
 
 TextBox2D (Domain *domain, string_view name)
 Constructor.
 
void updateRenderOverride () override
 Renderer update override.
 
Vector2 updateTouchPoint (InputManipulator::InputMessageArguments const &args)
 
- Protected Member Functions inherited from kanzi::TextBoxConceptImpl< Node2D, TextBox2D, TextBox2DTraits >
vector< pair< float, float > > calculateCompositionHighlightCoordinates () const
 Calculates the individual composition text highlight coordinates of a given Text Box node state.
 
vector< pair< float, float > > calculateSelectionCoordinates () const
 Calculates the individual selection coordinates of a given Text Box node state.
 
void censorRevealedCharacter ()
 Censors the revealed character in password echo mode.
 
TextConcept::TextFormatParameters createTextFormatParameters (float width, float height) const
 Creates the parameters that are needed for initializing the TextFormat of a Text Box node.
 
void deleteCharactersAtCursor (int count)
 Deletes a given number of characters at cursor position.
 
pair< float, float > getSelectionEndPoints () const
 Returns the selection end point coordinates from the given Text Box node state.
 
string getTextForFormatting () const
 Returns the m_displayText with added explicit directionality marker if it is a password text.
 
void handleBackspaceAtCursor (const TextBoxConcept::EraseCharactersMessageArguments &args)
 Handler for TextBoxConcept::BackspaceAtCursorMessage.
 
void handleBackspaceWordAtCursor (const TextBoxConcept::EraseCharactersMessageArguments &args)
 Handler for TextBoxConcept::BackspaceWordAtCursorMessage.
 
void handleCancelTextComposition (TextBoxConcept::TextCompositionStateMessageArguments &args)
 Handler for TextBoxConcept::CancelTextCompositionMessage.
 
void handleClearSelection (const TextBoxConcept::ModifySelectionMessageArguments &args)
 Handler for TextBoxConcept::ClearSelectionMessage.
 
void handleCommitCompositionText (TextBoxConcept::TextCompositionStateMessageArguments &args)
 Handler for TextBoxConcept::CommitCompositionTextMessage.
 
void handleDeleteAtCursor (const TextBoxConcept::EraseCharactersMessageArguments &args)
 Handler for TextBoxConcept::DeleteAtCursorMessage.
 
void handleDeleteSelectionMessage (TextBoxConcept::DeleteSelectionMessageArguments &args)
 Handler for TextBoxConcept::DeleteSelectionMessage.
 
void handleDeleteTextMessage (TextBoxConcept::TextRangeMessageArguments &args)
 Handler for TextBoxConcept::DeleteTextMessage.
 
void handleDeleteWordAtCursor (const TextBoxConcept::EraseCharactersMessageArguments &args)
 Handler for TextBoxConcept::DeleteWordAtCursorMessage.
 
void handleEnterEditing (TextBoxConcept::ModifyEditingStateMessageArguments &args)
 Handler for TextBoxConcept::EnterEditingStateMessage.
 
void handleInsertTextAtCursor (const TextBoxConcept::TextContentMessageArguments &args)
 Handler for TextBoxConcept::InsertTextAtCursorMessage.
 
void handleInsertTextMessage (TextBoxConcept::TextInsertionMessageArguments &args)
 Handler for TextBoxConcept::InsertTextMessage.
 
void handleLeaveEditing (TextBoxConcept::ModifyEditingStateMessageArguments &args)
 Handler for TextBoxConcept::LeaveEditingStateMessage.
 
void handleMoveCursorBackward (const TextBoxConcept::MoveCursorMessageArguments &args)
 Handler for TextBoxConcept::MoveCursorBackwardMessage.
 
void handleMoveCursorForward (const TextBoxConcept::MoveCursorMessageArguments &args)
 Handler for TextBoxConcept::MoveCursorForwardMessage.
 
void handleMoveCursorHome (const TextBoxConcept::MoveCursorMessageArguments &args)
 Handler for TextBoxConcept::MoveCursorHomeMessage.
 
void handleMoveCursorToEnd (const TextBoxConcept::MoveCursorMessageArguments &args)
 Handler for TextBoxConcept::MoveCursorToEndMessage.
 
void handleMoveCursorToNextWord (const TextBoxConcept::MoveCursorMessageArguments &args)
 Handler for TextBoxConcept::MoveCursorToNextWordMessage.
 
void handleMoveCursorToPreviousWord (const TextBoxConcept::MoveCursorMessageArguments &args)
 Handler for TextBoxConcept::MoveCursorToPreviousWordMessage.
 
void handleMoveSelectionEndBackward (const TextBoxConcept::ModifySelectionMessageArguments &args)
 Handler for TextBoxConcept::MoveSelectionEndBackwardMessage.
 
void handleMoveSelectionEndForward (const TextBoxConcept::ModifySelectionMessageArguments &args)
 Handler for TextBoxConcept::MoveSelectionEndForwardMessage.
 
void handleMoveSelectionEndToNextWordMessage (TextBoxConcept::ModifySelectionMessageArguments &args)
 Handler for TextBoxConcept::MoveSelectionEndToNextWordMessage.
 
void handleMoveSelectionEndToPreviousWordMessage (TextBoxConcept::ModifySelectionMessageArguments &args)
 Handler for TextBoxConcept::MoveSelectionEndToPreviousWordMessage.
 
void handleMoveSelectionStartBackward (const TextBoxConcept::ModifySelectionMessageArguments &args)
 Handler for TextBoxConcept::MoveSelectionStartBackwardMessage.
 
void handleMoveSelectionStartForward (const TextBoxConcept::ModifySelectionMessageArguments &args)
 Handler for TextBoxConcept::MoveSelectionStartForwardMessage.
 
void handleMoveSelectionStartToNextWordMessage (TextBoxConcept::ModifySelectionMessageArguments &args)
 Handler for TextBoxConcept::MoveSelectionStartToNextWordMessage.
 
void handleMoveSelectionStartToPreviousWordMessage (TextBoxConcept::ModifySelectionMessageArguments &args)
 Handler for TextBoxConcept::MoveSelectionStartToPreviousWordMessage.
 
void handleSelectAll (const TextBoxConcept::ModifySelectionMessageArguments &args)
 Handler for TextBoxConcept::SelectAllMessage.
 
void handleSelectTextMessage (TextBoxConcept::TextRangeMessageArguments &args)
 Handler for TextBoxConcept::SelectTextMessage.
 
void handleSelectToEnd (const TextBoxConcept::ModifySelectionMessageArguments &args)
 Handler for TextBoxConcept::SelectToEndMessage.
 
void handleSelectToHome (const TextBoxConcept::ModifySelectionMessageArguments &args)
 Handler for TextBoxConcept::SelectToHomeMessage.
 
void handleSelectWordAtCursor (const TextBoxConcept::ModifySelectionMessageArguments &args)
 Handler for TextBoxConcept::SelectWordAtCursorMessage.
 
bool hitTestAfterSelectionEnd (Vector2 point) const
 Checks whether the point is positioned after the point where text selection ends.
 
bool hitTestAheadSelectionStart (Vector2 point) const
 Checks whether the point is positioned ahead of the point where text selection starts.
 
bool hitTestSelectionEnd (Vector2 point) const
 Checks whether the point is on the selection ending point surroundings.
 
bool hitTestSelectionStart (Vector2 point) const
 Checks whether the point is on the selection starting point surroundings.
 
void initialize ()
 TextBoxConceptImpl specific initialization.
 
void moveCursorToPoint (const Vector2 &point)
 Moves the cursor to a given point.
 
void onAboutToLoseFocus (FocusManager::PreFocusMessageArguments &args)
 Handler for FocusManager::AboutToLoseFocusMessage.
 
void onCompositionTextChanged (TextInputManipulator::TextCompositionStateMessageArguments &)
 Handles TextInputManipulator::CompositionTextChangedMessage.
 
void onCompositionTextCommitted (TextInputManipulator::TextCompositionStateMessageArguments &)
 Handles TextInputManipulator::CompositionTextCommittedMessage.
 
void onCursorMoved (TextInputManipulator::CursorMovedMessageArguments &args)
 Handles TextInputManipulator::CursorMovedMessage.
 
void onDetached () override
 Overrides Node::onDetached().
 
void onEchoModeChanged ()
 Handles the change of the kanzi::EchoMode.
 
void onFocusGained (FocusManager::PostFocusMessageArguments &args)
 Handler for FocusManager::FocusGainedMessage.
 
void onFocusLost (FocusManager::PostFocusMessageArguments &args)
 Handler for FocusManager::FocusLostMessage.
 
void onInputAction (TextInputManipulator::InputMethodActionMessageArguments &)
 Handles TextInputManipulator::InputMethodActionMessage.
 
void onInputMethodAvailableChanged (TextInputManipulator::InputMethodAvailableChangedMessageArguments &)
 Handles TextInputManipulator::InputMethodAvailableChangedMessage.
 
void onInputMethodsDisconnected (TextInputManipulator::InputMethodsDisconnectedMessageArguments &)
 Handles TextInputManipulator::InputMethodDeactivatedMessage.
 
void onInputTypeChanged (TextInputManipulator::InputTypeChangedMessageArguments &)
 Handles TextInputManipulator::InputTypeChangedMessage.
 
void onInputTypePropertyChanged ()
 Handles the change of the kanzi::InputType.
 
void onMultiClick (const Vector2 &clickPoint)
 Handles the multi-click gesture on a node.
 
void onNodePropertyChanged (AbstractPropertyType propertyType, PropertyNotificationReason reason) override
 Node::onPropertyChanged implementation.
 
void onPanFinished ()
 Handles pan finishing.
 
void onPanMoved (Vector2 point)
 Handles the pan gesture, to drag the cursors including the selection cursors.
 
void onPanStarted (Vector2 clickPoint)
 Handles the click begin.
 
void onReadOnlyStateChanged (TextInputManipulator::ReadOnlyStateChangedMessageArguments &)
 Handles TextInputManipulator::ReadOnlyStateChangedMessage.
 
void onSelectionChanged (TextInputManipulator::SelectionChangedMessageArguments &args)
 Handles TextInputManipulator::SelectionChangedMessage.
 
void onTextChanged (TextInputManipulator::TextChangedMessageArguments &)
 Handles TextInputManipulator::TextChangedMessage.
 
void onTextCompositionCanceled (TextInputManipulator::TextCompositionStateMessageArguments &)
 Handles TextInputManipulator::TextCompositionCanceledMessage.
 
void onTextPropertyChanged ()
 Handles the update of the TextProperty.
 
void refreshTextHint ()
 Refresh text hint visibility.
 
void reloadCursor ()
 Reloads from the CursorPrefabProperty the prefab template that defines the appearance of the cursor.
 
void reloadSelectionEnd ()
 Reloads from the SelectionEndPrefabProperty the prefab template that defines the appearance of the selection handle at the end of text selection.
 
void reloadSelectionStart ()
 Reloads from the SelectionStartPrefabProperty the prefab template that defines the appearance of the selection handle at the beginning of text selection.
 
void reloadTextHint ()
 Reloads from the TextHintPrefabProperty the prefab template for showing placeholder content when the TextBox node is empty.
 
void setRevealLastInsertedCharacter (bool reveal)
 Sets whether to reveal the last inserted character in password echo mode.
 
void startEditing ()
 Tells a Text Box node to enter the editing state.
 
 TextBoxConceptImpl (Domain *domain, string_view name)
 Constructor.
 
void updateCharacterCount ()
 Updates the value of the CharacterCountProperty.
 
void updateCompositionText ()
 Updates the value of the CompositionTextProperty.
 
void updateDisplayText ()
 Updates the value of the DisplayTextProperty.
 
void updateDraggingStatus ()
 Updates the dragging flags:
 
void updateWordCount ()
 Updates the value of the WordCountProperty.
 
- Protected Member Functions inherited from kanzi::Node2D
NodeCompositor2DacquireCompositor ()
 Initializes and returns composition structure.
 
NodeVisual2DacquireVisual ()
 Initializes and returns visual structure.
 
Matrix3x3 applyCompositionForRenderSelf (Renderer3D &renderer, CompositionStack &compositionStack, const optional< Matrix3x3 > &baseTransform)
 Applies composition for rendering the node.
 
virtual void arrangeRecursive (const Matrix3x3 &worldTransform, const Matrix3x3 &parentTransform, bool arrangeNeeded, bool transformChanged)
 Perform arrange recursively.
 
ClippingArea calculateClippingArea (const Matrix3x3 &parentSpaceTransform) const
 Calculates clipping parameters.
 
optional< QuadDescriptioncalculateContentStretch (Vector2 renderSize, Vector2 contentSize)
 Calculates content stretch.
 
bool calculatePerspectiveTransformMatrices (int viewportWidth, int viewportHeight, Matrix4x4 &cameraMatrix, Matrix4x4 &projectionMatrix) const
 Calculate perspective transform matrices.
 
void calculateTransformedBoundingArea (const Matrix3x3 &transform, Vector2 sizeIn)
 Calculates new transformed bounding area.
 
void clearCompositionTarget (Renderer3D &renderer, CompositionStack &compositionStack)
 Clears the composition target of a 2D node.
 
Vector2 getDesiredSizeAxisAlignedBoundingBoxMaximum () const
 Gets the desired size axis aligned bounding box maximum.
 
Vector2 getDesiredSizeAxisAlignedBoundingBoxMinimum () const
 Gets the desired size axis aligned bounding box minimum.
 
optional< floatgetUserAspectRatio () const
 Gets the value of the aspect ratio property assigned to a node.
 
optional< floatgetUserHeight () const
 Gets the value of the layout height property assigned to a node.
 
optional< floatgetUserWidth () const
 Gets the value of the layout width property assigned to a node.
 
void initialize ()
 Node2D -specific initialization.
 
bool isEmptyActualSize () const
 Returns whether the size of the node is empty or invalid.
 
bool isForegroundHintOpaque () const
 Indicates whether foreground hint is opaque.
 
bool isForegroundHintTranslucent () const
 Indicates whether foreground hint is translucent.
 
 Node2D (Domain *domain, string_view name)
 Constructor.
 
virtual void onTransform ()
 Node2D transform function.
 
unsigned int performClipping (QuadDescription &backgroundQuad, optional< QuadDescription > &foregroundQuad, optional< QuadDescription > &effectQuad, unsigned int clippingResult)
 Performs rectangle clipping.
 
bool pushLocalViewportArea (CompositionStack &compositionStack, const optional< Matrix3x3 > &baseTransform)
 Pushes local viewport and scissor area into composition stack if it is required.
 
void renderBackground (Renderer3D &renderer, const CompositionStack &compositionStack, const Matrix3x3 &transform)
 Renders the background quad of a Node2D.
 
void renderChildren (Renderer3D &renderer, CompositionStack &compositionStack, const optional< Matrix3x3 > &baseTransform)
 Renders all children of a Node2D.
 
void renderForeground (Renderer3D &renderer, CompositionStack &compositionStack, const Matrix3x3 &transform)
 Renders the foreground of a Node2D.
 
virtual void renderOverride (Renderer3D &renderer, CompositionStack &compositionStack, const optional< Matrix3x3 > &baseTransform)
 Node-specific top-level render call.
 
void renderRecursive (Renderer3D &renderer, CompositionStack &compositionStack, const optional< Matrix3x3 > &baseTransform)
 Renders a Node2D and then recursively all its children.
 
virtual void renderSelfOverride (Renderer3D &renderer, CompositionStack &compositionStack, const optional< Matrix3x3 > &baseTransform)
 Node-specific rendering.
 
void restoreResources () override
 Node::restoreResources() implementation.
 
void setDesiredSizeAxisAlignedBoundingBoxMaximum (float sizeX, float sizeY)
 Sets the desired size maximum.
 
void setDesiredSizeAxisAlignedBoundingBoxMaximum (Vector2 size)
 Sets the desired size axis aligned bounding box maximum.
 
void setDesiredSizeAxisAlignedBoundingBoxMinimum (float sizeX, float sizeY)
 Sets the desired size axis aligned bounding box minimum.
 
void setDesiredSizeAxisAlignedBoundingBoxMinimum (Vector2 size)
 Sets the desired size axis aligned bounding box minimum.
 
void setEffect (NodeEffect2DSharedPtr value)
 Sets the value of EffectProperty.
 
void setPartialArrangeTransform (Matrix3x3 transform)
 Sets partial arrange transform.
 
void setRenderChildrenAllowed (bool enabled)
 Turn render children on or off.
 
void setRenderSelfAllowed (bool enabled)
 Turn render self on or off.
 
void setRenderType (RenderType renderType)
 Set render type.
 
void setSecondPassDesiredSize (Vector2 size)
 Set second pass desired size.
 
void updateContentTexture (TextureSharedPtr texture)
 Update content texture for the foreground brush.
 
void updateFinalTransform (const Matrix3x3 &worldTransform, const Matrix3x3 &parentTransform)
 Updates the transformation status based on node properties and calculations in measure and arrange phases.
 
bool updateRender (const Matrix3x3 &worldTransform, const Matrix3x3 &parentTransform, bool transformChanged)
 Validates a node for rendering.
 
- Protected Member Functions inherited from kanzi::Node
void attach ()
 Attaches the object node.
 
void detach ()
 Detaches the object node.
 
void initialize ()
 Node-specific initialization.
 
 Node (Domain *domain, string_view name)
 Constructor.
 
void notifyPropertyHandlers (PropertyStoragePtr &propertyStorage, PropertyNotificationReason reason) override
 Notifies all property handlers on a property storage.
 
virtual void updateFocusScopeInfo (FocusScopePtr &nodeScopeInfo)
 Updates the overlay scope information that is attached to the root node of an overlay scope.
 
void updatePropertiesForConnectedNode ()
 Invokes property notifications for inherited properties during node tree connections.
 
void updatePropertiesForDisconnectedNode (Node *oldParent)
 Invokes property notifications for inherited properties during node tree disconnections.
 
void updateResourceReferences ()
 
void updateResourceReferences (AbstractPropertyType propertyType)
 
void updateResourceReferencesRecursive ()
 
void updateResourceReferencesRecursive (const ResourceID &resourceID)
 
- Protected Member Functions inherited from kanzi::Object
void initialize ()
 
void onCopy (const Object &other)
 
- Protected Member Functions inherited from kanzi::MetaObject
void initialize ()
 
 MetaObject ()
 
- Protected Member Functions inherited from kanzi::PropertyObject
AbstractPropertyTypeDescriptor::ValueSourceEntryacquireLocalValueSourceEntry (AbstractPropertyTypeDescriptor &descriptor, PropertyStoragePtr &propertyStorage)
 Acquires a local value source entry that is free for the assignment of a value.
 
AbstractPropertyTypeDescriptor::ModifierStorageacquireModifierStorage (AbstractPropertyTypeDescriptor &descriptor, AbstractPropertyTypeDescriptor::PropertyStorage &propertyStorage)
 
AbstractPropertyTypeDescriptor::NotificationStorageacquireNotificationStorage (AbstractPropertyTypeDescriptor &descriptor)
 
PropertyStoragePtr acquirePropertyStorage (AbstractPropertyTypeDescriptor &descriptor)
 
template<typename DataType >
void addPropertyModifierBase (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::ModifierCallback callback, void *owner, bool notify)
 Adds a property modifier entry to the property modifier stack and validates them.
 
void addPropertyValueSource (AbstractPropertyTypeDescriptor &descriptor, AbstractPropertyTypeDescriptor::ValueSource *valueSource, PropertyValuePrecedence precedence, AbstractPropertyTypeDescriptor::ValueSourceOwner *owner)
 Internally adds a property value source.
 
void addPropertyValueSource (AbstractPropertyTypeDescriptor &descriptor, AbstractPropertyTypeDescriptor::ValueSource *valueSource, PropertyValuePrecedence precedence, void *ownerPointer)
 Internally adds a property value source.
 
AbstractPropertyTypeDescriptor::ValueSourceEntryconstructLocalValueSourceEntry (AbstractPropertyTypeDescriptor &descriptor, AbstractPropertyTypeDescriptor::PropertyStorage &propertyStorage)
 
PropertyStoragePtr constructPropertyStorage (AbstractPropertyTypeDescriptor &descriptor)
 
void copyLocalValue (const AbstractPropertyTypeDescriptor::PropertyStorage &otherPropertyStorage)
 Copy local value from property storage.
 
AbstractPropertyTypeDescriptor::ModifierStoragefindModifierStorage (AbstractPropertyTypeDescriptor &descriptor)
 
AbstractPropertyTypeDescriptor::NotificationStoragefindNotificationStorage (AbstractPropertyTypeDescriptor &descriptor) const
 
AbstractPropertyTypeDescriptor::PropertyStoragefindPropertyStorage (AbstractPropertyTypeDescriptor &descriptor) const
 Gets the property storage for given property type descriptor.
 
PropertyStoragePtr findPropertyStoragePtr (AbstractPropertyTypeDescriptor &descriptor) const
 Gets property storage intrusive pointer which you can use to hold a reference until the end of the operation.
 
AbstractPropertyTypeDescriptorfindPropertyTypeDescriptorByNameAndDataType (string_view name, PropertyDataType dataType) const
 Finds a property type descriptor by name and data type.
 
AbstractPropertyTypeDescriptorfindPropertyTypeDescriptorByQualifiedNameAndDataType (string_view qualifiedName, PropertyDataType dataType) const
 Like findPropertyTypeDescriptorByNameAndDataType, but only searches by matching with qualified names.
 
AbstractPropertyTypeDescriptorfindPropertyTypeDescriptorByUnqualifiedNameAndDataType (string_view unqualifiedName, PropertyDataType dataType) const
 Like findPropertyTypeDescriptorByNameAndDataType, but only searches by matching with unqualified names.
 
AbstractPropertyTypeDescriptor::ValueSourcegetClassValueSource (AbstractPropertyTypeDescriptor &descriptor) const
 
AbstractPropertyTypeDescriptor::ValueSourcegetFinalValueSource (AbstractPropertyTypeDescriptor &descriptor) const
 
AbstractPropertyTypeDescriptor::ValueSourcegetNonClassValueSource (AbstractPropertyTypeDescriptor &descriptor) const
 
AbstractPropertyTypeDescriptor::ValueSourcegetTopValueSource (AbstractPropertyTypeDescriptor &descriptor) const
 Gets the top-level value source for a given property descriptor.
 
void onCopy (const PropertyObject &other)
 
void removeLocalValue (AbstractPropertyTypeDescriptor &descriptor, PropertyStoragePtr &propertyStorage)
 Removes a local value from the given property storage.
 
void removePropertyValueSource (AbstractPropertyTypeDescriptor &descriptor, AbstractPropertyTypeDescriptor::ValueSource *valueSource, void *owner)
 Removes a property value source.
 
void validatePropertyModifiers (PropertyStoragePtr &propertyStorage)
 Validates property modifiers without notifying handlers.
 
void validatePropertyModifiersAndNotifyHandlers (PropertyStoragePtr &propertyStorage)
 Validates property modifiers and notifies handlers.
 
- Protected Member Functions inherited from kanzi::BindingHostConceptImpl< Node >
NodegetThisObject ()
 Internal accessor for the Curiously Recurring Template Pattern.
 
const NodegetThisObject () const
 Internal accessor for the Curiously Recurring Template Pattern.
 
- Protected Member Functions inherited from kanzi::BindingHostConcept
void attachBindings ()
 Attach all bindings stored in this object.
 
void detachBindings ()
 Detach bindings.
 
- Protected Member Functions inherited from kanzi::TextBoxConcept
void drawRectangle (Renderer3D &renderer, const Matrix4x4 &transform, const Vector2 &topLeft, const Vector2 &bottomRight, float z, const Material &material)
 Draws a filled rectangle with given corner coordinates and z-plane.
 
float getTextHeight (const TextFormat &textFormat) const
 Returns the height in pixels of the text from the given text format.
 
float getTextTop (const TextFormat &textFormat) const
 Returns the top of the text in a line.
 
- Protected Member Functions inherited from kanzi::TextConceptImpl< TDerivedClass >
void prepareTextFormat (const TextFormatParameters &parameters, string text)
 Updates the parameters and text of the internal text format.
 
 TextConceptImpl ()=default
 Constructor.
 
- Protected Member Functions inherited from kanzi::FontStyleConceptImpl< TDerivedClass >
 FontStyleConceptImpl ()=default
 Constructor.
 

Protected Attributes

ClassPropertyDefaultValue< boolm_classValueClipChildren
 
ClassPropertyDefaultValue< ResourceSharedPtrm_classValueForegroundBrush
 
ClassPropertyDefaultValue< ResourceSharedPtrm_classValueSelectionForegroundBrush
 
GeometrySharedPtr m_compositionGeometry
 Geometry for the composition.
 
QuadDescription m_compositionQuad
 Quad description for the composition.
 
float m_horizontalScrollPosition
 
float m_lastActiveTouchPointX
 
size_t m_lastSelectionEndPosition
 
size_t m_lastSelectionStartPosition
 
GeometrySharedPtr m_selectionGeometry
 Geometry for the selection.
 
QuadDescription m_selectionQuad
 Quad description for the selection.
 
bool m_skipEnsureCursorVisible
 
MainLoopTimerToken m_token
 
- Protected Attributes inherited from kanzi::TextBoxConceptImpl< Node2D, TextBox2D, TextBox2DTraits >
ClassPropertyDefaultValue< bool > m_classValueFocusable
 Default value for the Focusable property.
 
ClassPropertyDefaultValue< bool > m_classValueHitTestable
 Default value for the Hit Testable property.
 
bool m_contentChanged
 Helper flag for editing started and finished messages.
 
shared_ptr< Node2Dm_cursorNode
 Stores the prefab template instantiated from the CursorPrefabProperty.
 
bool m_draggingBegin
 The drag state of the selection cursor for the start selection cursor.
 
bool m_draggingEnd
 The drag state of the selection cursor for the end selection cursor.
 
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.
 
TextInputManipulatorSharedPtr m_inputManipulator
 The TextInputManipulator attached to the TextBox.
 
TextInputLayout m_layoutInfo
 
vector< Node::MessageSubscriptionTokenm_messageTokens
 The following MessageSubscriptionTokens are used for controlling the message subscription while a TextBox is in editing state.
 
bool m_panOngoing
 Helper flag for selection change messages.
 
MainLoopTimerToken m_passwordEchoTimeoutToken
 Timer subscription token for password echo timeout.
 
bool m_revealLastInsertedCharacter
 Whether to show, instead of censoring, the last inserted character in password echo mode.
 
shared_ptr< Node2Dm_selectionEndNode
 Stores the prefab template instantiated from the SelectionEndPrefabProperty.
 
shared_ptr< Node2Dm_selectionStartNode
 Stores the prefab template instantiated from the SelectionStartPrefabProperty.
 
shared_ptr< Node2Dm_textHintNode
 Stores the prefab template instantiated from the TextHintPrefabProperty.
 
- Protected Attributes inherited from kanzi::Node2D
QuadDescription m_backgroundQuadDescription
 Background clipping quad / composition quad description.
 
NodeEffect2DSharedPtr m_cachedEffect
 Cached effect instance.
 
ClippingArea m_clipping
 Clipping parameters.
 
CompositionRequirements m_compositionRequirements
 Composition requirements for this 2D node.
 
unique_ptr< NodeCompositor2Dm_compositor
 Composition and caching information.
 
NodeEffectPrefab2DSharedPtr m_currentEffectPrefab
 Currently instantiated effect prefab.
 
optional< QuadDescriptionm_effectQuadDescription
 Effect quad description.
 
unsigned int m_validatedEffectPaddingChangeCounter
 Effect padding change counter value at which effect quad was last validated.
 
unique_ptr< NodeVisual2Dm_visual
 Visual information.
 
- Protected Attributes inherited from kanzi::Object
AppliedStyleContainer m_appliedStyles
 Listing of applied styles applied to this object.
 
- Protected Attributes inherited from kanzi::BindingHostConcept
BindingRuntimeContainer m_bindingRuntimes
 Bindings in this object.
 
- Protected Attributes inherited from kanzi::TextConceptImpl< TDerivedClass >
TextFormatPtr m_textFormat
 The text format for the text that this node displays.
 

Additional Inherited Members

- Static Public Attributes inherited from kanzi::Node2D
static PropertyType< floatAspectRatioProperty
 AspectRatio property.
 
static PropertyType< boolForceCompositionProperty
 ForceComposition property.
 
static PropertyType< Node2D::ForegroundHintForegroundHintProperty
 ForegroundHint property.
 
static PropertyType< boolOffscreenRenderingProperty
 OffscreenRendering property.
 
static PropertyType< boolDisableRenderTargetClearProperty
 DisableRenderTargetClear property.
 
static PropertyType< Node2D::PixelFormatPixelFormatProperty
 PixelFormat property.
 
static PropertyType< boolRenderSelfProperty
 RenderSelf property.
 
static PropertyType< ResourceSharedPtrRenderTargetProperty
 RenderTarget property.
 
static PropertyType< floatRenderTargetMinimumHeightProperty
 RenderTargetMinimumHeight property.
 
static PropertyType< floatRenderTargetMinimumWidthProperty
 RenderTargetMinimumWidth property.
 
static PropertyType< floatRenderTargetReallocationLimitProperty
 RenderTargetReallocationLimit property.
 
static PropertyType< CachingModeCachingModeProperty
 Sets the caching mode:
 
static PropertyType< boolCacheValidProperty
 Kanzi sets the value of this property to indicate whether the node is cached.
 
static PropertyType< SRTValue2DLayoutTransformationProperty
 Sets the layout transformation of the node.
 
static PropertyType< SRTValue2DRenderTransformationProperty
 Sets the render transformation of the node.
 
static PropertyType< SRTValue3DPerspectiveTransformationProperty
 Sets the perspective transformation of the node.
 
static PropertyType< PerspectiveTransformationModePerspectiveTransformationModeProperty
 Sets the perspective transformation mode of the node.
 
static PropertyType< floatPerspectiveTransformationFovProperty
 PerspectiveTransformationFov property.
 
static PropertyType< Vector3PerspectiveTransformationPivotProperty
 PerspectiveTransformationOrigin property.
 
static PropertyType< Vector3PerspectiveTransformationOriginProperty
 PerspectiveTransformationOrigin property.
 
static PropertyType< Vector2RenderTransformationOriginProperty
 RenderTransformationOrigin property.
 
static PropertyType< boolSnapToPixelProperty
 SnapToPixel property.
 
static PropertyType< ResourceSharedPtrBackgroundBrushProperty
 BackgroundBrush property.
 
static PropertyType< ResourceSharedPtrCompositionBrushProperty
 CompositionBrush property.
 
static PropertyType< ResourceSharedPtrForegroundBrushProperty
 ForegroundBrush property.
 
static PropertyType< ResourceSharedPtrEffectProperty
 Reports the runtime effect instance used by the node, instantiated from the NodeEffectPrefab2D.
 
static PropertyType< ResourceSharedPtrEffectPrefabProperty
 Sets the 2D Effect prefab to use for the node.
 
static PropertyType< MultisampleCountMultisampleLevelProperty
 Sets the number of anti-aliasing samples to use for temporary composition targets.
 
- Static Public Attributes inherited from kanzi::Node
static PropertyType< string > NameProperty
 Name property.
 
static PropertyType< string > PathProperty
 Path property.
 
static PropertyType< string > LocaleProperty
 Locale property.
 
static PropertyType< boolCreatedFromKZBProperty
 CreatedFromKZB property.
 
static PropertyType< boolHitTestableProperty
 HitTestable property.
 
static PropertyType< boolHitTestableContainerProperty
 HitTestableContainer property.
 
static PropertyType< boolVisibleProperty
 Visible property.
 
static PropertyType< boolEnabledProperty
 Sets whether the node is enabled.
 
static PropertyType< boolEffectivelyEnabledProperty
 Indicates whether the node and its ancestor nodes are enabled.
 
static PropertyType< boolFocusableProperty
 Sets whether a node can get focus and can participate in the focus chain navigation.
 
static PropertyType< boolFocusedProperty
 Sets whether a node is an focus node and can receive key messages.
 
static PropertyType< FocusStateFocusStateProperty
 Reports the focus state of a focusable node or focus scope node.
 
static PropertyType< ResourceSharedPtrFontFamilyProperty
 Sets the font family the node uses.
 
static PropertyType< floatVisibleAmountInParentProperty
 VisibleAmountInParent property.
 
static PropertyType< floatProjection2DTo3DScaleProperty
 Projection2DTo3DScale property.
 
static PropertyType< ResourceSharedPtrStyleProperty
 Style property.
 
static PropertyType< ResourceSharedPtrStateManagerProperty
 StateManager property.
 
static PropertyType< void * > PrefabTemplateSourceProperty
 PrefabTemplateSource property.
 
static PropertyType< floatWidthProperty
 Width property.
 
static PropertyType< floatHeightProperty
 Height property.
 
static PropertyType< floatDepthProperty
 Depth property.
 
static PropertyType< floatActualWidthProperty
 ActualWidth property.
 
static PropertyType< floatActualHeightProperty
 ActualHeight property.
 
static PropertyType< floatActualDepthProperty
 ActualDepth property.
 
static PropertyType< Node::HorizontalAlignmentHorizontalAlignmentProperty
 HorizontalAlignment property.
 
static PropertyType< Node::VerticalAlignmentVerticalAlignmentProperty
 VerticalAlignment property.
 
static PropertyType< Node::DepthAlignmentDepthAlignmentProperty
 DepthAlignment property.
 
static PropertyType< Vector2HorizontalMarginProperty
 Sets the horizontal space between this node and other nodes that are adjacent to this node in a layout.
 
static PropertyType< Vector2VerticalMarginProperty
 Sets the vertical space between this node and other nodes that are adjacent to this node in a layout.
 
static PropertyType< Vector2DepthMarginProperty
 Sets the space in the depth direction between this node and other nodes that are adjacent to this node in a layout.
 
static PropertyType< Node::ContentStretchContentStretchProperty
 ContentStretch property.
 
static PropertyType< floatOpacityProperty
 Opacity property.
 
static PropertyType< boolHoverProperty
 Kanzi updates the HoverProperty for a hit testable node to indicate whether the node is the foremost node under the cursor.
 
static PropertyType< boolClipChildrenProperty
 ClipChildren property.
 
static PropertyType< intSceneGraphAddNodeChangeChildFlagsProperty
 SceneGraphAddNodeChangeChildFlags property.
 
static PropertyType< intSceneGraphAddNodeChangeParentFlagsProperty
 SceneGraphAddNodeChangeParentFlags property.
 
static PropertyType< intSceneGraphRemoveNodeChangeChildFlagsProperty
 SceneGraphRemoveNodeChangeChildFlags property.
 
static PropertyType< intSceneGraphRemoveNodeChangeParentFlagsProperty
 SceneGraphRemoveNodeChangeParentFlags property.
 
- Static Public Attributes inherited from kanzi::TextBoxConcept
static MessageType< TextCompositionStateMessageArgumentsCompositionTextChangedMessage
 Text Box dispatches this message when the composition text is updated by the input methods.
 
static MessageType< TextCompositionStateMessageArgumentsCompositionTextCommittedMessage
 Text Box dispatches this message when the composition text is committed to the cached text.
 
static MessageType< CursorPositionMessageArgumentsCursorMovedMessage
 Text Box node dispatches this message when the application user moves the cursor in that Text Box node.
 
static MessageType< TextChangedMessageArgumentsEditingFinishedMessage
 Text Box node dispatches this message when it leaves the editing state after the application user modifies the text content.
 
static MessageType< TextChangedMessageArgumentsEditingStartedMessage
 Text Box node dispatches this message when the application user makes the first modification to the text in that Text Box node.
 
static MessageType< EditingStateChangedMessageArgumentsEnteredEditingStateMessage
 Text Box node dispatches this message when it enters the editing state.
 
static MessageType< InputMethodActionMessageArgumentsInputMethodActionMessage
 Text Box node dispatches this message when an input method executes the input action assigned to the text box.
 
static MessageType< InputMethodAvailableMessageArgumentsInputMethodAvailableMessage
 Text Box node dispatches this message when an input method becomes available.
 
static MessageType< InputMethodAvailableMessageArgumentsInputMethodUnavailableMessage
 Text Box node dispatches this message when the composing input method becomes unavailable.
 
static MessageType< EditingStateChangedMessageArgumentsLeftEditingStateMessage
 Text Box node dispatches this message when it leaves the editing state.
 
static MessageType< SelectedTextMessageArgumentsSelectionChangedMessage
 Text Box node dispatches this message when the application user changes the text selection in that Text Box node.
 
static MessageType< CursorPositionMessageArgumentsSelectionClearedMessage
 Text Box node dispatches this message when the application user clears or resets the text selection in that Text Box node.
 
static MessageType< SelectedTextMessageArgumentsSelectionStartedMessage
 Text Box node dispatches this message when the application user starts selecting text in that Text Box node.
 
static MessageType< TextChangedMessageArgumentsTextChangedMessage
 Text Box node dispatches this message when the application user changes the text in that Text Box node.
 
static MessageType< TextCompositionStateMessageArgumentsTextCompositionCanceledMessage
 Text Box dispatches this message when the text composition is canceled.
 
static PropertyType< string > DisplayTextProperty
 Reports the text displayed in a Text Box.
 
static PropertyType< string > CompositionTextProperty
 Reports the text that the user composes in a Text Box using an input method editor (IME).
 
static PropertyType< ResourceSharedPtrSelectionBackgroundBrushProperty
 Sets the brush that highlights selected text.
 
static PropertyType< ResourceSharedPtrSelectionForegroundBrushProperty
 Sets the brush for rendering the selected text.
 
static PropertyType< ResourceSharedPtrCompositionTextBackgroundBrushProperty
 Sets the brush that highlights the text that the user composes using an input method editor (IME).
 
static PropertyType< ResourceSharedPtrCompositionTextForegroundBrushProperty
 Sets the brush that fills the text that the user composes using an input method editor (IME).
 
static PropertyType< intCursorPositionProperty
 Sets the position of the cursor in the text buffer of a Text Box node.
 
static PropertyType< intSelectionStartCursorPositionProperty
 Reports the position of the cursor that marks the beginning of text selection in the text buffer of a Text Box node.
 
static PropertyType< intSelectionEndCursorPositionProperty
 Reports the position of the cursor that marks the end of text selection in the text buffer of a Text Box node.
 
static PropertyType< boolHasSelectionProperty
 Reports whether any of the text in a Text Box node is selected.
 
static PropertyType< boolReadOnlyProperty
 Sets whether the Text Box node accepts user input.
 
static PropertyType< intMaximumTextLengthProperty
 Sets the maximum allowed text length in a Text Box node.
 
static PropertyType< ResourceSharedPtrCursorPrefabProperty
 Sets the prefab template that defines the appearance of the cursor, instead of using the default cursor.
 
static PropertyType< ResourceSharedPtrSelectionStartPrefabProperty
 Sets the prefab template that defines the appearance of the selection handle at the beginning of text selection, instead of using the default handle.
 
static PropertyType< ResourceSharedPtrSelectionEndPrefabProperty
 Sets the prefab template that defines the appearance of the selection handle at the end of text selection, instead of using the default handle.
 
static PropertyType< ResourceSharedPtrTextHintPrefabProperty
 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.
 
static PropertyType< boolHideTextHintWhenEditingProperty
 Sets whether Kanzi hides the placeholder content, which you set using the TextHintPrefabProperty, either:
 
static PropertyType< EchoModeEchoModeProperty
 Sets how a Text Box node shows text.
 
static PropertyType< InputTypeInputTypeProperty
 Sets the input type of the input methods that provide the input for a Text Box.
 
static PropertyType< EditModeEditModeProperty
 Sets the edit mode of a Text Box node. The default value is EditMode::Automatic.
 
static PropertyType< boolIsEditingProperty
 Reports the editing state of a Text Box node.
 
static PropertyType< boolIsComposingTextProperty
 Reports the text composition state of a Text Box node.
 
static PropertyType< intCharacterCountProperty
 Contains the number of characters in a Text Box node.
 
static PropertyType< intWordCountProperty
 Contains the number of words in a Text Box node.
 
static PropertyType< intPasswordEchoTimeoutProperty
 Sets the time in milliseconds that Kanzi shows an inserted character before masking it when using the EchoMode::Password echo mode.
 
static PropertyType< string > PasswordMaskingCharacterProperty
 Sets the UTF-8 character that masks each password character when using EchoMode::Password.
 
static PropertyType< InputMethodActionInputMethodActionProperty
 Sets the label of the user action button on the on-screen keyboard.
 
static PropertyType< TextKeyNavigationDirectionTextKeyNavigationDirectionProperty
 Sets the direction of key navigation for the Text Box node.
 
static MessageType< TextContentMessageArgumentsInsertTextAtCursorMessage
 Dispatch this message to insert given text at the cursor position.
 
static MessageType< EraseCharactersMessageArgumentsBackspaceAtCursorMessage
 Dispatch this message to erase at the cursor position the previous character in the text string.
 
static MessageType< EraseCharactersMessageArgumentsBackspaceWordAtCursorMessage
 Dispatch this message to erase the characters between the cursor position and the previous word boundary in the text string.
 
static MessageType< EraseCharactersMessageArgumentsDeleteAtCursorMessage
 Dispatch this message to erase at the cursor position the next character in the text string.
 
static MessageType< EraseCharactersMessageArgumentsDeleteWordAtCursorMessage
 Dispatch this message to erase the characters between the cursor position and the next word boundary in the text string.
 
static MessageType< MoveCursorMessageArgumentsMoveCursorBackwardMessage
 Dispatch this message to move the cursor backward in a text string.
 
static MessageType< MoveCursorMessageArgumentsMoveCursorForwardMessage
 Dispatch this message to move the cursor forward in the text string.
 
static MessageType< MoveCursorMessageArgumentsMoveCursorToPreviousWordMessage
 Dispatch this message to move the cursor to the previous word boundary in the text string.
 
static MessageType< MoveCursorMessageArgumentsMoveCursorToNextWordMessage
 Dispatch this message to move the cursor to the next word boundary in the text string.
 
static MessageType< MoveCursorMessageArgumentsMoveCursorHomeMessage
 Dispatch this message to move the cursor to the beginning of the text string.
 
static MessageType< MoveCursorMessageArgumentsMoveCursorToEndMessage
 Dispatch this message to move the cursor to the end of the text string.
 
static MessageType< ModifySelectionMessageArgumentsMoveSelectionStartForwardMessage
 Dispatch this message to move the handle at the start of text selection forward by one character in the text string.
 
static MessageType< ModifySelectionMessageArgumentsMoveSelectionStartBackwardMessage
 Dispatch this message to move the handle at the start of text selection backward by one character in the text string.
 
static MessageType< ModifySelectionMessageArgumentsMoveSelectionStartToNextWordMessage
 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.
 
static MessageType< ModifySelectionMessageArgumentsMoveSelectionStartToPreviousWordMessage
 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.
 
static MessageType< ModifySelectionMessageArgumentsMoveSelectionEndForwardMessage
 Dispatch this message to move the handle at the end of text selection forward by one character in the text string.
 
static MessageType< ModifySelectionMessageArgumentsMoveSelectionEndBackwardMessage
 Dispatch this message to move the handle at the end of text selection backward by one character in the text string.
 
static MessageType< ModifySelectionMessageArgumentsMoveSelectionEndToNextWordMessage
 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.
 
static MessageType< ModifySelectionMessageArgumentsMoveSelectionEndToPreviousWordMessage
 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.
 
static MessageType< TextRangeMessageArgumentsSelectTextMessage
 Dispatch this message to select the text between two character indexes in the current text string.
 
static MessageType< TextRangeMessageArgumentsDeleteTextMessage
 Dispatch this message to delete the text between two character indexes in the current text string.
 
static MessageType< DeleteSelectionMessageArgumentsDeleteSelectionMessage
 Dispatch this message to erase any currently selected text.
 
static MessageType< TextInsertionMessageArgumentsInsertTextMessage
 Dispatch this message to insert given text at a given position.
 
static MessageType< ModifySelectionMessageArgumentsSelectToHomeMessage
 Dispatch this message to select the text from the beginning of the text string to the cursor position.
 
static MessageType< ModifySelectionMessageArgumentsSelectToEndMessage
 Dispatch this message to select the text from the cursor position to the end of the text string.
 
static MessageType< ModifySelectionMessageArgumentsClearSelectionMessage
 Dispatch this message to clear the current text selection.
 
static MessageType< ModifySelectionMessageArgumentsSelectAllMessage
 Dispatch this message to select all text.
 
static MessageType< ModifySelectionMessageArgumentsSelectWordAtCursorMessage
 Dispatch this message to select the word at the current cursor position.
 
static MessageType< ModifyEditingStateMessageArgumentsEnterEditingStateMessage
 Dispatch this message to make a Text Box node enter the editing state.
 
static MessageType< ModifyEditingStateMessageArgumentsLeaveEditingStateMessage
 Dispatch this message to make a Text Box node leave the editing state.
 
static MessageType< TextCompositionStateMessageArgumentsCommitCompositionTextMessage
 Dispatch this message to make a Text Box commit the composition text.
 
static MessageType< TextCompositionStateMessageArgumentsCancelTextCompositionMessage
 Dispatch this message to make a Text Box cancel the text composition.
 
- Static Public Attributes inherited from kanzi::TextConcept
static PropertyType< ColorRGBAFontColorProperty
 Sets the text color for the default font material and for the materials with a fragment shader that uses the FontColor uniform.
 
static PropertyType< ResourceSharedPtrFontMaterialProperty
 Sets the material whose shader is used to render the text in a 3D text node.
 
static PropertyType< string > TextProperty
 Sets the text content that a text node renders.
 
static PropertyType< TextFormat::TextHorizontalAlignmentTextHorizontalAlignmentProperty
 Sets the horizontal alignment of the text in a text node.
 
static PropertyType< TextFormat::TextVerticalAlignmentTextVerticalAlignmentProperty
 Sets the vertical alignment of the text in a text node.
 
static PropertyType< Vector2HorizontalPaddingProperty
 Sets the padding spaces between the content and the left and right boundaries of a text node.
 
static PropertyType< Vector2VerticalPaddingProperty
 Sets the padding spaces between the content and the top and bottom boundaries of a text node.
 
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.
 
static PropertyType< TextFormat::TruncationTruncationProperty
 Sets how to truncate the text when the text string to be rendered is too long to fit in a node.
 
static PropertyType< TextFormat::TruncationDirectionTruncationDirectionProperty
 Sets which part of the text to truncate when the text string to be rendered is too long to fit in a node.
 
static PropertyType< boolRemoveSideBearingsProperty
 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.
 
static PropertyType< boolHorizontalFitProperty
 Allows a Text Block to scale glyphs horizontally when the text string is too long to fit in that Text Block.
 
static PropertyType< Vector2HorizontalFitScaleLimitsProperty
 Sets the scale range that the HorizontalFitProperty can use when it scales the text horizontally.
 
- Static Public Attributes inherited from kanzi::FontStyleConcept
static PropertyType< floatSizeProperty
 Sets the size for the font in pixels.
 
static PropertyType< FontStyleStyleProperty
 Sets the style for the font.
 
static PropertyType< FontWeightWeightProperty
 Sets the weight for the font.
 
static PropertyType< floatCharacterSpacingProperty
 Sets the character spacing in pixels.
 
static PropertyType< floatFixedCharacterWidthProperty
 Overrides the font advance widths and makes each character take a fixed amount of space specified in pixels.
 
static PropertyType< floatLineSpacingProperty
 Sets the line spacing in multiples of the normal line height of the selected font.
 
static PropertyType< boolFractionalCharacterWidthProperty
 Sets whether Kanzi uses fractional or rounded character widths to lay out text.
 
static PropertyType< boolSnapCharacterToPixelProperty
 Sets whether Kanzi positions characters in 2D rendering to the nearest pixel:
 
static PropertyType< FontHintingPreferenceHintingPreferenceProperty
 Sets the hinting preference of the selected font.
 
- Protected Types inherited from kanzi::Node2D
enum  Node2DFlags {
  AllowClear , AllowRenderChildren , AllowRenderSelf , ForegroundIsTranslucent ,
  ForegroundTranslucencyRequested , RequiresBackgroundQuad , RequiresLocalTransformationScope , RequiresTilingUpdate ,
  Node2DFlagsBitCount
}
 Different Node2D flags for bit set. More...
 
- Protected Types inherited from kanzi::Object
typedef vector< AppliedStyleEntrySharedPtrAppliedStyleContainer
 Applied style container.
 
- Static Protected Member Functions inherited from kanzi::TextBoxConceptImpl< Node2D, TextBox2D, TextBox2DTraits >
static Rectangle< float > transformRect (const Matrix3x3 &m, Rectangle< float > rect)
 Transforms a given rectangle with a given matrix.
 
static Rectangle< float > transformRect (const Matrix4x4 &m, Rectangle< float > rect)
 Transforms a given rectangle with a given matrix.
 
- Static Protected Member Functions inherited from kanzi::Node
static VisitorResult applyStylesVisitor (Node &node, bool apply)
 
static VisitorResult attachVisitor (Node &node)
 
static VisitorResult detachVisitor (Node &node)
 
static bool processPropertyChanged (Node &node, AbstractPropertyType propertyType, const PropertyStoragePtr &nodePropertyStorage, AbstractPropertyTypeDescriptor::PropertyStorage *changedPropertyStorage, PropertyNotificationReason reason)
 Processes notification handlers for node and property storage.
 
static VisitorResult propertyChangedVisitor (Node &node, AbstractPropertyType propertyType, AbstractPropertyTypeDescriptor::PropertyStorage *propertyStorage, PropertyNotificationReason reason)
 
static VisitorResult updateAllResourcesVisitor (Node &node)
 
static VisitorResult updateResourceVisitor (Node &node, const ResourceID &id)
 
static VisitorResult validateDrawVisitor (Node &node)
 Visitor for validating draw.
 

Detailed Description

TextBox2D provides the required overrides to handle 2D rendering and gesture handling for the 2D text input.

See also
For 3D text input, see TextBox3D.
Since
Kanzi 3.9.0

Examples

To create a TextBox2D node:

// Create a Text Box 2D node named Text Box.
TextBox2DSharedPtr textBoxNode = TextBox2D::create(this->getDomain(), "Text Box");

To set the initial text content in a TextBox2D node:

// Set the initial text content in the Text Box node.
textBoxNode->setText("Initial text that the Text Box contains before editing.");

To set the appearance of the text in a TextBox2D node:

// Set the style of the text in the Text Box node:
// Set the font family of the text.
textBoxNode->setFontFamily(fontFamily);
// Set line spacing to 1.5f.
textBoxNode->setLineSpacing(1.5f);
// Set font size to 36.0f.
textBoxNode->setFontSize(36.0f);
// Set the color of the text.
textBoxNode->setForegroundBrush(textColorBrush);
// Align the text to the right.
textBoxNode->setTextHorizontalAlignment(TextFormat::TextHorizontalAlignmentRight);
// Set font hinting: Render the text in the Text Box node using the hinter of the font engine rasterizer.
textBoxNode->setHintingPreference(FontHintingPreference::AutoHinting);

To show placeholder content in a TextBox2D node:

// Set the prefab that shows the placeholder content in the Text Box node.
textBoxNode->setTextHintPrefab(textHintPrefab);

To set the cursor position in a TextBox2D node:

// Move the cursor to the beginning of the text field.
textBoxNode->setCursorPosition(0u);

To set the appearance of the cursor in a TextBox2D node:

// Set the prefab that visualizes the cursor.
textBoxNode->setCursorPrefab(cursorPrefab);

To set the appearance of the text selection in a TextBox2D node:

// Set the brush that fills the background of the selected text.
textBoxNode->setSelectionBackgroundBrush(selectedTextBackgroundBrush);
// Set the brush that fills the selected text.
textBoxNode->setSelectionForegroundBrush(selectedTextColorBrush);
// Set the prefab that visualizes the selection handle at the beginning of the selection.
textBoxNode->setCursorPrefab(selectionStartPrefab);
// Set the prefab that visualizes the selection handle at the end of the selection.
textBoxNode->setCursorPrefab(selectionEndPrefab);

To set the appearance of the composition text in a TextBox2D node:

// Set the brush that fills the background of the composition text.
textBoxNode->setCompositionBackgroundBrush(compositionTextBackgroundBrush);
// // Set the brush that fills the composition text.
textBoxNode->setCompositionForegroundBrush(compositionTextColorBrush);

To make a TextBox2D node behave as a password field:

// Set Kanzi to show each character for a certain amount of time, and then hide it with a masking character.
textBoxNode->setEchoMode(EchoMode::Password);
// Set the UTF-8 character with which you want to hide each password character.
textBoxNode->setPasswordMaskingCharacter("*");
// Set the time in milliseconds that you want to show each character before hiding it.
textBoxNode->setPasswordEchoTimeout(500);

Member Typedef Documentation

◆ ConceptClass

Constructor & Destructor Documentation

◆ TextBox2D()

kanzi::TextBox2D::TextBox2D ( Domain * domain,
string_view name )
explicitprotected

Constructor.

Member Function Documentation

◆ create()

static TextBox2DSharedPtr kanzi::TextBox2D::create ( Domain * domain,
string_view name )
static

Creates a TextBox2D node.

Parameters
domainThe UI domain to which the node belongs.
nameThe name of the node.
Returns
The created node.

◆ localRectToScreen()

Rectangle< float > kanzi::TextBox2D::localRectToScreen ( Rectangle< float > rect) const

Transforms a given rectangle from the local coordinate system to the screen coordinate system.

Parameters
rectRectangle to transform.
Returns
Transformed rectangle.

◆ screenRectToLocal()

Rectangle< float > kanzi::TextBox2D::screenRectToLocal ( Rectangle< float > rect) const

Transforms a given rectangle from the screen coordinate system to the local coordinate system.

Parameters
rectRectangle to transform.
Returns
Transformed rectangle.

◆ makeEditorInfo()

static PropertyTypeEditorInfoSharedPtr kanzi::TextBox2D::makeEditorInfo ( )
static

◆ onMultiClick()

void kanzi::TextBox2D::onMultiClick ( MultiClickManipulator::MultiClickMessageArguments & args)

◆ onPanMoved()

void kanzi::TextBox2D::onPanMoved ( PanManipulator::MovedMessageArguments & args)

◆ onPanStarted()

void kanzi::TextBox2D::onPanStarted ( PanManipulator::StartedMessageArguments & args)

◆ onPanFinished()

void kanzi::TextBox2D::onPanFinished ( PanManipulator::FinishedMessageArguments & args)

◆ initialize()

void kanzi::TextBox2D::initialize ( )
protected

TextBox2D specific initialization.

◆ renderForegroundOverride()

void kanzi::TextBox2D::renderForegroundOverride ( Renderer3D & renderer,
CompositionStack & compositionStack,
const Matrix3x3 & baseTransform )
overrideprotectedvirtual

Rendering foreground override.

Reimplemented from kanzi::Node2D.

◆ measureOverride()

Vector2 kanzi::TextBox2D::measureOverride ( Vector2 availableSize)
overrideprotectedvirtual

Layouting measurement override.

Reimplemented from kanzi::Node2D.

◆ arrangeOverride()

void kanzi::TextBox2D::arrangeOverride ( Vector2 actualSize)
overrideprotectedvirtual

Layouting arrangement override.

Reimplemented from kanzi::Node2D.

◆ updateRenderOverride()

void kanzi::TextBox2D::updateRenderOverride ( )
overrideprotectedvirtual

Renderer update override.

Reimplemented from kanzi::Node2D.

◆ onAttached()

void kanzi::TextBox2D::onAttached ( )
overrideprotectedvirtual

Attachment override.

Reimplemented from kanzi::Node2D.

◆ calculateAlignmentOffset() [1/2]

Vector2 kanzi::TextBox2D::calculateAlignmentOffset ( ) const
protected

◆ calculateAlignmentOffset() [2/2]

Vector2 kanzi::TextBox2D::calculateAlignmentOffset ( const Vector2 actualSize) const
protected

◆ getTruncationOffsetWidth()

float kanzi::TextBox2D::getTruncationOffsetWidth ( )
protected

◆ scrollTimerTick()

void kanzi::TextBox2D::scrollTimerTick ( )
protected

Handles the scroll timer callback.

◆ renderSelection()

void kanzi::TextBox2D::renderSelection ( Renderer3D & renderer,
const Matrix3x3 & foregroundTransform )
protected

◆ renderComposition()

void kanzi::TextBox2D::renderComposition ( Renderer3D & renderer,
const Matrix3x3 & foregroundTransform )
protected

◆ clampScrollPosition()

float kanzi::TextBox2D::clampScrollPosition ( float originalScrollPosition,
TextFormat::TextHorizontalAlignment alignment,
TextLayout * textLayout,
float editorWidth )
protected

Clamps a scroll position to the visible area.

Parameters
originalScrollPositionThe scroll position to clamp.
alignmentThe horizontal text alignment of the Text Box 3D node.
textLayoutThe text layout of the text content.
editorWidthThe width of the text editor.

◆ onNodePropertyChanged()

void kanzi::TextBox2D::onNodePropertyChanged ( AbstractPropertyType propertyType,
PropertyNotificationReason reason )
overrideprotectedvirtual

Node::onNodePropertyChanged implementation.

Reimplemented from kanzi::Node2D.

◆ ensureCursorVisible()

void kanzi::TextBox2D::ensureCursorVisible ( )
protected

Scrolls the text content so that the cursor is visible.

◆ ensureMovingSelectionPointVisible()

void kanzi::TextBox2D::ensureMovingSelectionPointVisible ( )
protected

Scrolls the text content so that the selection handle at the end of the text selection is visible.

◆ ensureCompositionVisible()

void kanzi::TextBox2D::ensureCompositionVisible ( )
protected

Scrolls the text content so that the end position of the composition text is visible.

◆ updateTouchPoint()

Vector2 kanzi::TextBox2D::updateTouchPoint ( InputManipulator::InputMessageArguments const & args)
protected

◆ calculateScrollingDistance()

float kanzi::TextBox2D::calculateScrollingDistance ( )
protected

Returns the distance of the last pointer event from either side of the editor.

Use the returned distance to scroll text with pan events.

Returns
The last pointer event distance from either sides of the editor.

◆ resetScrollPosition()

void kanzi::TextBox2D::resetScrollPosition ( )
protected

Resets the scroll position according to the horizontal text alignment of the Text Box 3D node.

Kanzi calls this method when refocusing Text Box 3D with pointer event.

Member Data Documentation

◆ m_classValueForegroundBrush

ClassPropertyDefaultValue<ResourceSharedPtr> kanzi::TextBox2D::m_classValueForegroundBrush
protected

◆ m_classValueSelectionForegroundBrush

ClassPropertyDefaultValue<ResourceSharedPtr> kanzi::TextBox2D::m_classValueSelectionForegroundBrush
protected

◆ m_classValueClipChildren

ClassPropertyDefaultValue<bool> kanzi::TextBox2D::m_classValueClipChildren
protected

◆ m_selectionQuad

QuadDescription kanzi::TextBox2D::m_selectionQuad
protected

Quad description for the selection.

◆ m_selectionGeometry

GeometrySharedPtr kanzi::TextBox2D::m_selectionGeometry
protected

Geometry for the selection.

◆ m_compositionQuad

QuadDescription kanzi::TextBox2D::m_compositionQuad
protected

Quad description for the composition.

◆ m_compositionGeometry

GeometrySharedPtr kanzi::TextBox2D::m_compositionGeometry
protected

Geometry for the composition.

◆ m_token

MainLoopTimerToken kanzi::TextBox2D::m_token
protected

◆ m_horizontalScrollPosition

float kanzi::TextBox2D::m_horizontalScrollPosition
protected

◆ m_lastActiveTouchPointX

float kanzi::TextBox2D::m_lastActiveTouchPointX
protected

◆ m_lastSelectionStartPosition

size_t kanzi::TextBox2D::m_lastSelectionStartPosition
protected

◆ m_lastSelectionEndPosition

size_t kanzi::TextBox2D::m_lastSelectionEndPosition
protected

◆ m_skipEnsureCursorVisible

bool kanzi::TextBox2D::m_skipEnsureCursorVisible
protected

The documentation for this class was generated from the following file: