Class to handle the cached layout of STextBlock/SRichTextBlock by proxying around a FTextLayout 更多...
#include <SlateTextBlockLayout.h>
Public 成员函数 | |
| void | ArrangeChildren (const FGeometry &AllottedGeometry, FArrangedChildren &ArrangedChildren) const |
| Arrange any child widgets in this layout | |
| 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 | |
| void | DirtyContent () |
| Force dirty the content due to an external change that can't be picked up automatically by this cache. 更多... | |
| void | DirtyLayout () |
| Force dirty the layout due to an external change that can't be picked up automatically by this cache | |
| FSlateTextBlockLayout (SWidget *InOwner, FTextBlockStyle InDefaultTextStyle, const TOptional< ETextShapingMethod > InTextShapingMethod, const TOptional< ETextFlowDirection > InTextFlowDirection, const FCreateSlateTextLayout &InCreateSlateTextLayout, TSharedRef< ITextLayoutMarshaller > InMarshaller, TSharedPtr< IBreakIterator > InLineBreakPolicy) | |
| Constructor | |
| FChildren * | GetChildren () |
| Get the child widgets of this layout | |
| FVector2D | GetDesiredSize () const |
| Gets the last computed desired size. | |
| float | GetLayoutScale () const |
| Get the TextLayout scale. | |
| int32 | OnPaint (const FPaintArgs &InPaintArgs, const FGeometry &InAllottedGeometry, const FSlateRect &InClippingRect, FSlateWindowElementList &OutDrawElements, int32 LayerId, const FWidgetStyle &InWidgetStyle, bool bParentEnabled) |
| Paint this layout, updating the internal cache as required | |
| void | OverrideTextStyle (const FTextBlockStyle &InTextStyle) |
| Override the text style used and immediately update the text layout (if required). 更多... | |
| void | SetDebugSourceInfo (const TAttribute< FString > &InDebugSourceInfo) |
| Set the information used to help identify who owns this text layout in the case of an error | |
| void | SetTextFlowDirection (const TOptional< ETextFlowDirection > &InTextFlowDirection) |
| Set the text flow direction that the internal text layout should use | |
| void | SetTextShapingMethod (const TOptional< ETextShapingMethod > &InTextShapingMethod) |
| Set the text shaping method that the internal text layout should use | |
Class to handle the cached layout of STextBlock/SRichTextBlock by proxying around a FTextLayout
| void FSlateTextBlockLayout::DirtyContent | ( | ) |
Force dirty the content due to an external change that can't be picked up automatically by this cache.
Also force dirties the layout. Will cause the contained text to be re-parsed by the marshaller next frame.
| void FSlateTextBlockLayout::OverrideTextStyle | ( | const FTextBlockStyle & | InTextStyle | ) |
Override the text style used and immediately update the text layout (if required).
This can be used to override the text style after calling ComputeDesiredSize (eg, if you can only compute your text style in OnPaint) Please note that changing the size or font used by the text may causing clipping issues until the next call to ComputeDesiredSize