UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
SWidget Class Referenceabstract

#include <SWidget.h>

+ Inheritance diagram for SWidget:

Classes

struct  TSlateAttribute
 
struct  TSlateAttribute< FText, EInvalidateWidgetReason::None >
 
struct  TSlateAttribute< FText, InInvalidationReasonValue >
 
struct  TSlateAttributeRef
 
struct  TSlateAttributeRef< FText, EInvalidateWidgetReason::None >
 
struct  TSlateAttributeRef< FText, InInvalidationReasonValue >
 
struct  TSlateManagedAttribute
 
struct  TSlateManagedAttribute< FText, EInvalidateWidgetReason::None >
 
struct  TSlateManagedAttribute< FText, InInvalidationReasonValue >
 

Public Member Functions

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 FChildrenGetChildren ()=0
 
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
 
virtual SLATECORE_API void SetVisibility (TAttribute< EVisibility > InVisibility)
 
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
 

Protected Member Functions

void SetVolatilePrepass (bool bVolatile)
 
virtual bool CustomPrepass (float LayoutScaleMultiplier)
 
virtual SLATECORE_API void CacheDesiredSize (float InLayoutScaleMultiplier)
 
virtual FVector2D ComputeDesiredSize (float LayoutScaleMultiplier) const =0
 
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

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

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
 

Friends

class FWidgetProxy
 
class FSlateAttributeMetaData
 
class FSlateInvalidationRoot
 
class FSlateInvalidationWidgetList
 
class FSlateWindowElementList
 
class SWindow
 
class FSlateTrace
 
struct FSlateCachedElementList
 
template<class WidgetType , typename RequiredArgsPayloadType >
struct TSlateDecl
 

Additional Inherited Members

- Static Public Member Functions inherited from FSlateControlledConstruction
static const FSlateWidgetClassDataStaticWidgetClass ()
 

Detailed Description

HOW TO DEPRECATE SLATE_ATTRIBUTES

SLATE_ATTRIBUTE(ECheckBoxState, IsChecked)

UE_DEPRECATED(4.xx, "Please use IsChecked(TAttribute<ECheckBoxState>)") FArguments& IsChecked(bool InIsChecked) { _IsChecked = InIsChecked ? ECheckBoxState::Checked : ECheckBoxState::Unchecked; return Me(); }

// This version would prevent ambiguous conversions. FArguments& IsChecked(ECheckBoxState InIsChecked) { _IsChecked = InIsChecked; return Me(); } Abstract base class for Slate widgets.

STOP. DO NOT INHERIT DIRECTLY FROM WIDGET!

Inheritance: Widget is not meant to be directly inherited. Instead consider inheriting from LeafWidget or Panel, which represent intended use cases and provide a succinct set of methods which to override.

SWidget is the base class for all interactive Slate entities. SWidget's public interface describes everything that a Widget can do and is fairly complex as a result.

Events: Events in Slate are implemented as virtual functions that the Slate system will call on a Widget in order to notify the Widget about an important occurrence (e.g. a key press) or querying the Widget regarding some information (e.g. what mouse cursor should be displayed).

Widget provides a default implementation for most events; the default implementation does nothing and does not handle the event.

Some events are able to reply to the system by returning an FReply, FCursorReply, or similar object.

Examples
/work/Engine/Source/Runtime/UMG/Public/Components/Widget.h.

Constructor & Destructor Documentation

◆ SWidget()

SWidget::SWidget ( )
protected

Hidden default constructor.

Use SNew(WidgetClassName) to instantiate new widgets.

See also
SNew

◆ ~SWidget()

PRAGMA_DISABLE_DEPRECATION_WARNINGS SWidget::~SWidget ( )
protectedvirtual

Dtor ensures that active timer handles are UnRegistered with the SlateApplication.

Member Function Documentation

◆ AccessWidgetVisibilityAttribute()

static TAttribute< EVisibility > SWidget::AccessWidgetVisibilityAttribute ( const TSharedRef< SWidget > &  Widget)
inlinestaticprotected

Protected static helper to allow widgets to access the visibility attribute of other widgets directly

Parameters
WidgetThe widget to get the visibility attribute of

◆ AddMetadata()

template<typename MetaDataType >
void SWidget::AddMetadata ( const TSharedRef< MetaDataType > &  AddMe)
inline

Add metadata to this widget.

Parameters
AddMethe metadata to add to the widget.

◆ Advanced_AsInvalidationRoot()

virtual const FSlateInvalidationRoot * SWidget::Advanced_AsInvalidationRoot ( ) const
inlinevirtual

Reimplemented in SInvalidationPanel, SWindow, and SRetainerWidget.

◆ Advanced_GetPaintParentWidget()

TSharedPtr< SWidget > SWidget::Advanced_GetPaintParentWidget ( ) const
inline

◆ Advanced_InvalidateVolatility()

bool SWidget::Advanced_InvalidateVolatility ( )
inlineprotected

Recalculates and caches volatility and returns 'true' if the volatility changed.

◆ Advanced_IsInvalidationRoot()

virtual bool SWidget::Advanced_IsInvalidationRoot ( ) const
inlinevirtual

◆ Advanced_IsWindow()

virtual bool SWidget::Advanced_IsWindow ( ) const
inlinevirtual

Is this widget derivative of SWindow

Reimplemented in SWindow.

◆ ArrangeChildren()

void SWidget::ArrangeChildren ( const FGeometry AllottedGeometry,
FArrangedChildren ArrangedChildren,
bool  bUpdateAttributes = false 
) const

Non-virtual entry point for arrange children. ensures common work is executed before calling the virtual ArrangeChildren function. Compute the Geometry of all the children and add populate the ArrangedChildren list with their values. Each type of Layout panel should arrange children based on desired behavior.

Optionally, update the collapsed attributes (attributes that affect the visibility) of the children before executing the virtual ArrangeChildren function. The visibility attribute is updated once per frame (see SlatePrepass). Use the option when you are calling ArrangeChildren outside of the regular SWidget Paint/Tick.

Parameters
AllottedGeometryThe geometry allotted for this widget by its parent.
ArrangedChildrenThe array to which to add the WidgetGeometries that represent the arranged children.
bUpdateAttributesUpdate the collapsed attributes.

◆ AssignParentWidget()

void SWidget::AssignParentWidget ( TSharedPtr< SWidget InParent)

◆ CacheDesiredSize()

void SWidget::CacheDesiredSize ( float  InLayoutScaleMultiplier)
protectedvirtual

The system calls this method. It performs a breadth-first traversal of every visible widget and asks each widget to cache how big it needs to be in order to present all of its content.

Reimplemented in SEditableText, SGridPanel, and SResponsiveGridPanel.

◆ CacheVolatility()

void SWidget::CacheVolatility ( )
inline

Recalculates volatility of the widget and caches the result. Should be called any time anything examined by your implementation of ComputeVolatility is changed.

◆ CalculateCullingAndClippingRules()

FSlateRect SWidget::CalculateCullingAndClippingRules ( const FGeometry AllottedGeometry,
const FSlateRect MyCullingRect,
bool bClipToBounds,
bool bAlwaysClip,
bool bIntersectClipBounds 
) const

Calculates what if any clipping state changes need to happen when drawing this widget.

Returns
the culling rect that should be used going forward.

◆ ComputeDesiredSize()

