Show / Hide Table of Contents

Class WidgetBlueprintLibrary

Widget Blueprint Library

Inheritance
System.Object
UObject
BlueprintFunctionLibrary
WidgetBlueprintLibrary
Inherited Members
UObject.TransientPackage
UObject.CastTo<T>(UObject)
UObject.CastTo(UObject, Type)
UObject.RemoveObject(UObject)
UObject.MakeObjectArrayField<T>(NativeArray*)
UObject.NotImplemented<T>()
UObject.Construct()
UObject.GetHashCode()
UObject.GetName()
UObject.ToString()
UObject.Name
UObject._None
UObject.None
UObject.ObjPointer
UObject.LoadObjectFromClass(Class, UObject, String, String, LoadFlags, PackageMap, Boolean)
UObject.LoadClass(Class, UObject, String, String, LoadFlags, PackageMap)
UObject.GetPropertyFor<T>(Name)
UObject.ExecuteUbergraph
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: UE4.UMG
Assembly: UE4DotNet.dll
Syntax
public class WidgetBlueprintLibrary : BlueprintFunctionLibrary

Properties

| Improve this Doc View Source

DefaultObject

Get UE4 Default Object for this Class

Declaration
public static WidgetBlueprintLibrary DefaultObject { get; }
Property Value
Type Description
WidgetBlueprintLibrary
| Improve this Doc View Source

StaticClass

Get UE4 Class

Declaration
public static Class StaticClass { get; }
Property Value
Type Description
Class

Methods

| Improve this Doc View Source

CancelDragDrop()

Cancels any current drag drop operation.

Declaration
public static void CancelDragDrop()
| Improve this Doc View Source

CaptureJoystick(EventReply, Widget, Boolean)

Capture Joystick

Declaration
public static EventReply CaptureJoystick(EventReply Reply, Widget CapturingWidget, bool bInAllJoysticks)
Parameters
Type Name Description
EventReply Reply
Widget CapturingWidget
System.Boolean bInAllJoysticks
Returns
Type Description
EventReply
| Improve this Doc View Source

CaptureMouse(EventReply, Widget)

Capture Mouse

Declaration
public static EventReply CaptureMouse(EventReply Reply, Widget CapturingWidget)
Parameters
Type Name Description
EventReply Reply
Widget CapturingWidget
Returns
Type Description
EventReply
| Improve this Doc View Source

ClearUserFocus(EventReply, Boolean)

Clear User Focus

Declaration
public static EventReply ClearUserFocus(EventReply Reply, bool bInAllUsers)
Parameters
Type Name Description
EventReply Reply
System.Boolean bInAllUsers
Returns
Type Description
EventReply
| Improve this Doc View Source

Create(UObject, SubclassOf<UserWidget>, PlayerController)

Creates a widget

Declaration
public static UserWidget Create(UObject WorldContextObject, SubclassOf<UserWidget> WidgetType, PlayerController OwningPlayer)
Parameters
Type Name Description
UObject WorldContextObject
SubclassOf<UserWidget> WidgetType
PlayerController OwningPlayer
Returns
Type Description
UserWidget
| Improve this Doc View Source

CreateDragDropOperation(SubclassOf<DragDropOperation>)

Creates a new drag and drop operation that can be returned from a drag begin to inform the UI what i being dragged and dropped and what it looks like.

Declaration
public static DragDropOperation CreateDragDropOperation(SubclassOf<DragDropOperation> OperationClass)
Parameters
Type Name Description
SubclassOf<DragDropOperation> OperationClass
Returns
Type Description
DragDropOperation
| Improve this Doc View Source

DetectDrag(EventReply, Widget, Key)

Ask Slate to detect if a user starts dragging in this widget later.

Declaration
public static EventReply DetectDrag(EventReply Reply, Widget WidgetDetectingDrag, Key DragKey)
Parameters
Type Name Description
EventReply Reply
Widget WidgetDetectingDrag
Key DragKey
Returns
Type Description
EventReply
Remarks

