Navigation
API > API/Runtime > API/Runtime/Slate
Canvas is a layout widget that allows you to arbitrary position and size child widgets in a relative coordinate space
| Name | SCanvas |
| Type | class |
| Header File | /Engine/Source/Runtime/Slate/Public/Widgets/SCanvas.h |
| Include Path | #include "Widgets/SCanvas.h" |
Syntax
class SCanvas : public SPanel
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → SWidget → SPanel → SCanvas
- FSlateControlledConstruction → SWidget → SPanel → SCanvas
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
SCanvas() |
Widgets/SCanvas.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~SCanvas() |
Widgets/SCanvas.h |
Classes
| Name | Remarks |
|---|---|
| FSlot | Canvas slots allow child widgets to be positioned and sized |
Structs
| Name | Remarks |
|---|---|
| FArguments |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FScopedWidgetSlotArguments | TPanelChildren< FSlot >::FScopedWidgetSlotArguments | Widgets/SCanvas.h | |
| PrivateParentType | SPanel | Widgets/SCanvas.h | |
| PrivateThisType | SCanvas | Widgets/SCanvas.h | |
| Super | SPanel | Widgets/SCanvas.h | |
| ThisClass | SCanvas | Widgets/SCanvas.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FScopedWidgetSlotArguments AddSlot() |
Adds a content slot. | Widgets/SCanvas.h | |
void ClearChildren() |
Removes all slots from the panel. | Widgets/SCanvas.h | |
void Construct
(
const FArguments& InArgs |
Construct this widget | Widgets/SCanvas.h | |
int32 NumSlots() |
Widgets/SCanvas.h | ||
int32 RemoveSlot
(
const TSharedRef< SWidget >& SlotWidget |
Removes a particular content slot. | Widgets/SCanvas.h |
Overridden from SWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FChildren * GetChildren() |
Widgets/SCanvas.h | ||
virtual void OnArrangeChildren
(
const FGeometry& AllottedGeometry, |
Widgets/SCanvas.h | ||
virtual int32 OnPaint
(
const FPaintArgs& Args, |
Widgets/SCanvas.h |
Overridden from FSlateControlledConstruction
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual const FSlateWidgetClassData & GetWidgetClass() |
Widgets/SCanvas.h |
Protected
Overridden from SWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FVector2D ComputeDesiredSize
(
float |
Widgets/SCanvas.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static const FSlateWidgetClassData & GetPrivateWidgetClass() |
Widgets/SCanvas.h | ||
static SLATE_API void PrivateRegisterAttributes
(
FSlateAttributeInitializer& |
Widgets/SCanvas.h | ||
static FSlot::FSlotArguments Slot() |
Widgets/SCanvas.h | ||
static const FSlateWidgetClassData & StaticWidgetClass() |
Widgets/SCanvas.h |