UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
STextBlock Class Reference

#include <STextBlock.h>

+ Inheritance diagram for STextBlock:

Public Member Functions

 SLATE_BEGIN_ARGS (STextBlock)
 
SLATE_API STextBlock ()
 
SLATE_API ~STextBlock ()
 
SLATE_API void Construct (const FArguments &InArgs)
 
const FTextGetText () const
 
SLATE_API void SetText (TAttribute< FText > InText)
 
SLATE_API void SetHighlightText (TAttribute< FText > InText)
 
SLATE_API void SetFont (TAttribute< FSlateFontInfo > InFont)
 
SLATE_API void SetStrikeBrush (TAttribute< const FSlateBrush * > InStrikeBrush)
 
SLATE_API void SetColorAndOpacity (TAttribute< FSlateColor > InColorAndOpacity)
 
SLATE_API void SetTextStyle (const FTextBlockStyle *InTextStyle)
 
SLATE_API void SetTextShapingMethod (const TOptional< ETextShapingMethod > &InTextShapingMethod)
 
SLATE_API void SetTextFlowDirection (const TOptional< ETextFlowDirection > &InTextFlowDirection)
 
SLATE_API void SetWrapTextAt (TAttribute< float > InWrapTextAt)
 
SLATE_API void SetAutoWrapText (TAttribute< bool > InAutoWrapText)
 
SLATE_API void SetWrappingPolicy (TAttribute< ETextWrappingPolicy > InWrappingPolicy)
 
SLATE_API void SetTransformPolicy (TAttribute< ETextTransformPolicy > InTransformPolicy)
 
SLATE_API void SetOverflowPolicy (TOptional< ETextOverflowPolicy > InOverflowPolicy)
 
SLATE_API void SetShadowOffset (TAttribute< FVector2D > InShadowOffset)
 
SLATE_API void SetShadowColorAndOpacity (TAttribute< FLinearColor > InShadowColorAndOpacity)
 
SLATE_API void SetHighlightColor (TAttribute< FLinearColor > InHighlightColor)
 
SLATE_API void SetHighlightShape (TAttribute< const FSlateBrush * > InHighlightShape)
 
SLATE_API void SetMinDesiredWidth (TAttribute< float > InMinDesiredWidth)
 
SLATE_API void SetLineHeightPercentage (TAttribute< float > InLineHeightPercentage)
 
SLATE_API void SetApplyLineHeightToBottomLine (TAttribute< bool > InApplyLineHeightToBottomLine)
 
SLATE_API void SetMargin (TAttribute< FMargin > InMargin)
 
SLATE_API void SetJustification (TAttribute< ETextJustify::Type > InJustification)
 
virtual SLATE_API int32 OnPaint (const FPaintArgs &Args, const FGeometry &AllottedGeometry, const FSlateRect &MyCullingRect, FSlateWindowElementList &OutDrawElements, int32 LayerId, const FWidgetStyle &InWidgetStyle, bool bParentEnabled) const override
 
virtual SLATE_API FVector2D ComputeDesiredSize (float) const override
 
SLATE_API FSlateColor GetColorAndOpacity () const
 
SLATE_API const FSlateColorGetColorAndOpacityRef () const
 
SLATE_API FSlateFontInfo GetFont () const
 
SLATE_API const FSlateFontInfoGetFontRef () const
 
SLATE_API const FSlateBrushGetStrikeBrush () const
 
SLATE_API ETextTransformPolicy GetTransformPolicyImpl () const
 
SLATE_API FVector2f GetShadowOffset () const
 
SLATE_API FLinearColor GetShadowColorAndOpacity () const
 
SLATE_API const FLinearColorGetShadowColorAndOpacityRef () const
 
SLATE_API FSlateColor GetHighlightColor () const
 
SLATE_API const FSlateBrushGetHighlightShape () const
 
SLATE_API FMargin GetMargin () const
 
SLATE_API float GetMinDesiredWidth () const
 
- Public Member Functions inherited from SLeafWidget
SLATECORE_API SLeafWidget ()
 
virtual SLATECORE_API ~SLeafWidget ()
 
virtual SLATECORE_API void SetVisibility (TAttribute< EVisibility > InVisibility) override final
 
- Public Member Functions inherited from SWidget
SLATECORE_API int32 Paint (const FPaintArgs &Args, const FGeometry &AllottedGeometry, const FSlateRect &MyCullingRect, FSlateWindowElementList &OutDrawElements, int32 LayerId, const FWidgetStyle &InWidgetStyle, bool bParentEnabled) const
 
virtual SLATECORE_API void Tick (const FGeometry &AllottedGeometry, const double InCurrentTime, const float InDeltaTime)
 
virtual SLATECORE_API FReply OnFocusReceived (const FGeometry &MyGeometry, const FFocusEvent &InFocusEvent)
 
virtual SLATECORE_API void OnFocusLost (const FFocusEvent &InFocusEvent)
 
virtual SLATECORE_API void OnFocusChanging (const FWeakWidgetPath &PreviousFocusPath, const FWidgetPath &NewWidgetPath, const FFocusEvent &InFocusEvent)
 
virtual SLATECORE_API FReply OnKeyChar (const FGeometry &MyGeometry, const FCharacterEvent &InCharacterEvent)
 
virtual SLATECORE_API FReply OnPreviewKeyDown (const FGeometry &MyGeometry, const FKeyEvent &InKeyEvent)
 
virtual SLATECORE_API FReply OnKeyDown (const FGeometry &MyGeometry, const FKeyEvent &InKeyEvent)
 
virtual SLATECORE_API FReply OnKeyUp (const FGeometry &MyGeometry, const FKeyEvent &InKeyEvent)
 
virtual SLATECORE_API FReply OnAnalogValueChanged (const FGeometry &MyGeometry, const FAnalogInputEvent &InAnalogInputEvent)
 
