Navigation
API > API/Runtime > API/Runtime/Slate
Implements a widget that holds a weak pointer to one child widget.
Weak widgets encapsulate a piece of content without owning it. e.g. A tooltip is owned by the hovered widget but displayed by a floating window. That window cannot own the tooltip and must therefore use an SWeakWidget.
| Name | SWeakWidget |
| Type | class |
| Header File | /Engine/Source/Runtime/Slate/Public/Widgets/SWeakWidget.h |
| Include Path | #include "Widgets/SWeakWidget.h" |
Syntax
class SWeakWidget : public SWidget
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → SWidget → SWeakWidget
- FSlateControlledConstruction → SWidget → SWeakWidget
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
SWeakWidget() |
Widgets/SWeakWidget.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~SWeakWidget() |
Widgets/SWeakWidget.h |
Structs
| Name | Remarks |
|---|---|
| FArguments |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| WeakChild | TWeakChild< SWidget > | Widgets/SWeakWidget.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool ChildWidgetIsValid() |
Widgets/SWeakWidget.h | ||
void Construct
(
const FArguments& InArgs |
Widgets/SWeakWidget.h | ||
| Widgets/SWeakWidget.h | |||
virtual void OnArrangeChildren
(
const FGeometry& AllottedGeometry, |
Widgets/SWeakWidget.h | ||
virtual int32 OnPaint
(
const FPaintArgs& Args, |
Widgets/SWeakWidget.h | ||
void SetContent
(
const TSharedRef< SWidget >& InWidget |
Widgets/SWeakWidget.h |
Overridden from SWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FChildren * GetChildren() |
Widgets/SWeakWidget.h |
Protected
Overridden from SWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FVector2D ComputeDesiredSize
(
float |
Widgets/SWeakWidget.h |