Language:
Discover
By Skill Level
By Category

UWidget

Choose your OS:

Inheritance Hierarchy

Syntax

class UWidget : public UVisual

Remarks

This is the base class for all wrapped Slate controls that are exposed to UObjects.

Variables

Name Description

Public variable

uint8 : 1

 

bCreatedByConstructionScript

Flag if the Widget was created from a blueprint

Public variable

uint8 : 1

 

bExpandedInDesigner

Stores the design time flag setting if the widget is expanded inside the designer

Public variable

uint8 : 1

 

bHiddenInDesigner

Stores the design time flag setting if the widget is hidden inside the designer

Public variable

uint8 : 1

 

bIsEnabled

Sets whether this widget can be modified interactively by the user

Public variable

FGetBool

 

bIsEnabledDelegate

A bindable delegate for bIsEnabled

Public variable

uint8 : 1

 

bIsVariable

Allows controls to be exposed as variables in a blueprint.

Protected variable

uint8 : 1

 

bIsVolatile

If true prevents the widget or its child's geometry or layout information from being cached.

Public variable

uint8 : 1

 

bLockedInDesigner

Stores the design time flag setting if the widget is locked inside the designer

Public variable

uint8 : 1

 

bOverride_Cursor

Public variable

EWidgetClipping

 

Clipping

Controls how the clipping behavior of this widget.

Public variable

TEnumAsByte < EM ...

 

Cursor

The cursor to show when the mouse is over the widget

Protected variable

TWeakPtr < SObje ...

 

MyGCWidget

The underlying SWidget contained in a SObjectWidget

Protected variable

TWeakPtr < SWidg ...

 

MyWidget

The underlying SWidget .

Protected variable

TArray < UProper ...

 

NativeBindings

Native property bindings.

Public variable

UWidgetNavigati ...

 

Navigation

The navigation object for this widget is optionally created if the user has configured custom navigation rules for this widget in the widget designer.

Public variable

float

 

RenderOpacity

The opacity of the widget

Public variable

FWidgetTransfor ...

 

RenderTransform

FGetMouseCursor CursorDelegate;.

Public variable

FVector2D

 

RenderTransformPivot

The render transform pivot controls the location about which transforms are applied.

Public variable

UPanelSlot *...

 

Slot

The parent slot of the UWidget .

Public variable

FText

 

ToolTipText

Tooltip text to show when the user hovers over the widget with the mouse

Public variable

FGetText

 

ToolTipTextDelegate

A bindable delegate for ToolTipText

Public variable

UWidget *

 

ToolTipWidget

Tooltip widget to show when the user hovers over the widget with the mouse

Public variable

FGetWidget

 

ToolTipWidgetDelegate

A bindable delegate for ToolTipWidget

Public variable

ESlateVisibilit ...

 

Visibility

The visibility of the widget

Public variable

FGetSlateVisibi ...

 

VisibilityDelegate

A bindable delegate for Visibility

Public variable

TWeakObjectPtr <...

 

WidgetGeneratedBy

Stores a reference to the asset responsible for this widgets construction.

Public variable

TWeakObjectPtr <...

 

WidgetGeneratedByClass

Stores a reference to the class responsible for this widgets construction.

Constructors

Name Description

Public function

UWidget

(
    const FObjectInitializer & ObjectIn...
)

Functions

Name Description

Public function

bool

 

AddBinding

(
    UDelegateProperty * DelegatePro...,
    UObject * SourceObject,
    const FDynamicPropertyPath & Bindin...
)

Protected function

TSharedRef < ...

 

BuildDesignTimeWidget

(
    TSharedRef < SWidget > WrapWidget
)

Utility method for building a design time wrapper widget.

Public function

void

 

BuildNavigation()

Called by the owning user widget after the slate widget has been created.

Public function

bool

 

CanSafelyRouteEvent()

End UObject .

Public function Virtual

void

 

ConnectEditorData()

Allows general fixups and connections only used at editor time.

Protected function

TOptional < f...

 

ConvertFloatToOptionalFloat

(
    TAttribute < float > InFloat
)

Protected function

FSlateColor

 

ConvertLinearColorToSlateColor

(
    TAttribute < FLinearColor > InLinear...
)

Public function Static

ESlateVisibi ...

 

ConvertRuntimeToSerializedVisibility

(
    const EVisibility & Input
)

Public function Static

FSizeParam

 

ConvertSerializedSizeParamToRuntime

(
    const FSlateChildSize & Input
)

Public function Static

EVisibility

 

ConvertSerializedVisibilityToRuntime

(
    ESlateVisibility Input
)

End Designer contextual events.

Protected function

EVisibility

 

ConvertVisibility

(
    TAttribute < ESlateVisibility > Seri...
)

TODO UMG Consider moving conversion functions into another class. Conversion functions

Protected function

TSharedRef < ...

 

CreateDesignerOutline

(
    TSharedRef < SWidget > Content
)

Public function

void

 

DeselectByDesigner()

Public function Static

TSubclassOf <...

 

FindBinderClassForDestination

(
    UProperty * Property
)

Bool UWidget::BindProperty(const FName& DestinationProperty, UObject* SourceObject, const FName& SourceProperty) { UDelegateProperty* DelegateProperty = FindField(GetClass() , FName + TEXT("Delegate") )));

if ( DelegateProperty ) { FDynamicPropertyPath BindingPath(SourceProperty.ToString()); return AddBinding(DelegateProperty, SourceObject, BindingPath); }

return false; }

Public function Static

UWidget *...

 

FindChildContainingDescendant

(
    UWidget * Root,
    UWidget * Descendant
)

Public function

void

 

ForceLayoutPrepass()

Forces a pre-pass.

Public function

void

 

ForceVolatile

(
    bool bForce
)

Sets the forced volatility of the widget.

Public function

const FGeome ...

 

GetCachedGeometry()

Gets the last geometry used to Tick the widget.

Public function

TSharedPtr < ...

 

GetCachedWidget()

Gets the last created widget does not recreate the gc container for the widget if one is needed.

Public function

const FStrin ...

 

GetCategoryName()

The category name of the widget

Public function

EWidgetClipp ...

 

GetClipping()

Gets the clipping state of this widget.

Public function Static

FString

 

GetDefaultFontName()

TODO: Clean this up to, move it to a user interface setting, don't use a config.

Public function

EWidgetDesig ...

 

GetDesignerFlags()

Gets the designer flags currently set on the widget.

Public function

FVector2D

 

GetDesiredSize()

Gets the widgets desired size.

Public function

const FStrin ...

 

GetDisplayLabel()

The friendly name of the widget to display in the editor

Protected function

FText

 

GetDisplayNameBase()

Gets the base name used to generate the display label/name of this widget.

Public function Virtual

const FSlate ...

 

GetEditorIcon()

Gets the editor icon

Public function

bool

 

GetIsEnabled()

Gets the current enabled status of the widget

Public function Virtual

FString

 

GetLabelMetadata()

Get Label Metadata, which may be as simple as a bit of string data to help identify an anonymous text block.

Public function

FText

 

GetLabelText()

Gets the label to display to the user for this widget.

Public function

FText

 

GetLabelTextWithMetadata()

Gets the label to display to the user for this widget, including any extra metadata like the text string for text.

Public function Virtual

ULocalPlayer ...

 

GetOwningLocalPlayer()

Gets the local player associated with this UI.

The owning local player.

Public function Virtual

APlayerContr ...

 

GetOwningPlayer()

Gets the player controller associated with this UI.

The player controller that owns the UI.

Public function Virtual

const FText

 

GetPaletteCategory()

Gets the palette category of the widget

Public function

UPanelWidget ...

 

GetParent()

Gets the parent widget

Public function

float

 

GetRenderOpacity()

Gets the current visibility of the widget.

Public function

ESlateVisibi ...

 

