Navigation
API > API/Runtime > API/Runtime/SlateCore > API/Runtime/SlateCore/Layout
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
| Type | Name | Description | |
|---|---|---|---|
| TSharedPtr< SWindow > | TopLevelWindow | The top level window of this widget path. | |
| TArray< TOptional< FVirtualPointerPosition > > | VirtualPointerPositions | The virtual representation of the mouse at each level in the widget path. | |
| FArrangedChildren | 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
| Type | Name | Description | |
|---|---|---|---|
FWidgetPath () |
|||
FWidgetPath
(
TArrayView< FWidgetAndPointer > InWidgetsAndPointers |
|||
FWidgetPath
(
TSharedPtr< SWindow > InTopLevelWindow, |
Functions
| Type | Name | Description | |
|---|---|---|---|
| bool | ContainsWidget
(
const SWidget* WidgetToFind |
||
| bool | ContainsWidget
(
TSharedRef< const SWidget > WidgetToFind |
||
| 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. | |
| TOptional< FArrangedWidget > | FindArrangedWidget
(
TSharedRef< const SWidget > WidgetToFind |
||
| TOptional< FWidgetAndPointer > | FindArrangedWidgetAndCursor
(
TSharedRef< const SWidget > WidgetToFind |
||
| FArrangedChildren | GeneratePathToWidget
(
const MatcherType& Matcher, |
Generate a path from FromWidget to WidgetToFind. The path will not include FromWidget. | |
| const TSharedPtr< const FVirtualPointerPosition > & | GetCursorAt
(
int32 Index |
Get the widget and associated virtual cursor at a given index. | |
| TSharedRef< SWindow > | Get the deepest (bottom-most) window in this path; assumes path is valid. | ||
| TSharedRef< SWidget > | Get the last (leaf-most) widget in this path; assumes path is valid | ||
| FWidgetPath | GetPathDownTo
(
TSharedRef< const SWidget > MarkerWidget |
||
| TOptional< FVirtualPointerPosition > | GetVirtualPointerPosition
(
int32 Index |
Get the virtual representation of the mouse at each level in the widget path. | |
| TSharedRef< SWindow > | GetWindow () |
Get the first (top-most) widget in this path, which is always a window; assumes path is valid. | |
| bool | IsValid () |
A valid path has at least one widget in it | |
| bool | MoveFocus
(
int32 PathLevel, |
Move focus either forward on backward in the path level specified by PathLevel. | |
| FString | ToString () |
Builds a string representation of the widget path. |