virtual FVector2D SWidget::ComputeDesiredSize ( float  LayoutScaleMultiplier) const
protectedpure virtual

Compute the ideal size necessary to display this widget. For aggregate widgets (e.g. panels) this size should include the size necessary to show all of its children. CacheDesiredSize() guarantees that the size of descendants is computed and cached before that of the parents, so it is safe to call GetDesiredSize() for any children while implementing this method.

Note that ComputeDesiredSize() is meant as an aide to the developer. It is NOT meant to be very robust in many cases. If your widget is simulating a bouncing ball, you should just return a reasonable size; e.g. 160x160. Let the programmer set up a reasonable rule of resizing the bouncy ball simulation.

Parameters
LayoutScaleMultiplierThis parameter is safe to ignore for almost all widgets; only really affects text measuring.
Returns
The desired size.

Implemented in SScaleBox, SSafeZone, STimecode, SDebugCanvas, STabDrawerTextBlock, SPrioritizedWrapBox, SComplexGradient, SEditableText, SVirtualWindow, SPostBufferUpdate, SRetainerWidget, SColorValueSlider, SScrollBarTrack, UE::ColorGrading::SColorGradingWheel, SRadialSlider, SColorSlider, SCustomPaintWidget, SDockingCross, SDockingTabWell, SClippingHorizontalBox, SClippingVerticalBox, SUniformToolbarPanel, SListPanel, SColorSpectrum, SColorWheel, SCircularThrobber, SButton, SSlider, SVirtualJoystick, SVirtualKeyboardEntry, SBorder, SBox, SConstraintCanvas, SDPIScaler, SExpandableArea, SFxWidget, SGridPanel, SLinkedBox, SRadialBox, SResponsiveGridPanel, SScrollPanel, SSeparator, SSpacer, SSplitter, SUniformGridPanel, SUniformWrapPanel, SWidgetSwitcher, SWindowTitleBarArea, SWrapBox, SProgressBar, SCanvas, SViewport, SWeakWidget, STextBlock, SImage, SBoxPanel, SCompoundWidget, SOverlay, SMeshWidget, SWorldWidgetScreenLayer, SNullWidgetContent, and SPanel.

◆ ComputeFlowDirection()

EFlowDirection SWidget::ComputeFlowDirection ( ) const
inlineprotected

Establishes a new flow direction potentially, if this widget has a particular preference for it and all its children.

◆ ComputeVolatility()

virtual bool SWidget::ComputeVolatility ( ) const
inlineprotectedvirtual

Recomputes the volatility of the widget. If you have additional state you automatically want to make the widget volatile, you should sample that information here.

Reimplemented in SSpinningImage, SThrobber, SCircularThrobber, SEditableText, SScrollBox, SWidgetSwitcher, SProgressBar, STableViewBase, STimecode, and SNullWidgetContent.

◆ ConditionallyDetatchParentWidget()

bool SWidget::ConditionallyDetatchParentWidget ( SWidget InExpectedParent)

◆ CustomPrepass()

virtual bool SWidget::CustomPrepass ( float  LayoutScaleMultiplier)
inlineprotectedvirtual

◆ EnableToolTipForceField()

void SWidget::EnableToolTipForceField ( const bool  bEnableForceField)

Sets whether this widget is a "tool tip force field". That is, tool-tips should never spawn over the area occupied by this widget, and will instead be repelled to an outside edge

Parameters
bEnableForceFieldTrue to enable tool tip force field for this widget

◆ FindChildGeometries()

bool SWidget::FindChildGeometries ( const FGeometry MyGeometry,
const TSet< TSharedRef< SWidget > > &  WidgetsToFind,
TMap< TSharedRef< SWidget >, FArrangedWidget > &  OutResult 
) const
protected

Find the geometry of a descendant widget. This method assumes that WidgetsToFind are a descendants of this widget. Note that not all widgets are guaranteed to be found; OutResult will contain null entries for missing widgets.

Parameters
MyGeometryThe geometry of this widget.
WidgetsToFindThe widgets whose geometries we wish to discover.
OutResultA map of widget references to their respective geometries.
Returns
True if all the WidgetGeometries were found. False otherwise.

◆ FindChildGeometries_Helper()

void SWidget::FindChildGeometries_Helper ( const FGeometry MyGeometry,
const TSet< TSharedRef< SWidget > > &  WidgetsToFind,
TMap< TSharedRef< SWidget >, FArrangedWidget > &  OutResult 
) const
protected

Actual implementation of FindChildGeometries.

Parameters
MyGeometryThe geometry of this widget.
WidgetsToFindThe widgets whose geometries we wish to discover.
OutResultA map of widget references to their respective geometries.

◆ FindChildGeometry()

FGeometry SWidget::FindChildGeometry ( const FGeometry MyGeometry,
TSharedRef< SWidget WidgetToFind 
) const
protected

Find the geometry of a descendant widget. This method assumes that WidgetToFind is a descendant of this widget.

Parameters
MyGeometryThe geometry of this widget.
WidgetToFindThe widget whose geometry we wish to discover.
Returns
the geometry of WidgetToFind.

◆ FindChildUnderMouse()

int32 SWidget::FindChildUnderMouse ( const FArrangedChildren Children,
const FPointerEvent MouseEvent 
)
staticprotected
Returns
The index of the child that the mouse is currently hovering

◆ FindChildUnderPosition()

int32 SWidget::FindChildUnderPosition ( const FArrangedChildren Children,
const UE::Slate::FDeprecateVector2DParameter ArrangedSpacePosition 
)
staticprotected
Returns
The index of the child that is under the specified position

◆ ForceVolatile()

void SWidget::ForceVolatile ( bool  bForce)
inline

Should this widget always appear as volatile for any layout caching host widget. A volatile widget's geometry and layout data will never be cached, and neither will any children.

Parameters
bForceshould we force the widget to be volatile?

◆ GetAllChildren()

virtual FChildren * SWidget::GetAllChildren ( )
inlinevirtual

Returns the children (if any) of this widget that are used by the invalidation system. This is used by the FastPath system to generate the correct information for every widget.

Note
Prefer GetChildren. Some widget may hide widget from you.
Should be name GetFastPathChildren or GetInvalidationChildren

Reimplemented in SListPanel, and SInvalidationPanel.

◆ GetAllMetaData()

template<typename MetaDataType >
TArray< TSharedRef< MetaDataType > > SWidget::GetAllMetaData ( ) const
inline

Get all metadata of the type provided.

Returns
all the metadata found of the specified type.

◆ GetCachedGeometry()

const FGeometry & SWidget::GetCachedGeometry ( ) const

◆ GetCanTick()

bool SWidget::GetCanTick ( ) const
inline

◆ GetChildren()

virtual FChildren * SWidget::GetChildren ( )
pure virtual

Returns the useful children (if any) of this widget. Some widget type may hide widget if they are needed by the system. Allows for iteration over the Widget's children regardless of how they are actually stored.

Note
Should be renamed to GetVisibleChildren (not ALL children will be returned in all cases).

Implemented in SScrollBarTrack, SDockingTabWell, SPrioritizedWrapBox, SUniformToolbarPanel, SListPanel, SEditableText, SBox, SConstraintCanvas, SDPIScaler, SGridPanel, SRadialBox, SResponsiveGridPanel, SScrollPanel, SSplitter, SUniformGridPanel, SUniformWrapPanel, SWidgetSwitcher, SWindowTitleBarArea, SWrapBox, SCanvas, SInvalidationPanel, SWeakWidget, SBoxPanel, SCompoundWidget, SOverlay, SRetainerWidget, SNullWidgetContent, and SPanel.

◆ GetClipping()

EWidgetClipping SWidget::GetClipping ( ) const
inline
Returns
The current clipping rules for this widget.

◆ GetCreatedInLocation()

FName SWidget::GetCreatedInLocation ( ) const
Returns
An FName of the widget's code location (full path with number == line number of the file)

◆ GetCullingBoundsExtension()

FMargin SWidget::GetCullingBoundsExtension ( ) const
inline
Returns
CullingBoundsExtension

◆ GetCurrentClippingState()

const TOptional< FSlateClippingState > & SWidget::GetCurrentClippingState ( ) const
inline

Returns the clipping state to clip this widget against its parent

◆ GetCursor()

TOptional< EMouseCursor::Type > SWidget::GetCursor ( ) const
protectedvirtual

The cursor to show when the mouse is hovering over this widget.

◆ GetDesiredSize()

UE::Slate::FDeprecateVector2DResult SWidget::GetDesiredSize ( ) const
Returns
the DesiredSize that was computed the last time CacheDesiredSize() was called.

◆ GetDisabledForegroundColor()

FSlateColor SWidget::GetDisabledForegroundColor ( ) const
virtual
Returns
the Foreground color that this widget sets when this widget or any of its ancestors are disabled; unset options if the widget does not set a foreground color

Reimplemented in SButton.

◆ GetEnabledStateAttribute()

TSlateAttributeRef< bool > SWidget::GetEnabledStateAttribute ( ) const
inlineprotected
Returns
an attribute reference of EnabledStateAttribute

◆ GetFlowDirectionPreference()

EFlowDirectionPreference SWidget::GetFlowDirectionPreference ( ) const
inline

Gets the desired flow direction for the layout.

◆ GetFocusBrush()

const FSlateBrush * SWidget::GetFocusBrush ( ) const
protectedvirtual
Returns
a brush to draw focus, nullptr if no focus drawing is desired

Reimplemented in SEditableText.

◆ GetForegroundColor()

FSlateColor SWidget::GetForegroundColor ( ) const
virtual
Returns
the Foreground color that this widget sets; unset options if the widget does not set a foreground color

Reimplemented in STabDrawerButton, SDockTab, SCheckBox, SButton, and SCompoundWidget.

◆ GetHoveredAttribute()

TSlateAttributeRef< bool > SWidget::GetHoveredAttribute ( ) const
inlineprotected
Returns
an attribute reference of HoveredAttribute

◆ GetMetaData()

template<typename MetaDataType >
TSharedPtr< MetaDataType > SWidget::GetMetaData ( ) const
inline

Get the metadata of the type provided.

Returns
the first metadata of the type supplied that we encounter

◆ GetPaintSpaceGeometry()

const FGeometry & SWidget::GetPaintSpaceGeometry ( ) const

Gets the last geometry used to Tick the widget. This data may not exist yet if this call happens prior to the widget having been ticked/painted, or it may be out of date, or a frame behind.

◆ GetParentWidget()

TSharedPtr< SWidget > SWidget::GetParentWidget ( ) const
inline

◆ GetPersistentState()

const FSlateWidgetPersistentState & SWidget::GetPersistentState ( ) const
inline

◆ GetPixelSnapping()

EWidgetPixelSnapping SWidget::GetPixelSnapping ( ) const
inline
Returns
The current pixel snapping rules for this widget.

◆ GetPrepassLayoutScaleMultiplier()

float SWidget::GetPrepassLayoutScaleMultiplier ( ) const
inlineprotected

◆ GetProxyHandle()

const FWidgetProxyHandle SWidget::GetProxyHandle ( ) const
inline

◆ GetReadableLocation()

FString SWidget::GetReadableLocation ( ) const
virtual
Returns
A String of the widget's code location in readable format "BaseFileName(LineNumber)"

◆ GetRelativeLayoutScale()

float SWidget::GetRelativeLayoutScale ( const int32  ChildIndex,
float  LayoutScaleMultiplier 
) const
virtual

What is the Child's scale relative to this widget.

Reimplemented in SDPIScaler, and SScaleBox.

◆ GetRenderOpacity()

float SWidget::GetRenderOpacity ( ) const
inline
Returns
the render opacity of the widget.

◆ GetRenderTransform()

const TOptional< FSlateRenderTransform > & SWidget::GetRenderTransform ( ) const
inline
Returns
the render transform of the widget.

◆ GetRenderTransformAttribute()

TSlateAttributeRef< TOptional< FSlateRenderTransform > > SWidget::GetRenderTransformAttribute ( ) const
inlineprotected
Returns
an attribute reference of RenderTransformAttribute

◆ GetRenderTransformPivot()

UE::Slate::FDeprecateVector2DResult SWidget::GetRenderTransformPivot ( ) const
inline
Returns
the pivot point of the render transform.

◆ GetRenderTransformPivotAttribute()

TSlateAttributeRef< FVector2D > SWidget::GetRenderTransformPivotAttribute ( ) const
inlineprotected
Returns
an attribute reference of RenderTransformPivotAttribute

◆ GetRenderTransformPivotWithRespectToFlowDirection()

UE::Slate::FDeprecateVector2DResult SWidget::GetRenderTransformPivotWithRespectToFlowDirection ( ) const
inline

◆ GetRenderTransformWithRespectToFlowDirection()

TOptional< FSlateRenderTransform > SWidget::GetRenderTransformWithRespectToFlowDirection ( ) const
inline

◆ GetStatID()

TStatId SWidget::GetStatID ( bool  bForDeferredUse = false) const
inline

◆ GetTag()

FName SWidget::GetTag ( ) const
virtual
Returns
The name this widget was tagged with

◆ GetTickSpaceGeometry()

const FGeometry & SWidget::GetTickSpaceGeometry ( ) const

Gets the last geometry used to Tick the widget. This data may not exist yet if this call happens prior to the widget having been ticked/painted, or it may be out of date, or a frame behind.

We recommend not to use this data unless there's no other way to solve your problem. Normally in Slate we try and handle these issues by making a dependent widget part of the hierarchy, as to avoid frame behind or what are referred to as hysteresis problems, both caused by depending on geometry from the previous frame being used to advise how to layout a dependent object the current frame.

◆ GetToolTip()

TSharedPtr< IToolTip > SWidget::GetToolTip ( )
virtual
Returns
The tool tip associated with this widget; Invalid reference if there is not one

◆ GetType()

FName SWidget::GetType ( ) const
Returns
The widget's type as an FName ID

◆ GetTypeAsString()

FString SWidget::GetTypeAsString ( ) const
Returns
A String of the widget's type

◆ GetVisibility()

EVisibility SWidget::GetVisibility ( ) const
inline
Returns
is this widget visible, hidden or collapsed.
Note
this widget can be visible but if a parent is hidden or collapsed, it would not show on screen.

◆ GetVisibilityAttribute()

TSlateAttributeRef< EVisibility > SWidget::GetVisibilityAttribute ( ) const
inlineprotected
Returns
an attribute reference of VisibilityAttribute

◆ GetWindowZoneOverride()

EWindowZone::Type SWidget::GetWindowZoneOverride ( ) const
virtual

Called when the mouse is moved over the widget's window, to determine if we should report whether OS-specific features should be active at this location (such as a title bar grip, system menu, etc.) Usually you should not need to override this function.

Returns
The window "zone" the cursor is over, or EWindowZone::Unspecified if no special behavior is needed

Reimplemented in SDockingTabStack, SDockingTabWell, SWindowTitleBar, and SWindowTitleBarArea.

◆ HasActiveTimers()

bool SWidget::HasActiveTimers ( ) const
inline

Does this widget have any active timers?

◆ HasAnyUpdateFlags()

bool SWidget::HasAnyUpdateFlags ( EWidgetUpdateFlags  FlagsToCheck) const
inline

◆ HasAnyUserFocus()

TOptional< EFocusCause > SWidget::HasAnyUserFocus ( ) const

Gets whether or not any users have this widget focused, and if so the type of focus (first one found).

Returns
The optional will be set with the focus cause, if unset this widget doesn't have focus.

◆ HasAnyUserFocusOrFocusedDescendants()

bool SWidget::HasAnyUserFocusOrFocusedDescendants ( ) const
Returns
whether or not any users have this widget focused, or any descendant focused.

◆ HasFocusedDescendants()

bool SWidget::HasFocusedDescendants ( ) const
Returns
Whether this widget has any descendants with keyboard focus

◆ HasKeyboardFocus()

bool SWidget::HasKeyboardFocus ( ) const
virtual

Checks to see if this widget currently has the keyboard focus

Returns
True if this widget has keyboard focus

Reimplemented in SEditableTextBox, SSpinBox< NumericType >, and SSpinBox< float >.

◆ HasMouseCapture()

bool SWidget::HasMouseCapture ( ) const

Checks to see if this widget is the current mouse captor

Returns
True if this widget has captured the mouse

◆ HasMouseCaptureByUser()

bool SWidget::HasMouseCaptureByUser ( int32  UserIndex,
TOptional< int32 PointerIndex = TOptional<int32>() 
) const

Checks to see if this widget has mouse capture from the provided user.

Returns
True if this widget has captured the mouse

◆ HasRegisteredSlateAttribute()

bool SWidget::HasRegisteredSlateAttribute ( ) const
inline
Returns
true if the widgets has any bound slate attribute.

◆ HasToolTipForceField()

bool SWidget::HasToolTipForceField ( ) const
inline
Returns
True if a tool tip force field is active on this widget

◆ HasUserFocus()

TOptional< EFocusCause > SWidget::HasUserFocus ( int32  UserIndex) const

Gets whether or not the specified users has this widget focused, and if so the type of focus.

Returns
The optional will be set with the focus cause, if unset this widget doesn't have focus.

◆ HasUserFocusedDescendants()

bool SWidget::HasUserFocusedDescendants ( int32  UserIndex) const

Gets whether or not the specified users has this widget or any descendant focused.

Returns
The optional will be set with the focus cause, if unset this widget doesn't have focus.

◆ Invalidate()

void SWidget::Invalidate ( EInvalidateWidgetReason  InvalidateReason)

Invalidates the widget from the view of a layout caching widget that may own this widget. will force the owning widget to redraw and cache children on the next paint pass.

◆ InvalidateChildRemovedFromTree()

void SWidget::InvalidateChildRemovedFromTree ( SWidget Child)
protected

Called when a child is removed from the tree parent's widget tree either by removing it from a slot. This can also be called manually if you've got some non-slot based what of no longer reporting children An example of a widget that needs manual calling is SWidgetSwitcher. It keeps all its children but only arranges and paints a single "active" one. Once a child becomes inactive, its cached data should be removed.

◆ IsAttributesUpdatesEnabled()

bool SWidget::IsAttributesUpdatesEnabled ( ) const
inline
Returns
true if the widgets will update its registered slate attributes automatically or they need to be updated manually.

◆ IsChildWidgetCulled()

bool SWidget::IsChildWidgetCulled ( const FSlateRect ,
const FArrangedWidget  
) const
inlineprotected

◆ IsConstructed()

bool SWidget::IsConstructed ( ) const
inlineprotected

Is the widget construction completed (did we called and returned from the Construct() function)

◆ IsDirectlyHovered()

bool SWidget::IsDirectlyHovered ( ) const
Returns
True if this widget is directly hovered

◆ IsEnabled()

bool SWidget::IsEnabled ( ) const
inline
Returns
Whether or not this widget is enabled

◆ IsHovered()

bool SWidget::IsHovered ( ) const
inline
Returns
True if this widget hovered
Note
IsHovered used to be virtual. Use SetHover to assign an attribute if you need to override the default behavior.

◆ IsInteractable()

virtual bool SWidget::IsInteractable ( ) const
inlinevirtual
Returns
Is this widget interactive or not? Defaults to false

Reimplemented in SRadialSlider, SButton, SCheckBox, SEditableText, and SSlider.

◆ IsParentValid()

bool SWidget::IsParentValid ( ) const
inline

◆ IsVolatile()

bool SWidget::IsVolatile ( ) const
inline

Whether or not a widget is volatile and will update every frame without being invalidated

◆ IsVolatileIndirectly()

bool SWidget::IsVolatileIndirectly ( ) const
inline

This widget is volatile because its parent or some ancestor is volatile

Note
only valid if the widget is contained by an InvalidationRoot (the proxy is valid).

◆ MarkPrepassAsDirty()

void SWidget::MarkPrepassAsDirty ( )
inline

In fast path, if the widget is mark, do a full Prepass on its next update to calculate it's desired size. This does not invalidate the widget.

◆ NeedsPrepass()

bool SWidget::NeedsPrepass ( ) const
inline

◆ OnAnalogValueChanged()

FReply SWidget::OnAnalogValueChanged ( const FGeometry MyGeometry,
const FAnalogInputEvent InAnalogInputEvent 
)
virtual

Called when an analog value changes on a button that supports analog

Parameters
MyGeometryThe Geometry of the widget receiving the event
InAnalogInputEventAnalog input event
Returns
Returns whether the event was handled, along with other possible actions

Reimplemented in SScrollBox, and SViewport.

◆ OnClippingChanged()

void SWidget::OnClippingChanged ( )
protectedvirtual

Called when clipping is changed. Should be used to forward clipping states onto potentially hidden children that actually are responsible for clipping the content.

Reimplemented in SScrollBox, and STableViewBase.

◆ OnCursorQuery()

FCursorReply SWidget::OnCursorQuery ( const FGeometry MyGeometry,
const FPointerEvent CursorEvent 
) const
virtual

The system asks each widget under the mouse to provide a cursor. This event is bubbled.

Returns
FCursorReply::Unhandled() if the event is not handled; return FCursorReply::Cursor() otherwise.

Reimplemented in UE::ColorGrading::SColorGradingComponentSpinBox, SEyeDropperButton, SColorSpectrum, SColorWheel, SEditableText, SHyperlink, SSpinBox< NumericType >, SSpinBox< float >, SScrollBox, SSplitter, SViewport, STableViewBase, and SWindow.

◆ OnDragDetected()

FReply SWidget::OnDragDetected ( const FGeometry MyGeometry,
const FPointerEvent MouseEvent 
)
virtual

