Language:
Discover
By Skill Level
By Category

SWidget

Choose your OS:

Inheritance Hierarchy

FSlateControlledConstruction

TSharedFromThis

SWidget

SCompoundWidget

IAnimationSequenceBrowser

IDetailsView

IDistributionCurveEditor

ILevelEditor

IObjectNameEditableTextBox

IPersonaViewport

IPinnedCommandList

ISceneOutliner

ISinglePropertyView

ISkeletonTree

ISocketManager

IStatsViewer

ITimeSlider

ITransportControl

SAboutScreen

SAdvancedPreviewDetailsTab

SAnimationCompressionPanel

SAnimationRemapAssets

SAnimationRemapSkeleton

SAppIconWidget

SAssetSearchBox

SBackgroundBlur

SBarVisualizer

SBlueprintDiff

SBlueprintRevisionMenu

SBoneMappingBase

SBoneSelectionWidget

SBoneTreeMenu

SBorder

SBuildProgressWidget

SButton

SHyperlink

SRichTextHyperlink

SCarouselNavigationButton::SPeekBorder

SDockTab

SEditableTextBox

SSearchBox

SErrorText

SExpandableButton

SGraphEditorActionMenu

SGraphEditorActionMenuAI

SGraphPin

SGraphPinAI

SGraphPinBool

SGraphPinColor

SGraphPinExec

SGraphPinNameList

SGraphPinDataTableRowName

SGraphPinNum

SGraphPinInteger

SGraphPinObject

SGraphPinString

SGraphPinVector

SGraphPinVector2D

SGraphPinVector4

SHeaderRow

SMultiLineEditableTextBox

SScrollBar

SSeparator

STableRow

SComboRow

SMultiColumnTableRow

SAssetEntryRow

SBoneMappingListRow

SBonePairRow

SEventItem

SOptionTableRow

SSCS_RowWidget

SSCS_RowWidget_ActorRoot

SSCS_RowWidget_Separator

SMultiSelectTableRow

SBreadcrumbTrail

SCarouselNavigationBar

SCarouselNavigationButton

SCheckBox

SClassPickerDialog

SClassPropertyEntryBox

SColorGradingPicker

SColorPicker

SColorThemeBar

SColorThemesViewer

SColorTrash

SCommentBubble

SComplexGradient

SContentReference

SCreateAssetFromObject

SCreateClothingSettingsPanel

SCreditsScreen

SCSVImportOptions

SCulturePicker

SCurveEditor

SCurveEditorPanel

SDecoratedEnumCombo

SDefaultGraphActionWidget

SDeleteAssetsDialog

SDirectoryPicker

SDocumentationToolTip

SDropTarget

SAssetDropTarget

SEditableComboBox

SEditableLabel

SEditorViewport

SBasePoseViewport

SLevelViewport

SEditorViewportToolBarButton

SEditorViewportToolbarMenu

SEditorViewportViewMenu

SErrorHint

SEventsTree

SExpandableArea

SExpanderArrow

SExternalImageReference

SFilePathPicker

SFilterableObjectList

SFindInBlueprints

SFindInMaterial

SFrameRateEntryBox

SFrameRatePicker

SFxWidget

SGameLayerManager

SGenericDialogWidget

SGlobalPlayWorldActions

SGraphActionMenu

SGraphEditor

SGraphPalette

SGraphPaletteItem

SGraphPreviewer

SHyperlinkLaunchURL

SInlineEditableTextBlock

SInputKeySelector

SInvalidationPanel

SKeyEditInterface

SKeySelector

SKismetInspector

SKismetLinearExpression

SLayerHandle

SLevelOfDetailBranchNode

SListViewSelectorDropdownMenu

SLogWidget

SMaterialSlotWidget

SMatineeRecorder

SMenuOwner

SMultiBoxWidget

SMiniCurveEditor

SModeWidget

SMultiBlockBaseWidget

SToolBarButtonBlock

SToolBarComboButtonBlock

SMultipleOptionTable

SNameComboBox

SNodeTitle

SNotificationItem

SNotificationList

SNumericDropDown

SNumericEntryBox

SObjectPropertyEntryBox

SObjectWidget