Slate internally tracks the movement and if it surpasses the drag threshold, Slate will send an OnDragDetected event to the widget.

@param WidgetDetectingDrag Detect dragging in this widget @param DragKey This button should be pressed to detect the drag

| Improve this Doc View Source

DetectDragIfPressed(PointerEvent, Widget, Key)

Given the pointer event, emit the DetectDrag reply if the provided key was pressed.

Declaration
public static EventReply DetectDragIfPressed(PointerEvent PointerEvent, Widget WidgetDetectingDrag, Key DragKey)
Parameters
Type Name Description
PointerEvent PointerEvent
Widget WidgetDetectingDrag
Key DragKey
Returns
Type Description
EventReply
Remarks

If the DragKey is a touch key, that will also automatically work. @param PointerEvent The pointer device event coming in. @param WidgetDetectingDrag Detect dragging in this widget. @param DragKey This button should be pressed to detect the drag, won't emit the DetectDrag FEventReply unless this is pressed.

| Improve this Doc View Source

DismissAllMenus()

Closes any popup menu

Declaration
public static void DismissAllMenus()
| Improve this Doc View Source

DrawBox(PaintContext, Vector2D, Vector2D, SlateBrushAsset, LinearColor)

Draws a box

Declaration
public static void DrawBox(PaintContext Context, Vector2D Position, Vector2D Size, SlateBrushAsset Brush, LinearColor Tint)
Parameters
Type Name Description
PaintContext Context
Vector2D Position
Vector2D Size
SlateBrushAsset Brush
LinearColor Tint
| Improve this Doc View Source

DrawLine(PaintContext, Vector2D, Vector2D, LinearColor, Boolean)

Draws a line.

Declaration
public static void DrawLine(PaintContext Context, Vector2D PositionA, Vector2D PositionB, LinearColor Tint, bool bAntiAlias)
Parameters
Type Name Description
PaintContext Context
Vector2D PositionA
Vector2D PositionB
LinearColor Tint
System.Boolean bAntiAlias
Remarks

@param PositionA Starting position of the line in local space. @param PositionB Ending position of the line in local space. @param Thickness How many pixels thick this line should be. @param Tint Color to render the line.

| Improve this Doc View Source

DrawLines(PaintContext, Byte, LinearColor, Boolean)

Draws several line segments.

Declaration
public static void DrawLines(PaintContext Context, byte Points, LinearColor Tint, bool bAntiAlias)
Parameters
Type Name Description
PaintContext Context
System.Byte Points
LinearColor Tint
System.Boolean bAntiAlias
Remarks

@param Points Line pairs, each line needs to be 2 separate points in the array. @param Thickness How many pixels thick this line should be. @param Tint Color to render the line.

| Improve this Doc View Source

DrawText(PaintContext, String, Vector2D, LinearColor)

Draws text.

Declaration
public static void DrawText(PaintContext Context, string InString, Vector2D Position, LinearColor Tint)
Parameters
Type Name Description
PaintContext Context
System.String InString
Vector2D Position
LinearColor Tint
Remarks

@param InString The string to draw. @param Position The starting position where the text is drawn in local space. @param Tint Color to render the line.

| Improve this Doc View Source

DrawTextFormatted(PaintContext, Byte, Vector2D, Font, Int32, Name, LinearColor)

Draws text.

Declaration
public static void DrawTextFormatted(PaintContext Context, byte Text, Vector2D Position, Font Font, int FontSize, Name FontTypeFace, LinearColor Tint)
Parameters
Type Name Description
PaintContext Context
System.Byte Text
Vector2D Position
Font Font
System.Int32 FontSize
Name FontTypeFace
LinearColor Tint
Remarks

@param Text The string to draw. @param Position The starting position where the text is drawn in local space. @param Tint Color to render the line.

| Improve this Doc View Source

EndDragDrop(EventReply)

An event should return FReply::Handled().EndDragDrop() to request that the current drag/drop operation be terminated.

Declaration
public static EventReply EndDragDrop(EventReply Reply)
Parameters
Type Name Description
EventReply Reply
Returns
Type Description
EventReply
| Improve this Doc View Source

GetAllWidgetsOfClass(UObject, SubclassOf<UserWidget>, Boolean)

Find all widgets of a certain class.

Declaration
public static IReadOnlyCollection<UserWidget> GetAllWidgetsOfClass(UObject WorldContextObject, SubclassOf<UserWidget> WidgetClass, bool TopLevelOnly)
Parameters
Type Name Description
UObject WorldContextObject
SubclassOf<UserWidget> WidgetClass
System.Boolean TopLevelOnly
Returns
Type Description
System.Collections.Generic.IReadOnlyCollection<UserWidget>
Remarks

@param FoundWidgets The widgets that were found matching the filter. @param WidgetClass The widget class to filter by. @param TopLevelOnly Only the widgets that are direct children of the viewport will be returned.

| Improve this Doc View Source

GetAllWidgetsWithInterface(UObject, SubclassOf<Interface>, Boolean)

Find all widgets in the world with the specified interface.

Declaration
public static IReadOnlyCollection<UserWidget> GetAllWidgetsWithInterface(UObject WorldContextObject, SubclassOf<Interface> Interface, bool TopLevelOnly)
Parameters
Type Name Description
UObject WorldContextObject
SubclassOf<Interface> Interface
System.Boolean TopLevelOnly
Returns
Type Description
System.Collections.Generic.IReadOnlyCollection<UserWidget>
Remarks

This is a slow operation, use with caution e.g. do not use every frame. @param Interface The interface to find. Must be specified or result array will be empty. @param FoundWidgets Output array of widgets that implement the specified interface. @param TopLevelOnly Only the widgets that are direct children of the viewport will be returned.

| Improve this Doc View Source

GetBrushResource(SlateBrush)

Gets the resource object on a brush. This could be a UTexture2D or a UMaterialInterface.

Declaration
public static UObject GetBrushResource(SlateBrush Brush)
Parameters
Type Name Description
SlateBrush Brush
Returns
Type Description
UObject
| Improve this Doc View Source

GetBrushResourceAsMaterial(SlateBrush)

Gets the brush resource as a material.

Declaration
public static MaterialInterface GetBrushResourceAsMaterial(SlateBrush Brush)
Parameters
Type Name Description
SlateBrush Brush
Returns
Type Description
MaterialInterface
| Improve this Doc View Source

GetBrushResourceAsTexture2D(SlateBrush)

Gets the brush resource as a texture 2D.

Declaration
public static Texture2D GetBrushResourceAsTexture2D(SlateBrush Brush)
Parameters
Type Name Description
SlateBrush Brush
Returns
Type Description
Texture2D
| Improve this Doc View Source

GetDragDroppingContent()

Returns the drag and drop operation that is currently occurring if any, otherwise nothing.

Declaration
public static DragDropOperation GetDragDroppingContent()
Returns
Type Description
DragDropOperation
| Improve this Doc View Source

GetDynamicMaterial(SlateBrush)

Gets the material that allows changes to parameters at runtime.

Declaration
public static MaterialInstanceDynamic GetDynamicMaterial(SlateBrush Brush)
Parameters
Type Name Description
SlateBrush Brush
Returns
Type Description
MaterialInstanceDynamic
Remarks

The brush must already have a material assigned to it, if it does it will automatically be converted to a MID.

@return A material that supports dynamic input from the game.

| Improve this Doc View Source

GetInputEventFromCharacterEvent(CharacterEvent)

Get Input Event from Character Event

Declaration
public static InputEvent GetInputEventFromCharacterEvent(CharacterEvent Event)
Parameters
Type Name Description
CharacterEvent Event
Returns
Type Description
InputEvent
| Improve this Doc View Source

GetInputEventFromKeyEvent(KeyEvent)

Get Input Event from Key Event

Declaration
public static InputEvent GetInputEventFromKeyEvent(KeyEvent Event)
Parameters
Type Name Description
KeyEvent Event
Returns
Type Description
InputEvent
| Improve this Doc View Source

GetInputEventFromNavigationEvent(NavigationEvent)

Get Input Event from Navigation Event

Declaration
public static InputEvent GetInputEventFromNavigationEvent(NavigationEvent Event)
Parameters
Type Name Description
NavigationEvent Event
Returns
Type Description
InputEvent
| Improve this Doc View Source

GetInputEventFromPointerEvent(PointerEvent)

Get Input Event from Pointer Event

Declaration
public static InputEvent GetInputEventFromPointerEvent(PointerEvent Event)
Parameters
Type Name Description
PointerEvent Event
Returns
Type Description
InputEvent
| Improve this Doc View Source

GetKeyEventFromAnalogInputEvent(AnalogInputEvent)

Get Key Event from Analog Input Event

Declaration
public static KeyEvent GetKeyEventFromAnalogInputEvent(AnalogInputEvent Event)
Parameters
Type Name Description
AnalogInputEvent Event
Returns
Type Description
KeyEvent
| Improve this Doc View Source

GetSafeZonePadding(UObject)

Gets the amount of padding that needs to be added when accounting for the safe zone on TVs.

Declaration
public static (Vector4, Vector2D, Vector4) GetSafeZonePadding(UObject WorldContextObject)
Parameters
Type Name Description
UObject WorldContextObject
Returns
Type Description
System.ValueTuple<Vector4, Vector2D, Vector4>
| Improve this Doc View Source

Handled()

The event reply to use when you choose to handle an event.

Declaration
public static EventReply Handled()
Returns
Type Description
EventReply
Remarks

This will prevent the event from continuing to bubble up / down the widget hierarchy.

| Improve this Doc View Source

IsDragDropping()

Returns true if a drag/drop event is occurring that a widget can handle.

Declaration
public static bool IsDragDropping()
Returns
Type Description
System.Boolean
| Improve this Doc View Source

LockMouse(EventReply, Widget)

Lock Mouse

Declaration
public static EventReply LockMouse(EventReply Reply, Widget CapturingWidget)
Parameters
Type Name Description
EventReply Reply
Widget CapturingWidget
Returns
Type Description
EventReply
| Improve this Doc View Source

MakeBrushFromAsset(SlateBrushAsset)

Creates a Slate Brush from a Slate Brush Asset @

Declaration
public static SlateBrush MakeBrushFromAsset(SlateBrushAsset BrushAsset)
Parameters
Type Name Description
SlateBrushAsset BrushAsset
Returns
Type Description
SlateBrush
Remarks

return A new slate brush using the asset's brush.

| Improve this Doc View Source

MakeBrushFromMaterial(MaterialInterface, Int32, Int32)

Creates a Slate Brush from a Material.

Declaration
public static SlateBrush MakeBrushFromMaterial(MaterialInterface Material, int Width, int Height)
Parameters
Type Name Description
MaterialInterface Material
System.Int32 Width
System.Int32 Height
Returns
Type Description
SlateBrush
Remarks

Materials don't have an implicit size, so providing a widget and height is required to hint slate with how large the image wants to be by default.

@return A new slate brush using the material.

| Improve this Doc View Source

MakeBrushFromTexture(Texture2D, Int32, Int32)

Creates a Slate Brush from a Texture2D @

Declaration
public static SlateBrush MakeBrushFromTexture(Texture2D Texture, int Width, int Height)
Parameters
Type Name Description
Texture2D Texture
System.Int32 Width
System.Int32 Height
Returns
Type Description
SlateBrush
Remarks

param Width When less than or equal to zero, the Width of the brush will default to the Width of the Texture @param Height When less than or equal to zero, the Height of the brush will default to the Height of the Texture

