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

#include <WidgetPath.h>

Classes

struct  EInterruptedPathHandling
 
struct  EPathResolutionResult
 

Public Member Functions

SLATECORE_API FWeakWidgetPath (const FWidgetPath &InWidgetPath=FWidgetPath())
 
SLATECORE_API FWidgetPath ToWidgetPath (EInterruptedPathHandling::Type InterruptedPathHandling=EInterruptedPathHandling::Truncate, const FPointerEvent *PointerEvent=nullptr, const EVisibility VisibilityFilter=EVisibility::Visible) const
 
SLATECORE_API TSharedRef< FWidgetPathToWidgetPathRef (EInterruptedPathHandling::Type InterruptedPathHandling=EInterruptedPathHandling::Truncate, const FPointerEvent *PointerEvent=nullptr, const EVisibility VisibilityFilter=EVisibility::Visible) const
 
SLATECORE_API bool ContainsWidget (const SWidget *WidgetToFind) const
 
SLATECORE_API EPathResolutionResult::Result ToWidgetPath (FWidgetPath &WidgetPath, EInterruptedPathHandling::Type InterruptedPathHandling=EInterruptedPathHandling::Truncate, const FPointerEvent *PointerEvent=nullptr, const EVisibility VisibilityFilter=EVisibility::Visible) const
 
SLATECORE_API FWidgetPath ToNextFocusedPath (EUINavigation NavigationType) const
 
SLATECORE_API FWidgetPath ToNextFocusedPath (EUINavigation NavigationType, const FNavigationReply &NavigationReply, const FArrangedWidget &RuleWidget) const
 
TWeakPtr< SWidgetGetLastWidget () const
 
bool IsValid () const
 

Public Attributes

TArray< TWeakPtr< SWidget > > Widgets
 
TWeakPtr< SWindowWindow
 

Detailed Description

Just like a WidgetPath, but uses weak pointers and does not store geometry.

Constructor & Destructor Documentation

◆ FWeakWidgetPath()

FWeakWidgetPath::FWeakWidgetPath ( const FWidgetPath InWidgetPath = FWidgetPath())

Construct a weak widget path from a widget path. Defaults to an invalid path.

Member Function Documentation

◆ ContainsWidget()

bool FWeakWidgetPath::ContainsWidget ( const SWidget WidgetToFind) const
Returns
true if the WidgetToFind is in this WidgetPath, false otherwise.

◆ GetLastWidget()

TWeakPtr< SWidget > FWeakWidgetPath::GetLastWidget ( ) const
inline

Get the last (leaf-most) widget in this path; assumes path is valid

◆ IsValid()

bool FWeakWidgetPath::IsValid ( ) const
inline

A valid path has at least one widget in it

◆ ToNextFocusedPath() [1/2]

FWidgetPath FWeakWidgetPath::ToNextFocusedPath ( EUINavigation  NavigationType) const
Parameters
NavigationTypeDirection in which to move the focus (only for use with EUINavigation::Next and EUINavigation::Previous).
Returns
The widget path to the resulting widget

◆ ToNextFocusedPath() [2/2]

FWidgetPath FWeakWidgetPath::ToNextFocusedPath ( EUINavigation  NavigationType,
const FNavigationReply NavigationReply,
const FArrangedWidget RuleWidget 
) const
Parameters
NavigationTypeDirection in which to move the focus (only for use with EUINavigation::Next and EUINavigation::Previous).
NavigationReplyThe NavigationReply that the RuleWidget provided during the bubbled navigation event
RuleWidgetThe ArrangedWidget or the widget that provided the NavigationReply
Returns
The widget path to the resulting widget

◆ ToWidgetPath() [1/2]

FWidgetPath FWeakWidgetPath::ToWidgetPath ( EInterruptedPathHandling::Type  InterruptedPathHandling = EInterruptedPathHandling::Truncate,
const FPointerEvent PointerEvent = nullptr,
const EVisibility  VisibilityFilter = EVisibility::Visible 
) const

Make a non-weak WidgetPath out of this WeakWidgetPath. Do this by computing all the relevant geometries and converting the weak pointers to TSharedPtr.

Parameters
InterruptedPathHandlingShould interrupted paths result in a truncated path or an invalid path

Make a non-weak WidgetPath out of this WeakWidgetPath. Do this by computing all the relevant geometries and converting the weak pointers to TSharedPtr.

◆ ToWidgetPath() [2/2]

FWeakWidgetPath::EPathResolutionResult::Result FWeakWidgetPath::ToWidgetPath ( FWidgetPath WidgetPath,
EInterruptedPathHandling::Type  InterruptedPathHandling = EInterruptedPathHandling::Truncate,
const FPointerEvent PointerEvent = nullptr,
const EVisibility  VisibilityFilter = EVisibility::Visible 
) const

Make a non-weak WidgetPath out of this WeakWidgetPath. Do this by computing all the relevant geometries and converting the weak pointers to TSharedPtr.

Parameters
WidgetPathThe non-weak path is returned via this.
InterruptedPathHandlingShould interrupted paths result in a truncated path or an invalid path.
Returns
Whether the path is truncated or live - a live path refers to a widget that is currently active and visible, a widget with a truncated path is not.

◆ ToWidgetPathRef()

TSharedRef< FWidgetPath > FWeakWidgetPath::ToWidgetPathRef ( EInterruptedPathHandling::Type  InterruptedPathHandling = EInterruptedPathHandling::Truncate,
const FPointerEvent PointerEvent = nullptr,
const EVisibility  VisibilityFilter = EVisibility::Visible 
) const

Make a non-weak WidgetPath out of this WeakWidgetPath. Do this by computing all the relevant geometries and converting the weak pointers to TSharedPtr.

Parameters
InterruptedPathHandlingShould interrupted paths result in a truncated path or an invalid path

Member Data Documentation

◆ Widgets

TArray< TWeakPtr<SWidget> > FWeakWidgetPath::Widgets

◆ Window

TWeakPtr< SWindow > FWeakWidgetPath::Window

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