SObjectTableRow

SOutputLogDialog

SPerPlatformPropertiesWidget

SPinComboBox

SPinTypeSelector

SPlatformSetupMessage

SPListEditorPanel

SPopup

SPoseAssetNameWidget

SProperty

SReferenceTree

SRemapFailures

SResetToDefaultMenu

SRetainerWidget

SRotatorInputBox

SScalabilitySettings

SScaleBox

SScrollBorder

SScrollBox

SScrubControlPanel

SScrubWidget

SSCSEditor

SSettingsEditorCheckoutNotice

SSimpleGradient

SSimplePreLoadScreenWidget

SSingleObjectDetailsPanel

SSkeletonBoneRemoval

SSkeletonSelectorWindow

SSkeletonWidget

SSkeletonCompareWidget

SSkeletonListWidget

SSpinBox

SSubMenuHandler

SSuggestionTextBox

STableViewBase

SListView

STileView

STreeView

SSCSEditorDragDropTree

STextComboBox

STextComboPopup

STextEntryPopup

STextPropertyEditableStringTableReference

STextPropertyEditableTextBox

SThemeColorBlock

SThrobber

STimecodeProvider

STimeline

SToolTip

SUserWidget

SVectorInputBox

SViewport

SViewportToolBar

SCommonEditorViewportToolbarBase

STransformViewportToolBar

SViewportToolBarComboMenu

SViewportToolBarIconMenu

SVolumeControl

SWidgetCarousel

SWidgetCarouselWithNavigation

SWindow

SCreateAnimationAssetDlg

SDlgPickAssetPath

SDlgPickPath

SLogWindow

SSelectFolderDlg

SVirtualWindow

SWindowTitleBar

SWizard

SWorldWidgetScreenLayer

SEditableText

SLeafWidget

SCircularThrobber

SColorBlock

SColorGradientEditor

SColorGradingWheel

SColorSpectrum

SColorWheel

SGraphBar

SImage

SSpinningImage

SMeshWidget

SProgressBar

SSlider

SSpacer

FDetailWidgetDecl::SInvalidDetailWidget

STextBlock

STimecode

STreeMap

SVirtualJoystick

SVirtualKeyboardEntry

SMultiLineEditableText

SPanel

SBox

SEnableBox

SSafeZone

SBoxPanel

SHorizontalBox

SHeader

SVerticalBox

SDragAndDropVerticalBox

SCanvas

SConstraintCanvas

SDPIScaler

SGridPanel

SMenuAnchor

SComboButton

SComboBox

SComponentClassCombo

SPopupErrorText

SNodePanel

SGraphPanel

SNodePanel::SNode

SGraphNode

SGraphNodeAI

SGraphNodeDefault

SGraphNodeKnot

SGraphNodeK2Base

SGraphNodeK2Composite

SGraphNodeK2Default

SGraphNodeK2Event

SGraphNodeResizable

SGraphNodeComment

SGraphNodeDocumentation

SOverlay

SResponsiveGridPanel

SScissorRectBox

SScrollBarTrack

SSplitter

SSplitter2x2

SThemeColorBlocksBar

STooltipPresenter

SUniformGridPanel

SWidgetSwitcher

SWindowTitleBarArea

SWrapBox

SRichTextBlock

SWeakWidget

Syntax

class SWidget :
    public FSlateControlledConstruction ,
    public TSharedFromThis< SWidget >

Remarks

HOW TO DEPRECATE SLATE_ATTRIBUTES

SLATE_ATTRIBUTE(ECheckBoxState, IsChecked)

DEPRECATED(4.xx, "Please use IsChecked(TAttribute<ECheckBoxState>)") FArguments& IsChecked(bool InIsChecked) { _IsChecked = InIsChecked ? ECheckBoxState::Checked : ECheckBoxState::Unchecked ; return Me(); }

/// This version would prevent ambiguous conversions. FArguments& IsChecked(ECheckBoxState InIsChecked) { _IsChecked = InIsChecked; return Me(); } Abstract base class for Slate widgets.

STOP. DO NOT INHERIT DIRECTLY FROM WIDGET!

