engine
 
载入中...
搜索中...
未找到
Public 成员函数 | Public 属性 | 所有成员列表
FWidgetPath类 参考

A widget path is a vertical slice through the tree. 更多...

#include <WidgetPath.h>

Public 成员函数

bool ContainsWidget (TSharedRef< const SWidget > WidgetToFind) const
 
template<typename MatcherType >
bool ExtendPathTo (const MatcherType &Matcher, EVisibility VisibilityFilter=EVisibility::Visible)
 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. 更多...
 
template<typename MatcherType >
FArrangedChildren GeneratePathToWidget (const MatcherType &Matcher, const FArrangedWidget &FromWidget, EUINavigation NavigationType=EUINavigation::Next, EVisibility VisibilityFilter=EVisibility::Visible)
 Generate a path from FromWidget to WidgetToFind. 更多...
 
const TSharedPtr< FVirtualPointerPosition > & GetCursorAt (int32 Index) const
 Get the widget and associated virtual cursor at a given index.
 
TSharedRef< SWindow > GetDeepestWindow () const
 Get the deepest (bottom-most) window in this path; assumes path is valid. 更多...
 
TSharedRef< SWidget > GetLastWidget () const
 Get the last (leaf-most) widget in this path; assumes path is valid
 
FWidgetPath GetPathDownTo (TSharedRef< const SWidget > MarkerWidget) const
 
TSharedRef< SWindow > GetWindow () const
 Get the first (top-most) widget in this path, which is always a window; assumes path is valid 更多...
 
bool IsValid () const
 A valid path has at least one widget in it
 
bool MoveFocus (int32 PathLevel, EUINavigation NavigationType, bool bSearchFromPathWidget=true)
 Move focus either forward on backward in the path level specified by PathLevel. 更多...
 
FString ToString () const
 Builds a string representation of the widget path.
 

Public 属性

TSharedPtr< SWindow > TopLevelWindow
 The top level window of this widget path.
 
TArray< TSharedPtr< 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.
 

详细描述

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.

成员函数说明

◆ ContainsWidget()

bool FWidgetPath::ContainsWidget ( TSharedRef< const SWidget >  WidgetToFind) const
返回
true if the WidgetToFind is in this WidgetPath, false otherwise.

◆ ExtendPathTo()

template<typename MatcherType >
bool FWidgetPath::ExtendPathTo ( const MatcherType &  Matcher,
EVisibility  VisibilityFilter = EVisibility::Visible 
)
inline

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.

参数
MatcherSome struct that has a "bool IsMatch( const TSharedRef<const SWidget>& InWidget ) const" method
VisibilityFilterWidgets must have this type of visibility to be included the path
返回
true if successful; false otherwise.

◆ GeneratePathToWidget()

template<typename MatcherType >
FArrangedChildren FWidgetPath::GeneratePathToWidget ( const MatcherType &  Matcher,
const FArrangedWidget &  FromWidget,
EUINavigation  NavigationType = EUINavigation::Next,
EVisibility  VisibilityFilter = EVisibility::Visible 
)
inline

Generate a path from FromWidget to WidgetToFind.

The path will not include FromWidget.

参数
MatcherSome struct that has a "bool IsMatch( const TSharedRef<const SWidget>& InWidget ) const" method
FromWidgetWidget from which we a building a path.AddItem*
VisibilityFilterWidgets must have this type of visibility to be included the path
返回
A path from FromWidget to WidgetToFind; will not include FromWidget.

◆ GetDeepestWindow()

TSharedRef< SWindow > FWidgetPath::GetDeepestWindow ( ) const

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

返回
Window at the top of this path

◆ GetPathDownTo()

FWidgetPath FWidgetPath::GetPathDownTo ( TSharedRef< const SWidget >  MarkerWidget) const
参数
MarkerWidgetCopy the path up to and including this widget
返回
a copy of the widget path down to and including the MarkerWidget. If the MarkerWidget is not found in the path, return an invalid path.

◆ GetWindow()

TSharedRef< SWindow > FWidgetPath::GetWindow ( ) const

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

返回
Window at the top of this path

◆ MoveFocus()

bool FWidgetPath::MoveFocus ( int32  PathLevel,
EUINavigation  NavigationType,
bool  bSearchFromPathWidget = true 
)

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

That is, this movement of focus will modify the subtree under Widgets(PathLevel).

参数
PathLevelThe level in this WidgetPath whose focus to move.
MoveDirectinMove focus forward or backward?
bSearchFromPathWidgetif set false the search for the next will simply start at the beginning or end of the list of children dependant on the direction
返回
true if the focus moved successfully, false if we were unable to move focus

类成员变量说明

◆ VirtualPointerPositions

TArray< TSharedPtr<FVirtualPointerPosition> > FWidgetPath::VirtualPointerPositions

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

Due to 3D widgets, the space you transition to can be completely arbitrary as you traverse the tree.


该类的文档由以下文件生成: