Navigation
API > API/Runtime > API/Runtime/Slate
| Name | FTextLayout |
| Type | class |
| Header File | /Engine/Source/Runtime/Slate/Public/Framework/Text/TextLayout.h |
| Include Path | #include "Framework/Text/TextLayout.h" |
Syntax
class FTextLayout : public TSharedFromThis< FTextLayout >
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → FTextLayout
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FTextLayout() |
Framework/Text/TextLayout.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FTextLayout() |
Framework/Text/TextLayout.h |
Classes
| Name | Remarks |
|---|---|
| FRunModel |
Structs
| Name | Remarks |
|---|---|
| ELineModelDirtyState | |
| ETextLayoutDirtyState | |
| FBlockDefinition | |
| FBreakCandidate | |
| FLineModel | |
| FLineView | |
| FLineViewHighlight | |
| FNewLineData | |
| FTextLayoutSize | |
| FTextOffsetLocations | A mapping between the offsets into the text as a flat string (with line-breaks), and the internal lines used within a text layout |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddLine
(
const FNewLineData& NewLine |
Framework/Text/TextLayout.h | ||
void AddLineHighlight
(
const FTextLineHighlight& Highlight |
Adds a single line highlight to the existing set of highlights. | Framework/Text/TextLayout.h | |
void AddLines
(
const TArray< FNewLineData >& NewLines |
Framework/Text/TextLayout.h | ||
void AddRunRenderer
(
const FTextRunRenderer& Renderer |
Adds a single run renderer to the existing set of renderers. | Framework/Text/TextLayout.h | |
void ClearLineHighlights() |
Clears all line highlights | Framework/Text/TextLayout.h | |
void ClearLines() |
Framework/Text/TextLayout.h | ||
void ClearRunRenderers() |
Clears all run renderers | Framework/Text/TextLayout.h | |
void DirtyLayout() |
Framework/Text/TextLayout.h | ||
void DirtyRunLayout
(
const TSharedRef< const IRun >& Run |
Framework/Text/TextLayout.h | ||
bool GetApplyLineHeightToBottomLine() |
Framework/Text/TextLayout.h | ||
void GetAsText
(
FText& DisplayText, |
Framework/Text/TextLayout.h | ||
void GetAsText
(
FString& DisplayText, |
Framework/Text/TextLayout.h | ||
FVector2D GetDrawSize () |
Get the size of the text layout, including any lines which extend beyond the wrapping boundaries (eg, lines with lots of trailing whitespace, or lines with no break candidates) | Framework/Text/TextLayout.h | |
FTextSelection GetGraphemeAt
(
const FTextLocation& Location |
Framework/Text/TextLayout.h | ||
ETextJustify::Type GetJustification() |
Framework/Text/TextLayout.h | ||
int32 GetLineCount() |
Framework/Text/TextLayout.h | ||
float GetLineHeightPercentage() |
Framework/Text/TextLayout.h | ||
const TArray< FTextLayout::FLineModel > & GetLineModels() |
Framework/Text/TextLayout.h | ||
int32 GetLineViewIndexForTextLocation
(
const TArray< FTextLayout::FLineView >& LineViews, |
Framework/Text/TextLayout.h | ||
const TArray< FTextLayout::FLineView > & GetLineViews() |
Framework/Text/TextLayout.h | ||
FVector2D GetLocationAt
(
const FTextLocation& Location, |
Framework/Text/TextLayout.h | ||
FMargin GetMargin() |
Framework/Text/TextLayout.h | ||
float GetScale() |
Framework/Text/TextLayout.h | ||
void GetSelectionAsText
(
FString& DisplayText, |
Framework/Text/TextLayout.h | ||
FVector2D GetSize () |
Get the size of the text layout, including any lines which extend beyond the wrapping boundaries (eg, lines with lots of trailing whitespace, or lines with no break candidates) | Framework/Text/TextLayout.h | |
ETextFlowDirection GetTextFlowDirection() |
Framework/Text/TextLayout.h | ||
FTextLocation GetTextLocationAt
(
const FLineView& LineView, |
Framework/Text/TextLayout.h | ||
FTextLocation GetTextLocationAt
(
const FVector2D& Relative, |
Framework/Text/TextLayout.h | ||
void GetTextOffsetLocations
(
FTextOffsetLocations& OutTextOffsetLocations |
Constructs an array containing the mappings between the text that would be returned by GetAsText, and the internal FTextLocation points used within this text layout | Framework/Text/TextLayout.h | |
ETextShapingMethod GetTextShapingMethod() |
Framework/Text/TextLayout.h | ||
ETextTransformPolicy GetTransformPolicy() |
This option is destructive to the model text, so changing it requires refreshing the text layout from its marshaller | Framework/Text/TextLayout.h | |
FVector2D GetViewSize() |
Get the size of the text layout that can actually be seen from the parent widget | Framework/Text/TextLayout.h | |
ETextJustify::Type GetVisualJustification() |
Get the visual justification for this document (based on the visual justification used by the first line of text) | Framework/Text/TextLayout.h | |
FTextSelection GetWordAt
(
const FTextLocation& Location |
Framework/Text/TextLayout.h | ||
FVector2D GetWrappedDrawSize () |
Get the size of the text layout after the text has been wrapped, and including the first piece of trailing whitespace for any given soft-wrapped line | Framework/Text/TextLayout.h | |
FVector2D GetWrappedSize () |
Get the size of the text layout after the text has been wrapped, and including the first piece of trailing whitespace for any given soft-wrapped line | Framework/Text/TextLayout.h | |
ETextWrappingPolicy GetWrappingPolicy() |
Framework/Text/TextLayout.h | ||
float GetWrappingWidth() |
Framework/Text/TextLayout.h | ||
bool InsertAt
(
const FTextLocation& Location, |
Framework/Text/TextLayout.h | ||
bool InsertAt
(
const FTextLocation& Location, |
Framework/Text/TextLayout.h | ||
bool InsertAt
(
const FTextLocation& Location, |
Framework/Text/TextLayout.h | ||
bool IsEmpty() |
Framework/Text/TextLayout.h | ||
bool IsLayoutDirty() |
Framework/Text/TextLayout.h | ||
bool JoinLineWithNextLine
(
int32 LineIndex |
Framework/Text/TextLayout.h | ||
bool RemoveAt
(
const FTextLocation& Location, |
Framework/Text/TextLayout.h | ||
bool RemoveLine
(
int32 LineIndex |
Framework/Text/TextLayout.h | ||
void RemoveLineHighlight
(
const FTextLineHighlight& Highlight |
Removes a single line highlight to the existing set of highlights. | Framework/Text/TextLayout.h | |
void RemoveRunRenderer
(
const FTextRunRenderer& Renderer |
Removes a single run renderer to the existing set of renderers. | Framework/Text/TextLayout.h | |
void SetApplyLineHeightToBottomLine
(
bool Value |
Framework/Text/TextLayout.h | ||
void SetDebugSourceInfo
(
const TAttribute< FString >& InDebugSourceInfo |
Set the information used to help identify who owns this text layout in the case of an error | Framework/Text/TextLayout.h | |
void SetJustification
(
ETextJustify::Type Value |
Framework/Text/TextLayout.h | ||
void SetLineBreakIterator
(
TSharedPtr< IBreakIterator > InLineBreakIterator |
Set the iterator to use to detect appropriate soft-wrapping points for lines (or null to go back to using the default) | Framework/Text/TextLayout.h | |
void SetLineHeightPercentage
(
float Value |
Framework/Text/TextLayout.h | ||
void SetLineHighlights
(
const TArray< FTextLineHighlight >& Highlights |
Replaces the current set of line highlights with the provided highlights. | Framework/Text/TextLayout.h | |
void SetMargin
(
const FMargin& InMargin |
Framework/Text/TextLayout.h | ||
void SetRunRenderers
(
const TArray< FTextRunRenderer >& Renderers |
Replaces the current set of run renderers with the provided renderers. | Framework/Text/TextLayout.h | |
void SetScale
(
float Value |
Framework/Text/TextLayout.h | ||
void SetTextFlowDirection
(
const ETextFlowDirection InTextFlowDirection |
Framework/Text/TextLayout.h | ||
void SetTextOverflowPolicy
(
const TOptional< ETextOverflowPolicy > InTextOverflowPolicy |
Framework/Text/TextLayout.h | ||
void SetTextShapingMethod
(
const ETextShapingMethod InTextShapingMethod |
Framework/Text/TextLayout.h | ||
void SetTransformPolicy
(
ETextTransformPolicy Value |
Framework/Text/TextLayout.h | ||
void SetVisibleRegion
(
const FVector2D& InViewSize, |
Framework/Text/TextLayout.h | ||
void SetWrappingPolicy
(
ETextWrappingPolicy Value |
Framework/Text/TextLayout.h | ||
void SetWrappingWidth
(
float Value |
Framework/Text/TextLayout.h | ||
bool SplitLineAt
(
const FTextLocation& Location |
Framework/Text/TextLayout.h | ||
virtual void UpdateHighlights() |
Framework/Text/TextLayout.h | ||
virtual void UpdateIfNeeded() |
Updates the TextLayout's if any changes have occurred since the last update. | Framework/Text/TextLayout.h | |
virtual void UpdateLayout() |
Framework/Text/TextLayout.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void BeginLayout() |
Notifies all Runs that we are beginning to generate a new layout. | Framework/Text/TextLayout.h | |
void BeginLineLayout
(
FLineModel& LineModel |
Notifies all Runs on the given line is beginning to have a new layout generated. | Framework/Text/TextLayout.h | |
void CalculateLineTextDirection
(
FLineModel& LineModel |
Calculates the text direction for the given line based upon the current shaping method and document flow direction | Framework/Text/TextLayout.h | |
ETextJustify::Type CalculateLineViewVisualJustification
(
const FLineView& LineView |
Calculates the visual justification for the given line view | Framework/Text/TextLayout.h | |
void CalculateTextDirection() |
Calculates the text direction for each line based upon the current shaping method and document flow direction When changing the shaping method, or document flow direction, all the lines need to be dirtied (see DirtyAllLineModels(ELineModelDirtyState::TextBaseDirection)) | Framework/Text/TextLayout.h | |
void ClearView() |
Clears the current layouts view information. | Framework/Text/TextLayout.h | |
TSharedRef< IRun > CreateDefaultTextRun
(
const TSharedRef< FString >& NewText, |
Called to generate a new empty text run for this text layout | Framework/Text/TextLayout.h | |
void CreateLineWrappingCache
(
FLineModel& LineModel |
Create the wrapping cache for the given line based upon the current scale | Framework/Text/TextLayout.h | |
void CreateWrappingCache() |
Create the wrapping cache for the current text based upon the current scale Each line keeps its own cached state, so needs to be cleared when changing the text within a line When changing the scale, all the lines need to be cleared (see DirtyAllLineModels(ELineModelDirtyState::WrappingInformation)) | Framework/Text/TextLayout.h | |
void DirtyAllLineModels
(
const ELineModelDirtyState::Flags InDirtyFlags |
Set the given dirty flags on all line models in this layout | Framework/Text/TextLayout.h | |
virtual void EndLayout() |
Notifies all Runs that the layout has finished generating. | Framework/Text/TextLayout.h | |
void EndLineLayout
(
FLineModel& LineModel |
Notifies all Runs on the given line has finished having a new layout generated. | Framework/Text/TextLayout.h | |
void FlushLineTextShapingCache
(
FLineModel& LineModel |
Flushes the text shaping cache for the given line | Framework/Text/TextLayout.h | |
void FlushTextShapingCache() |
Flushes the text shaping cache for each line | Framework/Text/TextLayout.h | |
void TransformLineText
(
FLineModel& LineModel |
Transform the given line model text based on the active transform policy. | Framework/Text/TextLayout.h |