SRichTextBlock

A rich static text widget.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Slate

Header

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

Include

#include "Widgets/Text/SRichTextBlock.h"

Syntax

class SRichTextBlock : public SWidget

Remarks

A rich static text widget. Through the use of markup and text decorators, text with different styles, embedded image and widgets can be achieved.

Constructors

Name Description

Public function

SRichTextBlock()

Constructor

Destructors

Name Description

Public function

~SRichTextBlock()

Destructor

Functions

Name Description

Public function

void

 

Construct

(
    const FArguments& InArgs
)

Public function Static

TSharedRef< ...

 

Decorator

(
    const TSharedRef< ITextDecorator > ...
)

Public function Const

const FText ...

 

GetText()

Gets the text assigned to this text block

Public function Static

TSharedRef< ...

 

HyperlinkDecorator

(
    const FString Id,
    UserClass* InUserObjectPtr,
    typename FSlateHyperlinkRun::FOnCli...
)

Public function Static

TSharedRef< ...

 

HyperlinkDecorator

(
    const FString Id,
    const FSlateHyperlinkRun::FOnClick ...
)

Public function Static

TSharedRef< ...

 

ImageDecorator

(
    FString RunName,
    const ISlateStyle*const Overri...
)

Public function

void

 

Refresh()

Causes the text to reflow it's layout

Public function

void

 

SetAutoWrapText

(
    const TAttribute< bool >& InAutoWr...
)

See AutoWrapText attribute

Public function

void

 

SetDecoratorStyleSet

(
    const ISlateStyle* NewDecorato...
)

Public function

void

 

SetHighlightText

(
    const TAttribute< FText >& InHighl...
)

See HighlightText attribute

Public function

void

 

SetJustification

(
    const TAttribute< ETextJustify::Typ...
)

See Justification attribute

Public function

void

 

SetLineHeightPercentage

(
    const TAttribute< float >& InLineH...
)

See LineHeightPercentage attribute

Public function

void

 

SetMargin

(
    const TAttribute< FMargin >& InMar...
)

See Margin attribute

Public function

void

 

SetMinDesiredWidth

(
    const TAttribute< float >& InMinDe...
)

See MinDesiredWidth attribute

Public function

void

 

SetText

(
    const TAttribute< FText >& InTextA...
)

Sets the text for this text block

Public function

void

 

SetTextBlockScale

(
    const float NewTextBlockScale
)

Set the scale value at the TextLayout

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& InTextStyle
)

See TextStyle argument

Public function

void

 

SetWrappingPolicy

(
    const TAttribute< ETextWrappingPoli...
)

Set WrappingPolicy attribute

Public function

void

 

SetWrapTextAt

(
    const TAttribute< float >& InWrapT...
)

See WrapTextAt attribute

Public function Static

TSharedRef< ...

 

WidgetDecorator

(
    const FString RunName,
    const FWidgetDecorator::FCreateWidg...
)

Public function Static

TSharedRef< ...

 

WidgetDecorator

(
    const FString RunName,
    UserClass* InUserObjectPtr,
    typename FWidgetDecorator::FCreateW...
)

Overridden from SWidget

Name Description

Protected function Virtual Const

FVector2D

 

ComputeDesiredSize

(
    float LayoutScaleMultiplier
)

Compute the ideal size necessary to display this widget.

Protected function Virtual Const

bool

 

ComputeVolatility()

Recomputes the volatility of the widget.

Public function Virtual

FChildren &#...

 

GetChildren()

Every widget that has children must implement this method.

Public function Virtual Const

void

 

OnArrangeChildren

(
    const FGeometry& AllottedGeometry,
    FArrangedChildren& ArrangedChildre...
)

Compute the Geometry of all the children and add populate the ArrangedChildren list with their values.

Public function Virtual Const

int32

 

OnPaint

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

The widget should respond by populating the OutDrawElements array with FDrawElements that represent it and any of its children.

Classes

Name

Description

Public struct

FArguments

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