Called when Slate detects that a widget started to be dragged. Usage: A widget can ask Slate to detect a drag. OnMouseDown() reply with FReply::Handled().DetectDrag( SharedThis(this) ). Slate will either send an OnDragDetected() event or do nothing. If the user releases a mouse button or leaves the widget before a drag is triggered (maybe user started at the very edge) then no event will be sent.

Parameters
InMyGeometryWidget geometry
InMouseEventMouseMove that triggered the drag

Reimplemented in SDockTab, SButton, STableRow< ItemType >, STableRow< OptionType >, STableRow< TSharedPtr< FRTInfo > >, STableRow< TSharedPtr< FTestData > >, STableRow< TSharedPtr< OptionType > >, SDragAndDropVerticalBox, and SObjectTableRow< ItemType >.

◆ OnDragEnter()

void SWidget::OnDragEnter ( const FGeometry MyGeometry,
const FDragDropEvent DragDropEvent 
)
virtual

Called during drag and drop when the drag enters a widget.

Enter/Leave events in slate are meant as lightweight notifications. So we do not want to capture mouse or set focus in response to these. However, OnDragEnter must also support external APIs (e.g. OLE Drag/Drop) Those require that we let them know whether we can handle the content being dragged OnDragEnter.

The concession is to return a can_handled/cannot_handle boolean rather than a full FReply.

Parameters
MyGeometryThe geometry of the widget receiving the event.
DragDropEventThe drag and drop event.
Returns
A reply that indicated whether the contents of the DragDropEvent can potentially be processed by this widget.

Reimplemented in SDockingArea, SDockingTabWell, SDockingTarget, SMultiBlockBaseWidget, SDockTab, SObjectTableRow< ItemType >, SButton, STableRow< ItemType >, STableRow< OptionType >, STableRow< TSharedPtr< FRTInfo > >, STableRow< TSharedPtr< FTestData > >, STableRow< TSharedPtr< OptionType > >, and SDragAndDropVerticalBox.

◆ OnDragLeave()

void SWidget::OnDragLeave ( const FDragDropEvent DragDropEvent)
virtual

◆ OnDragOver()

FReply SWidget::OnDragOver ( const FGeometry MyGeometry,
const FDragDropEvent DragDropEvent 
)
virtual

Called during drag and drop when the the mouse is being dragged over a widget.

Parameters
MyGeometryThe geometry of the widget receiving the event.
DragDropEventThe drag and drop event.
Returns
A reply that indicated whether this event was handled.

Reimplemented in SDockingCross, SDockingTabStack, SDockingTabWell, SMultiBlockBaseWidget, SMultiBoxWidget, SButton, SEditableText, STableRow< ItemType >, STableRow< OptionType >, STableRow< TSharedPtr< FRTInfo > >, STableRow< TSharedPtr< FTestData > >, STableRow< TSharedPtr< OptionType > >, SDragAndDropVerticalBox, and SObjectTableRow< ItemType >.

◆ OnDrop()

FReply SWidget::OnDrop ( const FGeometry MyGeometry,
const FDragDropEvent DragDropEvent 
)
virtual

Called when the user is dropping something onto a widget; terminates drag and drop.

Parameters
MyGeometryThe geometry of the widget receiving the event.
DragDropEventThe drag and drop event.
Returns
A reply that indicated whether this event was handled.

Reimplemented in SDockingArea, SDockingCross, SDockingTabStack, SDockingTabWell, SDockingTarget, SMultiBlockBaseWidget, SMultiBoxWidget, SDockTab, SButton, SEditableText, STableRow< ItemType >, STableRow< OptionType >, STableRow< TSharedPtr< FRTInfo > >, STableRow< TSharedPtr< FTestData > >, STableRow< TSharedPtr< OptionType > >, SDragAndDropVerticalBox, and SObjectTableRow< ItemType >.

◆ OnFinishedKeyInput()

void SWidget::OnFinishedKeyInput ( )
virtual

All the key (keyboard, gamepay, joystick, etc.) input from this frame has been routed. This is a widget's chance to act on any accumulated data.

◆ OnFinishedPointerInput()

void SWidget::OnFinishedPointerInput ( )
virtual

All the pointer (mouse, touch, stylus, etc.) events from this frame have been routed. This is a widget's chance to act on any accumulated data.

Reimplemented in SViewport.

◆ OnFocusChanging()

void SWidget::OnFocusChanging ( const FWeakWidgetPath PreviousFocusPath,
const FWidgetPath NewWidgetPath,
const FFocusEvent InFocusEvent 
)
virtual

Called whenever a focus path is changing on all the widgets within the old and new focus paths

Reimplemented in MenuStackInternal::SMenuContentWrapper, SDockingTabStack, SMultiBoxWidget, and SScrollBox.

◆ OnFocusLost()

void SWidget::OnFocusLost ( const FFocusEvent InFocusEvent)
virtual

Called when this widget loses focus. This event does not bubble.

Parameters
InFocusEventThe FocusEvent

Reimplemented in SRadialSlider, SButton, SEditableText, SInputKeySelector, SSlider, SSuggestionTextBox, SVirtualKeyboardEntry, SScrollBox, SViewport, and STableViewBase.

◆ OnFocusReceived()

FReply SWidget::OnFocusReceived ( const FGeometry MyGeometry,
const FFocusEvent InFocusEvent 
)
virtual

Called when focus is given to this widget. This event does not bubble.

Parameters
MyGeometryThe Geometry of the widget receiving the event
InFocusEventThe FocusEvent
Returns
Returns whether the event was handled, along with other possible actions

Reimplemented in SGameMenuPageWidget, SMultiBoxWidget, SButton, SEditableText, SEditableTextBox, SSpinBox< NumericType >, SSpinBox< float >, SVirtualKeyboardEntry, SScrollBox, SViewport, and SWebBrowserView.

◆ OnKeyChar()

FReply SWidget::OnKeyChar ( const FGeometry MyGeometry,
const FCharacterEvent InCharacterEvent 
)
virtual

Called after a character is entered while this widget has keyboard focus

Parameters
MyGeometryThe Geometry of the widget receiving the event
InCharacterEventCharacter event
Returns
Returns whether the event was handled, along with other possible actions

Reimplemented in SViewport, SMultiBoxWidget, and SEditableText.

◆ OnKeyDown()

◆ OnKeyUp()

FReply SWidget::OnKeyUp ( const FGeometry MyGeometry,
const FKeyEvent InKeyEvent 
)
virtual

Called after a key is released when this widget has focus

Parameters
MyGeometryThe Geometry of the widget receiving the event
InKeyEventKey event
Returns
Returns whether the event was handled, along with other possible actions

Reimplemented in SRadialSlider, SButton, SCheckBox, SEditableText, SInputKeySelector, SSlider, and SViewport.

◆ OnMapCursor()

TOptional< TSharedRef< SWidget > > SWidget::OnMapCursor ( const FCursorReply CursorReply) const
virtual

After OnCursorQuery has specified a cursor type the system asks each widget under the mouse to map that cursor to a widget. This event is bubbled.

Returns
TOptional<TSharedRef<SWidget>>() if you don't have a mapping otherwise return the Widget to show.

Reimplemented in SViewport.

◆ OnMotionDetected()

FReply SWidget::OnMotionDetected ( const FGeometry MyGeometry,
const FMotionEvent InMotionEvent 
)
virtual

