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 | |
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 |
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 |