Inheritance: Widget is not meant to be directly inherited. Instead consider inheriting from LeafWidget or Panel, which represent intended use cases and provide a succinct set of methods which to override.

SWidget is the base class for all interactive Slate entities. SWidget 's public interface describes everything that a Widget can do and is fairly complex as a result.

Events: Events in Slate are implemented as virtual functions that the Slate system will call on a Widget in order to notify the Widget about an important occurrence (e.g. a key press) or querying the Widget regarding some information (e.g. what mouse cursor should be displayed).

Widget provides a default implementation for most events; the default implementation does nothing and does not handle the event.

Some events are able to reply to the system by returning an FReply , FCursorReply , or similar object.

Variables

Name Description

Protected variable

uint8 : 1

 

bCanHaveChildren

Can the widget ever support children? This will be false on SLeafWidgets, rather than setting this directly, you should probably inherit from SLeafWidget .

Protected variable

uint8 : 1

 

bCanSupportFocus

Can the widget ever support keyboard focus

Protected variable

uint8 : 1

 

bCanTick

Protected variable

uint8 : 1

 

bClippingProxy

Some widgets might be a complex hierarchy of child widgets you never see.

Protected variable

uint8 : 1

 

bIsHovered

Is this widget hovered?

Protected variable

EWidgetClipping

 

Clipping

Set to true if all content of the widget should clip to the bounds of this widget.

Protected variable

FName

 

CreatedInLocation

Full file path (and line) in which this widget was created

Protected variable

FMargin

 

CullingBoundsExtension

Can be used to enlarge the culling bounds of this widget (pre-intersection), this can be useful if you've got children that you know are using rendering transforms to render outside their standard bounds, if that happens it's possible the parent might be culled before the descendant widget is entirely off screen.

Protected variable

TAttribute < TOp ...

 

Cursor

The cursor to show when the mouse is hovering over this widget.

Protected variable

TAttribute < boo...

 

EnabledState

Whether or not this widget is enabled

Protected variable

TArray < TShared ...

 

MetaData

Metadata associated with this widget

Protected variable

float

 

RenderOpacity

The opacity of the widget. Automatically applied during rendering.

Protected variable

TAttribute < TOp ...

 

RenderTransform

Render transform of this widget.

Protected variable

TAttribute < FVe ...

 

RenderTransformPivot

Render transform pivot of this widget (in normalized local space)

Protected variable

FName

 

Tag

Tag for this widget

Protected variable

FName

 

TypeOfWidget

Debugging information on the type of widget we're creating for the Widget Reflector.

Protected variable

TAttribute < EVi ...

 

Visibility

Is this widget visible, hidden or collapsed

Constructors

Name Description

Protected function

SWidget()

Hidden default constructor.

Use SNew(WidgetClassName) to instantiate new widgets.

Destructors

Name Description

Protected function Virtual

~SWidget()

Dtor ensures that active timer handles are UnRegistered with the SlateApplication.

Functions

Name Description

Protected function Static

const TAttri ...

 

AccessWidgetVisibilityAttribute

(
    const TSharedRef < SWidget >& Widge...
)

Protected static helper to allow widgets to access the visibility attribute of other widgets directly

Public function

void

 

AddMetadata

(
    const TSharedRef < MetaDataType >& ...
)

Add metadata to this widget.

Protected function

void

 

Advanced_ForceInvalidateLayout()

Forces invalidation, doesn't check volatility.

Protected function

bool

 

Advanced_InvalidateVolatility()

Recalculates and caches volatility and returns 'true' if the volatility changed.

Public function Virtual

bool

 

Advanced_IsWindow()

Is this widget derivative of SWindow

Public function

void

 

ArrangeChildren

(
    const FGeometry & AllottedGeometry,
    FArrangedChildren & ArrangedChildre...
)

Non-virtual entry point for arrange children.

Protected function Virtual

void

 

CacheDesiredSize

(
    float InLayoutScaleMultiplier
)

The system calls this method.

Protected function

void

 

CachePrepass

(
    const TWeakPtr < ILayoutCache >& La...
)

Don't call this directly unless you're a layout cache, this is used to recursively set the layout cache on on invisible children that never get the opportunity to paint and receive the layout cache through the normal means.

Public function

void

 

CacheVolatility()

Recalculates volatility of the widget and caches the result.

Public function

FSlateRect

 

CalculateCullingAndClippingRules

(
    const FGeometry & AllottedGeometry,
    const FSlateRect & IncomingCullingR...,
    bool& bClipToBounds,
    bool& bAlwaysClip,
    bool& bIntersectClipBounds
)

Calculates what if any clipping state changes need to happen when drawing this widget.

Public function Virtual

void

 

ChildLayoutChanged

(
    EInvalidateWidget InvalidateReason
)

Protected function

FVector2D

 

ComputeDesiredSize

(
    float LayoutScaleMultiplier
)

Compute the ideal size necessary to display this widget.

Protected function Virtual

bool

 

ComputeVolatility()

Recomputes the volatility of the widget.

Public function

void

 

Construct

(
    const TAttribute < FText >& InToolT...,
    const TSharedPtr < IToolTip >& InTo...,
    const TAttribute < TOptional < EMouse ...,
    const TAttribute < bool >& InEnable...,
    const TAttribute < EVisibility >& I...,
    const float InRenderOpacity,
    const TAttribute < TOptional < FSlate ...,
    const TAttribute < FVector2D >& InT...,
    const FName & InTag,
    const bool InForceVolatile,
    const EWidgetClipping InClipping,
    const TArray < TSharedRef < ISlateMet ...
)

Construct a SWidget based on initial parameters.

Public function

void

 

EnableToolTipForceField

(
    const bool bEnableForceField
)

Sets whether this widget is a "tool tip force field".

Protected function

bool

 

FindChildGeometries

(
    const FGeometry & MyGeometry,
    const TSet < TSharedRef < SWidget > >...,
    TMap < TSharedRef < SWidget >, FArran ...
)

Find the geometry of a descendant widget.

Protected function

void

 

FindChildGeometries_Helper

(
    const FGeometry & MyGeometry,
    const TSet < TSharedRef < SWidget > >...,
    TMap < TSharedRef < SWidget >, FArran ...
)

Actual implementation of FindChildGeometries.

Protected function

FGeometry

 

FindChildGeometry

(
    const FGeometry & MyGeometry,
    TSharedRef < SWidget > WidgetToFind
)

Find the geometry of a descendant widget.

Protected function Static

int32

 

FindChildUnderMouse

(
    const FArrangedChildren & Children,
    const FPointerEvent & MouseEvent
)

The index of the child that the mouse is currently hovering

Protected function Static

int32

 

FindChildUnderPosition

(
    const FArrangedChildren & Children,
    const FVector2D & ArrangedSpacePosi...
)

The index of the child that is under the specified position

Public function

void

 

ForceVolatile

(
    bool bForce
)

Should this widget always appear as volatile for any layout caching host widget.

Public function

TArray < TSha ...

 

GetAllMetaData()

Get all metadata of the type provided.

all the metadata found of the specified type.

Public function

const FGeome ...

 

GetCachedGeometry()

Gets the last geometry used to Tick the widget.

Public function

bool

 

GetCanTick()

Public function

FChildren &#...

 

GetChildren()

Every widget that has children must implement this method.

Public function

EWidgetClipp ...

 

GetClipping()

The current clipping rules for this widget.

Public function

FName

 

GetCreatedInLocation()

An FName of the widget's code location (full path with number == line number of the file)

Public function

FMargin

 

GetCullingBoundsExtension()

CullingBoundsExtension

Public function

FVector2D

 

GetDesiredSize()

The DesiredSize that was computed the last time CacheDesiredSize() was called.

Protected function Virtual

const FSlate ...

 

GetFocusBrush()

A brush to draw focus, nullptr if no focus drawing is desired

Public function Virtual

FSlateColor

 

GetForegroundColor()

The Foreground color that this widget sets; unset options if the widget does not set a foreground color

Public function

TSharedPtr < ...

 

GetMetaData()

Get the metadata of the type provided.

Public function Virtual

FString

 

GetReadableLocation()

A String of the widget's code location in readable format "BaseFileName(LineNumber)"

Public function Virtual

float

 

GetRelativeLayoutScale

(
    const FSlotBase & Child,
    float LayoutScaleMultiplier
)

What is the Child's scale relative to this widget.

Public function Virtual

float

 

GetRelativeLayoutScale

(
    const FSlotBase & Child
)

What is the Child's scale relative to this widget.

Public function

float

 

GetRenderOpacity()

The render opacity of the widget.

Public function

const TOptio ...

 

GetRenderTransform()

The render transform of the widget.

Public function

const FVecto ...

 

GetRenderTransformPivot()

The pivot point of the render transform.

Public function

TStatId

 

GetStatID()

Public function Virtual

FName

 

GetTag()

The name this widget was tagged with

Public function Virtual

TSharedPtr < ...

 

GetToolTip()

The tool tip associated with this widget; Invalid reference if there is not one

Public function

FName

 

GetType()

The widget's type as an FName ID

Public function

FString

 

GetTypeAsString()

A String of the widget's type

Public function

EVisibility

 

GetVisibility()

Is this widget visible, hidden or collapsed

Public function Virtual

EWindowZone: ...

 

GetWindowZoneOverride()

Called when the mouse is moved over the widget's window, to determine if we should report whether OS-specific features should be active at this location (such as a title bar grip, system menu, etc.) Usually you should not need to override this function.

Protected function

bool

 

HasAnyUpdateFlags

(
    EWidgetUpdateFlags FlagsToCheck
)

Public function

TOptional < E ...

 

HasAnyUserFocus()

Gets whether or not any users have this widget focused, and if so the type of focus (first one found).

Public function

bool

 

HasAnyUserFocusOrFocusedDescendants()

Whether or not any users have this widget focused, or any descendant focused.

Public function

bool

 

HasFocusedDescendants()

Whether this widget has any descendants with keyboard focus

Public function Virtual

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,
    TOptional < int32 > PointerIndex
)

Checks to see if this widget has mouse capture from the provided user.

Public function

bool

 

HasToolTipForceField()

True if a tool tip force field is active on this widget

Public function

TOptional < E ...

 

HasUserFocus

(
    int32 UserIndex
)

Gets whether or not the specified users has this widget focused, and if so the type of focus.

Public function

bool

 

HasUserFocusedDescendants

(
    int32 UserIndex
)

Gets whether or not the specified users has this widget or any descendant focused.

Public function

void

 

Invalidate

(
    EInvalidateWidget InvalidateReason
)

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

Public function

void

 

InvalidatePrepass()

Protected function

bool

 

IsChildWidgetCulled

(
    const FSlateRect &,
    const FArrangedWidget &
)

Public function Virtual

bool

 

IsDirectlyHovered()

True if this widget is directly hovered

Public function

bool

 

IsEnabled()

Whether or not this widget is enabled

Public function Virtual

bool

 

IsHovered()

True if this widget hovered

Public function Virtual

bool

 

IsInteractable()

Is this widget interactive or not? Defaults to false

Public function

bool

 

IsVolatile()

When performing a caching pass, volatile widgets are not cached as part of everything else, instead they and their children are drawn as normal standard widgets and excluded from the cache.

Public function

bool

 

IsVolatileIndirectly()

Was this widget painted as part of a volatile pass previously.

Public function Virtual

FReply

 

OnAnalogValueChanged

(
    const FGeometry & MyGeometry,
    const FAnalogInputEvent & InAnalogI...
)

Called when an analog value changes on a button that supports analog

Protected function Virtual

void

 

OnClippingChanged()

Called when clipping is changed.

Public function Virtual

FCursorReply

 

OnCursorQuery

(
    const FGeometry & MyGeometry,
    const FPointerEvent & CursorEvent
)

The system asks each widget under the mouse to provide a cursor.

Public function Virtual

FReply

 

OnDragDetected

(
    const FGeometry & MyGeometry,
    const FPointerEvent & MouseEvent
)

Called when Slate detects that a widget started to be dragged.

Public function Virtual

void

 

OnDragEnter

(
    const FGeometry & MyGeometry,
    const FDragDropEvent & DragDropEven...
)

DRAG AND DROP (DragDrop) Called during drag and drop when the drag enters a widget.

Public function Virtual

void

 

OnDragLeave

(
    const FDragDropEvent & DragDropEven...
)

Called during drag and drop when the drag leaves a widget.

Public function Virtual

FReply

 

OnDragOver

(
    const FGeometry & MyGeometry,
    const FDragDropEvent & DragDropEven...
)

Called during drag and drop when the the mouse is being dragged over a widget.

Public function Virtual

FReply

 

OnDrop

(
    const FGeometry & MyGeometry,
    const FDragDropEvent & DragDropEven...
)

Called when the user is dropping something onto a widget; terminates drag and drop.

Public function Virtual

void

 

OnFinishedKeyInput()

All the key (keyboard, gamepay, joystick, etc.) input from this frame has been routed.

Public function Virtual

void

 

OnFinishedPointerInput()

All the pointer (mouse, touch, stylus, etc.) events from this frame have been routed.

Public function Virtual

void

 

OnFocusChanging

(
    const FWeakWidgetPath & PreviousFoc...,
    const FWidgetPath & NewWidgetPath,
    const FFocusEvent & InFocusEvent
)

Called whenever a focus path is changing on all the widgets within the old and new focus paths

Public function Virtual

void

 

OnFocusChanging

(
    const FWeakWidgetPath & PreviousFoc...,
    const FWidgetPath & NewWidgetPath
)

Called whenever a focus path is changing on all the widgets within the old and new focus paths

Public function Virtual

void

 

OnFocusLost

(
    const FFocusEvent & InFocusEvent
)

Called when this widget loses focus. This event does not bubble.

Public function Virtual

FReply

 

OnFocusReceived

(
    const FGeometry & MyGeometry,
    const FFocusEvent & InFocusEvent
)

KEY INPUT Called when focus is given to this widget.

Public function Virtual

FReply

 

OnKeyChar

(
    const FGeometry & MyGeometry,
    const FCharacterEvent & InCharacter...
)

Called after a character is entered while this widget has keyboard focus

Public function Virtual

FReply

 

OnKeyDown

(
    const FGeometry & MyGeometry,
    const FKeyEvent & InKeyEvent
)

Called after a key is pressed when this widget has focus (this event bubbles if not handled)

Public function Virtual

FReply

 

OnKeyUp

(
    const FGeometry & MyGeometry,
    const FKeyEvent & InKeyEvent
)

Called after a key is released when this widget has focus

Public function Virtual

TOptional < T ...

 

OnMapCursor

(
    const FCursorReply & CursorReply
)

After OnCursorQuery has specified a cursor type the system asks each widget under the mouse to map that cursor to a widget.

Public function Virtual

FReply

 

OnMotionDetected

(
    const FGeometry & MyGeometry,
    const FMotionEvent & InMotionEvent
)

Called when motion is detected (controller or device) e.g. Someone tilts or shakes their controller.

Public function Virtual

FReply

 

OnMouseButtonDoubleClick

(
    const FGeometry & InMyGeometry,
    const FPointerEvent & InMouseEvent
)

Called when a mouse button is double clicked.

Public function Virtual

FReply

 

OnMouseButtonDown

(
    const FGeometry & MyGeometry,
    const FPointerEvent & MouseEvent
)

MOUSE INPUT The system calls this method to notify the widget that a mouse button was pressed within it.

Public function Virtual

FReply

 

OnMouseButtonUp

(
    const FGeometry & MyGeometry,
    const FPointerEvent & MouseEvent
)

The system calls this method to notify the widget that a mouse button was release within it.

Public function Virtual

void

 

OnMouseCaptureLost

(
    const FCaptureLostEvent & CaptureLo...
)

Called when this widget had captured the mouse, but that capture has been revoked for some reason.

Protected function

void

 

OnMouseCaptureLost()

Called when this widget had captured the mouse, but that capture has been revoked for some reason.

Public function Virtual

void

 

OnMouseEnter

(
    const FGeometry & MyGeometry,
    const FPointerEvent & MouseEvent
)

The system will use this event to notify a widget that the cursor has entered it.

Public function Virtual

void

 

OnMouseLeave

(
    const FPointerEvent & MouseEvent
)

The system will use this event to notify a widget that the cursor has left it.

Public function Virtual