@return A new slate brush using the texture.

| Improve this Doc View Source

New(UObject, Name)

Spawn an object of this class

Declaration
public static WidgetBlueprintLibrary New(UObject obj = null, Name name = default(Name))
Parameters
Type Name Description
UObject obj
Name name
Returns
Type Description
WidgetBlueprintLibrary
| Improve this Doc View Source

NoResourceBrush()

Creates a Slate Brush that wont draw anything, the "Null Brush".

Declaration
public static SlateBrush NoResourceBrush()
Returns
Type Description
SlateBrush
Remarks

@return A new slate brush that wont draw anything.

| Improve this Doc View Source

ReleaseJoystickCapture(EventReply, Boolean)

Release Joystick Capture

Declaration
public static EventReply ReleaseJoystickCapture(EventReply Reply, bool bInAllJoysticks)
Parameters
Type Name Description
EventReply Reply
System.Boolean bInAllJoysticks
Returns
Type Description
EventReply
| Improve this Doc View Source

ReleaseMouseCapture(EventReply)

Release Mouse Capture

Declaration
public static EventReply ReleaseMouseCapture(EventReply Reply)
Parameters
Type Name Description
EventReply Reply
Returns
Type Description
EventReply
| Improve this Doc View Source

RestorePreviousWindowTitleBarState()

Restore Previous Window Title Bar State

Declaration
public static void RestorePreviousWindowTitleBarState()
| Improve this Doc View Source

SetBrushResourceToMaterial(SlateBrush, MaterialInterface)

Sets the resource on a brush to be a Material.

Declaration
public static void SetBrushResourceToMaterial(SlateBrush Brush, MaterialInterface Material)
Parameters
Type Name Description
SlateBrush Brush
MaterialInterface Material
| Improve this Doc View Source

SetBrushResourceToTexture(SlateBrush, Texture2D)

Sets the resource on a brush to be a UTexture2D.

Declaration
public static void SetBrushResourceToTexture(SlateBrush Brush, Texture2D Texture)
Parameters
Type Name Description
SlateBrush Brush
Texture2D Texture
| Improve this Doc View Source

SetFocusToGameViewport()

Set Focus to Game Viewport

Declaration
public static void SetFocusToGameViewport()
| Improve this Doc View Source

SetHardwareCursor(UObject, Byte, Name, Vector2D)

Loads or sets a hardware cursor from the content directory in the game.

Declaration
public static bool SetHardwareCursor(UObject WorldContextObject, byte CursorShape, Name CursorName, Vector2D HotSpot)
Parameters
Type Name Description
UObject WorldContextObject
System.Byte CursorShape
Name CursorName
Vector2D HotSpot
Returns
Type Description
System.Boolean
| Improve this Doc View Source

SetInputMode_GameAndUI(PlayerController, Widget, Boolean, Boolean)

Set Input Mode Game and UI

Declaration
public static void SetInputMode_GameAndUI(PlayerController Target, Widget InWidgetToFocus, bool bLockMouseToViewport, bool bHideCursorDuringCapture)
Parameters
Type Name Description
PlayerController Target
Widget InWidgetToFocus
System.Boolean bLockMouseToViewport
System.Boolean bHideCursorDuringCapture
| Improve this Doc View Source

SetInputMode_GameAndUIEx(PlayerController, Widget, EMouseLockMode, Boolean)

Setup an input mode that allows only the UI to respond to user input, and if the UI doesn't handle it player input / player controller gets a chance.

Declaration
public static void SetInputMode_GameAndUIEx(PlayerController PlayerController, Widget InWidgetToFocus, EMouseLockMode InMouseLockMode, bool bHideCursorDuringCapture)
Parameters
Type Name Description
PlayerController PlayerController
Widget InWidgetToFocus
EMouseLockMode InMouseLockMode
System.Boolean bHideCursorDuringCapture
| Improve this Doc View Source

