Widget Reference
Reference for UDraggableWindow (/Script/DraggableWindowUMG.DraggableWindow). Property names and defaults were read from the plugin (v3.3.4) via Unreal MCP.
Class diagram
Section titled “Class diagram”Overview
Section titled “Overview”flowchart LR Parent["«UserWidget» UUserWidget"] Window["«DraggableWindow» UDraggableWindow"] Enum["«enum» EOperatingSystemWindowStartupState<br/>Default · StartMinimized · StartMaximized"] Parent --> Window Window -->|CreateDraggableWindow| Enum
UDraggableWindow members
Section titled “UDraggableWindow members”Properties and Blueprint-callable functions on UDraggableWindow (from plugin v3.3.4):
flowchart TB Window["UDraggableWindow<br/>bEnableDrag · bEnableResizing · bEnableMaximizing · ResizeMinWidth · ResizeMaxWidth · ResizeMinHeight · ResizeMaxHeight · DragKey · bIsMaximized<br/>CreateDraggableWindow() · CreateDraggableWindowFromWidget() · AddContentWidget() · AddContentWidgetClass() · GetChildWidget() · UpdateWindowSize() · CenterWindowToScreen() · ToggleMaximize() · CloseWindow() · ApplyWindowStartupState() · OnCloseWindow() · OnDragStart() · OnResizeStart()"]
Blueprint events (On Close Window, On Drag Start, On Resize Start, etc.) are listed in Blueprint events below.
EOperatingSystemWindowStartupState
Section titled “EOperatingSystemWindowStartupState”Used by Create Draggable Window nodes when spawning at runtime.
| Value | Effect |
|---|---|
| Default | Normal visible window |
| Start Minimized | Fires On Start Minimized |
| Start Maximized | Opens maximized (requires resizing enabled) |
Properties (class defaults)
Section titled “Properties (class defaults)”| Property | Type | Default | Description |
|---|---|---|---|
| Enable Drag | Boolean | true | Allow dragging from WindowTitleBorderWidget |
| Enable Resizing | Boolean | true | Allow resize drag from ResizeAreaWidget |
| Enable Maximizing | Boolean | true | Allow Toggle Maximize (requires resizing) |
| Maximize Taskbar Offset | Float | — | Bottom inset when maximized (taskbar clearance) |
| Resize Min Width | Float | 640 | Minimum width in pixels |
| Resize Max Width | Float | 480 | Maximum width in pixels |
| Resize Min Height | Float | — | Minimum height in pixels |
| Resize Max Height | Float | — | Maximum height in pixels |
| Drag Key | Key | Left Mouse Button | Input key for drag / resize |
| Is Maximized | Boolean | false | Runtime state (read-only) |
Required widget bindings
Section titled “Required widget bindings”Bind these in your Draggable Window subclass (names are case-sensitive):
| Binding name | Widget type | Purpose |
|---|---|---|
| WindowTitleBorderWidget | Border | Drag handle + title area |
| ChildWidgetCanvas | Canvas Panel | Hosts child content |
| ResizeAreaWidget | Border | Bottom-right resize grip (optional) |
Blueprint API
Section titled “Blueprint API”Static — spawn at runtime
Section titled “Static — spawn at runtime”| Function | Description |
|---|---|
| Create Draggable Window (Child Widget Class) | Spawns window from class + optional child widget class |
| Create Draggable Window (Child Widget Reference) | Spawns window and attaches an existing User Widget instance |
Common parameters: Start Size, Resize Width (min X, max Y), Resize Height, Center To Screen, Can Drag, Can Resize, Window Startup State.
Instance — content and layout
Section titled “Instance — content and layout”| Function | Description |
|---|---|
| Add Content Widget | Attach an existing User Widget to ChildWidgetCanvas |
| Add Content Widget Class | Create and attach a widget from class |
| Get Child Widget | Returns the active content widget |
| Update Window Size | Set size in pixels (FVector2D) |
| Center Window To Screen | Re-center (ignored when maximized) |
| Toggle Maximize | Maximize or restore |
| Close Window | Removes from parent; fires On Close Window |
C++ also exposes SetWindowTitle, SetPosition, and GetWindowPosition.
Blueprint events
Section titled “Blueprint events”| Event | When it fires |
|---|---|
| On Close Window | Window closed via Close Window |
| On Set Window Title | Title text updated |
| On Content Widget Added | New child attached |
| On Drag Start | Drag began (requires Enable Drag) |
| On Resize Start | Resize began (requires Enable Resizing) |
| On Start Minimized | Spawned with Start Minimized |
| On Window Maximize Toggled | Maximize / restore |
Content paths
Section titled “Content paths”| Item | Location |
|---|---|
| Content root | DraggableWindowUMG/ |
| Sample window | WBP_DraggableWindow |
| Demo level | DemoLevel |
| Sample HUD | WBP_DraggableWindowSampleHUD |
C++ module
Section titled “C++ module”Add to your .Build.cs:
PrivateDependencyModuleNames.AddRange(new string[] { "DraggableWindowUMG" });Include #include "DraggableWindow.h" and call UDraggableWindow::CreateDraggableWindow(...).