UCommonActivatableWidget

The base for widgets that are capable of being "activated" and "deactivated" during their lifetime without being otherwise modified or destroyed.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

CommonUI

Header

/Engine/Plugins/Experimental/CommonUI/Source/CommonUI/Public/CommonActivatableWidget.h

Include

#include "CommonActivatableWidget.h"

Syntax

[UCLASS](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)()
class UCommonActivatableWidget : public UCommonUserWidget

Remarks

The base for widgets that are capable of being "activated" and "deactivated" during their lifetime without being otherwise modified or destroyed.

This is generally desired for one or more of the following purposes:

  • This widget can turn on/off without being removed from the hierarchy (or otherwise reconstructing the underlying SWidgets), so Construct/Destruct are insufficient

  • You'd like to be able to "go back" from this widget, whether that means back a breadcrumb, closing a modal, or something else. This is built-in here.

  • This widget's place in the hierarchy is such that it defines a meaningful node-point in the tree of activatable widgets through which input is routed to all widgets.

By default, an activatable widget:

  • Is not automatically activated upon construction

  • Does not register to receive back actions (or any other actions, for that matter)

  • If classified as a back handler, is automatically deactivated (but not destroyed) when it receives a back action

that removing an activatable widget from the UI (i.e. triggering Destruct()) will always deactivate it, even if the UWidget is not destroyed. Re-constructing the underlying SWidget will only result in re-activation if auto-activate is enabled. TODO: ADD MORE INFO ON INPUTS

Variables

Name Description

Protected variable UProperty Category, EditAnywhere

bool

 

bAutoActivate

True to automatically activate upon construction

Protected variable UProperty Category, EditAnywhere

bool

 

bIsBackHandler

True to receive "Back" actions automatically.

Protected variable UProperty Category, EditAnywhere, Meta

bool

 

bIsModal

True to have this widget be treated as a root node for input routing, regardless of its actual parentage.

Protected variable UProperty Category, EditAnywhere

bool

 

bSupportsActivationFocus

True if this widget is a candidate to receive/route focus or specify a desired UIInputConfig when active.

Protected variable UProperty Category, EditAnywhere, Meta

If

 

false

COMMONUI_SCOPE:

Functions

Name Description

Public function UFunction BlueprintCallable, Category

void

 

ActivateWidget()

Public function Const

bool

 

AutoRestoresFocus()

Protected function Const UFunction Category, Meta, BlueprintImplementableEvent

UWidget *...

 

BP_GetDesiredFocusTarget()

Implement to provide the desired widget to focus if/when this activatable becomes the primary active widget.

Protected function UFunction Category, Meta, BlueprintImplementableEvent

void

 

BP_OnActivated()

Protected function UFunction Category, Meta, BlueprintImplementableEvent

void

 

BP_OnDeactivated()

Protected function UFunction Category, Meta, BlueprintImplementableEvent

bool

 

BP_OnHandleBackAction()

Override in BP implementations to provide custom behavior when receiving a back action

Public function UFunction BlueprintCallable, Category

void

 

DeactivateWidget()

Public function Virtual Const

TOptional< F...

 

GetDesiredCameraConfig()

Public function Const

UWidget *...

 

GetDesiredFocusTarget()

COMMONUI_SCOPE:

Protected function

If we simply...

 

GetDesiredFocusTarget()

Public function Virtual Const

TOptional< F...

 

GetDesiredInputConfig()

Gets the desired input configuration to establish when this widget activates and can receive input (i.e. all parents are also active).

Protected function

void

 

HandleBackAction()

Protected function Virtual

void

 

InternalProcessActivation()

Protected function Virtual

void

 

InternalProcessDeactivation()

Public function Const UFunction BlueprintCallable, Category

bool

 

IsActivated()

Public function Const

bool

 

IsModal()

Protected function Virtual Const

UWidget *...

 

NativeGetDesiredFocusTarget()

Override to provide the desired widget that should receive focus when this becomes the primary active widget.

Protected function Virtual

void

 

NativeOnActivated()

Protected function Virtual

void

 

NativeOnDeactivated()

Protected function Virtual

bool

 

NativeOnHandleBackAction()

Public function Const

FSimpleMulti...

 

OnActivated()

Public function Const

FSimpleMulti...

 

OnDeactivated()

Public function Const

FSimpleMulti...

 

OnRequestRefreshFocus()

Public function Const

FSimpleMulti...

 

OnSlateReleased()

Protected function

void

 

RequestRefreshFocus()

Ask for focus to be re-set to our current DesiredFocusTarget, but only if our node is currently the leaf-most active node (no stealing!).

Protected function

void

 

Reset()

Public function Const

bool

 

SetsVisibilityOnActivated()

Public function Const

bool

 

SetsVisibilityOnDeactivated()

Public function Const

bool

 

SupportsActivationFocus()

Overridden from UUserWidget

Overridden from UWidget

Name Description

Protected function Virtual

TSharedRef< ...

 

RebuildWidget()

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

Overridden from UVisual

Name Description

Protected function Virtual

void

 

ReleaseSlateResources

(
    bool bReleaseChildren
)

Typedefs

Constants

Name

Description

OnRebuilding

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss