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

#include <HittestGrid.h>

+ Inheritance diagram for FHittestGrid:

Classes

struct  FDebuggingFindNextFocusableWidgetArgs
 
struct  FGridTestingParams
 

Public Member Functions

SLATECORE_API FHittestGrid ()
 
SLATECORE_API TArray< FWidgetAndPointerGetBubblePath (UE::Slate::FDeprecateVector2DParameter DesktopSpaceCoordinate, float CursorRadius, bool bIgnoreEnabledStatus, int32 UserIndex=INDEX_NONE)
 
SLATECORE_API bool SetHittestArea (const UE::Slate::FDeprecateVector2DParameter &HittestPositionInDesktop, const UE::Slate::FDeprecateVector2DParameter &HittestDimensions, const UE::Slate::FDeprecateVector2DParameter &HitestOffsetInWindow=FVector2f::ZeroVector)
 
SLATECORE_API void InsertCustomHitTestPath (const SWidget *InWidget, const TSharedRef< ICustomHitTestPath > &CustomHitTestPath)
 
void SetUserIndex (int32 UserIndex)
 
void SetCullingRect (const FSlateRect &InCullingRect)
 
void SetOwner (const SWidget *InOwner)
 
int32 GetUserIndex () const
 
SLATECORE_API TSharedPtr< SWidgetFindNextFocusableWidget (const FArrangedWidget &StartingWidget, const EUINavigation Direction, const FNavigationReply &NavigationReply, const FArrangedWidget &RuleWidget, int32 UserIndex)
 
UE::Slate::FDeprecateVector2DResult GetGridSize () const
 
UE::Slate::FDeprecateVector2DResult GetGridOrigin () const
 
UE::Slate::FDeprecateVector2DResult GetGridWindowOrigin () const
 
SLATECORE_API FSlateRect GetWidgetRenderBoundingRect (const TSharedPtr< SWidget > &Widget) const
 
SLATECORE_API bool IsValidCellCoord (const FIntPoint &CellCoord) const
 
SLATECORE_API bool IsValidCellCoord (const int32 XCoord, const int32 YCoord) const
 
const FVector2fGetCellSize () const
 
SLATECORE_API void Clear ()
 
SLATECORE_API void AddWidget (const SWidget *InWidget, int32 InBatchPriorityGroup, int32 InLayerId, FSlateInvalidationWidgetSortOrder InSecondarySort)
 
SLATECORE_API void RemoveWidget (const SWidget *InWidget)
 
SLATECORE_API void UpdateWidget (const SWidget *InWidget, FSlateInvalidationWidgetSortOrder InSecondarySort)
 
SLATECORE_API bool ContainsWidget (const SWidget *InWidget) const
 
SLATECORE_API void AddGrid (const TSharedRef< const FHittestGrid > &OtherGrid)
 
SLATECORE_API void RemoveGrid (const TSharedRef< const FHittestGrid > &OtherGrid)
 
SLATECORE_API void RemoveGrid (const SWidget *OtherGridOwner)
 

Friends

struct FNavigationMethod
 
struct FNavigationMethodOrthogonal
 
struct FNavigationRouting
 

Additional Inherited Members

- Protected Member Functions inherited from FNoncopyable
 FNoncopyable ()
 
 ~FNoncopyable ()
 

Constructor & Destructor Documentation

◆ FHittestGrid()

FHittestGrid::FHittestGrid ( )

Member Function Documentation

◆ AddGrid()

void FHittestGrid::AddGrid ( const TSharedRef< const FHittestGrid > &  OtherGrid)

Add an already existing grid that occupy the same space. The grid needs to have an owner, not be this grid and occupy the same space as this grid.

◆ AddWidget()

void FHittestGrid::AddWidget ( const SWidget InWidget,
int32  InBatchPriorityGroup,
int32  InLayerId,
FSlateInvalidationWidgetSortOrder  InSecondarySort 
)

Add SWidget from the HitTest Grid

◆ Clear()

void FHittestGrid::Clear ( )

Clear the grid

◆ ContainsWidget()

bool FHittestGrid::ContainsWidget ( const SWidget InWidget) const

Check if SWidget is contained within the HitTest Grid

◆ FindNextFocusableWidget()

TSharedPtr< SWidget > FHittestGrid::FindNextFocusableWidget ( const FArrangedWidget StartingWidget,
const EUINavigation  Direction,
const FNavigationReply NavigationReply,
const FArrangedWidget RuleWidget,
int32  UserIndex 
)

