Navigation
API > API/Developer > API/Developer/ToolWidgets
Class that can be used to place a draggable box into a viewport or some other large widget as an overlay. Just place the widget that you want to be draggable as the contents.
This overlay will remain confined to the bounds of the viewport dimensions. It anchors the content to the corners of the parent widget: e.g. when a user drags it from the bottom-left to the bottom-right corner and drags the right side of the viewport, the widget moves relative to the right side.
| Name | SDraggableBoxOverlay |
| Type | class |
| Header File | /Engine/Source/Developer/ToolWidgets/Public/Overlay/SDraggableBoxOverlay.h |
| Include Path | #include "Overlay/SDraggableBoxOverlay.h" |
Syntax
class SDraggableBoxOverlay : public SCompoundWidget
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → SWidget → SCompoundWidget → SDraggableBoxOverlay
- FSlateControlledConstruction → SWidget → SCompoundWidget → SDraggableBoxOverlay
Structs
| Name | Remarks |
|---|---|
| FArguments |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Construct
(
const FArguments& InArgs |
Overlay/SDraggableBoxOverlay.h | ||
FVector2f GetBoxAlignmentOffset() |
Overlay/SDraggableBoxOverlay.h | ||
EHorizontalAlignment GetBoxHorizontalAlignment() |
Overlay/SDraggableBoxOverlay.h | ||
EVerticalAlignment GetBoxVerticalAlignment() |
Overlay/SDraggableBoxOverlay.h | ||
FToolWidget_DragBoxPosition GetDragBoxPosition() |
Gets information to restore this content's position. This is useful for saving in config files. | Overlay/SDraggableBoxOverlay.h | |
TOptional< float > GetHeightOverride() |
Returns the explicit height override set by a user resize, or unset if the box is content-sized on this axis. | Overlay/SDraggableBoxOverlay.h | |
TOptional< float > GetMaximumBoxHeight() |
Overlay/SDraggableBoxOverlay.h | ||
TOptional< float > GetMaximumBoxWidth() |
Overlay/SDraggableBoxOverlay.h | ||
TOptional< float > GetMinimumBoxHeight() |
Overlay/SDraggableBoxOverlay.h | ||
TOptional< float > GetMinimumBoxWidth() |
Overlay/SDraggableBoxOverlay.h | ||
TOptional< float > GetWidthOverride() |
Returns the explicit width override set by a user resize, or unset if the box is content-sized on this axis. | Overlay/SDraggableBoxOverlay.h | |
void RestoreFromDragBoxPosition
(
const FToolWidget_DragBoxPosition& InWidgetPosition |
Restores the content position. This is useful for loading a widget position saved in a config file. | Overlay/SDraggableBoxOverlay.h | |
void SetBoxAlignmentOffset
(
const FVector2f& InOffset, |
Sets the content's position relative to the current anchor points. | Overlay/SDraggableBoxOverlay.h | |
void SetBoxHorizontalAlignment
(
EHorizontalAlignment InAlignment |
Overlay/SDraggableBoxOverlay.h | ||
void SetBoxVerticalAlignment
(
EVerticalAlignment InAlignment |
Overlay/SDraggableBoxOverlay.h | ||
void SetDragBoxPosition
(
const FToolWidget_DragBoxPosition& InPosition |
Sets the content's position. This is useful for loading a widget position saved in a config file. | Overlay/SDraggableBoxOverlay.h | |
void SetHeightOverride
(
const TOptional< float >& NewHeight |
Sets an explicit height override. Pass an unset optional to revert to content sizing on this axis. | Overlay/SDraggableBoxOverlay.h | |
void SetWidthOverride
(
const TOptional< float >& NewWidth |
Sets an explicit width override. Pass an unset optional to revert to content sizing on this axis. | Overlay/SDraggableBoxOverlay.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FMargin GetPadding() |
Overlay/SDraggableBoxOverlay.h | ||
FVector2f RecomputeAnchorPoints
(
const FVector2f& InOffset |
Recomputes HorizontalAlignment and VerticalAlignment if InOffset is too far away from the current corner. | Overlay/SDraggableBoxOverlay.h |