FReply

 

OnMouseMove

(
    const FGeometry & MyGeometry,
    const FPointerEvent & MouseEvent
)

The system calls this method to notify the widget that a mouse moved within it.

Public function Virtual

FReply

 

OnMouseWheel

(
    const FGeometry & MyGeometry,
    const FPointerEvent & MouseEvent
)

Called when the mouse wheel is spun.

Public function Virtual

FNavigationR ...

 

OnNavigation

(
    const FGeometry & MyGeometry,
    const FNavigationEvent & InNavigati...
)

Called when navigation is requested e.g. Left Joystick, Direction Pad, Arrow Keys can generate navigation events.

Public function Virtual

FReply

 

OnPreviewKeyDown

(
    const FGeometry & MyGeometry,
    const FKeyEvent & InKeyEvent
)

Called after a key is pressed when this widget or a child of this widget has focus If a widget handles this event, OnKeyDown will not be passed to the focused widget.

Public function Virtual

FReply

 

OnPreviewMouseButtonDown

(
    const FGeometry & MyGeometry,
    const FPointerEvent & MouseEvent
)

Just like OnMouseButtonDown, but tunnels instead of bubbling.

Public function Virtual

FPopupMethod ...

 

OnQueryPopupMethod()

Popups can manifest in a NEW OS WINDOW or via an OVERLAY in an existing window.

Public function Virtual

TOptional < b...

 

OnQueryShowFocus

(
    const EFocusCause InFocusCause
)

Called to determine if we should render the focus brush.

Public function Virtual

void

 

OnToolTipClosing()

Called when a tooltip displayed from this widget is being closed

Public function Virtual

FReply

 

OnTouchEnded

(
    const FGeometry & MyGeometry,
    const FPointerEvent & InTouchEvent
)

Called when a touchpad touch is ended (finger lifted)

Public function Virtual

FReply

 

OnTouchFirstMove

(
    const FGeometry & MyGeometry,
    const FPointerEvent & TouchEvent
)

Called when a touchpad touch first moves after TouchStarted

Public function Virtual

FReply

 

OnTouchForceChanged

(
    const FGeometry & MyGeometry,
    const FPointerEvent & TouchEvent
)

Called when a touchpad touch force changes

Public function Virtual

FReply

 

OnTouchGesture

(
    const FGeometry & MyGeometry,
    const FPointerEvent & GestureEvent
)

TOUCH and GESTURES Called when the user performs a gesture on trackpad.

Public function Virtual

FReply

 

OnTouchMoved

(
    const FGeometry & MyGeometry,
    const FPointerEvent & InTouchEvent
)

Called when a touchpad touch is moved (finger moved)

Public function Virtual

FReply

 

OnTouchStarted

(
    const FGeometry & MyGeometry,
    const FPointerEvent & InTouchEvent
)

Called when a touchpad touch is started (finger down)

Public function Virtual

TSharedPtr < ...

 

OnVisualizePopup

(
    const TSharedRef < SWidget >& Popup...
)

Visualize a new pop-up if possible.

Public function Virtual

bool

 

OnVisualizeTooltip

(
    const TSharedPtr < SWidget >& Toolt...
)

Called when Slate wants to visualize tooltip.

Public function

int32

 

Paint

(
    const FPaintArgs & Args,
    const FGeometry & AllottedGeometry,
    const FSlateRect & MyCullingRect,
    FSlateWindowElementList & OutDrawEl...,
    int32 LayerId,
    const FWidgetStyle & InWidgetStyle,
    bool bParentEnabled
)

