FSlateTextBlockLayout

Class to handle the cached layout of STextBlock/SRichTextBlock by proxying around a [FTextLayout](API\Runtime\Slate\Framework\Text\FTextLayout)

Windows
MacOS
Linux

References

Module

Slate

Header

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

Include

#include "Widgets/Text/SlateTextBlockLayout.h"

Syntax

class FSlateTextBlockLayout

Remarks

Class to handle the cached layout of STextBlock/SRichTextBlock by proxying around a FTextLayout

Constructors

Name Description

Public function

FSlateTextBlockLayout

(
    SWidget* InOwner,
    FTextBlockStyle InDefaultTextStyle,
    const TOptional< ETextShapingMethod...,
    const TOptional< ETextFlowDirection...,
    const FCreateSlateTextLayout& InCr...,
    TSharedRef< ITextLayoutMarshaller >...,
    TSharedPtr< IBreakIterator > InLine...
)

Constructor

Functions

Name Description

Public function Const

void

 

ArrangeChildren

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

Arrange any child widgets in this layout

Public function

FVector2D

 

ComputeDesiredSize

(
    const FWidgetArgs& InWidgetArgs,
    const float InScale,
    const FTextBlockStyle& InTextStyle
)

Get the computed desired size for this layout, updating the internal cache as required

Public function

void

 

DirtyContent()

Force dirty the content due to an external change that can't be picked up automatically by this cache.

Public function

void

 

DirtyLayout()

Force dirty the layout due to an external change that can't be picked up automatically by this cache

Public function

FChildren &#...

 

GetChildren()

Get the child widgets of this layout

Public function Const

FVector2D

 

GetDesiredSize()

Gets the last computed desired size.

Public function Const

float

 

GetLayoutScale()

Get the TextLayout scale.

Public function

int32

 

OnPaint

(
    const FPaintArgs& InPaintArgs,
    const FGeometry& InAllottedGeometr...,
    const FSlateRect& InClippingRect,
    FSlateWindowElementList& OutDrawEl...,
    int32 LayerId,
    const FWidgetStyle& InWidgetStyle,
    bool bParentEnabled
)

Paint this layout, updating the internal cache as required

Public function

void

 

OverrideTextStyle

(
    const FTextBlockStyle& InTextStyle
)

Override the text style used and immediately update the text layout (if required).

Public function

void

 

SetDebugSourceInfo

(
    const TAttribute< FString >& InDeb...
)

Set the information used to help identify who owns this text layout in the case of an error

Public function

void

 

SetTextFlowDirection

(
    const TOptional< ETextFlowDirection...
)

Set the text flow direction that the internal text layout should use

Public function

void

 

SetTextShapingMethod

(
    const TOptional< ETextShapingMethod...
)

Set the text shaping method that the internal text layout should use

Classes

Name

Description

Public struct

FWidgetArgs

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