UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
LayoutUtils.h File Reference
#include "CoreMinimal.h"
#include "ArrangedChildren.h"
#include "FlowDirection.h"
#include "Layout/Children.h"
#include "Margin.h"
#include "SlateRect.h"
#include "Templates/UnrealTypeTraits.h"
#include "Types/SlateStructs.h"
#include "Visibility.h"
#include "Widgets/SBoxPanel.h"

Go to the source code of this file.

Classes

struct  AlignmentArrangeResult
 
struct  FSlotProxy
 
class  TSlotProxyIterator< UE_REQUIRES >
 
struct  ArrangeUtils::GetChildAlignment< Orientation >
 
struct  ArrangeUtils::GetChildAlignment< Orient_Horizontal >
 
struct  ArrangeUtils::GetChildAlignment< Orient_Vertical >
 

Namespaces

namespace  UE
 
namespace  UE::Slate
 
namespace  ArrangeUtils
 

Functions

SLATECORE_API UE::Slate::FDeprecateVector2DResult ComputePopupFitInRect (const FSlateRect &InAnchor, const FSlateRect &PopupRect, const EOrientation &Orientation, const FSlateRect &RectToFit, bool bAllowFlip=true)
 

Function Documentation

◆ ComputePopupFitInRect()

SLATECORE_API UE::Slate::FDeprecateVector2DResult ComputePopupFitInRect ( const FSlateRect InAnchor,
const FSlateRect PopupRect,
const EOrientation Orientation,
const FSlateRect RectToFit,
bool  bAllowFlip = true 
)

Given information about a popup and the space available for displaying that popup, compute best placement for it.

Parameters
InAnchorArea relative to which popup is being created (e.g. the button part of a combo box)
PopupRectProposed placement of popup; position may require adjustment.
OrientationAre we trying to show the popup above/below or left/right relative to the anchor?
RectToFitThe space available for showing this popup; we want to fit entirely within it without clipping.
bAllowFlipDetermines whether the popup can be flipped to the other side of the anchor when there is no space on the screen for it to fit at its preferred position.
Returns
A best position within the RectToFit such that none of the popup clips outside of the RectToFit.