STextBlock

A simple static text widget

Inheritance Hierarchy

References

Module

Slate

Header

/Engine/Source/Runtime/Slate/Public/Widgets/Text/STextBlock.h

Include

#include "Widgets/Text/STextBlock.h"

Syntax

class STextBlock : public SLeafWidget

Remarks

A simple static text widget

Variables

Name Description

Public variable

uint16: 1

 

bIsAttributeBoundTextBound

Public variable

uint16: 1

 

bIsAttributeColorAndOpacitySet

Public variable

uint16: 1

 

bIsAttributeFontSet

Public variable

uint16: 1

 

bIsAttributeHighlightColorSet

Public variable

uint16: 1

 

bIsAttributeHighlightShapeSet

Public variable

uint16: 1

 

bIsAttributeShadowColorAndOpacitySet

Public variable

uint16: 1

 

bIsAttributeShadowOffsetSet

Public variable

uint16: 1

 

bIsAttributeStrikeBrushSet

Public variable

uint16: 1

 

bIsAttributeTransformPolicySet

Public variable

uint16: 1

 

bIsAttributeWrapTextAtSet

Public variable

uint16

 

Union_Flags

Constructors

Name Description

Public function

STextBlock()

Constructor

Destructors

Name Description

Public function

~STextBlock()

Destructor

Functions

Name Description

Public function

void

 

Construct

(
    const FArguments& InArgs
)

Construct this widget

Public function Const

FSlateColor

 

GetColorAndOpacity()

Gets the current foreground color

Public function Const

const FSlate...

 

GetColorAndOpacityRef()

Gets the current foreground color as ref

Public function Const

FSlateFontIn...

 

GetFont()

Gets the current font

Public function Const

const FSlate...

 

GetFontRef()

Gets the current font as ref

Public function Const

FSlateColor

 

GetHighlightColor()

Gets the current highlight color

Public function Const

const FSlate...

 

GetHighlightShape()

Gets the current highlight shape

Public function Const

FMargin

 

GetMargin()

Gets the current margin

Public function Const

float

 

GetMinDesiredWidth()

Gets the current min desired width

Public function Const

FLinearColor

 

GetShadowColorAndOpacity()

Gets the current shadow color and opacity

Public function Const

const FLinea...

 

GetShadowColorAndOpacityRef()

Gets the current shadow color and opacity as ref

Public function Const

FVector2f

 

GetShadowOffset()

Gets the current shadow offset

Public function Const

const FSlate...

 

GetStrikeBrush()

Gets the current strike brush

Public function Const

const FText ...

 

GetText()

Gets the text assigned to this text block

Public function Const

ETextTransfo...

 

GetTransformPolicyImpl()

Get TransformPolicy attribute

Public function

void

 

SetAutoWrapText

(
    TAttribute< bool > InAutoWrapText
)

See AutoWrapText attribute

Public function

void

 

SetColorAndOpacity

(
    TAttribute< FSlateColor > InColorAn...
)

See ColorAndOpacity attribute

Public function

void

 

SetFont

(
    TAttribute< FSlateFontInfo > InFont
)

Sets the font used to draw the text

Public function

void

 

SetHighlightColor

(
    TAttribute< FLinearColor > InHighli...
)

See HighlightColor attribute

Public function

void

 

SetHighlightShape

(
    TAttribute< const FSlateBrush*...
)

See HighlightShape attribute

Public function

void

 

SetHighlightText

(
    TAttribute< FText > InText
)

Sets the highlight text for this text block

Public function

void

 

SetJustification

(
    TAttribute< ETextJustify::Type > In...
)

See Justification attribute

Public function

void

 

SetLineHeightPercentage

(
    TAttribute< float > InLineHeightPer...
)

See LineHeightPercentage attribute

Public function

void

 

SetMargin

(
    TAttribute< FMargin > InMargin
)

See Margin attribute

Public function

void

 

SetMinDesiredWidth

(
    TAttribute< float > InMinDesiredWid...
)

See MinDesiredWidth attribute

Public function

void

 

SetOverflowPolicy

(
    TOptional< ETextOverflowPolicy > In...
)

Sets the overflow policy for this text block

Public function

void

 

SetShadowColorAndOpacity

(
    TAttribute< FLinearColor > InShadow...
)

See ShadowColorAndOpacity attribute

Public function

void

 

SetShadowOffset

(
    TAttribute< FVector2D > InShadowOff...
)

See ShadowOffset attribute

Public function

void

 

SetStrikeBrush

(
    TAttribute< const FSlateBrush*...
)

Sets the brush used to strike through the text

Public function

void

 

SetText

(
    TAttribute< FText > InText
)

Sets the text for this text block

Public function

void

 

SetTextFlowDirection

(
    const TOptional< ETextFlowDirection...
)

See TextFlowDirection attribute

Public function

void

 

SetTextShapingMethod

(
    const TOptional< ETextShapingMethod...
)

See TextShapingMethod attribute

Public function

void

 

SetTextStyle

(
    const FTextBlockStyle* InTextS...
)

See TextStyle argument

Public function

void

 

SetTransformPolicy

(
    TAttribute< ETextTransformPolicy > ...
)

Set TransformPolicy attribute

Public function

void

 

SetWrappingPolicy

(
    TAttribute< ETextWrappingPolicy > I...
)

Set WrappingPolicy attribute

Public function

void

 

SetWrapTextAt

(
    TAttribute< float > InWrapTextAt
)

See WrapTextAt attribute

Public function Static

const FSlate...

 

StaticWidgetClass()

Overridden from SWidget

Name Description

Public function Virtual Const

FVector2D

 

ComputeDesiredSize

(
    float
)

Overwritten from SWidget.

Public function Virtual

TSharedRef< ...

 

CreateAccessibleWidget()

Public function Virtual Const

TOptional< F...

 

GetDefaultAccessibleText

(
    EAccessibleType AccessibleType
)

Assign AccessibleText with a default value that can be used when AccessibleBehavior is set to Auto or Custom.

Public function Virtual Const

int32

 

OnPaint

(
    const FPaintArgs& Args,
    const FGeometry& AllottedGeometry,
    const FSlateRect& MyCullingRect,
    FSlateWindowElementList& OutDrawEl...,
    int32 LayerId,
    const FWidgetStyle& InWidgetStyle,
    bool bParentEnabled
)

Overwritten from SWidget.

Overridden from FSlateControlledConstruction

Name Description

Public function Virtual Const

const FSlate...

 

GetWidgetClass()

Classes

Name

Description

Public struct

FArguments

Typedefs

Deprecated Functions

Name Description

Public function Const

ETextTransfo...

 

GetTransformPolicy()

GetTransformPolicy is not accessible anymore since it's attribute value may not have been updated yet.

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