SBorder

A border is an widget that can be used to contain other widgets.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

Slate

Header

/Engine/Source/Runtime/Slate/Public/Widgets/Layout/SBorder.h

Include

#include "Widgets/Layout/SBorder.h"

Syntax

class SBorder : public SCompoundWidget

Remarks

A border is an widget that can be used to contain other widgets. It has a BorderImage property, which allows it to take on different appearances. Border also has a Content() slot as well as some parameters controlling the arrangement of said content.

Constructors

Name Description

Public function

SBorder()

Default constructor.

Functions

Name Description

Public function

void

 

ClearContent()

Clears out the content for the border

Public function

void

 

Construct

(
    const FArguments& InArgs
)

Construct this widget

Protected function Const

FSlateColor

 

GetBorderBackgroundColor()

Protected function Const

TSlateAttrib...

 

GetBorderBackgroundColorAttribute()

Protected function Const

const FSlate...

 

GetBorderImage()

Protected function Const

TSlateAttrib...

 

GetBorderImageAttribute()

Public function Const

const TShare...

 

GetContent()

Gets the content for this border

Protected function Const

FVector2D

 

GetDesiredSizeScale()

Protected function Const

TSlateAttrib...

 

GetDesiredSizeScaleAttribute()

Protected function Const

bool

 

GetShowDisabledEffect()

Protected function Const

TSlateAttrib...

 

GetShowDisabledEffectAttribute()

Public function

void

 

SetBorderBackgroundColor

(
    TAttribute< FSlateColor > InColorAn...
)

Sets the color and opacity of the background image of this border.

Public function

void

 

SetBorderImage

(
    TAttribute< const FSlateBrush*...
)

See BorderImage attribute

Public function Virtual

void

 

SetContent

(
    TSharedRef< SWidget > InContent
)

Sets the content for this border

Public function

void

 

SetDesiredSizeScale

(
    TAttribute< FVector2D > InDesiredSi...
)

Set the desired size scale multiplier

Public function

void

 

SetHAlign

(
    EHorizontalAlignment HAlign
)

See HAlign argument

Public function

void

 

SetPadding

(
    TAttribute< FMargin > InPadding
)

See Padding attribute

Public function

void

 

SetShowEffectWhenDisabled

(
    TAttribute< bool > InShowEffectWhen...
)

See ShowEffectWhenDisabled attribute

Public function

void

 

SetVAlign

(
    EVerticalAlignment VAlign
)

See VAlign argument

Public function Static

const FSlate...

 

StaticWidgetClass()

Overridden from SWidget

Name Description

Protected function Virtual Const

FVector2D

 

ComputeDesiredSize

(
    float LayoutScaleMultiplier
)

Compute the ideal size necessary to display this widget.

Public function Virtual Const

int32

 

OnPaint

(
    const FPaintArgs& Args,
    const FGeometry& AllottedGeometry,
    const FSlateRect& MyCullingRect,
    FSlateWindowElementList& OutDrawEl...,
    int32 LayerId,
    const FWidgetStyle& InWidgetStyle,
    bool bParentEnabled
)

The widget should respond by populating the OutDrawElements array with FDrawElements that represent it and any of its children.

Overridden from FSlateControlledConstruction

Name Description

Public function Virtual Const

const FSlate...

 

GetWidgetClass()

Classes

Name

Description

Public struct

FArguments

Typedefs

Deprecated Variables

Name Description

Protected variable

TSlateDeprecate...

 

BorderBackgroundColor

Direct access to BorderBackgroundColor is now deprecated. Use the setter or getter.

Protected variable

FInvalidatableB...

 

BorderImage

Direct access to BorderImage is now deprecated. Use the setter or getter.

Protected variable

TSlateDeprecate...

 

DesiredSizeScale

Direct access to DesiredSizeScale is now deprecated. Use the setter or getter.

Protected variable

TSlateDeprecate...

 

ShowDisabledEffect

Direct access to ShowDisabledEffect is now deprecated. Use the setter or getter.