Called when motion is detected (controller or device) e.g. Someone tilts or shakes their controller.

Parameters
InMotionEventThe motion event generated

Reimplemented in SViewport.

◆ OnMouseButtonDoubleClick()

FReply SWidget::OnMouseButtonDoubleClick ( const FGeometry InMyGeometry,
const FPointerEvent InMouseEvent 
)
virtual

Called when a mouse button is double clicked. Override this in derived classes.

Parameters
InMyGeometryWidget geometry
InMouseEventMouse button event
Returns
Returns whether the event was handled, along with other possible actions

Reimplemented in SColorValueSlider, UE::ColorGrading::SColorGradingWheel, SColorSpectrum, SColorWheel, SButton, SCheckBox, SEditableText, SSplitter, STableRow< ItemType >, STableRow< OptionType >, STableRow< TSharedPtr< FRTInfo > >, STableRow< TSharedPtr< FTestData > >, STableRow< TSharedPtr< OptionType > >, STableViewBase, SObjectTableRow< ItemType >, SDockTab, SWindowTitleBarArea, and SViewport.

◆ OnMouseButtonDown()

◆ OnMouseButtonUp()

◆ OnMouseCaptureLost()

void SWidget::OnMouseCaptureLost ( const FCaptureLostEvent CaptureLostEvent)
virtual

Called when this widget had captured the mouse, but that capture has been revoked for some reason.

Reimplemented in SEyeDropperButton, SCheckBoxStack, SButton, SSlider, SScrollBox, and STableViewBase.

◆ OnMouseEnter()

void SWidget::OnMouseEnter ( const FGeometry MyGeometry,
const FPointerEvent MouseEvent 
)
virtual

The system will use this event to notify a widget that the cursor has entered it. This event is uses a custom bubble strategy.

Parameters
MyGeometryThe Geometry of the widget receiving the event
MouseEventInformation about the input event

Reimplemented in SCarouselNavigationButton::SPeekBorder, SSubMenuButton, SMenuEntryBlock, SWidgetBlock, SButton, SCheckBox, SSubMenuHandler, SScrollBar, SScrollBox, SViewport, STableViewBase, SMouseHoverWidget, and SObjectTableRow< ItemType >.

◆ OnMouseLeave()

void SWidget::OnMouseLeave ( const FPointerEvent MouseEvent)
virtual

The system will use this event to notify a widget that the cursor has left it. This event is uses a custom bubble strategy.

Parameters
MouseEventInformation about the input event

Reimplemented in SCarouselNavigationButton::SPeekBorder, SMenuEntryButton, SSubMenuButton, SMenuEntryBlock, SButton, SCheckBox, SSubMenuHandler, SScrollBar, SScrollBox, SSplitter, SViewport, STableViewBase, SMouseHoverWidget, and SObjectTableRow< ItemType >.

◆ OnMouseMove()

FReply SWidget::OnMouseMove ( const FGeometry MyGeometry,
const FPointerEvent MouseEvent 
)
virtual

The system calls this method to notify the widget that a mouse moved within it. This event is bubbled.

Parameters
MyGeometryThe Geometry of the widget receiving the event
MouseEventInformation about the input event
Returns
Whether the event was handled along with possible requests for the system to take action.

Reimplemented in SEditableText, SColorValueSlider, UE::ColorGrading::SColorGradingComponentSpinBox, UE::ColorGrading::SColorGradingWheel, SRadialSlider, SEyeDropperButton, SGameMenuItemWidget, SDockingTabWell, SColorSpectrum, SColorWheel, SButton, SSlider, SSpinBox< NumericType >, SSpinBox< float >, SScrollBar, SScrollBox, SSplitter, SViewport, and STableViewBase.

◆ OnMouseWheel()

FReply SWidget::OnMouseWheel ( const FGeometry MyGeometry,
const FPointerEvent MouseEvent 
)
virtual

Called when the mouse wheel is spun. This event is bubbled.

Parameters
MouseEventMouse event
Returns
Returns whether the event was handled, along with other possible actions

Reimplemented in SSpinBox< NumericType >, SSpinBox< float >, SScrollBox, SViewport, and STableViewBase.

◆ OnNavigation()

FNavigationReply SWidget::OnNavigation ( const FGeometry MyGeometry,
const FNavigationEvent InNavigationEvent 
)
virtual

◆ OnPreviewKeyDown()

FReply SWidget::OnPreviewKeyDown ( const FGeometry MyGeometry,
const FKeyEvent InKeyEvent 
)
virtual

Called after a key is pressed when this widget or a child of this widget has focus If a widget handles this event, OnKeyDown will not be passed to the focused widget.

This event is primarily to allow parent widgets to consume an event before a child widget processes it and it should be used only when there is no better design alternative.

Parameters
MyGeometryThe Geometry of the widget receiving the event
InKeyEventKey event
Returns
Returns whether the event was handled, along with other possible actions

Reimplemented in SInputKeySelector.

◆ OnPreviewMouseButtonDown()

FReply SWidget::OnPreviewMouseButtonDown ( const FGeometry MyGeometry,
const FPointerEvent MouseEvent 
)
virtual

Just like OnMouseButtonDown, but tunnels instead of bubbling. If this event is handled, OnMouseButtonDown will not be sent.

Use this event sparingly as preview events generally make UIs more difficult to reason about.

Reimplemented in SInputKeySelector, SScrollBox, and STableViewBase.

◆ OnQueryPopupMethod()

FPopupMethodReply SWidget::OnQueryPopupMethod ( ) const
virtual

Popups can manifest in a NEW OS WINDOW or via an OVERLAY in an existing window. This can be set explicitly on SMenuAnchor, or can be determined by a scoping widget. A scoping widget can reply to OnQueryPopupMethod() to drive all its descendants' poup methods.

e.g. Fullscreen games cannot summon a new window, so game SViewports will reply with EPopupMethod::UserCurrentWindow. This makes all the menu anchors within them use the current window.

Reimplemented in SViewport, and SVirtualWindow.

◆ OnQueryShowFocus()

TOptional< bool > SWidget::OnQueryShowFocus ( const EFocusCause  InFocusCause) const
virtual

Called to determine if we should render the focus brush.

Parameters
InFocusCauseThe cause of focus

Reimplemented in SViewport.

◆ OnToolTipClosing()

void SWidget::OnToolTipClosing ( )
virtual

Called when a tooltip displayed from this widget is being closed

◆ OnTouchEnded()

FReply SWidget::OnTouchEnded ( const FGeometry MyGeometry,
const FPointerEvent InTouchEvent 
)
virtual

◆ OnTouchFirstMove()

FReply SWidget::OnTouchFirstMove ( const FGeometry MyGeometry,
const FPointerEvent TouchEvent 
)
virtual

Called when a touchpad touch first moves after TouchStarted

Parameters
InTouchEventThe touch event generated

Reimplemented in SViewport.

◆ OnTouchForceChanged()

FReply SWidget::OnTouchForceChanged ( const FGeometry MyGeometry,
const FPointerEvent TouchEvent 
)
virtual

Called when a touchpad touch force changes

Parameters
InTouchEventThe touch event generated

Reimplemented in SViewport.

◆ OnTouchGesture()

FReply SWidget::OnTouchGesture ( const FGeometry MyGeometry,
const FPointerEvent GestureEvent 
)
virtual

Called when the user performs a gesture on trackpad. This event is bubbled.

Parameters
GestureEventgesture event
Returns
Returns whether the event was handled, along with other possible actions

Reimplemented in SViewport.

◆ OnTouchMoved()

FReply SWidget::OnTouchMoved ( const FGeometry MyGeometry,
const FPointerEvent InTouchEvent 
)
virtual

Called when a touchpad touch is moved (finger moved)

Parameters
InTouchEventThe touch event generated

Reimplemented in SVirtualJoystick, SRadialSlider, SSlider, SViewport, and STableViewBase.

◆ OnTouchStarted()

FReply SWidget::OnTouchStarted ( const FGeometry MyGeometry,
const FPointerEvent InTouchEvent 
)
virtual

◆ OnVisualizePopup()

TSharedPtr< FPopupLayer > SWidget::OnVisualizePopup ( const TSharedRef< SWidget > &  PopupContent)
virtual

Visualize a new pop-up if possible. If it's not possible for this widget to host the pop-up content you'll get back an invalid pointer to the layer. The returned FPopupLayer allows you to remove the pop-up when you're done with it

Parameters
PopupContentThe widget to try and host overlaid on top of the widget.
Returns
a valid FPopupLayer if this widget supported hosting it. You can call Remove() on this to destroy the pop-up.

Reimplemented in SWindow.

◆ OnVisualizeTooltip()

bool SWidget::OnVisualizeTooltip ( const TSharedPtr< SWidget > &  TooltipContent)
virtual

Called when Slate wants to visualize tooltip. If nobody handles this event, Slate will use default tooltip visualization. If you override this event, you should probably return true.

Parameters
TooltipContentThe TooltipContent that I may want to visualize.
Returns
true if this widget visualized the tooltip content; i.e., the event is handled.

Reimplemented in SExampleLayout, SGameLayerManager, SMultiBoxWidget, and SVirtualWindow.

◆ Paint()

int32 SWidget::Paint ( const FPaintArgs Args,
const FGeometry AllottedGeometry,
const FSlateRect MyCullingRect,
FSlateWindowElementList OutDrawElements,
int32  LayerId,
const FWidgetStyle InWidgetStyle,
bool  bParentEnabled 
) const

