Navigation
API > API/Runtime > API/Runtime/SlateCore
HOW TO DEPRECATE SLATE_ATTRIBUTES
SLATE_ATTRIBUTE(ECheckBoxState, IsChecked)
UE_DEPRECATED(4.xx, "Please use IsChecked(TAttribute
// 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.
| Name | SWidget |
| Type | class |
| Header File | /Engine/Source/Runtime/SlateCore/Public/Widgets/SWidget.h |
| Include Path | #include "Widgets/SWidget.h" |
Syntax
class SWidget :
public FSlateControlledConstruction ,
public TSharedFromThis< SWidget >
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → SWidget
- FSlateControlledConstruction → SWidget
Derived Classes
SWidget derived class hierarchy
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
SWidget() |
Hidden default constructor.Use SNew(WidgetClassName) to instantiate new widgets. | Widgets/SWidget.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~SWidget() |
Dtor ensures that active timer handles are UnRegistered with the SlateApplication. | Widgets/SWidget.h |
Structs
| Name | Remarks |
|---|---|
| TSlateAttribute | A SlateAttribute that is member variable of a SWidget. |
| TSlateAttributeRef | A Reference to a TSlateAttribute. |
| TSlateManagedAttribute | A SlateAttribute that is NOT a member variable of a SWidget. |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| PrivateParentType | FSlateControlledConstruction | Widgets/SWidget.h | |
| PrivateThisType | SWidget | Widgets/SWidget.h | |
| Super | FSlateControlledConstruction | Widgets/SWidget.h | |
| ThisClass | SWidget | Widgets/SWidget.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bCachedVolatile | uint8 | The last cached volatility of this widget. | Widgets/SWidget.h | |
| bDesiredSizeSet | uint8 | Is the DesiredSize set. | Widgets/SWidget.h | |
| bEnabledAttributesUpdate | uint8 | Are bound Slate Attributes will be updated once per frame. | Widgets/SWidget.h | |
| bForceVolatile | uint8 | Should we be forcing this widget to be volatile at all times and redrawn every frame? | Widgets/SWidget.h | |
| bHasActiveTimers | uint8 | Is there at least one ActiveTimer currently registered. | Widgets/SWidget.h | |
| bHasRegisteredSlateAttribute | uint8 | Is there at least one SlateAttribute currently registered. | Widgets/SWidget.h | |
| bInheritedVolatility | uint8 | If we're owned by a volatile widget, we need inherit that volatility and use as part of our volatility, but don't cache it. | Widgets/SWidget.h | |
| bIsDeclarativeSyntaxConstructionCompleted | uint8 | The SNew or SAssignedNew construction is completed. | Widgets/SWidget.h | |
| bIsHoveredAttributeSet | uint8 | Is the attribute IsHovered is set? | Widgets/SWidget.h | |
| bNeedsPrepass | uint8 | Are we currently updating the desired size? | Widgets/SWidget.h | |
| bPrepassLayoutScaleMultiplierSet | uint8 | Is the PrepassLayoutScaleMultiplier set. | Widgets/SWidget.h | |
| bSupportsInvalidation | uint8 | We need to keep this information for each widget as not all widgets have a class to store this information. | Widgets/SWidget.h | |
| bToolTipForceFieldEnabled | uint8 | Whether this widget is a "tool tip force field". | Widgets/SWidget.h | |
| CachedSupportsInvalidationRecursive | bool | The cached value of the last SupportsInvalidationRecursive call. | Widgets/SWidget.h | |
| CreatedInLocation | FName | Full file path (and line) in which this widget was created | Widgets/SWidget.h | |
| Debug_DestroyedTag | uint8 | Flag to help detect when we access an invalid Widget. | Widgets/SWidget.h | |
| DesiredSize | FVector2f | Stores the ideal size this widget wants to be. See bDesiredSizeSet. | Widgets/SWidget.h | |
| EnabledStateAttribute | TSlateAttribute< bool > | Whether or not this widget is enabled | Widgets/SWidget.h | |
| FastPathProxyHandle | FWidgetProxyHandle | Handle to the proxy when on the fast path | Widgets/SWidget.h | |
| FlowDirectionPreference | EFlowDirectionPreference | Flow direction preference | Widgets/SWidget.h | |
| HoveredAttribute | TSlateAttribute< bool > | Whether or not this widget is hovered | Widgets/SWidget.h | |
| LastPaintFrame | uint32 | The last time this widget got painted. | Widgets/SWidget.h | |
| LastPrepassFrame | uint32 | The last time this widget got prepassed. | Widgets/SWidget.h | |
| MetaData | TArray< TSharedRef< ISlateMetaData > > | Metadata associated with this widget. | Widgets/SWidget.h | |
| ParentWidgetPtr | TWeakPtr< SWidget > | Pointer to this widgets parent widget. | Widgets/SWidget.h | |
| PersistentState | FSlateWidgetPersistentState | Widgets/SWidget.h | ||
| PrepassLayoutScaleMultiplierValue | float | Widgets/SWidget.h | ||
| RenderTransformAttribute | TSlateAttribute< TOptional< FSlateRenderTransform > > | Render transform of this widget. | Widgets/SWidget.h | |
| RenderTransformPivotAttribute | TSlateAttribute< FVector2D > | Render transform pivot of this widget (in normalized local space) | Widgets/SWidget.h | |
| Tag | FName | Tag for this widget | Widgets/SWidget.h | |
| TypeOfWidget | FName | Debugging information on the type of widget we're creating for the Widget Reflector. | Widgets/SWidget.h | |
| UniqueIdentifier | uint64 | The widget's id | Widgets/SWidget.h | |
| UpdateFlags | EWidgetUpdateFlags | The different updates this widget needs next frame. | Widgets/SWidget.h | |
| VisibilityAttribute | TSlateAttribute< EVisibility > | Is this widget visible, hidden or collapsed | Widgets/SWidget.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddMetadata
(
const TSharedRef< MetaDataType >& AddMe |
Add metadata to this widget. | Widgets/SWidget.h | |
virtual const FSlateInvalidationRoot * Advanced_AsInvalidationRoot() |
Widgets/SWidget.h | ||
TSharedPtr< SWidget > Advanced_GetPaintParentWidget() |
Widgets/SWidget.h | ||
virtual bool Advanced_IsInvalidationRoot() |
Widgets/SWidget.h | ||
virtual bool Advanced_IsWindow() |
Is this widget derivative of SWindow | Widgets/SWidget.h | |
void ArrangeChildren
(
const FGeometry& AllottedGeometry, |
Non-virtual entry point for arrange children. | Widgets/SWidget.h | |
void AssignParentWidget
(
TSharedPtr< SWidget > InParent |
Widgets/SWidget.h | ||
void CacheVolatility () |
Recalculates volatility of the widget and caches the result. | Widgets/SWidget.h | |
FSlateRect CalculateCullingAndClippingRules
(
const FGeometry& AllottedGeometry, |
Calculates what if any clipping state changes need to happen when drawing this widget. | Widgets/SWidget.h | |
bool CanChildrenBeAccessible() |
Checks whether this widget allows its children to be accessible or not. | Widgets/SWidget.h | |
bool ConditionallyDetatchParentWidget
(
SWidget* InExpectedParent |
Widgets/SWidget.h | ||
virtual TSharedRef< class FSlateAccessibleWidget > CreateAccessibleWidget() |
Widgets/SWidget.h | ||
virtual FChildren * Debug_GetChildrenForReflector () |
Returns all Widgets, including widget hidden from the invalidation system. | Widgets/SWidget.h | |
uint32 Debug_GetLastPaintFrame() |
Widgets/SWidget.h | ||
uint32 Debug_GetLastPrepassFrame() |
Widgets/SWidget.h | ||
void EnableToolTipForceField
(
const bool bEnableForceField |
Sets whether this widget is a "tool tip force field". | Widgets/SWidget.h | |
void ForceVolatile
(
bool bForce |
Should this widget always appear as volatile for any layout caching host widget. | Widgets/SWidget.h | |
EAccessibleBehavior GetAccessibleBehavior
(
EAccessibleType AccessibleType |
Get the behavior describing how the accessible text of this widget should be retrieved. | Widgets/SWidget.h | |
FText GetAccessibleSummary() |
Traverse all child widgets and concat their results of GetAccessibleText(Summary). | Widgets/SWidget.h | |
FText GetAccessibleText
(
EAccessibleType AccessibleType |
Get the text that should be reported to the user when attempting to access this widget. | Widgets/SWidget.h | |
virtual FChildren * GetAllChildren () |
Returns the children (if any) of this widget that are used by the invalidation system. | Widgets/SWidget.h | |
TArray< TSharedRef< MetaDataType > > GetAllMetaData() |
Get all metadata of the type provided. | Widgets/SWidget.h | |
const FGeometry & GetCachedGeometry() |
Widgets/SWidget.h | ||
bool GetCanTick() |
Widgets/SWidget.h | ||
FChildren * GetChildren () |
Returns the useful children (if any) of this widget. | Widgets/SWidget.h | |
EWidgetClipping GetClipping() |
Widgets/SWidget.h | ||
FName GetCreatedInLocation() |
Widgets/SWidget.h | ||
FMargin GetCullingBoundsExtension() |
Widgets/SWidget.h | ||
const TOptional< FSlateClippingState > & GetCurrentClippingState() |
Returns the clipping state to clip this widget against its parent | Widgets/SWidget.h | |
virtual TOptional< FText > GetDefaultAccessibleText
(
EAccessibleType AccessibleType |
Assign AccessibleText with a default value that can be used when AccessibleBehavior is set to Auto or Custom. | Widgets/SWidget.h | |
UE::Slate::FDeprecateVector2DResult GetDesiredSize() |
Widgets/SWidget.h | ||
virtual FSlateColor GetDisabledForegroundColor() |
Widgets/SWidget.h | ||
EFlowDirectionPreference GetFlowDirectionPreference() |
Gets the desired flow direction for the layout. | Widgets/SWidget.h | |
virtual FSlateColor GetForegroundColor() |
Widgets/SWidget.h | ||
uint64 GetId() |
Widgets/SWidget.h | ||
TSharedPtr< MetaDataType > GetMetaData() |
Get the metadata of the type provided. | Widgets/SWidget.h | |
const FGeometry & GetPaintSpaceGeometry () |
Gets the last geometry used to Tick the widget. | Widgets/SWidget.h | |
TSharedPtr< SWidget > GetParentWidget() |
Widgets/SWidget.h | ||
const FSlateWidgetPersistentState & GetPersistentState() |
Widgets/SWidget.h | ||
EWidgetPixelSnapping GetPixelSnapping() |
Widgets/SWidget.h | ||
const FWidgetProxyHandle GetProxyHandle() |
Widgets/SWidget.h | ||
virtual FString GetReadableLocation() |
Widgets/SWidget.h | ||
virtual float GetRelativeLayoutScale
(
const int32 ChildIndex, |
What is the Child's scale relative to this widget. | Widgets/SWidget.h | |
float GetRenderOpacity() |
Widgets/SWidget.h | ||
const TOptional< FSlateRenderTransform > & GetRenderTransform() |
Widgets/SWidget.h | ||
UE::Slate::FDeprecateVector2DResult GetRenderTransformPivot() |
Widgets/SWidget.h | ||
UE::Slate::FDeprecateVector2DResult GetRenderTransformPivotWithRespectToFlowDirection() |
Widgets/SWidget.h | ||
TOptional< FSlateRenderTransform > GetRenderTransformWithRespectToFlowDirection() |
Widgets/SWidget.h | ||
TStatId GetStatID
(
bool bForDeferredUse |
Widgets/SWidget.h | ||
virtual FName GetTag() |
Widgets/SWidget.h | ||
const FGeometry & GetTickSpaceGeometry () |
Gets the last geometry used to Tick the widget. | Widgets/SWidget.h | |
virtual TSharedPtr< IToolTip > GetToolTip() |
Widgets/SWidget.h | ||
FName GetType() |
Widgets/SWidget.h | ||
FString GetTypeAsString() |
Widgets/SWidget.h | ||
EVisibility GetVisibility() |
This widget can be visible but if a parent is hidden or collapsed, it would not show on screen. | Widgets/SWidget.h | |
virtual EWindowZone::Type 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. | Widgets/SWidget.h | |
bool HasActiveTimers() |
Does this widget have any active timers? | Widgets/SWidget.h | |
bool HasAnyUpdateFlags
(
EWidgetUpdateFlags FlagsToCheck |
Widgets/SWidget.h | ||
TOptional< EFocusCause > HasAnyUserFocus() |
Gets whether or not any users have this widget focused, and if so the type of focus (first one found). | Widgets/SWidget.h | |
bool HasAnyUserFocusOrFocusedDescendants() |
Widgets/SWidget.h | ||
bool HasFocusedDescendants() |
Widgets/SWidget.h | ||
virtual bool HasKeyboardFocus() |
Checks to see if this widget currently has the keyboard focus | Widgets/SWidget.h | |
bool HasMouseCapture() |
Checks to see if this widget is the current mouse captor | Widgets/SWidget.h | |
bool HasMouseCaptureByUser
(
int32 UserIndex, |
Checks to see if this widget has mouse capture from the provided user. | Widgets/SWidget.h | |
bool HasRegisteredSlateAttribute() |
Widgets/SWidget.h | ||
bool HasToolTipForceField() |
Widgets/SWidget.h | ||
TOptional< EFocusCause > HasUserFocus
(
int32 UserIndex |
Gets whether or not the specified users has this widget focused, and if so the type of focus. | Widgets/SWidget.h | |
bool HasUserFocusedDescendants
(
int32 UserIndex |
Gets whether or not the specified users has this widget or any descendant focused. | Widgets/SWidget.h | |
void Invalidate
(
EInvalidateWidgetReason InvalidateReason |
Invalidates the widget from the view of a layout caching widget that may own this widget. | Widgets/SWidget.h | |
bool IsAccessible () |
Whether this widget is considered accessible or not. | Widgets/SWidget.h | |
bool IsAttributesUpdatesEnabled() |
Widgets/SWidget.h | ||
bool IsDirectlyHovered() |
Widgets/SWidget.h | ||
bool IsEnabled() |
Widgets/SWidget.h | ||
bool IsHovered () |
IsHovered used to be virtual. | Widgets/SWidget.h | |
virtual bool IsInteractable() |
Widgets/SWidget.h | ||
bool IsParentValid() |
Widgets/SWidget.h | ||
bool IsVolatile() |
Whether or not a widget is volatile and will update every frame without being invalidated | Widgets/SWidget.h | |
bool IsVolatileIndirectly () |
This widget is volatile because its parent or some ancestor is volatile | Widgets/SWidget.h | |
void MarkPrepassAsDirty () |
In fast path, if the widget is mark, do a full Prepass on its next update to calculate it's desired size. | Widgets/SWidget.h | |
bool NeedsPrepass() |
LAYOUT | Widgets/SWidget.h | |
virtual FReply OnAnalogValueChanged
(
const FGeometry& MyGeometry, |
Called when an analog value changes on a button that supports analog | Widgets/SWidget.h | |
virtual FCursorReply OnCursorQuery
(
const FGeometry& MyGeometry, |
The system asks each widget under the mouse to provide a cursor. This event is bubbled. | Widgets/SWidget.h | |
virtual FReply OnDragDetected
(
const FGeometry& MyGeometry, |
Called when Slate detects that a widget started to be dragged. | Widgets/SWidget.h | |
virtual void OnDragEnter
(
const FGeometry& MyGeometry, |
DRAG AND DROP (DragDrop) Called during drag and drop when the drag enters a widget. | Widgets/SWidget.h | |
virtual void OnDragLeave
(
const FDragDropEvent& DragDropEvent |
Called during drag and drop when the drag leaves a widget. | Widgets/SWidget.h | |
virtual FReply OnDragOver
(
const FGeometry& MyGeometry, |
Called during drag and drop when the the mouse is being dragged over a widget. | Widgets/SWidget.h | |
virtual FReply OnDrop
(
const FGeometry& MyGeometry, |
Called when the user is dropping something onto a widget; terminates drag and drop. | Widgets/SWidget.h | |
virtual void OnFinishedKeyInput () |
All the key (keyboard, gamepay, joystick, etc.) input from this frame has been routed. | Widgets/SWidget.h | |
virtual void OnFinishedPointerInput () |
All the pointer (mouse, touch, stylus, etc.) events from this frame have been routed. | Widgets/SWidget.h | |
virtual void OnFocusChanging
(
const FWeakWidgetPath& PreviousFocusPath, |
Called whenever a focus path is changing on all the widgets within the old and new focus paths | Widgets/SWidget.h | |
virtual void OnFocusLost
(
const FFocusEvent& InFocusEvent |
Called when this widget loses focus. This event does not bubble. | Widgets/SWidget.h | |
virtual FReply OnFocusReceived
(
const FGeometry& MyGeometry, |
KEY INPUT Called when focus is given to this widget. This event does not bubble. | Widgets/SWidget.h | |
virtual FReply OnKeyChar
(
const FGeometry& MyGeometry, |
Called after a character is entered while this widget has keyboard focus | Widgets/SWidget.h | |
| Called after a key is pressed when this widget has focus (this event bubbles if not handled) | Widgets/SWidget.h | ||
| Called after a key is released when this widget has focus | Widgets/SWidget.h | ||
virtual TOptional< TSharedRef< SWidget > > 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. | Widgets/SWidget.h | |
virtual FReply OnMotionDetected
(
const FGeometry& MyGeometry, |
Called when motion is detected (controller or device) e.g. Someone tilts or shakes their controller. | Widgets/SWidget.h | |
virtual FReply OnMouseButtonDoubleClick
(
const FGeometry& InMyGeometry, |
Called when a mouse button is double clicked. Override this in derived classes. | Widgets/SWidget.h | |
virtual FReply OnMouseButtonDown
(
const FGeometry& MyGeometry, |
MOUSE INPUT The system calls this method to notify the widget that a mouse button was pressed within it. | Widgets/SWidget.h | |
virtual FReply OnMouseButtonUp
(
const FGeometry& MyGeometry, |
The system calls this method to notify the widget that a mouse button was release within it. | Widgets/SWidget.h | |
virtual void OnMouseCaptureLost
(
const FCaptureLostEvent& CaptureLostEvent |
Called when this widget had captured the mouse, but that capture has been revoked for some reason. | Widgets/SWidget.h | |
virtual void OnMouseEnter
(
const FGeometry& MyGeometry, |
The system will use this event to notify a widget that the cursor has entered it. | Widgets/SWidget.h | |
virtual void OnMouseLeave
(
const FPointerEvent& MouseEvent |
The system will use this event to notify a widget that the cursor has left it. | Widgets/SWidget.h | |
virtual FReply OnMouseMove
(
const FGeometry& MyGeometry, |
The system calls this method to notify the widget that a mouse moved within it. | Widgets/SWidget.h | |
virtual FReply OnMouseWheel
(
const FGeometry& MyGeometry, |
Called when the mouse wheel is spun. This event is bubbled. | Widgets/SWidget.h | |
virtual FNavigationReply OnNavigation
(
const FGeometry& MyGeometry, |
Called when navigation is requested e.g. Left Joystick, Direction Pad, Arrow Keys can generate navigation events. | Widgets/SWidget.h | |
virtual FReply OnPreviewKeyDown
(
const FGeometry& MyGeometry, |
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. | Widgets/SWidget.h | |
virtual FReply OnPreviewMouseButtonDown
(
const FGeometry& MyGeometry, |
Just like OnMouseButtonDown, but tunnels instead of bubbling. | Widgets/SWidget.h | |
virtual FPopupMethodReply OnQueryPopupMethod () |
Popups can manifest in a NEW OS WINDOW or via an OVERLAY in an existing window. | Widgets/SWidget.h | |
virtual TOptional< bool > OnQueryShowFocus
(
const EFocusCause InFocusCause |
Called to determine if we should render the focus brush. | Widgets/SWidget.h | |
virtual void OnToolTipClosing() |
Called when a tooltip displayed from this widget is being closed | Widgets/SWidget.h | |
virtual FReply OnTouchEnded
(
const FGeometry& MyGeometry, |
Called when a touchpad touch is ended (finger lifted) | Widgets/SWidget.h | |
virtual FReply OnTouchFirstMove
(
const FGeometry& MyGeometry, |
Called when a touchpad touch first moves after TouchStarted | Widgets/SWidget.h | |
virtual FReply OnTouchForceChanged
(
const FGeometry& MyGeometry, |
Called when a touchpad touch force changes | Widgets/SWidget.h | |
virtual FReply OnTouchGesture
(
const FGeometry& MyGeometry, |
TOUCH and GESTURES Called when the user performs a gesture on trackpad. This event is bubbled. | Widgets/SWidget.h | |
virtual FReply OnTouchMoved
(
const FGeometry& MyGeometry, |
Called when a touchpad touch is moved (finger moved) | Widgets/SWidget.h | |
virtual FReply OnTouchStarted
(
const FGeometry& MyGeometry, |
Called when a touchpad touch is started (finger down) | Widgets/SWidget.h | |
virtual TSharedPtr< FPopupLayer > OnVisualizePopup
(
const TSharedRef< SWidget >& PopupContent |
Visualize a new pop-up if possible. | Widgets/SWidget.h | |
virtual bool OnVisualizeTooltip
(
const TSharedPtr< SWidget >& TooltipContent |
Called when Slate wants to visualize tooltip. | Widgets/SWidget.h | |
int32 Paint
(
const FPaintArgs& Args, |
GENERAL EVENTS Called to tell a widget to paint itself (and it's children). | Widgets/SWidget.h | |
TSharedRef< FActiveTimerHandle > RegisterActiveTimer
(
float TickPeriod, |
Registers an "active timer" delegate that will execute at some regular interval. | Widgets/SWidget.h | |
int32 RemoveMetaData
(
const TSharedRef< MetaDataType >& RemoveMe |
Remove metadata to this widget. | Widgets/SWidget.h | |
void SetAccessibleBehavior
(
EAccessibleBehavior InBehavior, |
Set a new accessible behavior, and if the behavior is custom, new accessible text to go along with it. | Widgets/SWidget.h | |
void SetCanChildrenBeAccessible
(
bool InCanChildrenBeAccessible |
Sets whether children are allowed to be accessible or not. | Widgets/SWidget.h | |
void SetCanTick
(
bool bInCanTick |
Widgets/SWidget.h | ||
void SetClipping
(
EWidgetClipping InClipping |
Sets the clipping to bounds rules for this widget. | Widgets/SWidget.h | |
void SetCullingBoundsExtension
(
const FMargin& InCullingBoundsExtension |
Sets an additional culling padding that is added to a widget to give more leeway when culling widgets. | Widgets/SWidget.h | |
void SetCursor
(
const TAttribute< TOptional< EMouseCursor::Type > >& InCursor |
Set the cursor that should appear when this widget is hovered | Widgets/SWidget.h | |
void SetEnabled
(
TAttribute< bool > InEnabledState |
Sets the enabled state of this widget | Widgets/SWidget.h | |
void SetFlowDirectionPreference
(
EFlowDirectionPreference InFlowDirectionPreference |
Sets how content should flow in this panel, based on the current culture. | Widgets/SWidget.h | |
void SetOnMouseButtonDown
(
FPointerEventHandler EventHandler |
See OnMouseButtonDown event | Widgets/SWidget.h | |
void SetOnMouseButtonUp
(
FPointerEventHandler EventHandler |
See OnMouseButtonUp event | Widgets/SWidget.h | |
void SetOnMouseDoubleClick
(
FPointerEventHandler EventHandler |
See OnMouseDoubleClick event | Widgets/SWidget.h | |
void SetOnMouseEnter
(
FNoReplyPointerEventHandler EventHandler |
See OnMouseEnter event | Widgets/SWidget.h | |
void SetOnMouseLeave
(
FSimpleNoReplyPointerEventHandler EventHandler |
See OnMouseLeave event | Widgets/SWidget.h | |
void SetOnMouseMove
(
FPointerEventHandler EventHandler |
See OnMouseMove event | Widgets/SWidget.h | |
void SetPixelSnapping
(
EWidgetPixelSnapping InPixelSnappingMethod |
Sets the pixel snapping method for this widget. | Widgets/SWidget.h | |
void SetRenderOpacity
(
float InRenderOpacity |
Widgets/SWidget.h | ||
void SetRenderTransform
(
TAttribute< TOptional< FSlateRenderTransform > > InTransform |
Widgets/SWidget.h | ||
void SetRenderTransformPivot
(
TAttribute< FVector2D > InTransformPivot |
Widgets/SWidget.h | ||
void SetTag
(
FName InTag |
Widgets/SWidget.h | ||
void SetToolTip
(
const TAttribute< TSharedPtr< IToolTip > >& InToolTip |
Set the tool tip that should appear when this widget is hovered. | Widgets/SWidget.h | |
void SetToolTipText
(
const FText& InToolTipText |
Set the tool tip that should appear when this widget is hovered. | Widgets/SWidget.h | |
void SetToolTipText
(
const TAttribute< FText >& ToolTipText |
Set the tool tip that should appear when this widget is hovered. | Widgets/SWidget.h | |
virtual void SetVisibility
(
TAttribute< EVisibility > InVisibility |
Widgets/SWidget.h | ||
bool ShouldInvalidatePrepassDueToVolatility() |
Widgets/SWidget.h | ||
void SlatePrepass
(
float InLayoutScaleMultiplier |
Descends to leaf-most widgets in the hierarchy and gathers desired sizes on the way up. | Widgets/SWidget.h | |
void SlatePrepass () |
DEPRECATED version of SlatePrepass that assumes no scaling beyond AppScale | Widgets/SWidget.h | |
bool SupportsInvalidation() |
Returns true if this widget's class supports invalidation. | Widgets/SWidget.h | |
virtual bool SupportsInvalidationRecursive
(
bool bUseCachedValue |
Returns true if this widget and all of its children support invalidation. | Widgets/SWidget.h | |
virtual bool SupportsKeyboardFocus() |
Checks to see if this widget supports keyboard focus. Override this in derived classes. | Widgets/SWidget.h | |
| Ticks this widget with Geometry. | Widgets/SWidget.h | ||
virtual FString ToString() |
Widgets/SWidget.h | ||
virtual TOptional< FVirtualPointerPosition > TranslateMouseCoordinateForCustomHitTestChild
(
const SWidget& ChildWidget, |
Widgets/SWidget.h | ||
void UnRegisterActiveTimer
(
const TSharedRef< FActiveTimerHandle >& ActiveTimerHandle |
Unregisters an active timer handle. | Widgets/SWidget.h | |
virtual bool ValidatePathToChild
(
SWidget* InChild |
Widgets/SWidget.h |
Overridden from FSlateControlledConstruction
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual const FSlateWidgetClassData & GetWidgetClass() |
Widgets/SWidget.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool Advanced_InvalidateVolatility() |
Recalculates and caches volatility and returns 'true' if the volatility changed. | Widgets/SWidget.h | |
virtual void CacheDesiredSize
(
float InLayoutScaleMultiplier |
The system calls this method. | Widgets/SWidget.h | |
FVector2D ComputeDesiredSize
(
float LayoutScaleMultiplier |
Compute the ideal size necessary to display this widget. | Widgets/SWidget.h | |
EFlowDirection ComputeFlowDirection() |
Establishes a new flow direction potentially, if this widget has a particular preference for it and all its children. | Widgets/SWidget.h | |
virtual bool ComputeVolatility () |
Recomputes the volatility of the widget. | Widgets/SWidget.h | |
virtual bool CustomPrepass
(
float LayoutScaleMultiplier |
Widgets/SWidget.h | ||
bool FindChildGeometries
(
const FGeometry& MyGeometry, |
Find the geometry of a descendant widget. | Widgets/SWidget.h | |
void FindChildGeometries_Helper
(
const FGeometry& MyGeometry, |
Actual implementation of FindChildGeometries. | Widgets/SWidget.h | |
FGeometry FindChildGeometry
(
const FGeometry& MyGeometry, |
Find the geometry of a descendant widget. | Widgets/SWidget.h | |
virtual TOptional< EMouseCursor::Type > GetCursor() |
The cursor to show when the mouse is hovering over this widget. | Widgets/SWidget.h | |
TSlateAttributeRef< bool > GetEnabledStateAttribute() |
Widgets/SWidget.h | ||
virtual const FSlateBrush * GetFocusBrush() |
Widgets/SWidget.h | ||
TSlateAttributeRef< bool > GetHoveredAttribute() |
Widgets/SWidget.h | ||
float GetPrepassLayoutScaleMultiplier() |
Widgets/SWidget.h | ||
TSlateAttributeRef< TOptional< FSlateRenderTransform > > GetRenderTransformAttribute() |
Widgets/SWidget.h | ||
TSlateAttributeRef< FVector2D > GetRenderTransformPivotAttribute() |
Widgets/SWidget.h | ||
TSlateAttributeRef< EVisibility > GetVisibilityAttribute() |
Widgets/SWidget.h | ||
void InvalidateChildRemovedFromTree
(
SWidget& Child |
Called when a child is removed from the tree parent's widget tree either by removing it from a slot. | Widgets/SWidget.h | |
bool IsChildWidgetCulled
(
const FSlateRect& MyCullingRect, |
Tests if an arranged widget should be culled. | Widgets/SWidget.h | |
bool IsConstructed() |
Is the widget construction completed (did we called and returned from the Construct() function) | Widgets/SWidget.h | |
virtual void OnClippingChanged () |
Called when clipping is changed. | Widgets/SWidget.h | |
void Prepass_ChildLoop
(
float InLayoutScaleMultiplier, |
Widgets/SWidget.h | ||
bool SetAttribute
(
TAttribute< TargetValueType >& TargetValue, |
Performs the attribute assignment and invalidates the widget minimally based on what actually changed. | Widgets/SWidget.h | |
void SetDebugInfo
(
const ANSICHAR* InType, |
Used by Slate to set the runtime debug info about this widget. | Widgets/SWidget.h | |
void SetHover
(
TAttribute< bool > InHovered |
Set the hover state. | Widgets/SWidget.h | |
void SetVolatilePrepass
(
bool bVolatile |
Widgets/SWidget.h | ||
bool ShouldBeEnabled
(
bool InParentEnabled |
Determines if this widget should be enabled. | Widgets/SWidget.h | |
void SWidgetConstruct
(
const FSlateBaseNamedArgs& Args |
Construct a SWidget based on initial parameters. | Widgets/SWidget.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static TAttribute< EVisibility > AccessWidgetVisibilityAttribute
(
const TSharedRef< SWidget >& Widget |
Protected static helper to allow widgets to access the visibility attribute of other widgets directly | Widgets/SWidget.h | |
static int32 FindChildUnderMouse
(
const FArrangedChildren& Children, |
Widgets/SWidget.h | ||
static int32 FindChildUnderPosition
(
const FArrangedChildren& Children, |
Widgets/SWidget.h | ||
static const FSlateWidgetClassData & GetPrivateWidgetClass() |
Widgets/SWidget.h | ||
static void PrivateRegisterAttributes
(
FSlateAttributeInitializer& |
Widgets/SWidget.h | ||
static const FSlateWidgetClassData & StaticWidgetClass() |
Widgets/SWidget.h |