SetInputMode_GameOnly(PlayerController)

Setup an input mode that allows only player input / player controller to respond to user input.

Declaration
public static void SetInputMode_GameOnly(PlayerController PlayerController)
Parameters
Type Name Description
PlayerController PlayerController
| Improve this Doc View Source

SetInputMode_UIOnly(PlayerController, Widget, Boolean)

Set Input Mode UIOnly

Declaration
public static void SetInputMode_UIOnly(PlayerController Target, Widget InWidgetToFocus, bool bLockMouseToViewport)
Parameters
Type Name Description
PlayerController Target
Widget InWidgetToFocus
System.Boolean bLockMouseToViewport
| Improve this Doc View Source

SetInputMode_UIOnlyEx(PlayerController, Widget, EMouseLockMode)

Setup an input mode that allows only the UI to respond to user input.

Declaration
public static void SetInputMode_UIOnlyEx(PlayerController PlayerController, Widget InWidgetToFocus, EMouseLockMode InMouseLockMode)
Parameters
Type Name Description
PlayerController PlayerController
Widget InWidgetToFocus
EMouseLockMode InMouseLockMode
| Improve this Doc View Source

SetMousePosition(EventReply, Vector2D)

Set Mouse Position

Declaration
public static EventReply SetMousePosition(EventReply Reply, Vector2D NewMousePosition)
Parameters
Type Name Description
EventReply Reply
Vector2D NewMousePosition
Returns
Type Description
EventReply
| Improve this Doc View Source

SetUserFocus(EventReply, Widget, Boolean)

Set User Focus

Declaration
public static EventReply SetUserFocus(EventReply Reply, Widget FocusWidget, bool bInAllUsers)
Parameters
Type Name Description
EventReply Reply
Widget FocusWidget
System.Boolean bInAllUsers
Returns
Type Description
EventReply
| Improve this Doc View Source

SetWindowTitleBarCloseButtonActive(Boolean)

Set Window Title Bar Close Button Active

Declaration
public static void SetWindowTitleBarCloseButtonActive(bool bActive)
Parameters
Type Name Description
System.Boolean bActive
| Improve this Doc View Source

SetWindowTitleBarOnCloseClickedDelegate(Byte)

Set Window Title Bar on Close Clicked Delegate

Declaration
public static void SetWindowTitleBarOnCloseClickedDelegate(byte Delegate)
Parameters
Type Name Description
System.Byte Delegate
| Improve this Doc View Source

SetWindowTitleBarState(Widget, EWindowTitleBarMode, Boolean, Boolean, Boolean)

Set Window Title Bar State

Declaration
public static void SetWindowTitleBarState(Widget TitleBarContent, EWindowTitleBarMode Mode, bool bTitleBarDragEnabled, bool bWindowButtonsVisible, bool bTitleBarVisible)
Parameters
Type Name Description
Widget TitleBarContent
EWindowTitleBarMode Mode
System.Boolean bTitleBarDragEnabled
System.Boolean bWindowButtonsVisible
System.Boolean bTitleBarVisible
| Improve this Doc View Source

Unhandled()

The event reply to use when you choose not to handle an event.

Declaration
public static EventReply Unhandled()
Returns
Type Description
EventReply
| Improve this Doc View Source

UnlockMouse(EventReply)

Unlock Mouse

Declaration
public static EventReply UnlockMouse(EventReply Reply)
Parameters
Type Name Description
EventReply Reply
Returns
Type Description
EventReply

Operators

| Improve this Doc View Source

Implicit(IntPtr to WidgetBlueprintLibrary)

Convert from IntPtr to UObject

Declaration
public static implicit operator WidgetBlueprintLibrary(IntPtr p)
Parameters
Type Name Description
System.IntPtr p
Returns
Type Description
WidgetBlueprintLibrary
  • Improve this Doc
  • View Source
Back to top Generated by DocFX