SGraphActionMenu

Class that displays a list of graph actions and them to be searched and selected

Windows
MacOS
Linux

Inheritance Hierarchy

SCompoundWidget

FGCObject

SGraphActionMenu

References

Module

GraphEditor

Header

/Engine/Source/Editor/GraphEditor/Public/SGraphActionMenu.h

Include

#include "SGraphActionMenu.h"

Syntax

class SGraphActionMenu :
    public SCompoundWidget,
    public FGCObject

Remarks

Class that displays a list of graph actions and them to be searched and selected

Variables

Name Description

Protected variable

FGraphActionLis...

 

AllActions

List of all actions we can browser

Protected variable

bool

 

bAlphaSortItems

Don't sort items alphabetically

Protected variable

bool

 

bAutoExpandActionMenu

Should we auto-expand categories

Protected variable

bool

 

bIgnoreUIUpdate

Allows us to set selection (via keyboard) without triggering action

Protected variable

bool

 

bShowFilterTextBox

Should we display the filter text box

Protected variable

bool

 

bUseSectionStyling

Should the rows and sections be styled like the details panel?

Protected variable

TArray< TShared...

 

FilteredActionNodes

Flattened list of all actions passing the filter

Protected variable

TSharedPtr< FGr...

 

FilteredRootAction

Root of filtered actions tree

Protected variable

TSharedPtr< SSe...

 

FilterTextBox

Text box used for searching for actions

Protected variable

FOnActionDouble...

 

OnActionDoubleClicked

Delegate to call when action is double clicked

Protected variable

FOnActionDragge...

 

OnActionDragged

Delegate to call when an action is dragged.

Protected variable

FOnActionMatche...

 

OnActionMatchesName

Delegate to check if an action matches a specified name (used for renaming items etc.)

Protected variable

FOnActionSelect...

 

OnActionSelected

Delegate to call when action is selected

Protected variable

FCanRenameSelec...

 

OnCanRenameSelectedAction

Delegate to call to check if a selected action is valid for renaming

Protected variable

FOnCategoryDrag...

 

OnCategoryDragged

Delegate to call when a category is dragged.

Protected variable

FOnCategoryText...

 

OnCategoryTextCommitted

Delegate to call to handle any post-category rename events

Protected variable

FOnCollectAllAc...

 

OnCollectAllActions

Delegate to call to collect all actions

Protected variable

FOnCollectStati...

 

OnCollectStaticSections

Delegate to call to collect all always visible sections

Protected variable

FOnCreateCustom...

 

OnCreateCustomRowExpander

Delegate to call for creating a custom "expander" widget for indenting a menu row with

Protected variable

FOnCreateWidget...

 

OnCreateWidgetForAction

Delegate to call to create widget for an action

Protected variable

FGetFilterText

 

OnGetFilterText

Delegate to get the filter text if supplied from an external source

Protected variable

FGetSectionTitl...

 

OnGetSectionTitle

Delegate to get the name of a section separator.

Protected variable

FGetSectionTool...

 

OnGetSectionToolTip

Delegate to get the tooltip of a section separator.

Protected variable

FGetSectionWidg...

 

OnGetSectionWidget

Delegate to get the widgets of a section separator.

Protected variable

int32

 

SelectedSuggestion

Used to track selected action for keyboard interaction

Protected variable

TSharedPtr< STr...

 

TreeView

Tree view for showing actions

Functions

Name Description

Protected function Const

bool

 

CanRenameNode

(
    TWeakPtr< FGraphActionNode > InNode
)

Checks if the passed in node is safe for renaming

Public function Const

bool

 

CanRequestRenameOnActionNode()

Queries if a rename on the selected action node is possible

Public function

void

 

Construct

(
    const FArguments& InArgs,
    bool bIsReadOnly
)

Public function

void

 

ExpandCategory

(
    const FText& CategoryName
)

Expands any category with the associated name

Public function

void

 

GenerateFilteredItems

(
    bool bPreserveExpansion
)

Regenerated filtered results (FilteredRootAction and FilteredActionNodes) based on filter text

Protected function

float

 

GetActionFilteredWeight

(
    const FGraphActionListBuilderBase::...,
    const TArray< FString >& InFilterT...,
    const TArray< FString >& InSanitiz...,
    FContextMenuWeightDebugInfo& OutDe...
)

Get the 'weight' of the given action relevance to a given filter list

Public function Const

void

 

GetCategorySubActions

(
    TWeakPtr< FGraphActionNode > InActi...,
    TArray< TSharedPtr< FEdGraphSchemaA...
)

Get category child actions for the passed in action

Protected function Const

FText

 

GetFilterText()

Get current filter text

Public function

TSharedRef< ...

 

GetFilterTextBox()

Get filter text box widget

Public function Const

void

 

GetSectionExpansion

(
    TMap< int32, bool >& SectionExpans...
)

Returns a map of all top level sections and their current expansion state.

Public function Const

void

 

GetSelectedActions

Get action that is currently selected

Public function Const

FString

 

