UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
NavigationRouting.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6
7#include "NavigationRouting.generated.h"
8
9class SWidget;
10class FHittestGrid;
12class FSlateRect;
13
14UENUM()
16{
17 AcceptFocus UMETA(DisplayName="Accept Focus", Tooltip = "On navigation, this widget, or widgets within this boundary, will receive focus. Focus will not be routed"),
18 RouteToTopMostChild UMETA(DisplayName="Route To Top Most Child", Tooltip="On navigation, this widget, or widgets within this boundary, will route focus to topmost visibile widget in this container"),
19 RouteToBottomMostChild UMETA(DisplayName="Route To Bottom Most Child", Tooltip="On navigation, this widget, or widgets within this boundary, will route focus to bottommost visibile widget in this container"),
20 RouteToLeftMostChild UMETA(DisplayName="Route To Left Most Child", Tooltip="On navigation, this widget, or widgets within this boundary, will route focus to leftmost visibile widget in this container"),
21 RouteToRightMostChild UMETA(DisplayName="Route To Right Most Child", Tooltip="On navigation, this widget, or widgets within this boundary, will route focus to rightmost visibile widget in this container"),
22 RouteToTopLeftChild UMETA(DisplayName="Route To Top Left Child", Tooltip="On navigation, this widget, or widgets within this boundary, will route focus to widget in the top left container"),
23 RouteToTopRightChild UMETA(DisplayName="Route To Top Right Child", Tooltip="On navigation, this widget, or widgets within this boundary, will route focus to widget in the top right container"),
24 RouteToBottomLeftChild UMETA(DisplayName="Route To Bottom Left Child", Tooltip="On navigation, this widget, or widgets within this boundary, will route focus to widget in the bottom left container"),
25 RouteToBottomRightChild UMETA(DisplayName="Route To Bottom Right Child", Tooltip="On navigation, this widget, or widgets within this boundary, will route focus to widget in the bottom right container"),
28};
29
45
47{
49
50private:
51 using FGetEdgeFunc = TFunction<float(const FSlateRect&)>;
52 static TSharedPtr<SWidget> RouteNavigationFocusToEdge(const FNavigationRoutingParams& Params, int Direction, int AxisIndex, const FSlateRect& BoundaryRect, const FVector2f& StartingPoint, FGetEdgeFunc GetEdgeFunc);
53};
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
EWidgetNavigationRoutingPolicy
Definition NavigationRouting.h:16
#define UENUM(...)
Definition ObjectMacros.h:749
USkinnedMeshComponent float
Definition SkinnedMeshComponent.h:60
uint8_t uint8
Definition binka_ue_file_header.h:8
Definition HittestGrid.h:30
Definition NavigationReply.h:43
Definition SlateRect.h:26
Definition SWidget.h:165
Definition AndroidPlatformMisc.h:14
Definition SharedPointer.h:692
Definition NavigationRouting.h:31
const FNavigationReply & NavigationReply
Definition NavigationRouting.h:42
int32 UserIndex
Definition NavigationRouting.h:43
const FHittestGrid * HittestGrid
Definition NavigationRouting.h:41
TSharedPtr< SWidget > FocusedWidget
Definition NavigationRouting.h:40
FNavigationRoutingParams(TSharedPtr< SWidget > StartingWidget, TSharedPtr< SWidget > FocusedWidget, const FHittestGrid *HittestGrid, const FNavigationReply &NavigationReply, int32 UserIndex)
Definition NavigationRouting.h:32
TSharedPtr< SWidget > StartingWidget
Definition NavigationRouting.h:39
Definition NavigationRouting.h:47
static TSharedPtr< SWidget > RouteNavigationFocus(const FNavigationRoutingParams &Params)
Definition NavigationRouting.cpp:12