UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FMargin Struct Reference

#include <Margin.h>

Public Member Functions

 FMargin ()
 
 FMargin (float UniformMargin)
 
 FMargin (float Horizontal, float Vertical)
 
 FMargin (const FVector2f InVector)
 
 FMargin (const FVector2d InVector)
 
 FMargin (double InLeft, double InTop, double InRight, double InBottom)
 
 FMargin (const FVector4f InVector)
 
 FMargin (const FVector4d InVector)
 
FMargin operator* (float Scale) const
 
FMargin operator* (const FMargin &InScale) const
 
FMargin operator+ (const FMargin &InDelta) const
 
FMargin operator- (const FMargin &Other) const
 
bool operator== (const FMargin &Other) const
 
bool operator!= (const FMargin &Other) const
 
UE::Slate::FDeprecateVector2DResult GetTopLeft () const
 
FVector2f GetTopLeft2f () const
 
UE::Slate::FDeprecateVector2DResult GetDesiredSize () const
 
FVector2f GetDesiredSize2f () const
 
template<EOrientation Orientation>
float GetTotalSpaceAlong () const
 
template<>
float GetTotalSpaceAlong () const
 
template<>
float GetTotalSpaceAlong () const
 

Public Attributes

float Left
 
float Top
 
float Right
 
float Bottom
 

Detailed Description

Describes the space around a Widget.

Constructor & Destructor Documentation

◆ FMargin() [1/8]

FMargin::FMargin ( )
inline

Default constructor.

The default margin size is zero on all four sides..

◆ FMargin() [2/8]

FMargin::FMargin ( float  UniformMargin)
inline

Construct a Margin with uniform space on all sides

◆ FMargin() [3/8]

FMargin::FMargin ( float  Horizontal,
float  Vertical 
)
inline

Construct a Margin where Horizontal describes Left and Right spacing while Vertical describes Top and Bottom spacing

◆ FMargin() [4/8]

FMargin::FMargin ( const FVector2f  InVector)
inline

Construct a Margin where Horizontal describes Left and Right spacing while Vertical describes Top and Bottom spacing

◆ FMargin() [5/8]

FMargin::FMargin ( const FVector2d  InVector)
inline

Construct a Margin where Horizontal describes Left and Right spacing while Vertical describes Top and Bottom spacing

◆ FMargin() [6/8]

FMargin::FMargin ( double  InLeft,
double  InTop,
double  InRight,
double  InBottom 
)
inline

Construct a Margin where the spacing on each side is individually specified.

◆ FMargin() [7/8]

FMargin::FMargin ( const FVector4f  InVector)
inline

Construct a Margin where the margins are coming from a FVector4

◆ FMargin() [8/8]

FMargin::FMargin ( const FVector4d  InVector)
inline

Construct a Margin where the margins are coming from a FVector4

Member Function Documentation

◆ GetDesiredSize()

UE::Slate::FDeprecateVector2DResult FMargin::GetDesiredSize ( ) const
inline

Gets the margin's total size.

Returns
Cumulative margin size.

◆ GetDesiredSize2f()

FVector2f FMargin::GetDesiredSize2f ( ) const
inline

◆ GetTopLeft()

UE::Slate::FDeprecateVector2DResult FMargin::GetTopLeft ( ) const
inline

Gets the offset for the top left.

Returns
The top left offset.

◆ GetTopLeft2f()

FVector2f FMargin::GetTopLeft2f ( ) const
inline

◆ GetTotalSpaceAlong() [1/3]

template<EOrientation Orientation>
float FMargin::GetTotalSpaceAlong ( ) const
inline

Gets the total horizontal or vertical margin.

Returns
Cumulative horizontal margin.

◆ GetTotalSpaceAlong() [2/3]

template<>
float FMargin::GetTotalSpaceAlong ( ) const
inline

◆ GetTotalSpaceAlong() [3/3]

template<>
float FMargin::GetTotalSpaceAlong ( ) const
inline

◆ operator!=()

bool FMargin::operator!= ( const FMargin Other) const
inline

Compares this margin with another for inequality.

Parameters
OtherThe other margin.
Returns
true if the two margins are not equal, false otherwise.

◆ operator*() [1/2]

FMargin FMargin::operator* ( const FMargin InScale) const
inline

Multiply the margin by another margin functioning as the scale.

Parameters
InScaleHow much to scale the margin.
Returns
An FMargin where each value is scaled by Scale.

◆ operator*() [2/2]

FMargin FMargin::operator* ( float  Scale) const
inline

Multiply the margin by a scalar.

Parameters
ScaleHow much to scale the margin.
Returns
An FMargin where each value is scaled by Scale.

◆ operator+()

FMargin FMargin::operator+ ( const FMargin InDelta) const
inline

Adds another margin to this margin.

Parameters
OtherThe margin to add.
Returns
A margin that represents this margin plus the other margin.

◆ operator-()

FMargin FMargin::operator- ( const FMargin Other) const
inline

Subtracts another margin from this margin.

Parameters
OtherThe margin to subtract.
Returns
A margin that represents this margin minues the other margin.

◆ operator==()

bool FMargin::operator== ( const FMargin Other) const
inline

Compares this margin with another for equality.

Parameters
OtherThe other margin.
Returns
true if the two margins are equal, false otherwise.

Member Data Documentation

◆ Bottom

float FMargin::Bottom

Holds the margin to the bottom.

◆ Left

float FMargin::Left

Holds the margin to the left.

◆ Right

float FMargin::Right

Holds the margin to the right.

◆ Top

float FMargin::Top

Holds the margin to the top.


The documentation for this struct was generated from the following file: