UTextBlock

A simple static text widget. No Children Text

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

UMG

Header

/Engine/Source/Runtime/UMG/Public/Components/TextBlock.h

Include

#include "Components/TextBlock.h"

Syntax

class UTextBlock : public UTextLayoutWidget

Remarks

A simple static text widget.

No Children Text

Variables

Name Description

Protected variable

bool

 

bSimpleTextMode

If this is enabled, text shaping, wrapping, justification are disabled in favor of much faster text layout and measurement.

Public variable

bool

 

bWrapWithInvalidationPanel

If true, it will automatically wrap this text widget with an invalidation panel

Public variable

FSlateColor

 

ColorAndOpacity

The color of the text

Public variable

FGetSlateColor

 

ColorAndOpacityDelegate

A bindable delegate for the ColorAndOpacity.

Public variable

FSlateFontInfo

 

Font

The font to render the text with

Protected variable

FSlateColor

 

K2_Cache_ColorAndOpacity

Protected variable

FLinearColor

 

K2_Cache_ShadowColorAndOpacity

Protected variable

FText

 

K2_Cache_Text

Public variable

float

 

MinDesiredWidth

The minimum desired size for the text

Protected variable

TSharedPtr< STe...

 

MyTextBlock

Public variable

FLinearColor

 

ShadowColorAndOpacity

The color of the shadow

Public variable

FGetLinearColor

 

ShadowColorAndOpacityDelegate

A bindable delegate for the ShadowColorAndOpacity.

Public variable

FVector2D

 

ShadowOffset

The direction the shadow is cast

Public variable

FSlateBrush

 

StrikeBrush

The brush to strike through text with

Public variable

FText

 

Text

The text to display

Public variable

FGetText

 

TextDelegate

A bindable delegate to allow logic to drive the text of the widget

Public variable

ETextTransformP...

 

TextTransformPolicy

The text transformation policy to apply to this text block

Constructors

Name Description

Public function

UTextBlock

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Protected function Virtual

TAttribute< ...

 

GetDisplayText()

Get the text that should be displayed in the internal Slate widget (allows flags to mutate the display text without modifying the persistent designer property data)

Public function

UMaterialIns...

 

GetDynamicFontMaterial()

Public function

UMaterialIns...

 

GetDynamicOutlineMaterial()

Public function Const

FText

 

GetText()

Gets the widget text

Protected function Const

EVisibility

 

GetTextWarningImageVisibility()

Public function

void

 

HandleTextCommitted

(
    const FText& InText,
    ETextCommit::Type CommitteType
)

Protected function

FSlateColor

 

K2_Gate_ColorAndOpacity()

Protected function

FLinearColor

 

K2_Gate_ShadowColorAndOpacity()

Protected function

FText

 

K2_Gate_Text()

Public function

void

 

SetAutoWrapText

(
    bool InAutoTextWrap
)

Set the auto wrap for this text block.

Public function

void

 

SetColorAndOpacity

(
    FSlateColor InColorAndOpacity
)

Sets the color and opacity of the text in this text block

Public function

void

 

SetFont

(
    FSlateFontInfo InFontInfo
)

Dynamically set the font info for this text block

Public function

void

 

SetMinDesiredWidth

(
    float InMinDesiredWidth
)

Set the minimum desired width for this text block

Public function

void

 

SetOpacity

(
    float InOpacity
)

Sets the opacity of the text in this text block

Public function

void

 

SetShadowColorAndOpacity

(
    FLinearColor InShadowColorAndOpacit...
)

Sets the color and opacity of the text drop shadow

if opacity is zero no shadow will be drawn

Public function

void

 

SetShadowOffset

(
    FVector2D InShadowOffset
)

Sets the offset that the text drop shadow should be drawn at

Public function

void

 

SetStrikeBrush

(
    FSlateBrush InStrikeBrush
)

Dynamically set the strike brush for this text block

Public function Virtual

void

 

SetText

(
    FText InText
)

Directly sets the widget text.

Public function

void

 

SetTextTransformPolicy

(
    ETextTransformPolicy InTransformPol...
)

Set the text transformation policy for this text block.

Overridden from UTextLayoutWidget

Name Description

Public function Virtual

void

 

SetJustification

(
    ETextJustify::Type InJustification
)

Overridden from UWidget

Name Description

Protected function Virtual Const

TSharedPtr< ...

 

GetAccessibleWidget()

Gets the widget that accessibility properties should synchronize to.

Public function Virtual Const

FString

 

GetLabelMetadata()

Get Label Metadata, which may be as simple as a bit of string data to help identify an anonymous text block.

Public function Virtual

const FText

 

GetPaletteCategory()

Gets the palette category of the widget

Protected function Virtual

void

 

OnBindingChanged

(
    const FName& Property
)

Public function Virtual

void

 

OnCreationFromPalette()

Called by the palette after constructing a new widget, allows the widget to perform interesting default setup that we don't want to be UObject Defaults.

Protected function Virtual

TSharedRef< ...

 

RebuildWidget()

Function implemented by all subclasses of UWidget is called when the underlying SWidget needs to be constructed.

Public function Virtual

void

 

SynchronizeProperties()

Applies all properties to the native widget if possible.

Overridden from UVisual

Name Description

Public function Virtual

void

 

ReleaseSlateResources

(
    bool bReleaseChildren
)

Overridden from UObject

Name Description

Public function Virtual Const

bool

 

CanEditChange

(
    const FProperty* InProperty
)

Called by the editor to query whether a property of this object is allowed to be modified.

Protected function Virtual

void

 

PostLoad()

Do any object-specific cleanup required immediately after loading an object.

Deprecated Variables

Name Description

Public variable

bool

 

bAutoWrapText_DEPRECATED

Whether the text should automatically wrap

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss