Navigation
API > API/Runtime > API/Runtime/Slate > API/Runtime/Slate/Widgets > API/Runtime/Slate/Widgets/Text
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
| Type | Name | Description | |
|---|---|---|---|
| uint16: 1 | bIsAttributeBoundTextBound | ||
| uint16: 1 | bIsAttributeColorAndOpacitySet | ||
| uint16: 1 | bIsAttributeFontSet | ||
| uint16: 1 | bIsAttributeHighlightColorSet | ||
| uint16: 1 | bIsAttributeHighlightShapeSet | ||
| uint16: 1 | bIsAttributeShadowColorAndOpacitySet | ||
| uint16: 1 | bIsAttributeShadowOffsetSet | ||
| uint16: 1 | bIsAttributeStrikeBrushSet | ||
| uint16: 1 | bIsAttributeTransformPolicySet | ||
| uint16: 1 | bIsAttributeWrapTextAtSet | ||
| uint16 | Union_Flags |
Constructors
| Type | Name | Description | |
|---|---|---|---|
STextBlock () |
Constructor |
Destructors
| Type | Name | Description | |
|---|---|---|---|
~STextBlock () |
Destructor |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | Construct
(
const FArguments& InArgs |
Construct this widget | |
| FSlateColor | Gets the current foreground color | ||
| const FSlateColor & | Gets the current foreground color as ref | ||
| FSlateFontInfo | GetFont () |
Gets the current font | |
| const FSlateFontInfo & | GetFontRef () |
Gets the current font as ref | |
| FSlateColor | Gets the current highlight color | ||
| const FSlateBrush * | Gets the current highlight shape | ||
| FMargin | GetMargin () |
Gets the current margin | |
| float | Gets the current min desired width | ||
| FLinearColor | Gets the current shadow color and opacity | ||
| const FLinearColor & | Gets the current shadow color and opacity as ref | ||
| FVector2f | Gets the current shadow offset | ||
| const FSlateBrush * | Gets the current strike brush | ||
| const FText & | GetText () |
Gets the text assigned to this text block | |
| ETextTransformPolicy | Get TransformPolicy attribute | ||
| void | SetAutoWrapText
(
TAttribute< bool > InAutoWrapText |
See AutoWrapText attribute | |
| void | SetColorAndOpacity
(
TAttribute< FSlateColor > InColorAndOpacity |
See ColorAndOpacity attribute | |
| void | SetFont
(
TAttribute< FSlateFontInfo > InFont |
Sets the font used to draw the text | |
| void | SetHighlightColor
(
TAttribute< FLinearColor > InHighlightColor |
See HighlightColor attribute | |
| void | SetHighlightShape
(
TAttribute< const FSlateBrush* > InHighlightShape |
See HighlightShape attribute | |
| void | SetHighlightText
(
TAttribute< FText > InText |
Sets the highlight text for this text block | |
| void | SetJustification
(
TAttribute< ETextJustify::Type > InJustification |
See Justification attribute | |
| void | SetLineHeightPercentage
(
TAttribute< float > InLineHeightPercentage |
See LineHeightPercentage attribute | |
| void | SetMargin
(
TAttribute< FMargin > InMargin |
See Margin attribute | |
| void | SetMinDesiredWidth
(
TAttribute< float > InMinDesiredWidth |
See MinDesiredWidth attribute | |
| void | SetOverflowPolicy
(
TOptional< ETextOverflowPolicy > InOverflowPolicy |
Sets the overflow policy for this text block | |
| void | SetShadowColorAndOpacity
(
TAttribute< FLinearColor > InShadowColorAndOpacity |
See ShadowColorAndOpacity attribute | |
| void | SetShadowOffset
(
TAttribute< FVector2D > InShadowOffset |
See ShadowOffset attribute | |
| void | SetStrikeBrush
(
TAttribute< const FSlateBrush* > InStrikeBrush |
Sets the brush used to strike through the text | |
| void | SetText
(
TAttribute< FText > InText |
Sets the text for this text block | |
| void | SetTextFlowDirection
(
const TOptional< ETextFlowDirection >& InTextFlowDirection |
See TextFlowDirection attribute | |
| void | SetTextShapingMethod
(
const TOptional< ETextShapingMethod >& InTextShapingMethod |
See TextShapingMethod attribute | |
| void | SetTextStyle
(
const FTextBlockStyle* InTextStyle |
See TextStyle argument | |
| void | SetTransformPolicy
(
TAttribute< ETextTransformPolicy > InTransformPolicy |
Set TransformPolicy attribute | |
| void | SetWrappingPolicy
(
TAttribute< ETextWrappingPolicy > InWrappingPolicy |
Set WrappingPolicy attribute | |
| void | SetWrapTextAt
(
TAttribute< float > InWrapTextAt |
See WrapTextAt attribute | |
| const FSlateWidgetClassData & |
Overridden from SWidget
| Type | Name | Description | |
|---|---|---|---|
| FVector2D | ComputeDesiredSize
(
float |
Overwritten from SWidget. | |
| TSharedRef< FSlateAccessibleWidget > | |||
| TOptional< FText > | GetDefaultAccessibleText
(
EAccessibleType AccessibleType |
Assign AccessibleText with a default value that can be used when AccessibleBehavior is set to Auto or Custom. | |
| int32 | OnPaint
(
const FPaintArgs& Args, |
Overwritten from SWidget. |
Overridden from FSlateControlledConstruction
| Type | Name | Description | |
|---|---|---|---|
| const FSlateWidgetClassData & |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FArguments |
Typedefs
| Name | Description |
|---|---|
| PrivateParentType | |
| PrivateThisType | |
| Super | |
| ThisClass |
Deprecated Functions
| Type | Name | Description | |
|---|---|---|---|
| ETextTransformPolicy | GetTransformPolicy is not accessible anymore since it's attribute value may not have been updated yet. |