GetSelectedCategoryName()

Get category that is currently selected

Public function Const

void

 

GetSelectedCategorySubActions

Get category child actions that is currently selected

Protected function

bool

 

HandleSelection

(
    TSharedPtr< FGraphActionNode >& In...,
    ESelectInfo::Type InSelectionType
)

Executes the selection delegate providing it has been bound, and the provided action node given is valid and is an action node

Protected function

TSharedRef< ...

 

MakeWidget

(
    TSharedPtr< FGraphActionNode > InIt...,
    const TSharedRef< STableViewBase > ...,
    bool bIsReadOnly
)

Create widget for the supplied node

Protected function

void

 

MarkActiveSuggestion()

Change the selection to reflect the active suggestion

Protected function

void

 

OnFilterTextChanged

(
    const FText& InFilterText
)

Called when filter text changes

Protected function

void

 

OnFilterTextCommitted

(
    const FText& InText,
    ETextCommit::Type CommitInfo
)

Called when enter is hit in search box

Protected function

void

 

OnGetChildrenForCategory

(
    TSharedPtr< FGraphActionNode > InIt...,
    TArray< TSharedPtr< FGraphActionNod...
)

Get children

Protected function

void

 

OnItemDoubleClicked

(
    TSharedPtr< FGraphActionNode > InCl...
)

Called when tree item is double clicked

Protected function

FReply

 

OnItemDragDetected

(
    const FGeometry& MyGeometry,
    const FPointerEvent& MouseEvent
)

Called when tree item dragged

Protected function

void

 

OnItemScrolledIntoView

(
    TSharedPtr< FGraphActionNode > InAc...,
    const TSharedPtr< ITableRow >& InW...
)

Handler for when an item has scrolled into view after having been requested to do so

Protected function

void

 

OnItemSelected

(
    TSharedPtr< FGraphActionNode > InSe...,
    ESelectInfo::Type SelectInfo
)

Called when tree item is selected

Public function

bool

 

OnMouseButtonDownEvent

(
    TWeakPtr< FEdGraphSchemaAction > In...
)

Handler for mouse button going down

Protected function

void

 

OnNameTextCommitted

(
    const FText& NewText,
    ETextCommit::Type InTextCommit,
    TWeakPtr< FGraphActionNode > InActi...
)

Callback when rename text is committed

Public function

void

 

OnRequestRenameOnActionNode()

Initiates a rename on the selected action node, if possible

Protected function

void

 

OnSetExpansionRecursive

(
    TSharedPtr< FGraphActionNode > InTr...,
    bool bInIsItemExpanded
)

Callback for expanding tree items recursively

Public function

void

 

RefreshAllActions

(
    bool bPreserveExpansion,
    bool bHandleOnSelectionEvent
)

Refreshes the actions that this widget should display

Public function

bool

 

SelectItemByName

(
    const FName& ItemName,
    ESelectInfo::Type SelectInfo,
    int32 SectionId,
    bool bIsCategory
)

Selects an non-creation item in the list, searching by FName, deselects if name is none

Public function

void

 

SetSectionExpansion

(
    const TMap< int32, bool >& Section...
)

Sets the sections to be expanded of all top level sections.

Protected function Const

bool

 

ShouldExpandNodes()

Returns true if the tree should be autoexpanded

Protected function

bool

 

TryToSpawnActiveSuggestion()

Try to spawn the node reflected by the active suggestion

Overridden from SWidget

Name Description

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)

Overridden from FGCObject

Name Description

Public function Virtual

void

 

AddReferencedObjects

(
    FReferenceCollector& Collector
)

FGCObject override.

Public function Virtual Const

FString

 

GetReferencerName()

Use this method to report a name for your referencer.

Classes

Name

Description

Public struct

FArguments

Typedefs

Name

Description

FCanRenameSelectedAction

Delegate executed to check if the selected action is valid for renaming

FGetFilterText

Delegate to get the filter text

FGetSectionTitle

Delegate to get the name of a section if the widget is a section separator.

FGetSectionToolTip

Delegate to get the tooltip of a section if the widget is a section separator.

FGetSectionWidget

Delegate to get the widget that appears on the section bar in the section separator.

FOnActionDoubleClicked

Delegate executed when an action is double clicked

FOnActionDragged

Delegate executed when an action is dragged

FOnActionMatchesName

Delegate to check if an action matches a specified name (used for renaming items etc.)

FOnActionSelected

Delegate executed when an action is selected

FOnCategoryDragged

Delegate executed when a category is dragged

FOnCategoryTextCommitted

Delegate executed when a category is being renamed so any post-rename actions can be handled

FOnCollectAllActions

Delegate executed when the list of all actions needs to be refreshed

FOnCollectStaticSections

Delegate executed when the list of all actions needs to be refreshed, should return any sections that should always be visible, even if they don't have children.

FOnCreateCustomRowExpander

Delegate that can be used to create a custom "expander" widget for a particular row

FOnCreateWidgetForAction

Delegate that can be used to create a widget for a particular action

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