virtual SLATECORE_API FReply OnMouseButtonDown (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
 
virtual SLATECORE_API FReply OnPreviewMouseButtonDown (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
 
virtual SLATECORE_API FReply OnMouseButtonUp (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
 
virtual SLATECORE_API FReply OnMouseMove (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
 
virtual SLATECORE_API void OnMouseEnter (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
 
virtual SLATECORE_API void OnMouseLeave (const FPointerEvent &MouseEvent)
 
virtual SLATECORE_API FReply OnMouseWheel (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
 
virtual SLATECORE_API FCursorReply OnCursorQuery (const FGeometry &MyGeometry, const FPointerEvent &CursorEvent) const
 
virtual SLATECORE_API TOptional< TSharedRef< SWidget > > OnMapCursor (const FCursorReply &CursorReply) const
 
virtual SLATECORE_API FReply OnMouseButtonDoubleClick (const FGeometry &InMyGeometry, const FPointerEvent &InMouseEvent)
 
virtual SLATECORE_API bool OnVisualizeTooltip (const TSharedPtr< SWidget > &TooltipContent)
 
virtual SLATECORE_API TSharedPtr< FPopupLayerOnVisualizePopup (const TSharedRef< SWidget > &PopupContent)
 
virtual SLATECORE_API FReply OnDragDetected (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
 
virtual SLATECORE_API void OnDragEnter (const FGeometry &MyGeometry, const FDragDropEvent &DragDropEvent)
 
virtual SLATECORE_API void OnDragLeave (const FDragDropEvent &DragDropEvent)
 
virtual SLATECORE_API FReply OnDragOver (const FGeometry &MyGeometry, const FDragDropEvent &DragDropEvent)
 
virtual SLATECORE_API FReply OnDrop (const FGeometry &MyGeometry, const FDragDropEvent &DragDropEvent)
 
virtual SLATECORE_API FReply OnTouchGesture (const FGeometry &MyGeometry, const FPointerEvent &GestureEvent)
 
virtual SLATECORE_API FReply OnTouchStarted (const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent)
 
virtual SLATECORE_API FReply OnTouchMoved (const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent)
 
virtual SLATECORE_API FReply OnTouchEnded (const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent)
 
virtual SLATECORE_API FReply OnTouchForceChanged (const FGeometry &MyGeometry, const FPointerEvent &TouchEvent)
 
virtual SLATECORE_API FReply OnTouchFirstMove (const FGeometry &MyGeometry, const FPointerEvent &TouchEvent)
 
virtual SLATECORE_API FReply OnMotionDetected (const FGeometry &MyGeometry, const FMotionEvent &InMotionEvent)
 
virtual SLATECORE_API TOptional< boolOnQueryShowFocus (const EFocusCause InFocusCause) const
 
virtual SLATECORE_API FPopupMethodReply OnQueryPopupMethod () const
 
virtual SLATECORE_API TOptional< FVirtualPointerPositionTranslateMouseCoordinateForCustomHitTestChild (const SWidget &ChildWidget, const FGeometry &MyGeometry, const FVector2D ScreenSpaceMouseCoordinate, const FVector2D LastScreenSpaceMouseCoordinate) const
 
virtual SLATECORE_API void OnFinishedPointerInput ()
 
virtual SLATECORE_API void OnFinishedKeyInput ()
 
virtual SLATECORE_API FNavigationReply OnNavigation (const FGeometry &MyGeometry, const FNavigationEvent &InNavigationEvent)
 
virtual SLATECORE_API EWindowZone::Type GetWindowZoneOverride () const
 
bool NeedsPrepass () const
 
SLATECORE_API void SlatePrepass ()
 
SLATECORE_API void SlatePrepass (float InLayoutScaleMultiplier)
 
void SetCanTick (bool bInCanTick)
 
bool GetCanTick () const
 
bool HasRegisteredSlateAttribute () const
 
bool IsAttributesUpdatesEnabled () const
 
const FSlateWidgetPersistentStateGetPersistentState () const
 
const FWidgetProxyHandle GetProxyHandle () const
 
SLATECORE_API UE::Slate::FDeprecateVector2DResult GetDesiredSize () const
 
SLATECORE_API void AssignParentWidget (TSharedPtr< SWidget > InParent)
 
SLATECORE_API bool ConditionallyDetatchParentWidget (SWidget *InExpectedParent)
 
virtual bool ValidatePathToChild (SWidget *InChild)
 
bool IsParentValid () const
 
TSharedPtr< SWidgetGetParentWidget () const
 
TSharedPtr< SWidgetAdvanced_GetPaintParentWidget () const
 
SLATECORE_API FSlateRect CalculateCullingAndClippingRules (const FGeometry &AllottedGeometry, const FSlateRect &MyCullingRect, bool &bClipToBounds, bool &bAlwaysClip, bool &bIntersectClipBounds) const
 
bool HasAnyUpdateFlags (EWidgetUpdateFlags FlagsToCheck) const
 
TStatId GetStatID (bool bForDeferredUse=false) const
 
virtual SLATECORE_API float GetRelativeLayoutScale (const int32 ChildIndex, float LayoutScaleMultiplier) const
 
SLATECORE_API void ArrangeChildren (const FGeometry &AllottedGeometry, FArrangedChildren &ArrangedChildren, bool bUpdateAttributes=false) const
 
virtual FChildrenGetAllChildren ()
 
virtual SLATECORE_API bool SupportsKeyboardFocus () const
 
virtual SLATECORE_API bool HasKeyboardFocus () const
 
SLATECORE_API TOptional< EFocusCauseHasUserFocus (int32 UserIndex) const
 
SLATECORE_API TOptional< EFocusCauseHasAnyUserFocus () const
 
SLATECORE_API bool HasUserFocusedDescendants (int32 UserIndex) const
 
SLATECORE_API bool HasFocusedDescendants () const
 
SLATECORE_API bool HasAnyUserFocusOrFocusedDescendants () const
 
SLATECORE_API bool HasMouseCapture () const
 
SLATECORE_API bool HasMouseCaptureByUser (int32 UserIndex, TOptional< int32 > PointerIndex=TOptional< int32 >()) const
 
virtual SLATECORE_API void OnMouseCaptureLost (const FCaptureLostEvent &CaptureLostEvent)
 
void SetEnabled (TAttribute< bool > InEnabledState)
 
bool IsEnabled () const
 
virtual bool IsInteractable () const
 
virtual SLATECORE_API TSharedPtr< IToolTipGetToolTip ()
 
virtual SLATECORE_API void OnToolTipClosing ()
 
SLATECORE_API void EnableToolTipForceField (const bool bEnableForceField)
 
bool HasToolTipForceField () const
 
bool IsHovered () const
 
SLATECORE_API bool IsDirectlyHovered () const
 
EVisibility GetVisibility () const
 
bool IsVolatile () const
 
bool IsVolatileIndirectly () const
 
void ForceVolatile (bool bForce)
 
bool ShouldInvalidatePrepassDueToVolatility ()
 
SLATECORE_API void Invalidate (EInvalidateWidgetReason InvalidateReason)
 
void CacheVolatility ()
 
void MarkPrepassAsDirty ()
 
float GetRenderOpacity () const
 
void SetRenderOpacity (float InRenderOpacity)
 
void SetTag (FName InTag)
 
const TOptional< FSlateRenderTransform > & GetRenderTransform () const
 
TOptional< FSlateRenderTransformGetRenderTransformWithRespectToFlowDirection () const
 
UE::Slate::FDeprecateVector2DResult GetRenderTransformPivotWithRespectToFlowDirection () const
 
void SetRenderTransform (TAttribute< TOptional< FSlateRenderTransform > > InTransform)
 
UE::Slate::FDeprecateVector2DResult GetRenderTransformPivot () const
 
void SetRenderTransformPivot (TAttribute< FVector2D > InTransformPivot)
 
SLATECORE_API void SetClipping (EWidgetClipping InClipping)
 
EWidgetClipping GetClipping () const
 
SLATECORE_API void SetPixelSnapping (EWidgetPixelSnapping InPixelSnappingMethod)
 
EWidgetPixelSnapping GetPixelSnapping () const
 
void SetCullingBoundsExtension (const FMargin &InCullingBoundsExtension)
 
FMargin GetCullingBoundsExtension () const
 
void SetFlowDirectionPreference (EFlowDirectionPreference InFlowDirectionPreference)
 
EFlowDirectionPreference GetFlowDirectionPreference () const
 
SLATECORE_API void SetToolTipText (const TAttribute< FText > &ToolTipText)
 
SLATECORE_API void SetToolTipText (const FText &InToolTipText)
 
SLATECORE_API void SetToolTip (const TAttribute< TSharedPtr< IToolTip > > &InToolTip)
 
SLATECORE_API void SetCursor (const TAttribute< TOptional< EMouseCursor::Type > > &InCursor)
 
template<typename MetaDataType >
TSharedPtr< MetaDataType > GetMetaData () const
 
template<typename MetaDataType >
TArray< TSharedRef< MetaDataType > > GetAllMetaData () const
 
template<typename MetaDataType >
void AddMetadata (const TSharedRef< MetaDataType > &AddMe)
 
template<typename MetaDataType >
int32 RemoveMetaData (const TSharedRef< MetaDataType > &RemoveMe)
 
SLATECORE_API void SetOnMouseButtonDown (FPointerEventHandler EventHandler)
 
SLATECORE_API void SetOnMouseButtonUp (FPointerEventHandler EventHandler)
 
SLATECORE_API void SetOnMouseMove (FPointerEventHandler EventHandler)
 
SLATECORE_API void SetOnMouseDoubleClick (FPointerEventHandler EventHandler)
 
SLATECORE_API void SetOnMouseEnter (FNoReplyPointerEventHandler EventHandler)
 
SLATECORE_API void SetOnMouseLeave (FSimpleNoReplyPointerEventHandler EventHandler)
 
virtual SLATECORE_API FString ToString () const
 
SLATECORE_API FString GetTypeAsString () const
 
SLATECORE_API FName GetType () const
 
virtual SLATECORE_API FString GetReadableLocation () const
 
SLATECORE_API FName GetCreatedInLocation () const
 
virtual SLATECORE_API FName GetTag () const
 
virtual SLATECORE_API FSlateColor GetForegroundColor () const
 
virtual SLATECORE_API FSlateColor GetDisabledForegroundColor () const
 
SLATECORE_API const FGeometryGetCachedGeometry () const
 
SLATECORE_API const FGeometryGetTickSpaceGeometry () const
 
SLATECORE_API const FGeometryGetPaintSpaceGeometry () const
 
const TOptional< FSlateClippingState > & GetCurrentClippingState () const
 
virtual bool Advanced_IsWindow () const
 
virtual bool Advanced_IsInvalidationRoot () const
 
virtual const FSlateInvalidationRootAdvanced_AsInvalidationRoot () const
 
SLATECORE_API TSharedRef< FActiveTimerHandleRegisterActiveTimer (float TickPeriod, FWidgetActiveTimerDelegate TickFunction)
 
SLATECORE_API void UnRegisterActiveTimer (const TSharedRef< FActiveTimerHandle > &ActiveTimerHandle)
 
bool HasActiveTimers () const
 
- Public Member Functions inherited from FSlateControlledConstruction
 FSlateControlledConstruction ()=default
 
virtual ~FSlateControlledConstruction ()=default
 
virtual const FSlateWidgetClassDataGetWidgetClass () const =0
 
void operator delete (void *mem)
 
- Public Member Functions inherited from TSharedFromThis< SWidget >
TSharedRef< SWidget, Mode > AsShared ()
 
TSharedRef< SWidget const, Mode > AsShared () const
 
TSharedRef< SubobjectType, Mode > AsSharedSubobject (SubobjectType *SubobjectPtr) const
 
TWeakPtr< SWidget, Mode > AsWeak ()
 
TWeakPtr< SWidget const, Mode > AsWeak () const
 
TWeakPtr< SubobjectType, Mode > AsWeakSubobject (SubobjectType *SubobjectPtr) const
 
void UpdateWeakReferenceInternal (TSharedPtr< SharedPtrType, SharedPtrMode > const *InSharedPtr, OtherType *InObject) const
 
void UpdateWeakReferenceInternal (TSharedRef< SharedRefType, SharedPtrMode > const *InSharedRef, OtherType *InObject) const
 
UE_FORCEINLINE_HINT bool DoesSharedInstanceExist () const
 

Additional Inherited Members

- Static Public Member Functions inherited from FSlateControlledConstruction
static const FSlateWidgetClassDataStaticWidgetClass ()
 
- Protected Member Functions inherited from SWidget
void SetVolatilePrepass (bool bVolatile)
 
virtual bool CustomPrepass (float LayoutScaleMultiplier)
 
virtual SLATECORE_API void CacheDesiredSize (float InLayoutScaleMultiplier)
 
void SetHover (TAttribute< bool > InHovered)
 
bool IsChildWidgetCulled (const FSlateRect &, const FArrangedWidget &) const
 
SLATECORE_API void InvalidateChildRemovedFromTree (SWidget &Child)
 
bool Advanced_InvalidateVolatility ()
 
EFlowDirection ComputeFlowDirection () const
 
SLATECORE_API void SetDebugInfo (const ANSICHAR *InType, const ANSICHAR *InFile, int32 OnLine, size_t InAllocSize)
 
virtual SLATECORE_API TOptional< EMouseCursor::TypeGetCursor () const
 
SLATECORE_API SWidget ()
 
SLATECORE_API void SWidgetConstruct (const FSlateBaseNamedArgs &Args)
 
bool IsConstructed () const
 
SLATECORE_API bool FindChildGeometries (const FGeometry &MyGeometry, const TSet< TSharedRef< SWidget > > &WidgetsToFind, TMap< TSharedRef< SWidget >, FArrangedWidget > &OutResult) const
 
SLATECORE_API void FindChildGeometries_Helper (const FGeometry &MyGeometry, const TSet< TSharedRef< SWidget > > &WidgetsToFind, TMap< TSharedRef< SWidget >, FArrangedWidget > &OutResult) const
 
SLATECORE_API FGeometry FindChildGeometry (const FGeometry &MyGeometry, TSharedRef< SWidget > WidgetToFind) const
 
bool ShouldBeEnabled (bool InParentEnabled) const
 
virtual SLATECORE_API const FSlateBrushGetFocusBrush () const
 
virtual bool ComputeVolatility () const
 
virtual SLATECORE_API void OnClippingChanged ()
 
float GetPrepassLayoutScaleMultiplier () const
 
SLATECORE_API void Prepass_ChildLoop (float InLayoutScaleMultiplier, FChildren *MyChildren)
 
template<typename TargetValueType , typename SourceValueType >
bool SetAttribute (TAttribute< TargetValueType > &TargetValue, const TAttribute< SourceValueType > &SourceValue, EInvalidateWidgetReason BaseInvalidationReason)
 
TSlateAttributeRef< boolGetEnabledStateAttribute () const
 
TSlateAttributeRef< boolGetHoveredAttribute () const
 
TSlateAttributeRef< EVisibilityGetVisibilityAttribute () const
 
TSlateAttributeRef< TOptional< FSlateRenderTransform > > GetRenderTransformAttribute () const
 
TSlateAttributeRef< FVector2DGetRenderTransformPivotAttribute () const
 
virtual SLATECORE_API ~SWidget ()
 
- Protected Member Functions inherited from TSharedFromThis< SWidget >
 TSharedFromThis ()
 
 TSharedFromThis (TSharedFromThis const &)
 
UE_FORCEINLINE_HINT TSharedFromThisoperator= (TSharedFromThis const &)
 
 ~TSharedFromThis ()
 
- Static Protected Member Functions inherited from SWidget
static SLATECORE_API int32 FindChildUnderMouse (const FArrangedChildren &Children, const FPointerEvent &MouseEvent)
 
static SLATECORE_API int32 FindChildUnderPosition (const FArrangedChildren &Children, const UE::Slate::FDeprecateVector2DParameter &ArrangedSpacePosition)
 
static TAttribute< EVisibilityAccessWidgetVisibilityAttribute (const TSharedRef< SWidget > &Widget)
 
- Static Protected Member Functions inherited from TSharedFromThis< SWidget >
static UE_FORCEINLINE_HINT TSharedRef< OtherType, Mode > SharedThis (OtherType *ThisPtr)
 
static UE_FORCEINLINE_HINT TSharedRef< OtherType const, Mode > SharedThis (const OtherType *ThisPtr)
 
- Protected Attributes inherited from SWidget
uint8 bCanSupportFocus: 1
 
uint8 bCanHaveChildren: 1
 
uint8 bClippingProxy: 1
 
uint8 bHasCustomPrepass: 1
 
uint8 bHasRelativeLayoutScale: 1
 
uint8 bVolatilityAlwaysInvalidatesPrepass: 1
 
EWidgetClipping Clipping
 
EWidgetPixelSnapping PixelSnappingMethod
 
FMargin CullingBoundsExtension
 
float RenderOpacity
 

Detailed Description

A simple static text widget

Constructor & Destructor Documentation

◆ STextBlock()

STextBlock::STextBlock ( )

The text displayed in this text block Pointer to a style of the text block, which dictates the font, color, and shadow options. Sets the font used to draw the text Sets the brush used to strike through the text Text color and opacity Drop shadow offset in pixels Shadow color and opacity The color used to highlight the specified text The brush used to highlight the specified text Highlight this text in the text block Whether text wraps onto a new line when it's length exceeds this width; if this value is zero or negative, no wrapping occurs. Whether to wrap text automatically based on the widget's computed horizontal space. IMPORTANT: Using automatic wrapping can result in visual artifacts, as the the wrapped size will computed be at least one frame late! Consider using WrapTextAt instead. The initial desired size will not be clamped. This works best in cases where the text block's size is not affecting other widget's layout. The wrapping policy to use The transform policy to use The amount of blank space left around the edges of text area. The amount to scale each lines height by. Whether to leave extra space below the last line due to line height. How the text should be aligned with the margin. Minimum width that a text block should be Which text shaping method should we use? (unset to use the default returned by GetDefaultTextShapingMethod) Which text flow direction should we use? (unset to use the default returned by GetDefaultTextFlowDirection) The iterator to use to detect appropriate soft-wrapping points for lines (or null to use the default) Determines what happens to text that is clipped and doesn't fit within the clip rect for this widget If this is enabled, text shaping, wrapping, justification are disabled in favor of much faster text layout and measurement. This feature is suitable for numbers and text that changes often and impact performance. Enabling this setting may cause certain languages (such as Right to left languages) to not display properly. Called when this text is double clicked Constructor

◆ ~STextBlock()

STextBlock::~STextBlock ( )

Destructor

Member Function Documentation

◆ ComputeDesiredSize()

FVector2D STextBlock::ComputeDesiredSize ( float  ) const
overridevirtual

Overwritten from SWidget.

LeafWidgets should compute their DesiredSize based solely on their visual representation. There is no need to take child widgets into account as LeafWidgets have none by definition. For example, the TextBlock widget simply measures the area necessary to display its text with the given font and font size.

Implements SLeafWidget.

◆ Construct()

void STextBlock::Construct ( const FArguments &  InArgs)

Construct this widget

Parameters
InArgsThe declaration data for this widget

◆ GetColorAndOpacity()

FSlateColor STextBlock::GetColorAndOpacity ( ) const

Gets the current foreground color

◆ GetColorAndOpacityRef()

const FSlateColor & STextBlock::GetColorAndOpacityRef ( ) const

Gets the current foreground color as ref

◆ GetFont()

FSlateFontInfo STextBlock::GetFont ( ) const

Gets the current font

◆ GetFontRef()

const FSlateFontInfo & STextBlock::GetFontRef ( ) const

Gets the current font as ref

◆ GetHighlightColor()

FSlateColor STextBlock::GetHighlightColor ( ) const

Gets the current highlight color

◆ GetHighlightShape()

const FSlateBrush * STextBlock::GetHighlightShape ( ) const

Gets the current highlight shape

◆ GetMargin()

FMargin STextBlock::GetMargin ( ) const

Gets the current margin

◆ GetMinDesiredWidth()

float STextBlock::GetMinDesiredWidth ( ) const

Gets the current min desired width

◆ GetShadowColorAndOpacity()

FLinearColor STextBlock::GetShadowColorAndOpacity ( ) const

Gets the current shadow color and opacity

◆ GetShadowColorAndOpacityRef()

const FLinearColor & STextBlock::GetShadowColorAndOpacityRef ( ) const

Gets the current shadow color and opacity as ref

◆ GetShadowOffset()

FVector2f STextBlock::GetShadowOffset ( ) const

Gets the current shadow offset

◆ GetStrikeBrush()

const FSlateBrush * STextBlock::GetStrikeBrush ( ) const

Gets the current strike brush

◆ GetText()

const FText & STextBlock::GetText ( ) const
inline

Gets the text assigned to this text block

Returns
This text block's text string

◆ GetTransformPolicyImpl()

ETextTransformPolicy STextBlock::GetTransformPolicyImpl ( ) const

Get TransformPolicy attribute

◆ OnPaint()

int32 STextBlock::OnPaint ( const FPaintArgs Args,
const FGeometry AllottedGeometry,
const FSlateRect MyCullingRect,
FSlateWindowElementList OutDrawElements,
int32  LayerId,
const FWidgetStyle InWidgetStyle,
bool  bParentEnabled 
) const
overridevirtual

Overwritten from SWidget.

LeafWidgets provide a visual representation of themselves. They do so by adding DrawElement(s) to the OutDrawElements. DrawElements should have their positions set to absolute coordinates in Window space; for this purpose the Slate system provides the AllottedGeometry parameter. AllottedGeometry describes the space allocated for the visualization of this widget.

Whenever possible, LeafWidgets should avoid dealing with layout properties. See TextBlock for an example.

Implements SLeafWidget.

◆ SetApplyLineHeightToBottomLine()

void STextBlock::SetApplyLineHeightToBottomLine ( TAttribute< bool InApplyLineHeightToBottomLine)

See ApplyLineHeightToBottomLine attribute

◆ SetAutoWrapText()

void STextBlock::SetAutoWrapText ( TAttribute< bool InAutoWrapText)

See AutoWrapText attribute

◆ SetColorAndOpacity()

void STextBlock::SetColorAndOpacity ( TAttribute< FSlateColor InColorAndOpacity)

See ColorAndOpacity attribute

◆ SetFont()

void STextBlock::SetFont ( TAttribute< FSlateFontInfo InFont)

Sets the font used to draw the text

◆ SetHighlightColor()

void STextBlock::SetHighlightColor ( TAttribute< FLinearColor InHighlightColor)

See HighlightColor attribute

◆ SetHighlightShape()

void STextBlock::SetHighlightShape ( TAttribute< const FSlateBrush * >  InHighlightShape)

See HighlightShape attribute

◆ SetHighlightText()

void STextBlock::SetHighlightText ( TAttribute< FText InText)

Sets the highlight text for this text block

◆ SetJustification()

void STextBlock::SetJustification ( TAttribute< ETextJustify::Type InJustification)

See Justification attribute

◆ SetLineHeightPercentage()

void STextBlock::SetLineHeightPercentage ( TAttribute< float InLineHeightPercentage)

See LineHeightPercentage attribute

◆ SetMargin()

void STextBlock::SetMargin ( TAttribute< FMargin InMargin)

See Margin attribute

◆ SetMinDesiredWidth()

void STextBlock::SetMinDesiredWidth ( TAttribute< float InMinDesiredWidth)

See MinDesiredWidth attribute

◆ SetOverflowPolicy()

void STextBlock::SetOverflowPolicy ( TOptional< ETextOverflowPolicy InOverflowPolicy)

Sets the overflow policy for this text block

◆ SetShadowColorAndOpacity()

void STextBlock::SetShadowColorAndOpacity ( TAttribute< FLinearColor InShadowColorAndOpacity)

See ShadowColorAndOpacity attribute

◆ SetShadowOffset()

void STextBlock::SetShadowOffset ( TAttribute< FVector2D InShadowOffset)

See ShadowOffset attribute

◆ SetStrikeBrush()

void STextBlock::SetStrikeBrush ( TAttribute< const FSlateBrush * >  InStrikeBrush)

Sets the brush used to strike through the text

◆ SetText()

void STextBlock::SetText ( TAttribute< FText InText)

Sets the text for this text block

◆ SetTextFlowDirection()

void STextBlock::SetTextFlowDirection ( const TOptional< ETextFlowDirection > &  InTextFlowDirection)

See TextFlowDirection attribute

◆ SetTextShapingMethod()

void STextBlock::SetTextShapingMethod ( const TOptional< ETextShapingMethod > &  InTextShapingMethod)

See TextShapingMethod attribute

◆ SetTextStyle()

void STextBlock::SetTextStyle ( const FTextBlockStyle InTextStyle)

See TextStyle argument

◆ SetTransformPolicy()

void STextBlock::SetTransformPolicy ( TAttribute< ETextTransformPolicy InTransformPolicy)

Set TransformPolicy attribute

◆ SetWrappingPolicy()

void STextBlock::SetWrappingPolicy ( TAttribute< ETextWrappingPolicy InWrappingPolicy)

Set WrappingPolicy attribute

◆ SetWrapTextAt()

void STextBlock::SetWrapTextAt ( TAttribute< float InWrapTextAt)

See WrapTextAt attribute

◆ SLATE_BEGIN_ARGS()

STextBlock::SLATE_BEGIN_ARGS ( STextBlock  )
inline

Member Data Documentation

◆ bIsAttributeBoundTextBound

uint16 STextBlock::bIsAttributeBoundTextBound

◆ bIsAttributeColorAndOpacitySet

uint16 STextBlock::bIsAttributeColorAndOpacitySet

◆ bIsAttributeFontSet

uint16 STextBlock::bIsAttributeFontSet

◆ bIsAttributeHighlightColorSet

uint16 STextBlock::bIsAttributeHighlightColorSet

◆ bIsAttributeHighlightShapeSet

uint16 STextBlock::bIsAttributeHighlightShapeSet

◆ bIsAttributeShadowColorAndOpacitySet

uint16 STextBlock::bIsAttributeShadowColorAndOpacitySet

◆ bIsAttributeShadowOffsetSet

uint16 STextBlock::bIsAttributeShadowOffsetSet

◆ bIsAttributeStrikeBrushSet

uint16 STextBlock::bIsAttributeStrikeBrushSet

◆ bIsAttributeTransformPolicySet

uint16 STextBlock::bIsAttributeTransformPolicySet

◆ bIsAttributeWrapTextAtSet

uint16 STextBlock::bIsAttributeWrapTextAtSet

◆ bTextLayoutUpdateDesiredSize

uint16 STextBlock::bTextLayoutUpdateDesiredSize
mutable

◆ bTextLayoutUpdateTextStyle

uint16 STextBlock::bTextLayoutUpdateTextStyle
mutable

◆ Union_Flags

uint16 STextBlock::Union_Flags

The documentation for this class was generated from the following files: