FWidgetPath

A widget path is a vertical slice through the tree.

Windows
MacOS
Linux

References

Module

SlateCore

Header

/Engine/Source/Runtime/SlateCore/Public/Layout/WidgetPath.h

Include

#include "Layout/WidgetPath.h"

Syntax

class FWidgetPath

Remarks

A widget path is a vertical slice through the tree. The canonical form for widget paths is "leafmost last". The top-level window always resides at index 0. A widget path also contains a reference to a top-level SWindow that contains all the widgets in the path. The window is needed for its ability to determine its own geometry, from which the geometries of the rest of the widget can be determined.

Variables

Name Description

Public variable

TSharedPtr< SWi...

 

TopLevelWindow

The top level window of this widget path.

Public variable

TArray< TShared...

 

VirtualPointerPositions

The virtual representation of the mouse at each level in the widget path.

Public variable

FArrangedChildr...

 

Widgets

The widgets that make up the widget path, the first item is the root widget, the end is the widget this path was built for.

Constructors

Name Description

Public function

FWidgetPath()

Public function

FWidgetPath

(
    TArray< FWidgetAndPointer > InWidge...
)

Public function

FWidgetPath

(
    TSharedPtr< SWindow > InTopLevelWin...,
    const FArrangedChildren& InWidgetP...
)

Functions

Name Description

Public function Const

bool

 

ContainsWidget

(
    TSharedRef< const SWidget > WidgetT...
)

Public function

bool

 

ExtendPathTo

(
    const MatcherType& Matcher,
    EVisibility VisibilityFilter
)

Extend the current path such that it reaches some widget that qualifies as a Match The widget to match must be a descendant of the last widget currently in the path.

Public function Const

TOptional< F...

 

FindArrangedWidget

(
    TSharedRef< const SWidget > WidgetT...
)

Public function Const

TOptional< F...

 

FindArrangedWidgetAndCursor

(
    TSharedRef< const SWidget > WidgetT...
)

Public function

FArrangedChi...

 

GeneratePathToWidget

(
    const MatcherType& Matcher,
    const FArrangedWidget& FromWidget,
    EUINavigation NavigationType,
    EVisibility VisibilityFilter
)

Generate a path from FromWidget to WidgetToFind. The path will not include FromWidget.

Public function Const

const TShare...

 

GetCursorAt

(
    int32 Index
)

Get the widget and associated virtual cursor at a given index.

Public function Const

TSharedRef< ...

 

GetDeepestWindow()

Get the deepest (bottom-most) window in this path; assumes path is valid.

Public function Const

TSharedRef< ...

 

GetLastWidget()

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

Public function Const

FWidgetPath

 

GetPathDownTo

(
    TSharedRef< const SWidget > MarkerW...
)

Public function Const

TSharedRef< ...

 

GetWindow()

Get the first (top-most) widget in this path, which is always a window; assumes path is valid

Public function Const

bool

 

IsValid()

A valid path has at least one widget in it

Public function

bool

 

MoveFocus

(
    int32 PathLevel,
    EUINavigation NavigationType,
    bool bSearchFromPathWidget
)

Move focus either forward on backward in the path level specified by PathLevel.

Public function Const

FString

 

ToString()

Builds a string representation of the widget path.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss