![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <TextLayout.h>
Inheritance diagram for FTextLayout:Classes | |
| struct | ELineModelDirtyState |
| struct | ETextLayoutDirtyState |
| struct | FBlockDefinition |
| struct | FBreakCandidate |
| struct | FLineModel |
| struct | FLineView |
| struct | FLineViewHighlight |
| struct | FNewLineData |
| class | FRunModel |
| struct | FTextLayoutSize |
| struct | FTextOffsetLocations |
Additional Inherited Members | |
Static Protected Member Functions inherited from TSharedFromThis< FTextLayout > | |
| static UE_FORCEINLINE_HINT TSharedRef< OtherType, Mode > | SharedThis (OtherType *ThisPtr) |
| static UE_FORCEINLINE_HINT TSharedRef< OtherType const, Mode > | SharedThis (const OtherType *ThisPtr) |
|
virtual |
|
protected |
| void FTextLayout::AddLine | ( | const FNewLineData & | NewLine | ) |
| void FTextLayout::AddLineHighlight | ( | const FTextLineHighlight & | Highlight | ) |
Adds a single line highlight to the existing set of highlights.
| void FTextLayout::AddLines | ( | const TArray< FNewLineData > & | NewLines | ) |
| void FTextLayout::AddRunRenderer | ( | const FTextRunRenderer & | Renderer | ) |
Adds a single run renderer to the existing set of renderers.
|
protectedvirtual |
Notifies all Runs that we are beginning to generate a new layout.
|
protected |
Notifies all Runs on the given line is beginning to have a new layout generated.
|
protected |
Calculates the text direction for the given line based upon the current shaping method and document flow direction
|
protected |
Calculates the visual justification for the given line view
|
protected |
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))
| void FTextLayout::ClearLineHighlights | ( | ) |
Clears all line highlights
| void FTextLayout::ClearLines | ( | ) |
| void FTextLayout::ClearRunRenderers | ( | ) |
Clears all run renderers
|
protected |
Clears the current layouts view information.
|
protectedpure virtual |
Called to generate a new empty text run for this text layout
Implemented in FSlateTextLayout.
|
protected |
Create the wrapping cache for the given line based upon the current scale
|
protected |
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))
|
protected |
Set the given dirty flags on all line models in this layout
| void FTextLayout::DirtyLayout | ( | ) |
| void FTextLayout::DirtyRunLayout | ( | const TSharedRef< const IRun > & | Run | ) |
|
protectedvirtual |
Notifies all Runs that the layout has finished generating.
Reimplemented in FSlateTextLayout.
|
protected |
Notifies all Runs on the given line has finished having a new layout generated.
|
protected |
Flushes the text shaping cache for the given line
|
protected |
Flushes the text shaping cache for each line
|
inline |
| void FTextLayout::GetAsText | ( | FString & | DisplayText, |
| FTextOffsetLocations *const | OutTextOffsetLocations = nullptr |
||
| ) | const |
| void FTextLayout::GetAsText | ( | FText & | DisplayText, |
| FTextOffsetLocations *const | OutTextOffsetLocations = nullptr |
||
| ) | const |
| FVector2D FTextLayout::GetDrawSize | ( | ) | const |
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)
| FTextSelection FTextLayout::GetGraphemeAt | ( | const FTextLocation & | Location | ) | const |
|
inline |
| int32 FTextLayout::GetLineCount | ( | ) | const |
|
inline |
|
inline |
| int32 FTextLayout::GetLineViewIndexForTextLocation | ( | const TArray< FTextLayout::FLineView > & | LineViews, |
| const FTextLocation & | Location, | ||
| const bool | bPerformInclusiveBoundsCheck | ||
| ) | const |
|
inline |
| FVector2D FTextLayout::GetLocationAt | ( | const FTextLocation & | Location, |
| const bool | bPerformInclusiveBoundsCheck | ||
| ) | const |
|
inline |
|
inline |
| void FTextLayout::GetSelectionAsText | ( | FString & | DisplayText, |
| const FTextSelection & | Selection | ||
| ) | const |
| FVector2D FTextLayout::GetSize | ( | ) | const |
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)
|
inline |
| FTextLocation FTextLayout::GetTextLocationAt | ( | const FLineView & | LineView, |
| const FVector2D & | Relative, | ||
| ETextHitPoint *const | OutHitPoint = nullptr |
||
| ) | const |
| FTextLocation FTextLayout::GetTextLocationAt | ( | const FVector2D & | Relative, |
| ETextHitPoint *const | OutHitPoint = nullptr |
||
| ) | const |
| void FTextLayout::GetTextOffsetLocations | ( | FTextOffsetLocations & | OutTextOffsetLocations | ) | const |
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
|
inline |
|
inline |
| FVector2D FTextLayout::GetViewSize | ( | ) | const |
Get the size of the text layout that can actually be seen from the parent widget
| ETextJustify::Type FTextLayout::GetVisualJustification | ( | ) | const |
Get the visual justification for this document (based on the visual justification used by the first line of text)
| FTextSelection FTextLayout::GetWordAt | ( | const FTextLocation & | Location | ) | const |
| FVector2D FTextLayout::GetWrappedDrawSize | ( | ) | const |
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
| FVector2D FTextLayout::GetWrappedSize | ( | ) | const |
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
|
inline |
|
inline |
| bool FTextLayout::InsertAt | ( | const FTextLocation & | Location, |
| const FString & | Text | ||
| ) |
| bool FTextLayout::InsertAt | ( | const FTextLocation & | Location, |
| TCHAR | Character | ||
| ) |
| bool FTextLayout::InsertAt | ( | const FTextLocation & | Location, |
| TSharedRef< IRun > | InRun, | ||
| const bool | bAlwaysKeepRightRun = false |
||
| ) |
| bool FTextLayout::IsEmpty | ( | ) | const |
| bool FTextLayout::IsLayoutDirty | ( | ) | const |
| bool FTextLayout::RemoveAt | ( | const FTextLocation & | Location, |
| int32 | Count = 1 |
||
| ) |
| void FTextLayout::RemoveLineHighlight | ( | const FTextLineHighlight & | Highlight | ) |
Removes a single line highlight to the existing set of highlights.
| void FTextLayout::RemoveRunRenderer | ( | const FTextRunRenderer & | Renderer | ) |
Removes a single run renderer to the existing set of renderers.
| void FTextLayout::SetDebugSourceInfo | ( | const TAttribute< FString > & | InDebugSourceInfo | ) |
Set the information used to help identify who owns this text layout in the case of an error
| void FTextLayout::SetJustification | ( | ETextJustify::Type | Value | ) |
| void FTextLayout::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)
| void FTextLayout::SetLineHighlights | ( | const TArray< FTextLineHighlight > & | Highlights | ) |
Replaces the current set of line highlights with the provided highlights.
| void FTextLayout::SetRunRenderers | ( | const TArray< FTextRunRenderer > & | Renderers | ) |
Replaces the current set of run renderers with the provided renderers.
| void FTextLayout::SetTextFlowDirection | ( | const ETextFlowDirection | InTextFlowDirection | ) |
| void FTextLayout::SetTextOverflowPolicy | ( | const TOptional< ETextOverflowPolicy > | InTextOverflowPolicy | ) |
| void FTextLayout::SetTextShapingMethod | ( | const ETextShapingMethod | InTextShapingMethod | ) |
| void FTextLayout::SetTransformPolicy | ( | ETextTransformPolicy | Value | ) |
| void FTextLayout::SetVisibleRegion | ( | const FVector2D & | InViewSize, |
| const FVector2D & | InScrollOffset | ||
| ) |
| void FTextLayout::SetWrappingPolicy | ( | ETextWrappingPolicy | Value | ) |
| bool FTextLayout::SplitLineAt | ( | const FTextLocation & | Location | ) |
|
protected |
Transform the given line model text based on the active transform policy.
|
virtual |
|
virtual |
Updates the TextLayout's if any changes have occurred since the last update.
|
virtual |
|
protected |
Whether or not line height should be applied to the last line.
|
protected |
|
protected |
Information given to use by our an external source (typically our owner widget) to help identify who owns this text layout in the case of an error
|
protected |
Whether parameters on the layout have changed which requires the view be updated.
|
protected |
The iterator to use to detect grapheme cluster boundaries
|
protected |
How the text should be aligned with the margin.
|
protected |
The iterator to use to detect appropriate soft-wrapping points for lines
|
protected |
The percentage to modify a line height by.
|
protected |
The models for the lines of text. A LineModel represents a single string with no manual breaks.
The views for the lines of text. A LineView represents a single visual line of text. Multiple LineViews can map to the same LineModel, if for example wrapping occurs.
|
protected |
The indices for all of the line views that require justification.
|
protected |
The size of the margins to put about the text. This is an unscaled value.
|
protected |
Extra height of the last line due to line height.
|
protected |
The scale to draw the text at
|
protected |
The scroll offset of the text layout from the parent widget
|
protected |
Unicode BiDi text detection
|
protected |
How should the text within this layout be flowed?
|
protected |
The final size of the text layout on screen.
|
protected |
Override for the text overflow policy. If unset, the style is used
|
protected |
The method used to shape the text within this layout
|
protected |
The transform policy used by this text layout.
|
protected |
The size of the text layout that can actually be seen from the parent widget
|
protected |
The iterator to use to detect word boundaries
|
protected |
The wrapping policy used by this text layout.
|
protected |
The width that the text should be wrap at. If 0 or negative no wrapping occurs.