Vuo  2.1.1
Public Member Functions | List of all members
VuoTextFieldInternal Class Reference

Description

Internal implementation of a text field object.

Definition at line 56 of file VuoTextFieldInternal.h.

Public Member Functions

 VuoTextFieldInternal (VuoInteger numLines)
 Initialize a new internal text field object. More...
 
 ~VuoTextFieldInternal ()
 Release resources allocated by a text field object. More...
 
void SetLineCount (VuoInteger lines)
 Set the number of lines to be displayed when rendering this field. More...
 
void SetPosition (VuoPoint2d newPosition)
 Set the position used when rendering this field to a layer. More...
 
void SetWidth (VuoReal newWidth)
 Set the width used when rendering this field to a layer. More...
 
void SetCursorColor (VuoColor color)
 Set the color of the text cursor. More...
 
void SetAnchor (VuoAnchor newAnchor)
 Set the anchor used when rendering this field to a layer. More...
 
void SetTheme (VuoUiTheme newTheme)
 Set the theme used when rendering this field to a layer. More...
 
void SetText (VuoText text)
 Set the text for this field. More...
 
void SetPlaceholderText (VuoText text)
 Set the text for this field. More...
 
void SetValidateCharInputCallback (bool(*validateCharInputCallback)(const VuoText current, uint32_t append))
 Set an optional function callback to be invoked when OnTypedCharacterEvent is fired. More...
 
void SetValidateTextInputCallback (bool(*validateTextInputCallback)(const VuoText current, VuoText *modifiedText))
 Optional function callback to be invoked when text field loses focus. More...
 
VuoText GetText () const
 Return a new VuoText string of the currently displayed value. More...
 
void OnTypedCharacterEvent (VuoText character, VuoModifierKey modifiers)
 Update the internal text field state with a typed character. More...
 
bool OnRenderedLayersEvent (const VuoRenderedLayers *renderedLayers) VuoWarnUnusedResult
 Update the internal state of this text field with a rendered layers event. More...
 
VuoLayer CreateTextLayer ()
 Build a new layer group from the current state of this text field. More...
 

Constructor & Destructor Documentation

◆ VuoTextFieldInternal()

VuoTextFieldInternal::VuoTextFieldInternal ( VuoInteger  numLines)

Initialize a new internal text field object.

Definition at line 65 of file VuoTextFieldInternal.cc.

◆ ~VuoTextFieldInternal()

VuoTextFieldInternal::~VuoTextFieldInternal ( )

Release resources allocated by a text field object.

Definition at line 82 of file VuoTextFieldInternal.cc.

Member Function Documentation

◆ CreateTextLayer()

VuoLayer VuoTextFieldInternal::CreateTextLayer ( )

Build a new layer group from the current state of this text field.

Definition at line 390 of file VuoTextFieldInternal.cc.

◆ GetText()

VuoText VuoTextFieldInternal::GetText ( ) const

Return a new VuoText string of the currently displayed value.

Definition at line 145 of file VuoTextFieldInternal.cc.

◆ OnRenderedLayersEvent()

bool VuoTextFieldInternal::OnRenderedLayersEvent ( const VuoRenderedLayers renderedLayers)

Update the internal state of this text field with a rendered layers event.

Returns true if a state change has occurred that requires a layer rebuild, false otherwise. Use CreateTextLayer to rebuild the layer after a change has been made.

Definition at line 296 of file VuoTextFieldInternal.cc.

◆ OnTypedCharacterEvent()

void VuoTextFieldInternal::OnTypedCharacterEvent ( VuoText  character,
VuoModifierKey  modifiers 
)

Update the internal text field state with a typed character.

Use CreateTextLayer to rebuild the layer after a change has been made.

Definition at line 236 of file VuoTextFieldInternal.cc.

◆ SetAnchor()

void VuoTextFieldInternal::SetAnchor ( VuoAnchor  newAnchor)

Set the anchor used when rendering this field to a layer.

Definition at line 124 of file VuoTextFieldInternal.cc.

◆ SetCursorColor()

void VuoTextFieldInternal::SetCursorColor ( VuoColor  color)

Set the color of the text cursor.

Definition at line 100 of file VuoTextFieldInternal.cc.

◆ SetLineCount()

void VuoTextFieldInternal::SetLineCount ( VuoInteger  lines)

Set the number of lines to be displayed when rendering this field.

Definition at line 90 of file VuoTextFieldInternal.cc.

◆ SetPlaceholderText()

void VuoTextFieldInternal::SetPlaceholderText ( VuoText  text)

Set the text for this field.

Definition at line 153 of file VuoTextFieldInternal.cc.

◆ SetPosition()

void VuoTextFieldInternal::SetPosition ( VuoPoint2d  newPosition)

Set the position used when rendering this field to a layer.

Definition at line 108 of file VuoTextFieldInternal.cc.

◆ SetText()

void VuoTextFieldInternal::SetText ( VuoText  text)

Set the text for this field.

Definition at line 132 of file VuoTextFieldInternal.cc.

◆ SetTheme()

void VuoTextFieldInternal::SetTheme ( VuoUiTheme  newTheme)

Set the theme used when rendering this field to a layer.

Definition at line 164 of file VuoTextFieldInternal.cc.

◆ SetValidateCharInputCallback()

void VuoTextFieldInternal::SetValidateCharInputCallback ( bool(*)(const VuoText current, uint32_t append)  validateCharInputCallback)

Set an optional function callback to be invoked when OnTypedCharacterEvent is fired.

Returns true if input is valid, false otherwise.

Definition at line 173 of file VuoTextFieldInternal.cc.

◆ SetValidateTextInputCallback()

void VuoTextFieldInternal::SetValidateTextInputCallback ( bool(*)(const VuoText current, VuoText *modifiedText)  validateTextInputCallback)

Optional function callback to be invoked when text field loses focus.

Use this to validate user input and (if necessary) change it. Returns true if the text has been modified (in which case modifiedText should contain the new text).

Definition at line 182 of file VuoTextFieldInternal.cc.

◆ SetWidth()

void VuoTextFieldInternal::SetWidth ( VuoReal  newWidth)

Set the width used when rendering this field to a layer.

Definition at line 116 of file VuoTextFieldInternal.cc.


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