Navigation
API > API/Runtime > API/Runtime/Slate > API/Runtime/Slate/FSlateApplication
Description
Calculates the popup window position from the passed in window position and size. Adjusts position for popup windows which are outside of the work area of the monitor where they reside
| Name | CalculatePopupWindowPosition |
| Type | function |
| Header File | /Engine/Source/Runtime/Slate/Public/Framework/Application/SlateApplication.h |
| Include Path | #include "Framework/Application/SlateApplication.h" |
| Source | /Engine/Source/Runtime/Slate/Private/Framework/Application/SlateApplication.cpp |
virtual UE::Slate::FDeprecateVector2DResult CalculatePopupWindowPosition
(
const FSlateRect & InAnchor,
const UE::Slate::FDeprecateVector2DParameter & InSize,
bool bAutoAdjustForDPIScale,
const UE::Slate::FDeprecateVector2DParameter & InProposedPlacement,
const EOrientation Orientation,
const EPopupLayoutMode
) const
The adjusted position
Parameters
| Name | Remarks |
|---|---|
| InAnchor | The current(suggested) window position and size of an area which may not be covered by the popup. |
| InSize | The size of the window |
| bAutoAdjustForDPIScale | Whether the method should attempt to correct for the DPI scale of the monitor. |
| InProposedPlacement | The location on screen where the popup should go if allowed. If zero this will be determined from Orientation and Anchor |
| Orientation | The direction of the popup. If vertical it will attempt to open below the anchor but will open above if there is no room. If horizontal it will attempt to open below the anchor but will open above if there is no room. |
| LayoutMode | Determines whether the popup is allowed to flip to the other side of the anchor when there is no room on the screen. |