Navigation
API > API/Runtime > API/Runtime/SlateCore
Describes the space around a Widget.
| Name | FMargin |
| Type | struct |
| Header File | /Engine/Source/Runtime/SlateCore/Public/Layout/Margin.h |
| Include Path | #include "Layout/Margin.h" |
Syntax
USTRUCT (BlueprintType )
struct FMargin
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FMargin
(
const FVector2f InVector |
Construct a Margin where Horizontal describes Left and Right spacing while Vertical describes Top and Bottom spacing | Layout/Margin.h | |
FMargin
(
double InLeft, |
Construct a Margin where the spacing on each side is individually specified. | Layout/Margin.h | |
FMargin
(
float Horizontal, |
Construct a Margin where Horizontal describes Left and Right spacing while Vertical describes Top and Bottom spacing | Layout/Margin.h | |
FMargin
(
const FVector4d InVector |
Construct a Margin where the margins are coming from a FVector4 | Layout/Margin.h | |
FMargin
(
const FVector4f InVector |
Construct a Margin where the margins are coming from a FVector4 | Layout/Margin.h | |
FMargin
(
const FVector2d InVector |
Construct a Margin where Horizontal describes Left and Right spacing while Vertical describes Top and Bottom spacing | Layout/Margin.h | |
FMargin
(
float UniformMargin |
Construct a Margin with uniform space on all sides | Layout/Margin.h | |
FMargin () |
Default constructor.The default margin size is zero on all four sides.. | Layout/Margin.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Bottom | float | Holds the margin to the bottom. | Layout/Margin.h |
|
| Left | float | Holds the margin to the left. | Layout/Margin.h |
|
| Right | float | Holds the margin to the right. | Layout/Margin.h |
|
| Top | float | Holds the margin to the top. | Layout/Margin.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UE::Slate::FDeprecateVector2DResult GetDesiredSize() |
Gets the margin's total size. | Layout/Margin.h | |
FVector2f GetDesiredSize2f() |
Layout/Margin.h | ||
UE::Slate::FDeprecateVector2DResult GetTopLeft() |
Gets the offset for the top left. | Layout/Margin.h | |
FVector2f GetTopLeft2f() |
Layout/Margin.h | ||
float GetTotalSpaceAlong () |
Gets the total horizontal or vertical margin. | Layout/Margin.h | |
float GetTotalSpaceAlong () |
Layout/Margin.h | ||
float GetTotalSpaceAlong () |
Layout/Margin.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Subtracts another margin from this margin. | Layout/Margin.h | ||
bool operator!=
(
const FMargin& Other |
Compares this margin with another for inequality. | Layout/Margin.h | |
| Multiply the margin by a scalar. | Layout/Margin.h | ||
| Multiply the margin by another margin functioning as the scale. | Layout/Margin.h | ||
| Adds another margin to this margin. | Layout/Margin.h | ||
bool operator==
(
const FMargin& Other |
Compares this margin with another for equality. | Layout/Margin.h |