Called to tell a widget to paint itself (and it's children).

The widget should respond by populating the OutDrawElements array with FDrawElements that represent it and any of its children.

Parameters
ArgsAll the arguments necessary to paint this widget (
AllottedGeometryThe FGeometry that describes an area in which the widget should appear.
MyCullingRectThe clipping rectangle allocated for this widget and its children.
OutDrawElementsA list of FDrawElements to populate with the output.
LayerIdThe Layer onto which this widget should be rendered.
InColorAndOpacityColor and Opacity to be applied to all the descendants of the widget being painted
bParentEnabledTrue if the parent of this widget is enabled.
Returns
The maximum layer ID attained by this widget or any of its children.

◆ Prepass_ChildLoop()

void SWidget::Prepass_ChildLoop ( float  InLayoutScaleMultiplier,
FChildren MyChildren 
)
protected

◆ RegisterActiveTimer()

TSharedRef< FActiveTimerHandle > SWidget::RegisterActiveTimer ( float  TickPeriod,
FWidgetActiveTimerDelegate  TickFunction 
)

Registers an "active timer" delegate that will execute at some regular interval. TickFunction will not be called until the specified interval has elapsed once. A widget can register as many delegates as it needs. Be careful when registering to avoid duplicate active timers.

An active timer can be UnRegistered in one of three ways:

  1. Call UnRegisterActiveTimer using the active timer handle that is returned here.
  2. Have your delegate return EActiveTimerReturnType::Stop.
  3. Destroying the widget

Active Timers

Slate may go to sleep when there is no user interaction for some time to save power. However, some UI elements may need to "drive" the UI even when the user is not providing any input (ie, animations, viewport rendering, async polling, etc). A widget notifies Slate of this by registering an "Active Timer" that is executed at a specified frequency to drive the UI. In this way, slate can go to sleep when there is no input and no active timer needs to fire. When any active timer needs to fire, all of Slate will do a Tick and Paint pass.

Parameters
PeriodThe time period to wait between each execution of the timer. Pass zero to fire the timer once per frame. If an interval is missed, the delegate is NOT called more than once.
TimerFunctionThe active timer delegate to call every Period seconds.
Returns
An active timer handle that can be used to UnRegister later.

◆ RemoveMetaData()

template<typename MetaDataType >
int32 SWidget::RemoveMetaData ( const TSharedRef< MetaDataType > &  RemoveMe)
inline

Remove metadata to this widget.

Returns
Number of removed elements.

◆ SetAttribute()

bool SWidget::SetAttribute ( TAttribute< TargetValueType > &  TargetValue,
const TAttribute< SourceValueType > &  SourceValue,
EInvalidateWidgetReason  BaseInvalidationReason 
)
inlineprotected

Performs the attribute assignment and invalidates the widget minimally based on what actually changed. So if the boundness of the attribute didn't change volatility won't need to be recalculated. Returns true if the value changed.

◆ SetCanTick()

void SWidget::SetCanTick ( bool  bInCanTick)
inline

◆ SetClipping()

void SWidget::SetClipping ( EWidgetClipping  InClipping)

Sets the clipping to bounds rules for this widget.

◆ SetCullingBoundsExtension()

void SWidget::SetCullingBoundsExtension ( const FMargin InCullingBoundsExtension)
inline

Sets an additional culling padding that is added to a widget to give more leeway when culling widgets. Useful if several child widgets have rendering beyond their bounds.

◆ SetCursor()

void SWidget::SetCursor ( const TAttribute< TOptional< EMouseCursor::Type > > &  InCursor)

Set the cursor that should appear when this widget is hovered

◆ SetDebugInfo()

void SWidget::SetDebugInfo ( const ANSICHAR InType,
const ANSICHAR InFile,
int32  OnLine,
size_t  InAllocSize 
)
protected

Used by Slate to set the runtime debug info about this widget.

◆ SetEnabled()

void SWidget::SetEnabled ( TAttribute< bool InEnabledState)
inline

Sets the enabled state of this widget

Parameters
InEnabledStateAn attribute containing the enabled state or a delegate to call to get the enabled state.

◆ SetFlowDirectionPreference()

void SWidget::SetFlowDirectionPreference ( EFlowDirectionPreference  InFlowDirectionPreference)
inline

Sets how content should flow in this panel, based on the current culture. By default all panels inherit the state of the widget above. If they set a new flow direction it will be inherited down the tree.

◆ SetHover()

void SWidget::SetHover ( TAttribute< bool InHovered)
inlineprotected

Set the hover state. Once set, the attribute that the ownership and SWidget code will not update the attribute value. You can return the control to the SWidget code by setting an empty TAttribute.

◆ SetOnMouseButtonDown()

void SWidget::SetOnMouseButtonDown ( FPointerEventHandler  EventHandler)

See OnMouseButtonDown event

◆ SetOnMouseButtonUp()

void SWidget::SetOnMouseButtonUp ( FPointerEventHandler  EventHandler)

See OnMouseButtonUp event

◆ SetOnMouseDoubleClick()

void SWidget::SetOnMouseDoubleClick ( FPointerEventHandler  EventHandler)

See OnMouseDoubleClick event

◆ SetOnMouseEnter()

void SWidget::SetOnMouseEnter ( FNoReplyPointerEventHandler  EventHandler)

See OnMouseEnter event

◆ SetOnMouseLeave()

void SWidget::SetOnMouseLeave ( FSimpleNoReplyPointerEventHandler  EventHandler)

See OnMouseLeave event

◆ SetOnMouseMove()

void SWidget::SetOnMouseMove ( FPointerEventHandler  EventHandler)

See OnMouseMove event

◆ SetPixelSnapping()

void SWidget::SetPixelSnapping ( EWidgetPixelSnapping  InPixelSnappingMethod)

Sets the pixel snapping method for this widget.

◆ SetRenderOpacity()

void SWidget::SetRenderOpacity ( float  InRenderOpacity)
inline
Parameters
InOpacityThe opacity of the widget during rendering.

◆ SetRenderTransform()

void SWidget::SetRenderTransform ( TAttribute< TOptional< FSlateRenderTransform > >  InTransform)
inline
Parameters
InTransformthe render transform to set for the widget (transforms from widget's local space). TOptional<> to allow code to skip expensive overhead if there is no render transform applied.

◆ SetRenderTransformPivot()

void SWidget::SetRenderTransformPivot ( TAttribute< FVector2D InTransformPivot)
inline
Parameters
InTransformPivotSets the pivot point of the widget's render transform (in normalized local space).

◆ SetTag()

void SWidget::SetTag ( FName  InTag)
inline

◆ SetToolTip()

void SWidget::SetToolTip ( const TAttribute< TSharedPtr< IToolTip > > &  InToolTip)

Set the tool tip that should appear when this widget is hovered.

◆ SetToolTipText() [1/2]

void SWidget::SetToolTipText ( const FText InToolTipText)

Set the tool tip that should appear when this widget is hovered.

◆ SetToolTipText() [2/2]

void SWidget::SetToolTipText ( const TAttribute< FText > &  ToolTipText)

Set the tool tip that should appear when this widget is hovered.

◆ SetVisibility()

void SWidget::SetVisibility ( TAttribute< EVisibility InVisibility)
virtual
Parameters
InVisibilityshould this widget be

Reimplemented in SCompoundWidget, SLeafWidget, and SPanel.

◆ SetVolatilePrepass()

void SWidget::SetVolatilePrepass ( bool  bVolatile)
inlineprotected

◆ ShouldBeEnabled()

bool SWidget::ShouldBeEnabled ( bool  InParentEnabled) const
inlineprotected

Determines if this widget should be enabled.

Parameters
InParentEnabledtrue if the parent of this widget is enabled
Returns
true if the widget is enabled

◆ ShouldInvalidatePrepassDueToVolatility()

bool SWidget::ShouldInvalidatePrepassDueToVolatility ( )
inline

◆ SlatePrepass() [1/2]

void SWidget::SlatePrepass ( )

DEPRECATED version of SlatePrepass that assumes no scaling beyond AppScale

◆ SlatePrepass() [2/2]

void SWidget::SlatePrepass ( float  InLayoutScaleMultiplier)

Descends to leaf-most widgets in the hierarchy and gathers desired sizes on the way up. i.e. Caches the desired size of all of this widget's children recursively, then caches desired size for itself.

◆ SupportsKeyboardFocus()

◆ SWidgetConstruct()

PRAGMA_ENABLE_DEPRECATION_WARNINGS void SWidget::SWidgetConstruct ( const FSlateBaseNamedArgs Args)
protected

Construct a SWidget based on initial parameters.

◆ Tick()

void SWidget::Tick ( const FGeometry AllottedGeometry,
const double  InCurrentTime,
const float  InDeltaTime 
)
virtual

◆ ToString()

FString SWidget::ToString ( ) const
virtual
Returns
A String representation of the widget

Reimplemented in SWindow.

◆ TranslateMouseCoordinateForCustomHitTestChild()

TOptional< FVirtualPointerPosition > SWidget::TranslateMouseCoordinateForCustomHitTestChild ( const SWidget ChildWidget,
const FGeometry MyGeometry,
const FVector2D  ScreenSpaceMouseCoordinate,
const FVector2D  LastScreenSpaceMouseCoordinate 
) const
virtual

Reimplemented in SViewport.

◆ UnRegisterActiveTimer()

void SWidget::UnRegisterActiveTimer ( const TSharedRef< FActiveTimerHandle > &  ActiveTimerHandle)

Unregisters an active timer handle. This is optional, as the delegate can UnRegister itself by returning EActiveTimerReturnType::Stop.

◆ ValidatePathToChild()

virtual bool SWidget::ValidatePathToChild ( SWidget InChild)
inlinevirtual

Reimplemented in SWidgetSwitcher.

Friends And Related Symbol Documentation

◆ FSlateAttributeMetaData

◆ FSlateCachedElementList

◆ FSlateInvalidationRoot

◆ FSlateInvalidationWidgetList

◆ FSlateTrace

friend class FSlateTrace
friend

◆ FSlateWindowElementList

◆ FWidgetProxy

friend class FWidgetProxy
friend

◆ SWindow

friend class SWindow
friend

◆ TSlateDecl

template<class WidgetType , typename RequiredArgsPayloadType >
friend struct TSlateDecl
friend

Member Data Documentation

◆ bCanHaveChildren

uint8 SWidget::bCanHaveChildren
protected

Can the widget ever support children? This will be false on SLeafWidgets, rather than setting this directly, you should probably inherit from SLeafWidget.

◆ bCanSupportFocus

uint8 SWidget::bCanSupportFocus
protected

Can the widget ever support keyboard focus

◆ bClippingProxy

uint8 SWidget::bClippingProxy
protected

Some widgets might be a complex hierarchy of child widgets you never see. Some of those widgets would expose their clipping option normally, but may not personally be responsible for clipping so even though it may be set to clip, this flag is used to inform painting that this widget doesn't really do the clipping.

◆ bHasCustomPrepass

uint8 SWidget::bHasCustomPrepass
protected

◆ bHasRelativeLayoutScale

uint8 SWidget::bHasRelativeLayoutScale
protected

◆ bVolatilityAlwaysInvalidatesPrepass

uint8 SWidget::bVolatilityAlwaysInvalidatesPrepass
protected

if this widget should always invalidate the prepass step when volatile

◆ Clipping

EWidgetClipping SWidget::Clipping
protected

Set to true if all content of the widget should clip to the bounds of this widget.

◆ CullingBoundsExtension

FMargin SWidget::CullingBoundsExtension
protected

Can be used to enlarge the culling bounds of this widget (pre-intersection), this can be useful if you've got children that you know are using rendering transforms to render outside their standard bounds, if that happens it's possible the parent might be culled before the descendant widget is entirely off screen. For those cases, you should extend the bounds of the culling area to add a bit more slack to how culling is performed to this panel.

◆ PixelSnappingMethod

EWidgetPixelSnapping SWidget::PixelSnappingMethod
protected

When set to EPixelSnappingMethod::SnapToPixel, the widget is drawn at the nearest pixel. Will improve sharpness but could show a stepping effect when moved in an animation. By default everything in slate is Inherit, and the default state all things inherit is SnapToPixel.

◆ RenderOpacity

float SWidget::RenderOpacity
protected

The opacity of the widget. Automatically applied during rendering.


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