GetVisibility()

Gets the current visibility of the widget.

Public function

EVisibility

 

GetVisibilityInDesigner()

End of UObject interface.

Public function Virtual

UWorld *

 

GetWorld()

Begin UObject .

Public function

bool

 

HasAnyDesignerFlags

(
    EWidgetDesignFlags::Type FlagToChec...
)

Tests if any of the flags exist on this widget.

Public function

bool

 

HasAnyUserFocus()

True if this widget is focused by any user.

Public function

bool

 

HasFocusedDescendants()

True if any descendant widget is focused by any user.

Public function

bool

 

HasKeyboardFocus()

Checks to see if this widget currently has the keyboard focus

Public function

bool

 

HasMouseCapture()

Checks to see if this widget is the current mouse captor

Public function

bool

 

HasMouseCaptureByUser

(
    int32 UserIndex,
    int32 PointerIndex
)

Checks to see if this widget is the current mouse captor

Public function

bool

 

HasUserFocus

(
    APlayerController * PlayerContr...
)

True if this widget is focused by a specific user.

Public function

bool

 

HasUserFocusedDescendants

(
    APlayerController * PlayerContr...
)

True if any descendant widget is focused by a specific user.

Public function

void

 

InvalidateLayoutAndVolatility()

Invalidates the widget from the view of a layout caching widget that may own this widget.

Public function

bool

 

IsChildOf

(
    UWidget * PossibleParent
)

Recurses up the list of parents and returns true if this widget is a descendant of the PossibleParent

Public function

bool

 

IsConstructed()

Gets the last created widget does not recreate the gc container for the widget if one is needed.

Public function

bool

 

IsDesignTime()

Returns if the widget is currently being displayed in the designer, it may want to display different data.

Public function

bool

 

IsGeneratedName()

Is the label generated or provided by the user?

Public function Virtual

bool

 

IsHovered()

True if the widget is currently being hovered by a pointer device

Public function

bool

 

IsLockedInDesigner()

Is this widget locked

Public function

bool

 

IsVisible()

True if the widget is Visible, HitTestInvisible or SelfHitTestInvisible.

Public function Virtual

void

 

OnBeginEditByDesigner()

Protected function Virtual

void

 

OnBindingChanged

(
    const FName & Property
)

Public function Virtual

void

 

OnCreationFromPalette()

Called by the palette after constructing a new widget, allows the widget to perform interesting default setup that we don't want to be UObject Defaults.

Public function Virtual

void

 

OnDescendantDeselectedByDesigner

(
    UWidget * DescendantWidget
)

Public function Virtual

void

 

OnDescendantSelectedByDesigner

(
    UWidget * DescendantWidget
)

Public function Virtual

void

 

OnDeselectedByDesigner()

Public function Virtual

void

 

OnDesignerChanged

(
    const FDesignerChangedEventArgs & E...
)

Public function Virtual

void

 

OnEndEditByDesigner()

Public function Virtual

void

 

OnSelectedByDesigner()

Protected function Virtual

void

 

OnWidgetRebuilt()

Function called after the underlying SWidget is constructed.

Protected function Virtual

TSharedRef < ...

 

RebuildDesignWidget

(
    TSharedRef < SWidget > Content
)

Protected function Virtual

TSharedRef < ...

 

RebuildWidget()

Function implemented by all subclasses of UWidget is called when the underlying SWidget needs to be constructed.

Public function Virtual

void

 

RemoveFromParent()

Removes the widget from its parent widget.

Public function

void

 

ResetCursor()

Resets the cursor to use on the widget, removing any customization for it.

Public function

void

 

SelectByDesigner()

Begin Designer contextual events.

Public function

void

 

SetAllNavigationRules

(
    EUINavigationRule Rule,
    FName WidgetToFocus
)

Sets the widget navigation rules for all directions.

Public function

void

 

SetCategoryName

(
    const FString & InValue
)

Sets the category name of the widget

Public function

void

 

SetClipping

