SConstraintCanvas

ConstraintCanvas is a layout widget that allows you to arbitrary position and size child widgets in a relative coordinate space.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Slate

Header

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

Include

#include "Widgets/Layout/SConstraintCanvas.h"

Syntax

class SConstraintCanvas : public SPanel

Remarks

ConstraintCanvas is a layout widget that allows you to arbitrary position and size child widgets in a relative coordinate space. Additionally it permits anchoring widgets.

Variables

Name Description

Protected variable

TPanelChildren<...

 

Children

The ConstraintCanvas widget's children.

Constructors

Name Description

Public function

SConstraintCanvas()

Functions

Name Description

Public function

FSlot &

 

AddSlot()

Adds a content slot.

Public function

void

 

ClearChildren()

Removes all slots from the panel.

Public function

void

 

Construct

(
    const FArguments& InArgs
)

Construct this widget

Public function

int32

 

RemoveSlot

(
    const TSharedRef< SWidget >& SlotW...
)

Removes a particular content slot.

Public function Static

FSlot &

 

Slot()

Overridden from SWidget

Name Description

Protected function Virtual Const

FVector2D

 

ComputeDesiredSize

(
    float
)

A Panel's desired size in the space required to arrange of its children on the screen while respecting all of the children's desired sizes and any layout-related options specified by the user.

Public function Virtual

FChildren &#...

 

GetChildren()

All widgets must provide a way to access their children in a layout-agnostic way.

Public function Virtual Const

void

 

OnArrangeChildren

(
    const FGeometry& AllottedGeometry,
    FArrangedChildren& ArrangedChildre...
)

Panels arrange their children in a space described by the AllottedGeometry parameter.

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.

Classes

Name

Description

Public struct

FArguments

Public class

FSlot

ConstraintCanvas slots allow child widgets to be positioned and sized

Typedefs

Name

Description

FArrangedChildLayers

An array matching the length and order of ArrangedChildren.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss