Widget Studio
UWidgetStudioTextFieldBase Class Reference

A Widget Studio abstract text field without any pre-defined styling or widgets. More...

#include <WSTextFieldBase.h>

Inheritance diagram for UWidgetStudioTextFieldBase:
UWidgetStudioBase UWidgetStudioModernTextField

Public Member Functions

FText GetLabel () const
 Returns the label.
 
FText GetText () const
 Returns the text in the text field.
 
FText GetPlaceholderText () const
 Returns the placeholder text.
 
ETextFilter GetFilter () const
 Returns the current set text filter.
 
int32 GetCharacterLimit () const
 Returns the character limit.
 
ETextFieldState GetState () const
 Returns the current Text Field State.
 
bool IsPasswordField () const
 Returns true if the text field is set to be a password field.
 
virtual void SetLabel (FText NewLabel)
 Sets the label that appears above the text field. More...
 
virtual void SetText (FText NewText)
 Sets the text in the Text Field. More...
 
virtual void SetPlaceholderText (FText NewText)
 Sets the placeholder text in the Text Field. More...
 
virtual void SetFilter (ETextFilter NewFilter)
 Sets and applies a new filter for the text in the text field. More...
 
virtual void SetCharacterLimit (int32 NewLimit)
 Sets and applies the character limit. More...
 
virtual void SetState (ETextFieldState NewState)
 Manually set the state of the Text Field. More...
 
- Public Member Functions inherited from UWidgetStudioBase
FVector2D GetDimensions () const
 Returns the current X and Y dimensions of the Widget. More...
 
int32 GetBorderRadius () const
 Returns the current border radius of the Widget. More...
 
void ForceStyleUpdate ()
 Refresh the dynamic styling of the Widget Studio widget.
 
void SetSizeModifier (ESizeModifier InSizeModifier)
 Set the size modifier of the Widget Studio widget.
 

Public Attributes

FWSTextFieldTextChangedDelegate OnTextChanged
 
FWSTextFieldTextCommittedDelegate OnTextCommitted
 
- Public Attributes inherited from UWidgetStudioBase
FWSBaseHoverStateDelegate OnHoverStateChanged
 Called when the hover state has been changed.
 
bool bCanOverrideDimensions = true
 Used to enable or disable dimension override's.
 
bool bCanOverrideBorderRadius = true
 Used to enable or disable dimension override's.
 
FVector2D MinimumDimensions = FVector2D(50, 7)
 The minimum dimensions of the widget. More...
 
bool bDisablePainting = false
 Used for debugging. More...
 
float AnimationTime = 7
 The animation interpolation speed. More...
 
ESizeModifier SizeModifier = ESizeModifier::Regular
 Quickly modify the overall size of the widget. More...
 
FVector2D OverrideDimensions = FVector2D(0, 0)
 Manually adjust the X and Y dimensions of the widget. More...
 
int32 OverrideBorderRadius = -1
 Manually adjust the border radius of the widget. More...
 

Protected Member Functions

 UWidgetStudioTextFieldBase (const FObjectInitializer &ObjectInitializer)
 
virtual void SynchronizeProperties () override
 
virtual void OnTextInputTextChanged (const FText &InText)
 Called when the text within the field has changed. More...
 
virtual void OnTextInputTextCommitted (const FText &InText, ETextCommit::Type InCommitMethod)
 Called when the text field has been committed. More...
 
- Protected Member Functions inherited from UWidgetStudioBase
virtual void InitializeStyling ()
 
virtual void UpdateStyling ()
 
virtual void NativeOnMouseEnter (const FGeometry &InGeometry, const FPointerEvent &InMouseEvent) override
 
virtual void NativeOnMouseLeave (const FPointerEvent &InMouseEvent) override
 
virtual void NativeOnMouseCaptureLost (const FCaptureLostEvent &CaptureLostEvent) override
 

Protected Attributes

bool bMultiLine = false
 Enable/disable multi-line support. More...
 
FText Label
 The label of the text field. More...
 
FText PlaceholderText = FText().FromString("Enter text here!")
 The text displayed in the Text Field when no text has been inputted.
 
FText Text = FText().FromString("")
 The text displayed in the Text Field.
 
FWSTextStyle TextStyle
 The text styling to apply to the text within the text field. More...
 
ETextFieldState State = ETextFieldState::Normal
 The current state of the text field.
 
ETextFilter Filter = ETextFilter::None
 How the text should be filtered.
 
int32 CharacterLimit = 0
 The limit on how many characters should allowed. More...
 
bool bIsPasswordField = false
 Set the Text Field to password mode.
 

Detailed Description

A Widget Studio abstract text field without any pre-defined styling or widgets.

See WSModernTextField on how to setup a new custom text field.

Member Function Documentation

◆ OnTextInputTextChanged()

void UWidgetStudioTextFieldBase::OnTextInputTextChanged ( const FText &  InText)
protectedvirtual

Called when the text within the field has changed.

Parameters
InTextThe new text within the text field.

◆ OnTextInputTextCommitted()

void UWidgetStudioTextFieldBase::OnTextInputTextCommitted ( const FText &  InText,
ETextCommit::Type  InCommitMethod 
)
protectedvirtual

Called when the text field has been committed.

Parameters
InTextThe new text within the text field.
InCommitMethodThe method used to commit the text.

◆ SetCharacterLimit()

void UWidgetStudioTextFieldBase::SetCharacterLimit ( int32  NewLimit)
virtual

Sets and applies the character limit.

If set to 0, then no limit is imposed.

Parameters
NewLimitThe new character limit to apply to the Text Field.

◆ SetFilter()

void UWidgetStudioTextFieldBase::SetFilter ( ETextFilter  NewFilter)
virtual

Sets and applies a new filter for the text in the text field.

Parameters
NewFilterThe new filter to apply to the Text Field.

◆ SetLabel()

void UWidgetStudioTextFieldBase::SetLabel ( FText  NewLabel)
virtual

Sets the label that appears above the text field.

Parameters
NewLabelThe new text to apply to the label.

◆ SetPlaceholderText()

void UWidgetStudioTextFieldBase::SetPlaceholderText ( FText  NewText)
virtual

Sets the placeholder text in the Text Field.

Parameters
NewTextThe new placeholder text to display in the Text Field.

◆ SetState()

void UWidgetStudioTextFieldBase::SetState ( ETextFieldState  NewState)
virtual

Manually set the state of the Text Field.

Parameters
NewStateThe new state to apply to the Text Field.

◆ SetText()

void UWidgetStudioTextFieldBase::SetText ( FText  NewText)
virtual

Sets the text in the Text Field.

Parameters
NewTextThe new text to display in the Text Field.

Member Data Documentation

◆ bMultiLine

bool UWidgetStudioTextFieldBase::bMultiLine = false
protected

Enable/disable multi-line support.

Note, not compatible with password mode.

◆ CharacterLimit

int32 UWidgetStudioTextFieldBase::CharacterLimit = 0
protected

The limit on how many characters should allowed.

0 = Uncapped

◆ Label

FText UWidgetStudioTextFieldBase::Label
protected

The label of the text field.

If empty, the label will be hidden.

◆ TextStyle

FWSTextStyle UWidgetStudioTextFieldBase::TextStyle
protected
Initial value:
EWSFontType::Body2,
EFontCase::Sentence,
ETextJustify::Left,
true,
0,
ETextWrappingPolicy::DefaultWrapping)
Struct with font weight, size, and letter spacing.
Definition: WSTypography.h:23
The settings for the Widget Studio Text.
Definition: WSText.h:23

The text styling to apply to the text within the text field.


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