Navigation
API > API/Runtime > API/Runtime/Slate
A rich static text widget. Through the use of markup and text decorators, text with different styles, embedded image and widgets can be achieved.
| Name | SRichTextBlock |
| Type | class |
| Header File | /Engine/Source/Runtime/Slate/Public/Widgets/Text/SRichTextBlock.h |
| Include Path | #include "Widgets/Text/SRichTextBlock.h" |
Syntax
class SRichTextBlock : public SWidget
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → SWidget → SRichTextBlock
- FSlateControlledConstruction → SWidget → SRichTextBlock
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
SRichTextBlock() |
Constructor | Widgets/Text/SRichTextBlock.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~SRichTextBlock() |
Destructor | Widgets/Text/SRichTextBlock.h |
Structs
| Name | Remarks |
|---|---|
| FArguments |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ApplyLineHeightToBottomLine | TAttribute< bool > | Whether to leave extra space below the last line due to line height. | Widgets/Text/SRichTextBlock.h | |
| AutoWrapText | TAttribute< bool > | True if we're wrapping text automatically based on the computed horizontal space for this widget | Widgets/Text/SRichTextBlock.h | |
| BoundText | TAttribute< FText > | The text displayed in this text block | Widgets/Text/SRichTextBlock.h | |
| HighlightText | TAttribute< FText > | Highlight this text in the textblock | Widgets/Text/SRichTextBlock.h | |
| Justification | TAttribute< ETextJustify::Type > | The amount to scale each lines height by. | Widgets/Text/SRichTextBlock.h | |
| LineHeightPercentage | TAttribute< float > | How the text should be aligned with the margin. | Widgets/Text/SRichTextBlock.h | |
| Margin | TAttribute< FMargin > | The amount of blank space left around the edges of text area. | Widgets/Text/SRichTextBlock.h | |
| Marshaller | TSharedPtr< FRichTextLayoutMarshaller > | Widgets/Text/SRichTextBlock.h | ||
| MinDesiredWidth | TAttribute< float > | Prevents the text block from being smaller than desired in certain cases (e.g. when it is empty) | Widgets/Text/SRichTextBlock.h | |
| TextBlockScale | float | Use to Scale the entire Text Block | Widgets/Text/SRichTextBlock.h | |
| TextLayoutCache | TUniquePtr< FSlateTextBlockLayout > | The wrapped layout for this text block | Widgets/Text/SRichTextBlock.h | |
| TextStyle | FTextBlockStyle | Default style used by the TextLayout | Widgets/Text/SRichTextBlock.h | |
| TransformPolicy | TAttribute< ETextTransformPolicy > | The transform policy we're using | Widgets/Text/SRichTextBlock.h | |
| WrappingPolicy | TAttribute< ETextWrappingPolicy > | The wrapping policy we're using | Widgets/Text/SRichTextBlock.h | |
| WrapTextAt | TAttribute< float > | Whether text wraps onto a new line when it's length exceeds this width; if this value is zero or negative, no wrapping occurs. | Widgets/Text/SRichTextBlock.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Construct
(
const FArguments& InArgs |
Widgets/Text/SRichTextBlock.h | ||
const FText & GetText() |
Gets the text assigned to this text block | Widgets/Text/SRichTextBlock.h | |
virtual void OnArrangeChildren
(
const FGeometry& AllottedGeometry, |
Widgets/Text/SRichTextBlock.h | ||
virtual int32 OnPaint
(
const FPaintArgs& Args, |
Widgets/Text/SRichTextBlock.h | ||
void Refresh() |
Causes the text to reflow it's layout | Widgets/Text/SRichTextBlock.h | |
void SetApplyLineHeightToBottomLine
(
const TAttribute< bool >& InApplyLineHeightToBottomLine |
See ApplyLineHeightToBottomLine attribute | Widgets/Text/SRichTextBlock.h | |
void SetAutoWrapText
(
const TAttribute< bool >& InAutoWrapText |
See AutoWrapText attribute | Widgets/Text/SRichTextBlock.h | |
void SetDecorators
(
TArrayView< TSharedRef< ITextDecorator > > InDecorators |
Replaces the decorators for this text block | Widgets/Text/SRichTextBlock.h | |
void SetDecoratorStyleSet
(
const ISlateStyle* NewDecoratorStyleSet |
Widgets/Text/SRichTextBlock.h | ||
void SetHighlightText
(
const TAttribute< FText >& InHighlightText |
See HighlightText attribute | Widgets/Text/SRichTextBlock.h | |
void SetJustification
(
const TAttribute< ETextJustify::Type >& InJustification |
See Justification attribute | Widgets/Text/SRichTextBlock.h | |
void SetLineHeightPercentage
(
const TAttribute< float >& InLineHeightPercentage |
See LineHeightPercentage attribute | Widgets/Text/SRichTextBlock.h | |
void SetMargin
(
const TAttribute< FMargin >& InMargin |
See Margin attribute | Widgets/Text/SRichTextBlock.h | |
void SetMinDesiredWidth
(
const TAttribute< float >& InMinDesiredWidth |
See MinDesiredWidth attribute | Widgets/Text/SRichTextBlock.h | |
void SetOverflowPolicy
(
TOptional< ETextOverflowPolicy > InOverflowPolicy |
Sets the overflow policy for this text block | Widgets/Text/SRichTextBlock.h | |
void SetText
(
const TAttribute< FText >& InTextAttr |
Sets the text for this text block | Widgets/Text/SRichTextBlock.h | |
void SetTextBlockScale
(
const float NewTextBlockScale |
Set the scale value at the TextLayout | Widgets/Text/SRichTextBlock.h | |
void SetTextFlowDirection
(
const TOptional< ETextFlowDirection >& InTextFlowDirection |
See TextFlowDirection attribute | Widgets/Text/SRichTextBlock.h | |
void SetTextShapingMethod
(
const TOptional< ETextShapingMethod >& InTextShapingMethod |
See TextShapingMethod attribute | Widgets/Text/SRichTextBlock.h | |
void SetTextStyle
(
const FTextBlockStyle& InTextStyle |
See TextStyle argument | Widgets/Text/SRichTextBlock.h | |
void SetTransformPolicy
(
const TAttribute< ETextTransformPolicy >& InTransformPolicy |
Set TransformPolicy attribute | Widgets/Text/SRichTextBlock.h | |
void SetWrappingPolicy
(
const TAttribute< ETextWrappingPolicy >& InWrappingPolicy |
Set WrappingPolicy attribute | Widgets/Text/SRichTextBlock.h | |
void SetWrapTextAt
(
const TAttribute< float >& InWrapTextAt |
See WrapTextAt attribute | Widgets/Text/SRichTextBlock.h |
Overridden from SWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FChildren * GetChildren() |
Widgets/Text/SRichTextBlock.h |
Protected
Overridden from SWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FVector2D ComputeDesiredSize
(
float |
Widgets/Text/SRichTextBlock.h | ||
virtual bool ComputeVolatility() |
Widgets/Text/SRichTextBlock.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static TSharedRef< ITextDecorator > Decorator
(
const TSharedRef< ITextDecorator >& Decorator |
Widgets/Text/SRichTextBlock.h | ||
static TSharedRef< ITextDecorator > HyperlinkDecorator
(
const FString Id, |
Widgets/Text/SRichTextBlock.h | ||
static TSharedRef< ITextDecorator > HyperlinkDecorator
(
const FString Id, |
Widgets/Text/SRichTextBlock.h | ||
static TSharedRef< ITextDecorator > ImageDecorator
(
FString RunName, |
Widgets/Text/SRichTextBlock.h | ||
static TSharedRef< ITextDecorator > WidgetDecorator
(
const FString RunName, |
Widgets/Text/SRichTextBlock.h | ||
static TSharedRef< ITextDecorator > WidgetDecorator
(
const FString RunName, |
Widgets/Text/SRichTextBlock.h |