Show / Hide Table of Contents

Class Widget

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

Inheritance
System.Object
UObject
Visual
Widget
CircularThrobber
ComboBox
ComboBoxString
DynamicEntryBox
EditableText
EditableTextBox
ExpandableArea
Image
InputKeySelector
ListViewBase
NativeWidgetHost
PanelWidget
ProgressBar
ScrollBar
Slider
Spacer
SpinBox
TextLayoutWidget
Throbber
UserWidget
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 Widget : Visual

Properties

| Improve this Doc View Source

bCreatedByConstructionScript

Declaration
public bool bCreatedByConstructionScript { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

bExpandedInDesigner

Declaration
public bool bExpandedInDesigner { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

bHiddenInDesigner

Declaration
public bool bHiddenInDesigner { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

bIsEnabled

Declaration
public bool bIsEnabled { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

bIsVariable

Declaration
public bool bIsVariable { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

bIsVolatile

Declaration
public bool bIsVolatile { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

bLockedInDesigner

Declaration
public bool bLockedInDesigner { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

bOverride_Cursor

Declaration
public bool bOverride_Cursor { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Cursor

The cursor to show when the mouse is over the widget

Declaration
public byte Cursor { get; }
Property Value
Type Description
System.Byte
| Improve this Doc View Source

DefaultObject

Get UE4 Default Object for this Class

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

DesignerFlags

Any flags used by the designer at edit time.

Declaration
public byte DesignerFlags { get; set; }
Property Value
Type Description
System.Byte
| Improve this Doc View Source

NativeBindings

Native property bindings.

Declaration
public ObjectArrayField<PropertyBinding> NativeBindings { get; }
Property Value
Type Description
ObjectArrayField<PropertyBinding>
| Improve this Doc View Source

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.

Declaration
public WidgetNavigation Navigation { get; }
Property Value
Type Description
WidgetNavigation
Remarks

Those rules determine how navigation transitions can occur between widgets.

| Improve this Doc View Source

RenderOpacity

The opacity of the widget

Declaration
public float RenderOpacity { get; set; }
Property Value
Type Description
System.Single
| Improve this Doc View Source

RenderTransform

The render transform of the widget allows for arbitrary 2D transforms to be applied to the widget.

Declaration
public WidgetTransform RenderTransform { get; }
Property Value
Type Description
WidgetTransform
| Improve this Doc View Source

RenderTransformPivot

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

Declaration
public Vector2D RenderTransformPivot { get; }
Property Value
Type Description
Vector2D
Remarks

This value is a normalized coordinate about which things like rotations will occur.

| Improve this Doc View Source

Slot

The parent slot of the UWidget. Allows us to easily inline edit the layout controlling this widget.

Declaration
public PanelSlot Slot { get; }
Property Value
Type Description
PanelSlot
| Improve this Doc View Source

StaticClass

Get UE4 Class

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

ToolTipWidget

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

Declaration
public Widget ToolTipWidget { get; }
Property Value
Type Description
Widget

Methods

| Improve this Doc View Source

ForceLayoutPrepass()

Forces a pre-pass.

Declaration
public void ForceLayoutPrepass()
Remarks

A pre-pass caches the desired size of the widget hierarchy owned by this widget. One pre-pass is already happens for every widget before Tick occurs. You only need to perform another pre-pass if you are adding child widgets this frame and want them to immediately be visible this frame.

| Improve this Doc View Source

ForceVolatile(Boolean)

Sets the forced volatility of the widget.

Declaration
public void ForceVolatile(bool bForce)
Parameters
Type Name Description
System.Boolean bForce
| Improve this Doc View Source

GetCachedGeometry(Geometry)

Gets the last geometry used to Tick the widget.

Declaration
public void GetCachedGeometry(Geometry ReturnValue)
Parameters
Type Name Description
Geometry ReturnValue
Remarks

This data may not exist yet if this call happens prior to the widget having been ticked/painted, or it may be out of date, or a frame behind.

We recommend not to use this data unless there's no other way to solve your problem. Normally in Slate we try and handle these issues by making a dependent widget part of the hierarchy, as to avoid frame behind or what are referred to as hysteresis problems, both caused by depending on geometry from the previous frame being used to advise how to layout a dependent object the current frame.

| Improve this Doc View Source

GetClipping()

Gets the clipping state of this widget.

Declaration
public EWidgetClipping GetClipping()
Returns
Type Description
EWidgetClipping
| Improve this Doc View Source

GetDesiredSize()

Gets the widgets desired size.

Declaration
public Vector2D GetDesiredSize()
Returns
Type Description
Vector2D
Remarks

NOTE: The underlying Slate widget must exist and be valid, also at least one pre-pass must have occurred before this value will be of any use.

@return The widget's desired size

| Improve this Doc View Source

GetIsEnabled()

Gets the current enabled status of the widget

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

GetOwningLocalPlayer()

Gets the local player associated with this UI.

Declaration
public LocalPlayer GetOwningLocalPlayer()
Returns
Type Description
LocalPlayer
Remarks

@return The owning local player.

| Improve this Doc View Source

GetOwningPlayer()

Gets the player controller associated with this UI.

Declaration
public PlayerController GetOwningPlayer()
Returns
Type Description
PlayerController
Remarks

@return The player controller that owns the UI.

| Improve this Doc View Source

GetParent()

Gets the parent widget

Declaration
public PanelWidget GetParent()
Returns
Type Description
PanelWidget
| Improve this Doc View Source

GetRenderOpacity()

Gets the current visibility of the widget.

Declaration
public float GetRenderOpacity()
Returns
Type Description
System.Single
| Improve this Doc View Source

GetVisibility()

Gets the current visibility of the widget.

Declaration
public ESlateVisibility GetVisibility()
Returns
Type Description
ESlateVisibility
| Improve this Doc View Source

HasAnyUserFocus()

@return true if this widget is focused by any user.

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

HasFocusedDescendants()

@return true if any descendant widget is focused by any user.

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

HasKeyboardFocus()

Checks to see if this widget currently has the keyboard focus @

Declaration
public bool HasKeyboardFocus()
Returns
Type Description
System.Boolean
Remarks

return True if this widget has keyboard focus

| Improve this Doc View Source

HasMouseCapture()

Checks to see if this widget is the current mouse captor @

Declaration
public bool HasMouseCapture()
Returns
Type Description
System.Boolean
Remarks

return True if this widget has captured the mouse

| Improve this Doc View Source

HasMouseCaptureByUser(Int32, Int32)

Checks to see if this widget is the current mouse captor @

Declaration
public bool HasMouseCaptureByUser(int UserIndex, int PointerIndex)
Parameters
Type Name Description
System.Int32 UserIndex
System.Int32 PointerIndex
Returns
Type Description
System.Boolean
Remarks

param User index to check for capture @param Optional pointer index to check for capture @return True if this widget has captured the mouse with given user and pointer

| Improve this Doc View Source

HasUserFocus(PlayerController)

@return true if this widget is focused by a specific user.

Declaration
public bool HasUserFocus(PlayerController PlayerController)
Parameters
Type Name Description
PlayerController PlayerController
Returns
Type Description
System.Boolean
| Improve this Doc View Source

HasUserFocusedDescendants(PlayerController)

@return true if any descendant widget is focused by a specific user.

Declaration
public bool HasUserFocusedDescendants(PlayerController PlayerController)
Parameters
Type Name Description
PlayerController PlayerController
Returns
Type Description
System.Boolean
| Improve this Doc View Source

InvalidateLayoutAndVolatility()

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

Declaration
public void InvalidateLayoutAndVolatility()
Remarks

will force the owning widget to redraw and cache children on the next paint pass.

| Improve this Doc View Source

IsHovered()

@return true if the widget is currently being hovered by a pointer device

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

IsVisible()

@return true if the widget is Visible, HitTestInvisible or SelfHitTestInvisible.

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

New(UObject, Name)

Spawn an object of this class

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

RemoveFromParent()

Removes the widget from its parent widget.

Declaration
public void RemoveFromParent()
Remarks

If this widget was added to the player's screen or the viewport it will also be removed from those containers.

| Improve this Doc View Source

ResetCursor()

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

Declaration
public void ResetCursor()
| Improve this Doc View Source

SetAllNavigationRules(EUINavigationRule, Name)

Sets the widget navigation rules for all directions.

Declaration
public void SetAllNavigationRules(EUINavigationRule Rule, Name WidgetToFocus)
Parameters
Type Name Description
EUINavigationRule Rule
Name WidgetToFocus
Remarks

This can only be called on widgets that are in a widget tree. @param Rule The rule to use when navigation is taking place @param WidgetToFocus When using the Explicit rule, focus on this widget

| Improve this Doc View Source

SetClipping(EWidgetClipping)

Sets the clipping state of this widget.

Declaration
public void SetClipping(EWidgetClipping InClipping)
Parameters
Type Name Description
EWidgetClipping InClipping
| Improve this Doc View Source

SetCursor(Byte)

Sets the cursor to show over the widget.

Declaration
public void SetCursor(byte InCursor)
Parameters
Type Name Description
System.Byte InCursor
| Improve this Doc View Source

SetIsEnabled(Boolean)

Sets the current enabled status of the widget

Declaration
public void SetIsEnabled(bool bInIsEnabled)
Parameters
Type Name Description
System.Boolean bInIsEnabled
| Improve this Doc View Source

SetKeyboardFocus()

Sets the focus to this widget.

Declaration
public void SetKeyboardFocus()
| Improve this Doc View Source

SetNavigationRule(EUINavigation, EUINavigationRule, Name)

Sets the widget navigation rules for a specific direction.

Declaration
public void SetNavigationRule(EUINavigation Direction, EUINavigationRule Rule, Name WidgetToFocus)
Parameters
Type Name Description
EUINavigation Direction
EUINavigationRule Rule
Name WidgetToFocus
Remarks

This can only be called on widgets that are in a widget tree. @param Direction @param Rule The rule to use when navigation is taking place @param WidgetToFocus When using the Explicit rule, focus on this widget

| Improve this Doc View Source

SetRenderAngle(Single)

Set Render Angle

Declaration
public void SetRenderAngle(float Angle)
Parameters
Type Name Description
System.Single Angle
| Improve this Doc View Source

SetRenderOpacity(Single)

Sets the visibility of the widget.

Declaration
public void SetRenderOpacity(float InOpacity)
Parameters
Type Name Description
System.Single InOpacity
| Improve this Doc View Source

SetRenderScale(Vector2D)

Set Render Scale

Declaration
public void SetRenderScale(Vector2D Scale)
Parameters
Type Name Description
Vector2D Scale
| Improve this Doc View Source

SetRenderShear(Vector2D)

Set Render Shear

Declaration
public void SetRenderShear(Vector2D Shear)
Parameters
Type Name Description
Vector2D Shear
| Improve this Doc View Source

SetRenderTransform(WidgetTransform)

Set Render Transform

Declaration
public void SetRenderTransform(WidgetTransform InTransform)
Parameters
Type Name Description
WidgetTransform InTransform
| Improve this Doc View Source

SetRenderTransformPivot(Vector2D)

Set Render Transform Pivot

Declaration
public void SetRenderTransformPivot(Vector2D Pivot)
Parameters
Type Name Description
Vector2D Pivot
| Improve this Doc View Source

SetRenderTranslation(Vector2D)

Set Render Translation

Declaration
public void SetRenderTranslation(Vector2D Translation)
Parameters
Type Name Description
Vector2D Translation
| Improve this Doc View Source

SetToolTip(Widget)

Sets a custom widget as the tooltip of the widget.

Declaration
public void SetToolTip(Widget Widget)
Parameters
Type Name Description
Widget Widget
| Improve this Doc View Source

SetToolTipText(Byte)

Sets the tooltip text for the widget.

Declaration
public void SetToolTipText(byte InToolTipText)
Parameters
Type Name Description
System.Byte InToolTipText
| Improve this Doc View Source

SetUserFocus(PlayerController)

Sets the focus to this widget for a specific user

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

SetVisibility(ESlateVisibility)

Sets the visibility of the widget.

Declaration
public void SetVisibility(ESlateVisibility InVisibility)
Parameters
Type Name Description
ESlateVisibility InVisibility

Operators

| Improve this Doc View Source

Implicit(IntPtr to Widget)

Convert from IntPtr to UObject

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