You.i Engine
CYITextEditView Class Reference

Detailed Description

Displays text to the user and allows them to edit it.

This view will display editable text as well as a blinking caret. The caret is a vertical line which indicates the current editing position.

A CYITextEditView can receive focus but must be activated in order to receive inputs. The CYITextEditView is activated by selecting it once it has focus. When CYITextEditView is clicked, it receives focus and is activated.

The clear button cannot be interacted with using focus navigation.

This view provides a password mode that masks entered text contents in password fields. The view allows for a mask character to be configured as well as the duration which the last entered character will be visible for.

When password mode is enabled certain configurations of CYITextEditView can lead to erratic behavior if bidirectional or right-to-left text is entered. If the view is set to use text justifications CYITextEditView::Justification::Start or CYITextEditView::Justification::End, the view will automatically align based on the detected base direction of the text. Since password mask characters are typically not strongly directional, including the default character '•', the default text direction of left-to-right will typically be detected when all characters are mask characters. If a right-to-left character is entered, and the show character timer, which is set using SetCharacterShowDuration, is not set to zero, the visible right-to-left character will briefly cause the string to be detected as having a base direction of right-to-left. Since the start and end justifications automatically adjust alignment based on base text direction, this can cause the entered text to jump between the left and right side of the view.
When password mode is enabled we recommend using justifications with a static alignment, such as CYITextEditView::Justification::Left, CYITextEditView::Justification::Right, or CYITextEditView::Justification::Center when calling CYITextEditView::SetXJustify on a CYITextEditView that is expected to have bidirectional or right-to-left text entered. Alternatively, the show character timer can be set to zero by calling SetCharacterShowDuration, to prevent strongly directional characters from ever being visible.

View Template Specification

Type Labels Property Description
Marker Blink Optional An optional timeline that will be looped while the text edit is active. If not provided, the caret will blink on and off using a timer. The visibility track must not be used to animate the blink, as the caret is shown and hidden in normal operation of the view.
Node Text Required Layer name for the text field. It must be a text layer which uses point type and left justified.
Node InputProperties Required Solid Color to mark the end of the text edit field, and also to set the color of the text that will be typed by the user. Please note that the InputProperties's parent field needs to be set to the Text layer in After Effects.
Node Caret Optional Layer name for the caret. If no 'Caret' layer exists, a default black and rectangular caret will be created. Change the color of the caret using the caret-color comment or the SetCaretColor function. The caret's anchor point will be positioned at the baseline of the text. Note that this layer must not be layer-parented to another layer.
Node Clear Optional Layer name for the button that clears the text field. Layer must be a CYIPushButtonView. This button will be made non-focusable at initialization time, even if it contains focus timelines.
Node EntryField Optional Layer name for the node that marks the start and end of the text edit field. If present, it will take priority over the InputProperties node in determining the end of the text edit field.
Comment default-text Optional Corresponds to: SetDefaultText. Contains a quoted string.
Comment input-type Optional Corresponds to: GetInputType. Default: text, Possible Values: text, phone, number, email, uri, password. Can be set on the composition & the layer.
Comment caret-color Optional Corresponds to: SetCaretColor. Colors the caret with a provided string in hexadecimal #RRGGBB or #RRGGBBAA format.
Comment is-password Optional Corresponds to: EnablePasswordMode. Deafult: false. When enabled, input masking is used wherever possible.


  • "Text" must be point type and left justified
  • "InputProperties" must be parented under "Text".
  • Comment properties may be set at the composition level or the layer level.

#include <view/YiTextEditView.h>

Inheritance diagram for CYITextEditView:

Public Types

enum  Justification : uint8_t {
  Justification::Left = 0,
enum  ClearButtonMode {
- Public Types inherited from CYISceneView
enum  TimelineGetMode {
enum  InitialFocusLifetime {
- Public Types inherited from CYISceneNode
enum  LayoutDirtyFlag : uint8_t {
enum  LayoutConfigFetchMode {
  LayoutConfigFetchMode::DoNotLazyInstantiate = 0,
enum  MeasureMode {
enum  FetchType {
  FetchType::Optional = 0,
typedef std::reverse_iterator< IteratorReverseIterator
typedef uint16_t DirtyFlag
- Public Types inherited from CYIEventTarget
enum  SpecialEventTargetType : uint8_t {
  SpecialEventTargetType::None = 0x00,
  SpecialEventTargetType::NoPick = 0x20
enum  Phase : uint8_t {

Public Member Functions