Finds the next focusable widget by searching through the hit test grid

Parameters
StartingWidgetThis is the widget we are starting at, and navigating from.
DirectionThe direction we should search in.
NavigationReplyThe Navigation Reply to specify a boundary rule for the search.
RuleWidgetThe Widget that is applying the boundary rule, used to get the bounds of the Rule.

◆ GetBubblePath()

TArray< FWidgetAndPointer > FHittestGrid::GetBubblePath ( UE::Slate::FDeprecateVector2DParameter  DesktopSpaceCoordinate,
float  CursorRadius,
bool  bIgnoreEnabledStatus,
int32  UserIndex = INDEX_NONE 
)

Given a Slate Units coordinate in virtual desktop space, perform a hittest and return the path along which the corresponding event would be bubbled.

◆ GetCellSize()

const FVector2f & FHittestGrid::GetCellSize ( ) const
inline

◆ GetGridOrigin()

UE::Slate::FDeprecateVector2DResult FHittestGrid::GetGridOrigin ( ) const
inline

◆ GetGridSize()

UE::Slate::FDeprecateVector2DResult FHittestGrid::GetGridSize ( ) const
inline

◆ GetGridWindowOrigin()

UE::Slate::FDeprecateVector2DResult FHittestGrid::GetGridWindowOrigin ( ) const
inline

◆ GetUserIndex()

int32 FHittestGrid::GetUserIndex ( ) const
inline

Gets current slate user index that should be associated with any added widgets

◆ GetWidgetRenderBoundingRect()

FSlateRect FHittestGrid::GetWidgetRenderBoundingRect ( const TSharedPtr< SWidget > &  Widget) const

Get the screen space rectangle that corresponds to the painted area of the widget

◆ InsertCustomHitTestPath()

void FHittestGrid::InsertCustomHitTestPath ( const SWidget InWidget,
const TSharedRef< ICustomHitTestPath > &  CustomHitTestPath 
)

Insert custom hit test data for a widget already in the grid

◆ IsValidCellCoord() [1/2]

bool FHittestGrid::IsValidCellCoord ( const FIntPoint CellCoord) const

Returns true if the CellCoordinates are within the grid

◆ IsValidCellCoord() [2/2]

bool FHittestGrid::IsValidCellCoord ( const int32  XCoord,
const int32  YCoord 
) const

◆ RemoveGrid() [1/2]

void FHittestGrid::RemoveGrid ( const SWidget OtherGridOwner)

Remove a grid that was appended.

◆ RemoveGrid() [2/2]

void FHittestGrid::RemoveGrid ( const TSharedRef< const FHittestGrid > &  OtherGrid)

Remove a grid that was appended.

◆ RemoveWidget()

void FHittestGrid::RemoveWidget ( const SWidget InWidget)

Remove SWidget from the HitTest Grid

◆ SetCullingRect()

void FHittestGrid::SetCullingRect ( const FSlateRect InCullingRect)
inline

Set the culling rect to be used by the parent grid (in case we are appended to another grid).

◆ SetHittestArea()

bool FHittestGrid::SetHittestArea ( const UE::Slate::FDeprecateVector2DParameter HittestPositionInDesktop,
const UE::Slate::FDeprecateVector2DParameter HittestDimensions,
const UE::Slate::FDeprecateVector2DParameter HitestOffsetInWindow = FVector2f::ZeroVector 
)

Set the position and size of the hittest area in desktop coordinates

Parameters
HittestPositionInDesktopThe position of this hit testing area in desktop coordinates.
HittestDimensionsThe dimensions of this hit testing area.
Returns
Returns true if a clear of the hittest grid was required.

◆ SetOwner()

void FHittestGrid::SetOwner ( const SWidget InOwner)
inline

Set the owner SWidget to be used by the parent grid (in case we are appended to another grid).

◆ SetUserIndex()

void FHittestGrid::SetUserIndex ( int32  UserIndex)
inline

Sets the current slate user index that should be associated with any added widgets

◆ UpdateWidget()

void FHittestGrid::UpdateWidget ( const SWidget InWidget,
FSlateInvalidationWidgetSortOrder  InSecondarySort 
)

Update the widget SecondarySort without removing it and readding it again.

Friends And Related Symbol Documentation

◆ FNavigationMethod

◆ FNavigationMethodOrthogonal

◆ FNavigationRouting


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