Navigation
Unreal Engine C++ API Reference > Runtime > SlateCore > Widgets
Inheritance Hierarchy
- FSlateControlledConstruction
- TSharedFromThis
- SWidget
- SPanel
- SBoxPanel
- SHorizontalBox
- SStackBox
- SSplitter
- SThemeColorBlocksBar
References
Module | SlateCore |
Header | /Engine/Source/Runtime/SlateCore/Public/Widgets/SPanel.h |
Include | #include "Widgets/SPanel.h" |
Syntax
class SPanel : public SWidget
Remarks
A Panel arranges its child widgets on the screen.
Each child widget should be stored in a Slot. The Slot describes how the individual child should be arranged with respect to its parent (i.e. the Panel) and its peers Widgets (i.e. the Panel's other children.) For a simple example see StackPanel.
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
SPanel () |
Hidden default constructor. |
Destructors
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
~SPanel () |
Functions
Type | Name | Description | |
---|---|---|---|
![]() |
void | Construct () |
Most panels do not create widgets as part of their implementation, so they do not need to implement a Construct() |
![]() ![]() |
int32 | PaintArrangedChildren
(
const FPaintArgs& Args, |
Just like OnPaint, but takes already arranged children. Can be handy for writing custom SPanels. |
Overridden from SWidget
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
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. |
![]() |
FChildren * | GetChildren () |
All widgets must provide a way to access their children in a layout-agnostic way. |
![]() ![]() |
void | OnArrangeChildren
(
const FGeometry& AllottedGeometry, |
Panels arrange their children in a space described by the AllottedGeometry parameter. |
![]() ![]() ![]() |
int32 | OnPaint
(
const FPaintArgs& Args, |
The widget should respond by populating the OutDrawElements array with FDrawElements that represent it and any of its children. |
![]() ![]() |
void | SetVisibility
(
TAttribute< EVisibility > InVisibility |