 CYITextEditView ()
virtual ~CYITextEditView ()
virtual bool Init () override
virtual void Clear ()
void SetValue (CYIString text)
virtual CYIString GetValue () const
void SetDefaultText (const CYIString &defaultText, bool cropToMaxCharacterCount=true)
const CYIStringGetDefaultText () const
void SetDefaultTextColor (const CYIColor &defaultTextColor)
const CYIColorGetDefaultTextColor () const
bool IsDisplayingDefaultText () const
void SetTextColor (const CYIColor &textColor)
const CYIColorGetTextColor () const
void SetFontSize (int32_t size)
size_t GetFontSize () const
void SetCaretColor (const CYIColor &clrCaret)
const CYIColorGetCaretColor () const
size_t GetCaretPosition () const
void SetCaretPosition (size_t position)
void DeactivateCaret ()
void ActivateCaret ()
void SetClearButtonMode (ClearButtonMode mode)
ClearButtonMode GetClearButtonMode () const
void SetMaximumCharacterCount (size_t maximumCharacterCount)
void SetEditingEnabled (bool enable)
bool IsEditingEnabled () const
void Activate ()
void Deactivate ()
bool IsActivated () const
size_t GetMaximumCharacterCount () const
bool SetTextEntryBoxWidth (float boxWidth)
float GetTextEntryBoxWidth () const
float GetInitialTextEntryBoxWidth () const
void SetXJustify (Justification xJustify)
Justification GetXJustify () const
void SetDefaultTextDirection (CYITextLayout::TextDirection direction)
CYITextLayout::TextDirection GetDefaultTextDirection () const
CYIKeyboardInputBridge::ReturnKeyType GetReturnKeyType () const
void SetReturnKeyType (CYIKeyboardInputBridge::ReturnKeyType keyType)
void SetInputType (CYIKeyboardInputBridge::InputType inputType)
CYIKeyboardInputBridge::InputType GetInputType () const
void SetInputModifiers (CYIKeyboardInputBridge::InputModifiers inputModifiers)
CYIKeyboardInputBridge::InputModifiers GetInputModifiers () const
bool SetAccessoryImageUrl (const CYIUrl &url)
const CYIUrlGetAccessoryImageUrl () const
virtual const CYISceneView::AssetRequirementGetAssetRequirements (uint32_t *pRequirementCount) override
virtual bool HandleEvent (const std::shared_ptr< CYIEventDispatcher > &pDispatcher, CYIEvent *pEvent) override
void EnablePasswordMode (bool passwordModeEnabled)
bool IsPasswordModeEnabled () const
void SetMaskCharacter (char32_t maskCharacter)
char32_t GetMaskCharacter () const
void SetCharacterShowDuration (uint64_t timeMs)
uint64_t GetCharacterShowDuration () const
- Public Member Functions inherited from CYISceneView
 CYISceneView ()
virtual ~CYISceneView ()
bool BuildFromTemplate (CYISceneManager *pSceneManager, const std::shared_ptr< CYIAssetViewTemplate > &pAssetViewTemplate, CYISceneManager::MissingClassHandlingMode missingHandlingMode=CYISceneManager::MissingClassHandlingMode::Abort)
bool IsInitialized () const
void SetClippingAreaNode (CYISceneNode *pClippingNode)
virtual CYIOptional< CYIStringViewGetProperty (CYIStringView propertyName) const override
bool GetProperty (CYIStringView propertyName, CYIString *pValue) const
virtual std::map< CYIString, CYIStringGetProperties () const override
virtual void ForEachProperty (const std::function< void(const CYIString &, const CYIString &)> &action) const override
virtual bool HasProperties () const override
void EnableDefaultHitZone ()
bool IsResponsiveLayoutEnabled () const
void EnableResponsiveLayout ()
void DisableResponsiveLayout ()
void AddAnchor (EYIAnchorType anchorType)
YI_ANCHOR_DATA GetAnchor (EYIAnchorType anchorType) const
CYIAbstractTimelineGetInTimeline () const
CYIAbstractTimelineGetOutTimeline () const
CYIAbstractTimelineGetFocusInTimeline () const
CYIAbstractTimelineGetFocusOutTimeline () const
virtual bool HandlesFocusInDescendants () const
virtual bool RequestFocus (CYIFocus::Direction direction=CYIFocus::Direction::Forward, CYIFocus::FocusRootRule focusRootRule=CYIFocus::FocusRootRule::DescendantsUpdateContext, const CYIAABB &previousFocusRect=CYIAABB(), const CYIFocusSearchOptions &options=CYIFocusSearchOptions())
bool HasFocus () const
void SetFocusable (bool focusable)
bool IsFocusable () const
bool CanBeFocused () const
void SetNextFocus (CYISceneView *pView, CYIFocus::Direction direction)
CYISceneViewGetNextFocus (CYIFocus::Direction direction) const
virtual void SetInitiallyFocusedView (CYISceneView *pView, InitialFocusLifetime initialFocusLifetime=InitialFocusLifetime::Persistent)
CYISceneViewGetInitiallyFocusedView () const
CYISceneView::InitialFocusLifetime GetInitialFocusLifetime () const
CYISceneViewFindNextFocus (CYIFocus::Direction direction, const CYIFocusSearchOptions &options=CYIFocusSearchOptions()) const
CYISceneViewFindNextFocus (CYIFocus::Direction direction, CYIAABB &screenSpaceFocusRegion, const CYIFocusSearchOptions &options=CYIFocusSearchOptions()) const
virtual CYISceneViewFindNextFocusInDescendants (const CYISceneView *pCurrentFocusView, CYIFocus::Direction direction, CYIAABB &screenSpaceFocusRegion, const CYIFocusSearchOptions &options=CYIFocusSearchOptions()) const
const CYISceneNodeGetFocusRoot () const
CYISceneViewGetFocusHandler () const
virtual void OnFocusGained ()
virtual void FocusGained ()
virtual void OnFocusLost ()
virtual void FocusLost ()
virtual void FocusGainedInDescendants (CYISceneNode *pNewNodeWithFocus, CYISceneNode *pPreviousNodeWithFocus) override
virtual bool ContainsFocusableDescendant (const CYIFocusSearchOptions &options=CYIFocusSearchOptions()) const override
const std::shared_ptr< CYIAssetViewTemplate > & GetViewTemplate () const
const std::vector< CYIString > & GetChildTemplateNames ()
template<typename T >
T * BuildTimeline (const CYIString &markerName)
CYITimelineBuildTimeline (const CYIString &markerName, int32_t startOffset, int32_t duration)
CYIAbstractTimelineGetTimeline (CYIMarkerData::ID id)
virtual CYIAbstractTimelineGetTimeline (CYIStringView markerName, TimelineGetMode mode=TimelineGetMode::GetDefault)
std::map< CYIString, CYITimeline * > GetSimpleTimelines () const
std::map< CYIString, CYIAbstractTimeline * > GetTimelines () const
bool FindTimeline (CYIAbstractTimeline *&pTimeline, CYIStringView markerName, FetchType type, const CYIString &tag="", TimelineGetMode mode=TimelineGetMode::GetDefault)
CYITimelineGroupGetTimelineGroup (CYIStringView markerName)
void BuildAnchorList ()
virtual void Reset ()
void SetLayout (std::unique_ptr< CYILayout > pLayout)
const CYILayoutGetLayout () const
CYILayoutGetLayout ()
virtual void Measure (const MeasureSpec &widthSpec, const MeasureSpec &heightSpec, const MeasureSpec &depthSpec) override
virtual void ApplyMeasurements () override
- Public Member Functions inherited from CYISceneNode
 CYISceneNode ()
virtual ~CYISceneNode ()
bool IsInitialized () const
void ForceDirty ()
void SetDirtyFlag (DirtyFlag dirtyFlag)
DirtyFlag GetDirtyFlag () const
DirtyFlag GetPreviousDirtyFlag () const
const CYIStringGetName () const
CYIString GetUniqueName () const
void SetSceneManager (CYISceneManager *pSceneManager)
void SetName (const CYIString &name)
int32_t GetID () const
void SetID (int32_t id)
uint64_t GetUniqueID () const
bool AddChild (std::unique_ptr< CYISceneNode > pSceneNode)
bool AddChild (std::unique_ptr< CYISceneNode >, size_t index)
bool InsertChildAfter (CYISceneNode *pRefNode, std::unique_ptr< CYISceneNode > pSceneNode)
std::unique_ptr< CYISceneNodeRemoveChild (CYISceneNode *pSceneNode)
bool ReorderChild (size_t fromIndex, size_t toIndex)
CYITransformGetTransform ()
CYISceneNodeGetParent () const
bool ChangeParent (CYISceneNode *pParent)
CYISceneNodeGetDrawParent () const
bool IsAncestorOf (const CYISceneNode *pNode) const
CYISceneManagerGetSceneManager () const
size_t GetChildCount () const
uint32_t GetChildCountRecursive () const
CYISceneNodeGetChild (size_t index) const
Iterator begin (Iterator::Mode mode=Iterator::Mode::ImmediateChildren) const
Iterator end (Iterator::Mode mode=Iterator::Mode::ImmediateChildren) const
ReverseIterator rbegin (Iterator::Mode mode=Iterator::Mode::ImmediateChildren) const
ReverseIterator rend (Iterator::Mode mode=Iterator::Mode::ImmediateChildren) const
CYISceneNodeGetChild (const CYIString &name) const
size_t GetDrawChildCount () const
CYISceneNodeGetDrawChild (size_t index) const
CYISceneNodeGetDrawChildByID (int32_t id) const
template<class YI_SCENE_NODE_SUBCLASS >
YI_SCENE_NODE_SUBCLASS * GetChild (uint32_t targetMatchedNodeCount=1) const
template<class YI_SCENE_NODE_SUBCLASS >
std::list< YI_SCENE_NODE_SUBCLASS * > GetChildren () const
template<class YI_SCENE_NODE_SUBCLASS >
std::list< YI_SCENE_NODE_SUBCLASS * > GetDrawChildren () const
size_t GetIndexOfChild (const CYISceneNode *pSceneNode) const
size_t GetIndexOfDrawChild (const CYISceneNode *pSceneNode) const
void Show ()
void Hide ()
void SetVisibility (bool visible)
void SetOpacity (float opacity)
float GetCompositeOpacity () const
float GetLocalOpacity () const
bool IsVisible () const
bool IsTrulyVisible () const
bool IsPerceptible () const
CYISceneNodeGetNode (CYIStringView name)
CYISceneNodeGetNode (CYIStringView name, const CYIRuntimeTypeInfo &enforceClassType)
CYISceneNodeGetNode (const CYIRuntimeTypeInfo &enforceClassType)
CYISceneNodeGetNodeAfterTarget (const CYIRuntimeTypeInfo &enforceClassType, CYISceneNode *pStartAfterTarget)
template<class YI_SCENE_NODE_SUBCLASS >
YI_SCENE_NODE_SUBCLASS * GetNode (CYIStringView name)
CYISceneNodeGetNode (const int32_t id)
CYISceneNodeGetNode (const int32_t id, const CYIRuntimeTypeInfo &enforceClassType)
CYISceneNodeGetNodeWithUniqueID (uint64_t uniqueID)
template<class YI_SCENE_NODE_SUBCLASS >
bool FindNode (YI_SCENE_NODE_SUBCLASS *&pNode, CYIStringView nodeName, FetchType type, const CYIString &tag)
std::list< CYISceneNode * > GetNodes (CYIStringView name)
std::list< CYISceneNode * > GetNodes (int32_t id)
std::list< CYISceneNode * > GetNodes (const CYIRuntimeTypeInfo &enforceClassType)
template<class YI_SCENE_NODE_SUBCLASS >
const YI_SCENE_NODE_SUBCLASS * GetNode (uint32_t targetMatchedNodeCount=1) const
template<class YI_SCENE_NODE_SUBCLASS >
YI_SCENE_NODE_SUBCLASS * GetNode (uint32_t targetMatchedNodeCount=1)
void SetMesh (const std::shared_ptr< CYIMesh > &pMesh)
bool SetNPatchBitmap (const std::shared_ptr< CYIBitmap > &pNPatchBitmap)
void ClearNPatch ()
void SetMaterial (const std::shared_ptr< CYIMaterial > &pMaterial, size_t index=0)
void AddEffect (const std::shared_ptr< CYIEffect > &pEffect)
void RemoveEffect (const std::shared_ptr< CYIEffect > &pEffect)
size_t GetEffectCount () const
const std::shared_ptr< CYIEffect > & GetEffect (size_t index) const
void ConnectEffectsToTimelines (const CYITimelineTrack *pTrack)
void AddMask (std::unique_ptr< CYIMask > pMask)
std::unique_ptr< CYIMaskRemoveMask (const CYIMask *pMask)
size_t GetMaskCount () const
const CYIMaskGetMask (size_t index) const
CYIMaskGetMask (size_t index)
const std::shared_ptr< CYIMesh > & GetMesh () const
const std::shared_ptr< CYIBitmap > & GetNPatchBitmap () const
size_t GetMaterialCount () const
const std::shared_ptr< CYIMaterial > & GetMaterial (size_t index=0) const
const std::shared_ptr< IYIUniformBufferObject > & GetShaderUniforms () const
void SetMeshTransform (const glm::mat4 &transform)
void DestroyChildren ()
glm::mat4 GetLocalTransform () const
glm::mat4 GetWorldTransform () const
bool Intersects (const CYISceneNode *pNode) const
void SetRenderTarget (const std::shared_ptr< CYIRenderTarget > &pRenderTarget)
const std::shared_ptr< CYIRenderTarget > & GetRenderTarget () const
virtual void OnPreBuildDrawList (std::vector< IYIRenderer::Command > *pDrawList, std::vector< CYIAbstractCameraSceneNode *> *pDrawWithCameraList)
virtual void OnPostBuildDrawList (std::vector< IYIRenderer::Command > *pDrawList)
const CYIAABBGetWorldAABB () const
const CYIAABBGetLocalAABB () const
void SetAnchorPoint (const glm::vec3 &anchorPoint)
void SetAnchorPoint (float x, float y, float z)
void SetAnchorPointX (float x)
void SetAnchorPointY (float y)
void SetAnchorPointZ (float z)
void SetPosition (const glm::vec3 &position)
void SetPosition (float x, float y, float z)
void SetPositionX (float x)
void SetPositionY (float y)
void SetPositionZ (float z)
void SetRotation (const glm::vec3 &rotation)
void SetRotation (float pitchDegrees, float yawDegrees, float rollDegrees)
void SetRotationX (float pitchDegrees)
void SetRotationY (float yawDegrees)
void SetRotationZ (float rollDegrees)
void SetOrientation (float pitchDegrees, float yawDegrees, float rollDegrees)
void SetOrientation (const glm::quat &orientation)
void SetScale (const glm::vec3 &scale)
void SetScale (float factorX, float factorY, float factorZ)
void SetScaleX (float factor)
void SetScaleY (float factor)
void SetScaleZ (float factor)
const glm::vec3 & GetPosition () const
const glm::vec3 & GetScale () const
const glm::vec3 & GetWorldScale () const
const glm::vec3 & GetWorldSurfaceScale () const
const glm::vec3 & GetRotation () const
const glm::quat & GetOrientation () const
const glm::vec3 & GetAnchorPoint () const
virtual void SetSize (const glm::vec3 &size, bool dirtyLayout=true)
const glm::vec3 & GetSize () const
const glm::vec3 & GetInitialSize () const
void SetMeasuredSize (const glm::vec3 &measuredSize)
const glm::vec3 & GetMeasuredSize () const
void SetInternalCustomTimelineValue (uint32_t trackID, const CYIVariant &value)
virtual void SetCustomTimelineValue (uint32_t trackID, const CYIVariant &value)
void SetClippingOn ()
void SetClippingOff ()
bool GetClipping () const
void SetClippingBox (const CYIAABB &worldBox)
const CYIAABBGetClippingBox () const
void StartPropertyAnimation (PropertyAnimation::Type propType, float from, float to, uint32_t durMs, CYITimeInterpolator *pTimeInterpolator=nullptr, bool dirtyLayout=true)
void StopPropertyAnimation (PropertyAnimation::Type propType)
void UpdateLocalSpaceCollision (CYIActionEvent *pActionEvent)
virtual bool BroadcastEvent (const std::shared_ptr< CYIEventDispatcher > &pDispatcher, CYIEvent *pEvent)
void UpdateEventForLocalSpace (CYIActionEvent *pActionEvent, glm::vec3 &rayOrigin, glm::vec3 &rayNonOriginPoint) const
bool IsBoundingBoxHit (const CYIRay &worldSpaceRay) const
bool IsMeshHit (const CYIRay &worldSpaceRay) const
void DumpTree () const
void StartCaptureKeyboardEvents ()
void StopCaptureKeyboardEvents ()
void StartCaptureTrackpadEvents ()
void StopCaptureTrackpadEvents ()
void StartCapturePointerEvents (uint8_t pointerID)
void StopCapturePointerEvents (uint8_t pointerID)
bool DrawBehindChildren (CYISceneNode *pSceneNode, bool *pChanged=nullptr)
bool DrawInFrontOfChildren (CYISceneNode *pSceneNode, bool *pChanged=nullptr)
bool DrawBehind (CYISceneNode *pSceneNode, bool *pChanged=nullptr)
bool DrawInFront (CYISceneNode *pSceneNode, bool *pChanged=nullptr)
bool IsFocusRoot () const
void SetIsFocusRoot (bool isFocusRoot)
virtual void OnFocusGainedInDescendants (CYISceneNode *pNewNodeWithFocus, CYISceneNode *pPreviousNodeWithFocus)
virtual void OnFocusLostInDescendants (CYISceneNode *pNewNodeWithFocus, CYISceneNode *pPreviousNodeWithFocus)
virtual void FocusLostInDescendants (CYISceneNode *pNewNodeWithFocus, CYISceneNode *pPreviousNodeWithFocus)
virtual void OnFocusChangedInDescendants (CYISceneNode *pNewNodeWithFocus, CYISceneNode *pPreviousNodeWithFocus)
virtual void FocusChangedInDescendants (CYISceneNode *pNewNodeWithFocus, CYISceneNode *pPreviousNodeWithFocus)
void SetUseLocalTransformAndAlpha (bool use)
bool GetProperty (CYIStringView propertyName, CYIString *pValue) const
void SetProperty (const CYIString &propertyName, const CYIString &propertyValue)
std::shared_ptr< CYISceneNodeProxyGetSceneNodeProxy () const
void SetLayoutConfig (std::unique_ptr< CYILayoutConfig > pLayoutConfig)
const CYILayoutConfigGetLayoutConfig (LayoutConfigFetchMode fetchMode=LayoutConfigFetchMode::LazyInstantiate) const
CYILayoutConfigGetLayoutConfig (LayoutConfigFetchMode fetchMode=LayoutConfigFetchMode::LazyInstantiate)
void SetLayoutState (std::unique_ptr< CYILayoutState > pLayoutState)
const CYILayoutStateGetLayoutState () const
CYILayoutStateGetLayoutState ()
void RequestLayout ()
LayoutDirtyFlag GetLayoutDirtyFlag () const
virtual void SetLayoutDirtyFlag (LayoutDirtyFlag flag)
virtual CYIAbstractCameraSceneNodeFindActiveCamera (const CYISceneNode *pTargetSceneNode=nullptr) const
CYIAccessibilityAttributes::Accessible GetAccessible () const
void SetAccessible (CYIAccessibilityAttributes::Accessible accessible)
const CYIAccessibilityAttributesGetAccessibilityAttributes () const
std::unique_ptr< CYIAccessibilityAttributesTakeAccessibilityAttributes ()
void SetAccessibilityAttributes (std::unique_ptr< CYIAccessibilityAttributes > pAttributes)
const CYIRenderableGetRenderable () const
template<typename T >
bool CanCastTo () const
CYIAdjustmentLayerSceneNode * GetLastAdjustmentLayer () const
- Public Member Functions inherited from CYIEventTarget
 CYIEventTarget ()
virtual ~CYIEventTarget ()
bool AddEventListener (CYIEvent::Type eventType, CYIEventHandler *pListener, CYIEventTarget::Phase phase=CYIEventTarget::Phase::Bubble)
bool RemoveEventListener (CYIEvent::Type eventType, CYIEventHandler *pListener, CYIEventTarget::Phase phase=CYIEventTarget::Phase::Bubble)
void SetSpecialTypeFlag (SpecialEventTargetType type)
void ClearSpecialTypeFlag (SpecialEventTargetType type)
SpecialEventTargetType GetSpecialTypes () const
const std::shared_ptr< CYIEventTargetProxy > & GetProxy () const
- Public Member Functions inherited from CYISignalHandler
 CYISignalHandler ()
 CYISignalHandler (const CYISignalHandler &signalHandler)
virtual ~CYISignalHandler ()
CYISignalHandleroperator= (const CYISignalHandler &signalHandler)
void MoveToThread (CYIThread *pThread)
 This function allows the user to override the default thread affinity to any CYIThread that may or may not be running. More...
CYIThreadHandle GetThreadAffinity () const
void SetThreadAffinity (const CYIThreadHandle &threadAffinity)
virtual bool IsConnected () const
virtual bool IsConnected (const CYISignalBase &signal) const
void Disconnect (CYISignalBase &signal)
void DisconnectFromAllSignals ()
- Public Member Functions inherited from CYIThread::Listener
 Listener ()
virtual ~Listener ()
virtual void OnThreadStarted (CYIThread *)
virtual void OnThreadTerminated (CYIThread *)
virtual void OnThreadFinished (CYIThread *)
- Public Member Functions inherited from IYIPropertiesSource
virtual ~IYIPropertiesSource ()=default
bool GetProperty (CYIStringView propertyName, CYIString *pValue) const
- Public Member Functions inherited from CYIEventHandler
 CYIEventHandler ()
 CYIEventHandler (const CYIEventHandler &)
virtual ~CYIEventHandler ()
CYIEventHandleroperator= (const CYIEventHandler &)
bool RegisterEventFilter (CYIEventFilter *pFilter)
bool UnregisterEventFilter (CYIEventFilter *pFilter)
bool PreFilter (const std::shared_ptr< CYIEventDispatcher > &pDispatcher, CYIEvent *pEvent)
bool PostFilter (const std::shared_ptr< CYIEventDispatcher > &pDispatcher, CYIEvent *pEvent)
bool AreEventsEnabled () const
void EnableEvents (bool enable)

Public Attributes

CYISignal< const CYIString &, const CYIString &> TextChanged
CYISignal< CYITextEditView * > Activated
CYISignal< CYITextEditView * > Deactivated
CYISignal< CYITextEditView * > ReturnKeyPressed
- Public Attributes inherited from CYISceneView
CYISignal< CYISceneView *, CYISceneView *> GainedFocus
 Emitted when focus has entered this view. The first signal argument is the view that gained focus (e.g. the current view) and the second signal argument is the view that lost focus. More...
CYISignal< CYISceneView *, CYISceneView *> LostFocus
 Emitted when focus has left this view. The first signal argument is the view that lost focus (e.g. the current view) and the second signal argument is the view that gained focus. More...
- Public Attributes inherited from CYISceneNode
CYISignal< CYISceneNode *, PropertyAnimation::TypePropertyAnimationComplete
CYISignal< CYISceneNode *, CYISceneNode *> DescendantGainedFocus
 Emitted when focus has entered this tree. The first signal parameter is the new node with focus, and the second signal parameter is the previous node with focus. More...
CYISignal< CYISceneNode *, CYISceneNode *> DescendantLostFocus
 Emitted when focus has left this tree. The first signal parameter is the new node with focus, and the second signal parameter is the previous node with focus. More...
CYISignal< CYISceneNode *, CYISceneNode *> DescendantsChangedFocus
 Emitted when focus has changed within this tree. This signal is called only if focus was previously within this tree and focus is now on a different node (but still within this tree). The first signal parameter is the new node with focus, and the second signal parameter is the previous node with focus. More...
CYISignal< CYIAccessibilityAttributes::AccessibleAccessibleStateChanged
 Emitted when accessible state changed. More...

Protected Member Functions

virtual void UpdateTextView ()
void UpdateTextView (const CYIString &currentText)
bool OnKeyDownWhenActive (CYIKeyEvent *pEvent)
bool OnKeyInputWhenActive (CYIKeyEvent *pEvent)
virtual bool OnCharWhenActive (CYIKeyEvent *pEvent)
void OnCaretBlink ()
void OnActivated ()
void OnDeactivated ()
void ShowKeyboard ()
void OnTextChanged (bool notifyKeyboard)
void UpdateCaretNodePositionAndTextOffset ()
void ResetCaretBlinkTimer ()
void SetCaretPositionInString (float localSpaceX, float localSpaceY, int8_t caretOffset=0)
void OnClearButtonClicked ()
void UpdateClearButton ()
void UpdateTextSpan (bool updateTextOffset)
void InitInputSettings ()
bool InitDefaultTextFromProperty ()
float GetTextWidth (uint32_t position)
void OnScrollTimerEvent ()
void StartScrolling ()
void StopScrolling ()
void DoScrollingForTimerEvent ()
void DoScrollingForMouseEvent ()
virtual bool OnTextEntered (const CYIString &pText, int32_t caret)
virtual bool OnTextDeleted (int32_t beforeCaret, int32_t afterCaret)
virtual void OnTextReplaced (const CYIString &text, size_t cursor)
virtual void OnCursorPositionChanged (size_t cursor)
bool OnKeyboardHidden ()
void OnSynchronizeKeyboard (CYIKeyboardInputBridge::Receiver::Description &receiverDescription)
virtual void WorldSurfaceScaleUpdated () override
virtual void UpdateBegin () override
virtual void UpdateEnd () override
void HideLastCharacter ()
CYIString GetMaskedText (const CYIString &text, bool showLastChar) const
- Protected Member Functions inherited from CYISceneView
void UpdateClipping ()
virtual void WorldScaleUpdated () override
virtual void WorldBoundingBoxUpdated () override
virtual void OnViewReflowed (const glm::vec3 &worldScale)
virtual void ViewReflowed (const glm::vec3 &worldScale)
virtual bool ProcessEvent (const std::shared_ptr< CYIEventDispatcher > &pDispatcher, CYIEvent *pEvent) override
void UpdateResponsiveLayoutAnchors ()
virtual void SizeChanged () override
virtual void ChildNeedsLayout () override
virtual void LayoutDirtied () override
virtual void ChildAdded (CYISceneNode *pChild) override
virtual void ChildRemoved (CYISceneNode *pChild) override
virtual void ChildVisibilityChanged (CYISceneNode *pChild) override
void OnViewIsInAnimatedPosition ()
void OnViewIsGoingOutOfAnimatedPosition ()
void SetInTimeline (CYIAbstractTimeline *pTimeline)
void SetOutTimeline (CYIAbstractTimeline *pTimeline)
virtual void OnInit ()
bool TryRequestFocusOnInitiallyFocusedView ()
- Protected Member Functions inherited from CYISceneNode
void Update ()
virtual void OnUpdateBegin ()
virtual void OnUpdateEnd ()
virtual void OnDirtyFlagChanged ()
virtual void DirtyFlagChanged ()
virtual void OnTransformUpdated ()
virtual void TransformUpdated ()
virtual void OnWorldScaleUpdated ()
virtual void OnWorldSurfaceScaleUpdated ()
virtual void OnVisibilityUpdated ()
virtual void VisibilityUpdated ()
virtual void OnCompositeOpacityUpdated ()
virtual void CompositeOpacityUpdated ()
virtual void OnWorldBoundingBoxUpdated ()
virtual void OnLocalBoundingBoxUpdated ()
virtual void LocalBoundingBoxUpdated ()
virtual void OnChildAdded (CYISceneNode *pChild)
virtual void OnChildRemoved (CYISceneNode *pChild)
virtual void OnSizeChanged ()
virtual void OnChildVisibilityChanged (CYISceneNode *pChild)
virtual void OnDrawOrderChanged ()
LayoutDirtyFlag GetCurrentLayoutDirtyFlag () const
virtual CYIString GetDumpTreeString () const
void DumpTree (int32_t indentLevel) const
virtual void SetCustomUniforms ()
template<class T >
void SetNodeType ()
virtual CYISceneNodeGetNodeFromChildren (CYIStringView name)
virtual CYISceneNodeGetNodeFromChildren (const int32_t id)
virtual CYISceneNodeGetNodeFromChildren (const CYIRuntimeTypeInfo &enforceClassType)
CYISceneNodeGetNodeFromChildrenAfterTarget (const CYIRuntimeTypeInfo &enforceClassType, bool *pTargetReached, CYISceneNode *pStartAfterTarget)

Protected Attributes

CYITimer m_CaretTimer
std::unique_ptr< CYITimerm_pScrollTimer
CYIString m_CurrentText
CYIString m_PreviousText
CYIString m_DefaultText
CYIColor m_DefaultTextColor
CYIColor m_TextColor
CYIColor m_CaretColor
ClearButtonMode m_clearButtonMode
bool m_updateText
bool m_editingEnabled
bool m_activated
bool m_caretActive
bool m_placeholderTextMode
size_t m_lengthOfValueString
CYITextEngine::PositionInString m_posInString
bool m_alignedCharacterMustBeVisible
size_t m_maximumCharacterCount
CYIKeyboardInputBridge::InputType m_inputType
CYIKeyboardInputBridge::InputModifiers m_inputModifiers
CYITextLayout::TextDirection m_defaultTextDirection
glm::vec2 m_scrollMouseLocationDown
glm::vec3 m_scrollMouseLocalSpaceLocation
float m_caretMaxX
float m_initialCaretMaxX
Justification m_xJustify
std::shared_ptr< CYIAssetTexturem_DefaultCaretTexture
std::unique_ptr< CYITextEditReceiverm_pReceiver
bool m_maskingEnabled
CYITimer m_lastCharacterShowTimer
CYIString m_maskCharacter
- Protected Attributes inherited from CYISceneView
bool m_stopEventPropagation
bool m_responsiveLayoutEnabled
bool m_sceneTreeBuilt
bool m_inAnimatedPosition
std::unique_ptr< CYILayoutm_pLayout
std::shared_ptr< CYIAssetViewTemplatem_pAssetViewTemplate
std::shared_ptr< CYISceneNodeProxym_pInitiallyFocusedView
InitialFocusLifetime m_initialFocusLifetime
std::multimap< EYIAnchorType, YI_ANCHOR_DATAm_anchors
std::map< CYIString, std::unique_ptr< CYITimeline >, std::less< void > > m_timelines
std::map< CYIString, std::unique_ptr< CYIParallelTimelineGroup >, std::less< void > > m_timelineGroups
std::map< CYIString, std::unique_ptr< CYIAbstractTimeline >, std::less< void > > m_externalTimelines
- Protected Attributes inherited from CYISceneNode
CYIString m_name
std::vector< std::unique_ptr< CYISceneNode > > m_children
std::vector< CYISceneNode * > m_drawChildren
std::map< CYIString, CYIString, std::less< void > > m_Properties
std::vector< std::shared_ptr< CYIEffect > > m_Effects
std::vector< std::unique_ptr< PropertyAnimation > > m_propertyAnimations
float m_localOpacity
std::unique_ptr< CYITransformm_pTransform
glm::vec3 m_size
glm::vec3 m_initialSize
glm::vec3 m_measuredSize
glm::vec3 m_vlsLastCollision
bool m_clip
bool m_localVisibility
int32_t m_id
uint64_t m_guid
std::unique_ptr< CYINPatch > m_pNPatch
std::shared_ptr< CYIBitmapm_pNPatchBitmap
std::shared_ptr< CYIRenderablem_pRenderable
- Protected Attributes inherited from CYIEventTarget
std::vector< EventListenerEntry > m_listeners
SpecialEventTargetType m_specialTypes
std::shared_ptr< CYIEventTargetProxym_pEventTargetProxy
- Protected Attributes inherited from CYIEventHandler
bool m_enableEvents


class CYITextEditReceiver
class CYITextEditViewPriv

Additional Inherited Members

- Static Public Member Functions inherited from CYISceneView
static void RegisterAllViews ()
- Static Public Member Functions inherited from CYISceneNode
static void RegisterAllSceneNodes ()
- Static Public Attributes inherited from CYISceneNode
static constexpr DirtyFlag DirtyClean = 0x0000
static constexpr DirtyFlag DirtySceneGraph = 0x0001
static constexpr DirtyFlag DirtyVisibility = 0x0002
static constexpr DirtyFlag DirtyOpacity = 0x0004
static constexpr DirtyFlag DirtyLocalTransform = 0x0008
static constexpr DirtyFlag DirtyWorldTransform = 0x0010
static constexpr DirtyFlag DirtyUniform = 0x0020
static constexpr DirtyFlag DirtyWorldBoundingBox = 0x0040
static constexpr DirtyFlag DirtyMesh = 0x0080
static constexpr DirtyFlag DirtyWorldSurfaceScale = 0x0100
static constexpr DirtyFlag DirtyWorldScale = 0x0200
static constexpr DirtyFlag DirtyLocalBoundingBox = 0x0400
static constexpr DirtyFlag DirtyEverything = (DirtySceneGraph | DirtyVisibility | DirtyOpacity | DirtyLocalTransform | DirtyWorldTransform | DirtyUniform | DirtyWorldBoundingBox | DirtyWorldSurfaceScale | DirtyWorldScale | DirtyLocalBoundingBox)

Member Enumeration Documentation

◆ ClearButtonMode


◆ Justification

enum CYITextEditView::Justification : uint8_t

Text is aligned with the left of the textbox.


Text is aligned with the right of the textbox.


Text is aligned with the center of the textbox.


Text is aligned with the start of the textbox. Alignment automatically adjusts based on the detected text direction. If there are no strongly-directional characters, alignment will follow the default text direction. Left-to-right text will be left-aligned, and right-to-left text will be right-aligned.


Text is aligned with the end of the textbox. Alignment automatically adjusts based on the detected text direction. If there are no strongly-directional characters, alignment will follow the default text direction. Left-to-right text will be right-aligned, and right-to-left text will be left-aligned.

Constructor & Destructor Documentation

◆ CYITextEditView()

CYITextEditView::CYITextEditView ( )

◆ ~CYITextEditView()

virtual CYITextEditView::~CYITextEditView ( )

Member Function Documentation

◆ Activate()

void CYITextEditView::Activate ( )

Focuses and activates the text view. This will show the virtual keyboard if applicable.

See also

◆ ActivateCaret()

void CYITextEditView::ActivateCaret ( )

Turns on displaying of the caret. It is on by default.

◆ Clear()

virtual void CYITextEditView::Clear ( )

Clears the text and hides any keyboard selection menus such as copy and paste dialogs.

◆ Deactivate()

void CYITextEditView::Deactivate ( )

Deactivates the text view. Focus is retained on the text view after deactivation. This will hide any selection menus from virtual keyboards.

See also

◆ DeactivateCaret()

void CYITextEditView::DeactivateCaret ( )

Turns off displaying of the caret.

◆ DoScrollingForMouseEvent()

void CYITextEditView::DoScrollingForMouseEvent ( )

Handles scrolling when triggered by mouse movement within the view.

◆ DoScrollingForTimerEvent()

void CYITextEditView::DoScrollingForTimerEvent ( )

Handles scrolling when triggered by m_pScrollTimer.

◆ EnablePasswordMode()

void CYITextEditView::EnablePasswordMode ( bool  passwordModeEnabled)

Enables/disables the masking of characters in this view. The view's input type will be changed to password.

By default password mode is disabled for this view.

Enabling password mode will also set the input modifiers to CYIKeyboardInputBridge::InputModifiers::MaskInput and CYIKeyboardInputBridge::InputModifiers::NoSuggestions.

See also

◆ GetAccessoryImageUrl()

const CYIUrl& CYITextEditView::GetAccessoryImageUrl ( ) const

Returns the URL used for the AccessoryImage.

See also

◆ GetAssetRequirements()

virtual const CYISceneView::AssetRequirement* CYITextEditView::GetAssetRequirements ( uint32_t *  pRequirementCount)

Returns the asset requirements for the view; implemented in each subclass to return the nodes and timelines which must be present in the view. Used internally by the You.i Engine After Effects Plug-in.

Reimplemented from CYISceneView.

◆ GetCaretColor()

const CYIColor& CYITextEditView::GetCaretColor ( ) const

Returns the color of the caret.

See also

◆ GetCaretPosition()

size_t CYITextEditView::GetCaretPosition ( ) const

Returns the zero-based position of the caret.

◆ GetCharacterShowDuration()

uint64_t CYITextEditView::GetCharacterShowDuration ( ) const

Returns the duration that the last entered character will be shown for.

See also

◆ GetClearButtonMode()

ClearButtonMode CYITextEditView::GetClearButtonMode ( ) const

Gets the ClearButtonMode, which dictates the condition that the clear button, if provided, is displayed.

See also

◆ GetDefaultText()

const CYIString& CYITextEditView::GetDefaultText ( ) const

Returns the current default text.

See also

◆ GetDefaultTextColor()

const CYIColor& CYITextEditView::GetDefaultTextColor ( ) const

Returns the color of the default text.

See also

◆ GetDefaultTextDirection()

CYITextLayout::TextDirection CYITextEditView::GetDefaultTextDirection ( ) const

Returns the default text direction.

The initial default text direction is left-to-right.

◆ GetFontSize()

size_t CYITextEditView::GetFontSize ( ) const

Returns the font size of the text.

See also

◆ GetInitialTextEntryBoxWidth()

float CYITextEditView::GetInitialTextEntryBoxWidth ( ) const

Returns the maximum width of the text entry's display area. If the EntryField node is not provided, this is set by the position of the input properties specified in the view template. Otherwise, it is set by the initial width of the EntryField node.

◆ GetInputModifiers()

CYIKeyboardInputBridge::InputModifiers CYITextEditView::GetInputModifiers ( ) const

Returns the current input modifiers that the view expects the keyboard to use when displaying the keyboard. By default this is set to CYIKeyboardInputBridge::InputModifiers::None.

◆ GetInputType()

CYIKeyboardInputBridge::InputType CYITextEditView::GetInputType ( ) const

Returns the input type that the view expects the keyboard to use when displaying the keyboard. By default this is set to CYIKeyboardInputBridge::InputType::Text. This can also be set by specifying the 'input-type' property on the view in AE.

◆ GetMaskCharacter()

char32_t CYITextEditView::GetMaskCharacter ( ) const

Returns the character that is currently being used to mask text entered into this view.

See also

◆ GetMaskedText()

CYIString CYITextEditView::GetMaskedText ( const CYIString text,
bool  showLastChar 
) const

Returns a masked version of text. All characters of text will be masked unless showLastChar is true, in this case the last character of text will be left unmasked.

◆ GetMaximumCharacterCount()

size_t CYITextEditView::GetMaximumCharacterCount ( ) const

◆ GetReturnKeyType()

CYIKeyboardInputBridge::ReturnKeyType CYITextEditView::GetReturnKeyType ( ) const

Returns the type of return key that will be displayed on platforms that support different return key types. The default is CYIKeyboardInputBridge::ReturnKeyType::Default.

See also

◆ GetTextColor()

const CYIColor& CYITextEditView::GetTextColor ( ) const

Returns the color of the text node.

See also

◆ GetTextEntryBoxWidth()

float CYITextEditView::GetTextEntryBoxWidth ( ) const

Returns the maximum width of the text entry's display area.

By default this value is based on the position of the input properties specified in the view template.

◆ GetTextWidth()

float CYITextEditView::GetTextWidth ( uint32_t  position)

Returns the width of the text entered up to and including character at position 'n'.

◆ GetValue()

virtual CYIString CYITextEditView::GetValue ( ) const
See also

◆ GetXJustify()

Justification CYITextEditView::GetXJustify ( ) const

Returns the text alignment.

See also

◆ HandleEvent()

virtual bool CYITextEditView::HandleEvent ( const std::shared_ptr< CYIEventDispatcher > &  pDispatcher,
CYIEvent pEvent 

This function intercepts key input to add characters to the text. It also handles various other events for interacting with the caret.

Reimplemented from CYISceneView.

◆ HideLastCharacter()

void CYITextEditView::HideLastCharacter ( )

Hides all characters in the text. If password mode is not enabled, this has no effect.

See also

◆ Init()

virtual bool CYITextEditView::Init ( )

Initializes the view and all of its content. Subclasses must call CYISceneView::Init().

This must be called after CYISceneView::BuildFromTemplate()

Reimplemented from CYISceneView.

◆ InitDefaultTextFromProperty()

bool CYITextEditView::InitDefaultTextFromProperty ( )

Initializes the default text based on the 'default-text' property specified in AE.

See also

◆ InitInputSettings()

void CYITextEditView::InitInputSettings ( )

Initialises the input type from the 'input-type' and the input modifiers from the 'is-password' properties specified in AE.

See also

◆ IsActivated()

bool CYITextEditView::IsActivated ( ) const

Returns true if this view is currently activated.

See also

◆ IsDisplayingDefaultText()

bool CYITextEditView::IsDisplayingDefaultText ( ) const

Returns true if the view is currently displaying the default text. Default text is displayed when no text has been entered and GetValue returns an empty string.

See also

◆ IsEditingEnabled()

bool CYITextEditView::IsEditingEnabled ( ) const

Returns true if editing is enabled for this view.

See also

◆ IsPasswordModeEnabled()

bool CYITextEditView::IsPasswordModeEnabled ( ) const

Returns whether or not password mode is enabled.

See also

◆ OnActivated()

void CYITextEditView::OnActivated ( )

Called when the view is focused. This will activate the caret.

This will only activate the caret, to bring up the keyboard ShowKeyboard() must be called.

◆ OnCaretBlink()

void CYITextEditView::OnCaretBlink ( )

Connected to m_pCaretTimer.TimedOut. This handles showing and hiding the caret at a timed interval.

◆ OnCharWhenActive()

virtual bool CYITextEditView::OnCharWhenActive ( CYIKeyEvent pEvent)

Handles character input from OnKeyInputWhenActive().

◆ OnClearButtonClicked()

void CYITextEditView::OnClearButtonClicked ( )

Called when the optional clear button is clicked. This will clear the text and reset the virtual keyboard.

◆ OnCursorPositionChanged()

virtual void CYITextEditView::OnCursorPositionChanged ( size_t  cursor)

◆ OnDeactivated()

void CYITextEditView::OnDeactivated ( )

Called when the view loses focus. This will hide any selection menus from virtual keyboards.

◆ OnKeyboardHidden()

bool CYITextEditView::OnKeyboardHidden ( )

Clears focus when the OS keyboard is hidden.

◆ OnKeyDownWhenActive()

bool CYITextEditView::OnKeyDownWhenActive ( CYIKeyEvent pEvent)

Handles CYIEvent::Type::KeyDown events from HandleEventWhenActive().

◆ OnKeyInputWhenActive()

bool CYITextEditView::OnKeyInputWhenActive ( CYIKeyEvent pEvent)

Handles CYIEvent::Type::KeyInput events from HandleEventWhenActive().

◆ OnScrollTimerEvent()

void CYITextEditView::OnScrollTimerEvent ( )

Connected to m_pScrollTimer.TimedOut. This handles scrolling when dragging the mouse outside the range of the view.

◆ OnSynchronizeKeyboard()

void CYITextEditView::OnSynchronizeKeyboard ( CYIKeyboardInputBridge::Receiver::Description receiverDescription)

Synchronizes the state of our view with the state of the OS keyboard.

◆ OnTextChanged()

void CYITextEditView::OnTextChanged ( bool  notifyKeyboard)

Called when text is changed in the view. The TextChanged signal is emitted here.

The value of notifyKeyboard indicates if CYIKeyboardInputMethod::OnTextChanged should be called or not. This should be true if the text is changing as a result of being set or cleared, and not as a result of user input.

◆ OnTextDeleted()

virtual bool CYITextEditView::OnTextDeleted ( int32_t  beforeCaret,
int32_t  afterCaret 

◆ OnTextEntered()

virtual bool CYITextEditView::OnTextEntered ( const CYIString pText,
int32_t  caret 

◆ OnTextReplaced()

virtual void CYITextEditView::OnTextReplaced ( const CYIString text,
size_t  cursor 

◆ ResetCaretBlinkTimer()

void CYITextEditView::ResetCaretBlinkTimer ( )

Resets the caret blink timer.

◆ SetAccessoryImageUrl()

bool CYITextEditView::SetAccessoryImageUrl ( const CYIUrl url)

Sets the URL to be used for the AccessoryImage. The URL can be for either a local or remote image, that image will then be displayed above the keyboard. Returns false if an AccessoryImage is not supported by the current platform.

SetAccessoryImageUrl is only supported on tvOS.

◆ SetCaretColor()

void CYITextEditView::SetCaretColor ( const CYIColor clrCaret)

Sets color of the caret.

By default the caret color corresponds to the color of the caret node's material which is CYIColor::Named().Black if no 'Caret' node is specified in the view template.

See also

◆ SetCaretPosition()

void CYITextEditView::SetCaretPosition ( size_t  position)

Sets the position of the caret in the current text value. If position is larger than the length of the text it will be clamped.

◆ SetCaretPositionInString()

void CYITextEditView::SetCaretPositionInString ( float  localSpaceX,
float  localSpaceY,
int8_t  caretOffset = 0 

Sets the position of the caret using spatial coordinates localSpaceX and localSpaceY. carretOffset allows specifying an offset to position the caret relative to localSpaceX and localSpaceY.

◆ SetCharacterShowDuration()

void CYITextEditView::SetCharacterShowDuration ( uint64_t  timeMs)

Sets the duration in milliseconds to show the last entered character if password mode is enabled. After this amount of time, the character is replaced by the mask character.

The default duration is 2 seconds.

See also

◆ SetClearButtonMode()

void CYITextEditView::SetClearButtonMode ( ClearButtonMode  mode)

Sets the ClearButtonMode, which dictates the conditions that the clear button, if provided, is displayed.

◆ SetDefaultText()

void CYITextEditView::SetDefaultText ( const CYIString defaultText,
bool  cropToMaxCharacterCount = true 

Sets the text that will be displayed when no text has been input (or set using SetValue()). By default the defaultText will be modified to max length and remove newlines. If cropToMaxCharacterCount is set to false then the default text will not be cropped.

◆ SetDefaultTextColor()

void CYITextEditView::SetDefaultTextColor ( const CYIColor defaultTextColor)

Sets color of the default text.

By default the color will be the font color of the text node created in AE.

◆ SetDefaultTextDirection()

void CYITextEditView::SetDefaultTextDirection ( CYITextLayout::TextDirection  direction)

Sets the default text direction, which is used to set the alignment when no strongly-directional characters are detected in the text.

◆ SetEditingEnabled()

void CYITextEditView::SetEditingEnabled ( bool  enable)

Allows enabling and disabling of editing text in this view.

◆ SetFontSize()

void CYITextEditView::SetFontSize ( int32_t  size)

Sets the font size of the text.

◆ SetInputModifiers()

void CYITextEditView::SetInputModifiers ( CYIKeyboardInputBridge::InputModifiers  inputModifiers)

Sets the current requested keyboard input modifiers.

See also

◆ SetInputType()

void CYITextEditView::SetInputType ( CYIKeyboardInputBridge::InputType  inputType)

Sets the current keyboard input type.

See also

◆ SetMaskCharacter()

void CYITextEditView::SetMaskCharacter ( char32_t  maskCharacter)

Sets the character that will be used to mask the text entered into this view to maskCharacter if password mode is enabled.

The default mask character is '•'.

See also

◆ SetMaximumCharacterCount()

void CYITextEditView::SetMaximumCharacterCount ( size_t  maximumCharacterCount)

Set the maximum character count. This will apply to both text and default text. The default count is 200.

◆ SetReturnKeyType()

void CYITextEditView::SetReturnKeyType ( CYIKeyboardInputBridge::ReturnKeyType  keyType)

Sets the type of return key to be used when the keyboard is shown.

See also

◆ SetTextColor()

void CYITextEditView::SetTextColor ( const CYIColor textColor)

Sets the color of the text node.

By default the color will be the color of the input properties specified in the view template.

◆ SetTextEntryBoxWidth()

bool CYITextEditView::SetTextEntryBoxWidth ( float  boxWidth)

Sets the maximum width of the text entry's display area. Text whose width extends beyond boxWidth will be clipped. If an EntryField node was provided, this sets only the bounding box of the text, and the text is clipped based on the bounding box of the EntryField node instead.

See also

◆ SetValue()

void CYITextEditView::SetValue ( CYIString  text)

Sets the current text held in the control to the provided value. If the length of the provided text is longer than the maximum character count (as returned by GetMaximumCharacterCount() ), the text will be cropped to the limit prior to setting.

The TextChanged signal will not be emitted when calling this function.

◆ SetXJustify()

void CYITextEditView::SetXJustify ( Justification  xJustify)

Sets the text alignment.

See also

◆ ShowKeyboard()

void CYITextEditView::ShowKeyboard ( )

Request that the system software keyboard be displayed.

◆ StartScrolling()

void CYITextEditView::StartScrolling ( )

Starts m_pScrollTimer for handling scrolling with the mouse. This is called when the mouse moves outside the view with the mouse button held down.

◆ StopScrolling()

void CYITextEditView::StopScrolling ( )

Stops m_pScrollTimer. This is called when the mouse button is released or the view loses focus.

◆ UpdateBegin()

virtual void CYITextEditView::UpdateBegin ( )

This will update the position and max width of the text when the EntryField node resizes. It will also update the text offset and caret position.

Reimplemented from CYISceneNode.

◆ UpdateCaretNodePositionAndTextOffset()

void CYITextEditView::UpdateCaretNodePositionAndTextOffset ( )

Updates the position of the caret and the offset of the text.

◆ UpdateClearButton()

void CYITextEditView::UpdateClearButton ( )

Updates the visibility of the clear button based on the ClearButtonMode.

◆ UpdateEnd()

virtual void CYITextEditView::UpdateEnd ( )

This will update the clipping box of the text.

Reimplemented from CYISceneNode.

◆ UpdateTextSpan()

void CYITextEditView::UpdateTextSpan ( bool  updateTextOffset)

Updates the start and end of the text edit field. If updateTextOffset is true, update text scrolling.

◆ UpdateTextView() [1/2]

virtual void CYITextEditView::UpdateTextView ( )

Updates the state of all of the visual components of the CYITextEditView. Uses UpdateTextView(const CYIString &currentText) to update the view with the current text (CYITextEditView::m_text).

◆ UpdateTextView() [2/2]

void CYITextEditView::UpdateTextView ( const CYIString currentText)

Updates the state of all of the visual components of the CYITextEditView. The view will be updated with the text of currentText.

◆ WorldSurfaceScaleUpdated()

virtual void CYITextEditView::WorldSurfaceScaleUpdated ( )

This will update the visible area and caret position.

Reimplemented from CYISceneNode.

Friends And Related Function Documentation

◆ CYITextEditReceiver

friend class CYITextEditReceiver

◆ CYITextEditViewPriv

friend class CYITextEditViewPriv

Member Data Documentation

◆ Activated

CYISignal<CYITextEditView *> CYITextEditView::Activated

Emitted when the text view becomes activated.

◆ Deactivated

CYISignal<CYITextEditView *> CYITextEditView::Deactivated

Emitted when the text view becomes deactivated;

◆ m_activated

bool CYITextEditView::m_activated

◆ m_alignedCharacterMustBeVisible

bool CYITextEditView::m_alignedCharacterMustBeVisible

◆ m_caretActive

bool CYITextEditView::m_caretActive

◆ m_CaretColor

CYIColor CYITextEditView::m_CaretColor

◆ m_caretMaxX

float CYITextEditView::m_caretMaxX

◆ m_CaretTimer

CYITimer CYITextEditView::m_CaretTimer

◆ m_clearButtonMode

ClearButtonMode CYITextEditView::m_clearButtonMode

◆ m_CurrentText

CYIString CYITextEditView::m_CurrentText

◆ m_DefaultCaretTexture

std::shared_ptr<CYIAssetTexture> CYITextEditView::m_DefaultCaretTexture

◆ m_DefaultText

CYIString CYITextEditView::m_DefaultText

◆ m_DefaultTextColor

CYIColor CYITextEditView::m_DefaultTextColor

◆ m_defaultTextDirection

CYITextLayout::TextDirection CYITextEditView::m_defaultTextDirection

◆ m_editingEnabled

bool CYITextEditView::m_editingEnabled

◆ m_initialCaretMaxX

float CYITextEditView::m_initialCaretMaxX

◆ m_inputModifiers

CYIKeyboardInputBridge::InputModifiers CYITextEditView::m_inputModifiers

◆ m_inputType

CYIKeyboardInputBridge::InputType CYITextEditView::m_inputType

◆ m_lastCharacterShowTimer

CYITimer CYITextEditView::m_lastCharacterShowTimer

◆ m_lengthOfValueString

size_t CYITextEditView::m_lengthOfValueString

◆ m_maskCharacter

CYIString CYITextEditView::m_maskCharacter

◆ m_maskingEnabled

bool CYITextEditView::m_maskingEnabled

◆ m_maximumCharacterCount

size_t CYITextEditView::m_maximumCharacterCount

◆ m_pCaretBlinkTimelineLoop

CYITimelineLoop* CYITextEditView::m_pCaretBlinkTimelineLoop

◆ m_pCaretNode

CYISceneNode* CYITextEditView::m_pCaretNode

◆ m_pClearBtn

CYIPushButtonView* CYITextEditView::m_pClearBtn

◆ m_pEntryFieldNode

CYISceneNode* CYITextEditView::m_pEntryFieldNode

◆ m_placeholderTextMode

bool CYITextEditView::m_placeholderTextMode

◆ m_posInString

CYITextEngine::PositionInString CYITextEditView::m_posInString

◆ m_pReceiver

std::unique_ptr<CYITextEditReceiver> CYITextEditView::m_pReceiver

◆ m_PreviousText

CYIString CYITextEditView::m_PreviousText

◆ m_pScrollTimer

std::unique_ptr<CYITimer> CYITextEditView::m_pScrollTimer

◆ m_pSecondaryCaretNode

CYISceneNode* CYITextEditView::m_pSecondaryCaretNode

◆ m_pTextNode

CYITextSceneNode* CYITextEditView::m_pTextNode

◆ m_scrollMouseLocalSpaceLocation

glm::vec3 CYITextEditView::m_scrollMouseLocalSpaceLocation

◆ m_scrollMouseLocationDown

glm::vec2 CYITextEditView::m_scrollMouseLocationDown

◆ m_TextColor

CYIColor CYITextEditView::m_TextColor

◆ m_updateText

bool CYITextEditView::m_updateText

◆ m_xJustify

Justification CYITextEditView::m_xJustify

◆ ReturnKeyPressed

CYISignal<CYITextEditView *> CYITextEditView::ReturnKeyPressed

◆ TextChanged

CYISignal<const CYIString & , const CYIString & > CYITextEditView::TextChanged

Emitted when the text changes. The first signal parameter is the text currently in the text view. The second signal parameter is the text which was previously in the text view before the text changed.

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