Navigation
API > API/Runtime > API/Runtime/Slate > API/Runtime/Slate/SCanvas
Canvas slots allow child widgets to be positioned and sized
Horizontal Alignment Given a top aligned slot, where '+' represents the anchor point defined by PositionAttr.
Left Center Right
- + + | | | | | | | | | | | _ |
Note: FILL is NOT supported.
Vertical Alignment Given a left aligned slot, where '+' represents the anchor point defined by PositionAttr.
Top Center Bottom + | | | | | | | | + | | | | | + _ |
Note: FILL is NOT supported.
| Name | FSlot |
| Type | class |
| Header File | /Engine/Source/Runtime/Slate/Public/Widgets/SCanvas.h |
| Include Path | #include "Widgets/SCanvas.h" |
Syntax
class FSlot :
public TWidgetSlotWithAttributeSupport< FSlot > ,
public TAlignmentWidgetSlotMixin< FSlot >
Inheritance Hierarchy
- FSlotPosition → FSlotBase → TSlotBase → TWidgetSlotWithAttributeSupport → SCanvas::FSlot
- FSlotBase → TSlotBase → TWidgetSlotWithAttributeSupport → SCanvas::FSlot
- SlateAttributePrivate::ISlateAttributeContainer → TWidgetSlotWithAttributeSupport → SCanvas::FSlot
- TAlignmentWidgetSlotMixin → SCanvas::FSlot
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FSlot() |
Default values for a slot. | Widgets/SCanvas.h |
Structs
| Name | Remarks |
|---|---|
| FSlotArguments |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Position | TSlateSlotAttribute< FVector2D > | Position | Widgets/SCanvas.h | |
| Size | TSlateSlotAttribute< FVector2D > | Size | Widgets/SCanvas.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Construct
(
const FChildren& SlotOwner, |
Widgets/SCanvas.h | ||
FVector2D GetPosition() |
Widgets/SCanvas.h | ||
FVector2D GetSize() |
Widgets/SCanvas.h | ||
void SetPosition
(
TAttribute< FVector2D > InPosition |
Widgets/SCanvas.h | ||
void SetSize
(
TAttribute< FVector2D > InSize |
Widgets/SCanvas.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void RegisterAttributes
(
FSlateWidgetSlotAttributeInitializer& AttributeInitializer |
Widgets/SCanvas.h |