SGraphActionMenu

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

Unreal Engine C++ API Reference > Editor > GraphEditor

Inheritance Hierarchy

References

   
Module GraphEditor
Header /Engine/Source/Editor/GraphEditor/Public/SGraphActionMenu.h
Include #include "SGraphActionMenu.h"

Syntax

class SGraphActionMenu :  
    public [SCompoundWidget](API\Runtime\SlateCore\Widgets\SCompoundWidget),  
    public [FGCObject](API\Runtime\CoreUObject\UObject\FGCObject)  

Remarks

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

Variables

Type Name Description
TSharedPtr< FGr... AllActions List of all actions we can browser
bool bAllowPreselectedItemActivation Whether we allow pre-selected items to be activated with a left-click
bool bAlphaSortItems Don't sort items alphabetically
bool bAutoExpandActionMenu Should we auto-expand categories
bool bIgnoreUIUpdate Allows us to set selection (via keyboard) without triggering action
bool bShowFilterTextBox Should we display the filter text box
bool bSortItemsRecursively If only the top entries should be sorted or subentries as well
bool bUseSectionStyling Should the rows and sections be styled like the details panel?
TArray< TShared... FilteredActionNodes Flattened list of all actions passing the filter
TSharedPtr< FGr... FilteredRootAction Root of filtered actions tree
TSharedPtr< SSe... FilterTextBox Text box used for searching for actions
FOnActionDouble... OnActionDoubleClicked Delegate to call when action is double clicked
FOnActionDragge... OnActionDragged Delegate to call when an action is dragged.
FOnActionMatche... OnActionMatchesName Delegate to check if an action matches a specified name (used for renaming items etc.)
FOnActionSelect... OnActionSelected Delegate to call when action is selected
FCanRenameSelec... OnCanRenameSelectedAction Delegate to call to check if a selected action is valid for renaming
FOnCategoryDrag... OnCategoryDragged Delegate to call when a category is dragged.
FOnCategoryText... OnCategoryTextCommitted Delegate to call to handle any post-category rename events
FOnCollectAllAc... OnCollectAllActions Delegate to call to collect all actions
FOnCollectStati... OnCollectStaticSections Delegate to call to collect all always visible sections
FOnCreateCustom... OnCreateCustomRowExpander Delegate to call for creating a custom "expander" widget for indenting a menu row with
FOnCreateWidget... OnCreateWidgetForAction Delegate to call to create widget for an action
FOnGetActionLis... OnGetActionList Delegate to call to get a custom action list
FGetFilterText OnGetFilterText Delegate to get the filter text if supplied from an external source
FGetSectionTitl... OnGetSectionTitle Delegate to get the name of a section separator.
FGetSectionTool... OnGetSectionToolTip Delegate to get the tooltip of a section separator.
FGetSectionWidg... OnGetSectionWidget Delegate to get the widgets of a section separator.
int32 SelectedSuggestion Used to track selected action for keyboard interaction
float SelectedSuggestionScore Stored score for our current selection, so that we can quickly maintain selection when building the list asynchronously
int32 SelectedSuggestionSourceIndex Stored index in the AllActions list builder that we think is the best fit
TSharedPtr< STr... TreeView Tree view for showing actions

Functions

Type Name Description
bool CanRenameNode ( TWeakPtr< FGraphActionNode > InNode ) Checks if the passed in node is safe for renaming
bool CanRequestRenameOnActionNode () Queries if a rename on the selected action node is possible
void Construct ( const FArguments& InArgs, bool bIsReadOnly )  
void ExpandCategory ( const FText& CategoryName ) Expands any category with the associated name
void GenerateFilteredItems ( bool bPreserveExpansion ) Regenerated filtered results (FilteredRootAction and FilteredActionNodes) based on filter text
void GetCategorySubActions ( TWeakPtr< FGraphActionNode > InActi..., TArray< TSharedPtr< FEdGraphSchemaA... ) Get category child actions for the passed in action
FText GetFilterText () Get current filter text
TSharedRef< ... GetFilterTextBox () Get filter text box widget
void GetSectionExpansion ( TMap< int32, bool >& SectionExpans... ) Returns a map of all top level sections and their current expansion state.
void GetSelectedActions ( TArray< TSharedPtr< FEdGraphSchemaA... ) Get action that is currently selected
FString GetSelectedCategoryName () Get category that is currently selected
void GetSelectedCategorySubActions ( TArray< TSharedPtr< FEdGraphSchemaA... ) Get category child actions that is currently selected
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
TSharedRef< ... MakeWidget ( TSharedPtr< FGraphActionNode > InIt..., const TSharedRef< STableViewBase > ..., bool bIsReadOnly ) Create widget for the supplied node
void MarkActiveSuggestion () Change the selection to reflect the active suggestion
void OnFilterTextChanged ( const FText& InFilterText ) Called when filter text changes
void OnFilterTextCommitted ( const FText& InText, ETextCommit::Type CommitInfo ) Called when enter is hit in search box
void OnGetChildrenForCategory ( TSharedPtr< FGraphActionNode > InIt..., TArray< TSharedPtr< FGraphActionNod... ) Get children
void OnItemDoubleClicked ( TSharedPtr< FGraphActionNode > InCl... ) Called when tree item is double clicked
FReply OnItemDragDetected ( const FGeometry& MyGeometry, const FPointerEvent& MouseEvent ) Called when tree item dragged
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
void OnItemSelected ( TSharedPtr< FGraphActionNode > InSe..., ESelectInfo::Type SelectInfo ) Called when tree item is selected
bool OnMouseButtonDownEvent ( TWeakPtr< FEdGraphSchemaAction > In... ) Handler for mouse button going down
void OnNameTextCommitted ( const FText& NewText, ETextCommit::Type InTextCommit, TWeakPtr< FGraphActionNode > InActi... ) Callback when rename text is committed
void OnRequestRenameOnActionNode () Initiates a rename on the selected action node, if possible
void OnSetExpansionRecursive ( TSharedPtr< FGraphActionNode > InTr..., bool bInIsItemExpanded ) Callback for expanding tree items recursively
void RefreshAllActions ( bool bPreserveExpansion, bool bHandleOnSelectionEvent ) Refreshes the actions that this widget should display
FScoreResult... ScoreAndAddActions ( int32 StartingIndex )  
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
void SetSectionExpansion ( const TMap< int32, bool >& Section... ) Sets the sections to be expanded of all top level sections.
bool ShouldExpandNodes () Returns true if the tree should be autoexpanded
bool TryToSpawnActiveSuggestion () Try to spawn the node reflected by the active suggestion
void UpdateActiveSelection ( FScoreResults ForResults ) Helper function to update the active selection after updating the displayed tree
void UpdateForNewActions ( int32 IdxStart ) Updates the displayed list starting from IdxStart, useful for async building the display list of actions

Overridden from SWidget

Type Name Description
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

Type Name Description
void AddReferencedObjects ( FReferenceCollector& Collector ) FGCObject override.
FString GetReferencerName () Overload this method to report a name for your referencer

Classes

Type Name Description
Public struct FArguments  
Protected struct FScoreResults Helper function for adding and scoring actions from our builder

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
FOnGetActionList Delegate that can be used to create and/or get a custom action list.

Constants

Name Description
LastUsedFilterText The last typed action within the graph action menu

Ask questions and help your peers Developer Forums

Write your own tutorials or read those from others Learning Library