GENERAL EVENTS Called to tell a widget to paint itself (and it's children).

Public function

TSharedRef < ...

 

RegisterActiveTimer

(
    float TickPeriod,
    FWidgetActiveTimerDelegate TickFunc...
)

Registers an "active timer" delegate that will execute at some regular interval.

Public function

void

 

SetCanTick

(
    bool bInCanTick
)

Public function

void

 

SetClipping

(
    EWidgetClipping InClipping
)

Sets the clipping to bounds rules for this widget.

Public function

void

 

SetCullingBoundsExtension

(
    const FMargin & InCullingBoundsExte...
)

Sets an additional culling padding that is added to a widget to give more leeway when culling widgets.

Public function

void

 

SetCursor

(
    const TAttribute < TOptional < EMouse ...
)

Set the cursor that should appear when this widget is hovered

Public function

void

 

SetDebugInfo

(
    const ANSICHAR * InType,
    const ANSICHAR * InFile,
    int32 OnLine,
    size_t InAllocSize
)

Used by Slate to set the runtime debug info about this widget.

Public function

void

 

SetEnabled

(
    const TAttribute < bool >& InEnable...
)

Sets the enabled state of this widget

Public function

void

 

SetOnMouseButtonDown

(
    FPointerEventHandler EventHandler
)

See OnMouseButtonDown event

Public function

void

 

SetOnMouseButtonUp

(
    FPointerEventHandler EventHandler
)

See OnMouseButtonUp event

Public function

void

 

SetOnMouseDoubleClick

(
    FPointerEventHandler EventHandler
)

See OnMouseDoubleClick event

Public function

void

 

SetOnMouseEnter

(
    FNoReplyPointerEventHandler EventHa...
)

See OnMouseEnter event

Public function

void

 

SetOnMouseLeave

See OnMouseLeave event

Public function

void

 

SetOnMouseMove

(
    FPointerEventHandler EventHandler
)

See OnMouseMove event

Public function

void

 

SetRenderOpacity

(
    float InRenderOpacity
)

Public function

void

 

SetRenderTransform

(
    TAttribute < TOptional < FSlateRender ...
)

Public function

void

 

SetRenderTransformPivot

(
    TAttribute < FVector2D > InTransform...
)

Public function

void

 

SetTag

(
    FName InTag
)

Public function

void

 

SetToolTip

(
    const TSharedPtr < IToolTip >& InTo...
)

Set the tool tip that should appear when this widget is hovered.

Public function

void

 

SetToolTipText

(
    const FText & InToolTipText
)

Public function

void

 

SetToolTipText

(
    const TAttribute < FText >& ToolTip...
)

Set the tool tip that should appear when this widget is hovered.

Public function Virtual

void

 

SetVisibility

(
    TAttribute < EVisibility > InVisibil...
)

Protected function

bool

 

ShouldBeEnabled

(
    bool InParentEnabled
)

Determines if this widget should be enabled.

true if the widget is enabled

Public function

void

 

SlatePrepass

(
    float LayoutScaleMultiplier
)

Descends to leaf-most widgets in the hierarchy and gathers desired sizes on the way up.

Public function

void

 

SlatePrepass()

DEPRECATED(4.20, "SlatePrepass requires a layout scale to be accurate.")

Public function Virtual

bool

 

SupportsKeyboardFocus()

Checks to see if this widget supports keyboard focus.

Public function

void

 

SWidgetConstruct

(
    const TAttribute < FText >& InToolT...,
    const TSharedPtr < IToolTip >& InTo...,
    const TAttribute < TOptional < EMouse ...,
    const TAttribute < bool >& InEnable...,
    const TAttribute < EVisibility >& I...,
    const float InRenderOpacity,
    const TAttribute < TOptional < FSlate ...,
    const TAttribute < FVector2D >& InT...,
    const FName & InTag,
    const bool InForceVolatile,
    const EWidgetClipping InClipping,
    const TArray < TSharedRef < ISlateMet ...
)

Public function Virtual

void

 

Tick

(
    const FGeometry & AllottedGeometry,
    const double InCurrentTime,
    const float InDeltaTime
)

Ticks this widget with Geometry.

Public function Virtual

FString

 

ToString()

Widget Inspector and debugging methods.

Public function Virtual

TSharedPtr < ...

 

TranslateMouseCoordinateFor3DChild

(
    const TSharedRef < SWidget >& Child...,
    const FGeometry & MyGeometry,
    const FVector2D & ScreenSpaceMouseC...,
    const FVector2D & LastScreenSpaceMo...
)

Public function

void

 

UnRegisterActiveTimer

(
    const TSharedRef < FActiveTimerHandl...
)

Unregisters an active timer handle.

References

Module

SlateCore

Header

Runtime/SlateCore/Public/Widgets/SWidget.h