(
    EWidgetClipping InClipping
)

Sets the clipping state of this widget.

Public function

void

 

SetCursor

(
    EMouseCursor::Type InCursor
)

Sets the cursor to show over the widget.

Public function Virtual

void

 

SetDesignerFlags

(
    EWidgetDesignFlags::Type NewFlags
)

Sets the designer flags on the widget.

Public function

void

 

SetDisplayLabel

(
    const FString & DisplayLabel
)

Sets the friendly name of the widget to display in the editor

Public function Virtual

void

 

SetIsEnabled

(
    bool bInIsEnabled
)

Sets the current enabled status of the widget

Public function

void

 

SetKeyboardFocus()

Sets the focus to this widget.

Public function Virtual

void

 

SetLockedInDesigner

(
    bool NewLockedInDesigner
)

Public function

void

 

SetNavigationRule

(
    EUINavigation Direction,
    EUINavigationRule Rule,
    FName WidgetToFocus
)

Sets the widget navigation rules for a specific direction.

Protected function

void

 

SetNavigationRuleInternal

(
    EUINavigation Direction,
    EUINavigationRule Rule,
    FName WidgetToFocus
)

Public function

void

 

SetRenderAngle

(
    float Angle
)

Public function

void

 

SetRenderOpacity

(
    float InOpacity
)

Sets the visibility of the widget.

Public function

void

 

SetRenderScale

(
    FVector2D Scale
)

Public function

void

 

SetRenderShear

(
    FVector2D Shear
)

Public function

void

 

SetRenderTransform

(
    FWidgetTransform InTransform
)

Public function

void

 

SetRenderTransformPivot

(
    FVector2D Pivot
)

Public function

void

 

SetRenderTranslation

(
    FVector2D Translation
)

Public function

void

 

SetToolTip

(
    UWidget * Widget
)

Sets a custom widget as the tooltip of the widget.

Public function

void

 

SetToolTipText

(
    const FText & InToolTipText
)

Sets the tooltip text for the widget.

Public function

void

 

SetUserFocus

(
    APlayerController * PlayerContr...
)

Sets the focus to this widget for a specific user

Public function Virtual

void

 

SetVisibility

(
    ESlateVisibility InVisibility
)

Sets the visibility of the widget.

Public function Virtual

void

 

SynchronizeProperties()

Applies all properties to the native widget if possible.

Public function

TSharedRef < ...

 

TakeDerivedWidget

(
    ConstructMethodType ConstructMethod
)

Public function

TSharedRef < ...

 

TakeWidget()

Gets the underlying slate widget or constructs it if it doesn't exist.

Protected function

void

 

UpdateRenderTransform()

Public function Virtual

void

 

ValidateCompiledDefaults

(
    FCompilerResultsLog & CompileLog
)

Called at the end of Widget Blueprint compilation.

Overridden from UObject

Name Description

Public function Virtual

void

 

FinishDestroy()

Called to finish destroying the object.

Public function Virtual

bool

 

Modify

(
    bool bAlwaysMarkDirty
)

Mark this object as modified, also mark the slot as modified.

Public function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent & PropertyCha...
)

UObject interface.

Classes

Name

Description

Public class

FGenerateWidgetForObject

Public class

FGenerateWidgetForString

Events.

Public class

FGetBool

Common Bindings - If you add any new common binding, you must provide a UPropertyBinder for it.

Public class

FGetCheckBoxState

Public class

FGetFloat

Public class

FGetInt32

Public class

FGetLinearColor

Public class

FGetMouseCursor

Public class

FGetSlateBrush

Public class

FGetSlateColor

Public class

FGetSlateVisibility

Public class

FGetText

Public class

FGetWidget

Public class

FOnPointerEvent

Public class

FOnReply

Events.

Typedefs

Name

Description

ConstructMethodType

Constants

Name

Description

BinderClasses

UWidget .

References

Module

UMG

Header

Runtime/UMG/Public/Components/Widget.h