Navigation
API > API/Runtime > API/Runtime/SlateCore
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.
| Name | FWidgetPath |
| Type | class |
| Header File | /Engine/Source/Runtime/SlateCore/Public/Layout/WidgetPath.h |
| Include Path | #include "Layout/WidgetPath.h" |
Syntax
class FWidgetPath
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FWidgetPath () |
Layout/WidgetPath.h | ||
FWidgetPath
(
TArrayView< FWidgetAndPointer > InWidgetsAndPointers |
Layout/WidgetPath.h | ||
FWidgetPath
(
TSharedPtr< SWindow > InTopLevelWindow, |
Layout/WidgetPath.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| TopLevelWindow | TSharedPtr< SWindow > | The top level window of this widget path. | Layout/WidgetPath.h | |
| Widgets | FArrangedChildren | 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. | Layout/WidgetPath.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| VirtualPointerPositions | TArray< TOptional< FVirtualPointerPosition > > | The virtual representation of the mouse at each level in the widget path. | Layout/WidgetPath.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool ContainsWidget
(
const SWidget* WidgetToFind |
Layout/WidgetPath.h | ||
bool ExtendPathTo
(
const MatcherType& Matcher, |
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. | Layout/WidgetPath.h | |
TOptional< FArrangedWidget > FindArrangedWidget
(
TSharedRef< const SWidget > WidgetToFind |
Layout/WidgetPath.h | ||
TOptional< FWidgetAndPointer > FindArrangedWidgetAndCursor
(
TSharedRef< const SWidget > WidgetToFind |
Layout/WidgetPath.h | ||
FArrangedChildren GeneratePathToWidget
(
const MatcherType& Matcher, |
Generate a path from FromWidget to WidgetToFind. The path will not include FromWidget. | Layout/WidgetPath.h | |
TSharedRef< SWindow > GetDeepestWindow() |
Get the deepest (bottom-most) window in this path; assumes path is valid. | Layout/WidgetPath.h | |
TSharedRef< SWidget > GetLastWidget() |
Get the last (leaf-most) widget in this path; assumes path is valid | Layout/WidgetPath.h | |
FWidgetPath GetPathDownTo
(
TSharedRef< const SWidget > MarkerWidget |
Layout/WidgetPath.h | ||
TOptional< FVirtualPointerPosition > GetVirtualPointerPosition
(
int32 Index |
Get the virtual representation of the mouse at each level in the widget path. | Layout/WidgetPath.h | |
TSharedRef< SWindow > GetWindow() |
Get the first (top-most) widget in this path, which is always a window; assumes path is valid. | Layout/WidgetPath.h | |
bool IsValid() |
A valid path has at least one widget in it | Layout/WidgetPath.h | |
bool MoveFocus
(
int32 PathLevel, |
Move focus either forward on backward in the path level specified by PathLevel. | Layout/WidgetPath.h | |
FString ToString() |
Builds a string representation of the widget path. | Layout/WidgetPath.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static bool SearchForWidgetRecursively
(
const MatchRuleType& MatchRule, |
Utility function to search recursively through a widget hierarchy for a specific widget | Layout/WidgetPath.h | |
static bool SearchForWidgetRecursively_Reverse
(
const MatchRuleType& MatchRule, |
Identical to SearchForWidgetRecursively, but iterates in reverse order | Layout/WidgetPath.h |