UToolMenus

Unreal Engine C++ API Reference > Developer > ToolMenus

Inheritance Hierarchy

References

   
Module ToolMenus
Header /Engine/Source/Developer/ToolMenus/Public/ToolMenus.h
Include #include "ToolMenus.h"

Syntax

class UToolMenus : public [UObject](API\Runtime\CoreUObject\UObject\UObject)  

Variables

Type Name Description
FEditMenuDelega... EditMenuDelegate  
FSlateIcon EditMenuIcon Icon to display in menus for command to open menu editor
FSlateIcon EditToolbarIcon Icon to display in toolbars for command to open menu editor
FGenerateWidget... OnPostGenerateWidget Called after we generate a menu widget.
FGenerateWidget... OnPreGenerateWidget Called before we generate a menu widget.
FShouldDisplayE... ShouldDisplayExtensionPoints  

Constructors

Type Name Description
  UToolMenus ()  

Functions

Type Name Description
void AddEntry ( const FName MenuName, const FName SectionName, const FToolMenuEntry& Entry ) Registers an entry for a menu's section
FCustomizedT... AddMenuCustomization ( const FName InName ) Find or add customization settings for a menu
bool AddMenuEntryObject ( UToolMenuEntryScript* MenuEntr... ) Registers menu entry object from blueprint/script
void AddMenuSubstitutionDuringGenerate ( const FName OriginalMenu, const FName NewMenu ) Substitute one menu for another during generate but not during find or extend
void AddReferencedObjects ( UObject* InThis, FReferenceCollector& Collector )  
FCustomizedT... AddRuntimeMenuCustomization ( const FName InName ) Find or add runtime customization settings for a menu
void AddSection ( const FName MenuName, const FName SectionName, const TAttribute< FText >& InLabel, const FToolMenuInsert InPosition ) Registers a section for a menu
void AssembleMenuHierarchy ( UToolMenu* GeneratedMenu, const TArray< UToolMenu* >& H... ) Bake final menu including calls to construction delegates, sorting, and customization
void AssignSetTimerForNextTickDelegate ( const FSimpleDelegate& InDelegate ) Sets delegate to setup timer for deferred one off ticks
bool CanSafelyRouteCall () Returns true if safe to call into script
void CleanupStaleWidgetsNextTick ( bool bGarbageCollect ) Release references to UObjects of widgets that have been deleted.
TArray< UToo... CollectHierarchy ( const FName Name ) Returns list of menus starting with root parent
FToolMenuOwn... CurrentOwner () For advanced use cases
UToolMenu &#... ExtendMenu ( const FName Name ) Extends a menu without registering the menu or claiming ownership of it.
UObject *... FindContext ( const FToolMenuContext& InContext, UClass* InClass ) Finds a context object of a given class if it exists
UToolMenu &#... FindMenu ( const FName Name ) Finds an existing menu that has been registered or extended.
FCustomizedT... FindMenuCustomization ( const FName InName ) Find customization settings for a menu
int32 FindMenuCustomizationIndex ( const FName InName ) Find index of customization settings for a menu
FCustomizedT... FindRuntimeMenuCustomization ( const FName InName ) Find runtime customization settings for a menu
UToolMenu &#... GenerateMenu ( const FName Name, const FToolMenuContext& InMenuCont... ) Create a finalized menu that combines all parents used to generate a widget.
UToolMenu &#... GenerateMenuAsBuilder ( const UToolMenu* InMenu, const FToolMenuContext& InMenuCont... ) Create a finalized menu based on a custom crafted menu. Advanced special use cases only.
UToolMenu &#... GenerateMenuOrSubMenuForEdit ( const UToolMenu* InMenu ) Generate either a menu or submenu ready for editing
UToolMenu &#... GenerateSubMenu ( const UToolMenu* InGeneratedPa..., const FName InBlockName ) Generates sub menu by entry name in the given generated menu parent
TSharedRef< ... GenerateWidget ( UToolMenu* GeneratedMenu ) Generate widget from a final collapsed menu. For advanced specialized use cases.
TSharedRef< ... GenerateWidget ( const TArray< UToolMenu* >& H..., const FToolMenuContext& InMenuCont... ) Generate widget from a hierarchy of menus. For advanced specialized use cases.
TSharedRef< ... GenerateWidget ( const FName Name, const FToolMenuContext& InMenuCont... ) Generate widget from a registered menu. Most common function used to generate new menu widgets.
UToolMenus &... Get ()  
bool GetEditMenusMode () When true, adds command to open edit menu dialog to each menu
void HandleNextTick () Timer function used to consolidate multiple duplicate requests into a single frame.
bool IsMenuRegistered ( const FName Name ) Determines if a menu has already been registered.
bool IsToolMenuUIEnabled () Returns true if slate initialized and editor GUI is being used.
FName JoinMenuPaths ( const FName Base, const FName Child ) Join two paths together
void RefreshAllWidgets () Rebuilds all currently generated widgets next tick.
bool RefreshMenuWidget ( const FName Name ) Rebuilds all widgets generated from a specific menu.
UToolMenu &#... RegisterMenu ( FName Name, const FName Parent, EMultiBoxType Type, bool bWarnIfAlreadyRegistered ) Registers a menu by name
FDelegateHan... RegisterStartupCallback ( const FSimpleMulticastDelegate::FDe... ) Delays menu registration until safe and ready Will not trigger if Slate does not end up being enabled after loading Will not trigger when running commandlet, game, dedicated server or client only
void RegisterStringCommandHandler ( const FName InName, const FToolMenuExecuteString& InDe... ) Registers a new type of string based command handler.
void RemoveAllCustomizations () Remove all menu customizations for all menus
void RemoveCustomization ( const FName InName ) Remove customization for a menu
void RemoveEntry ( const FName MenuName, const FName Section, const FName Name ) Removes a menu entry from a given menu and section
void RemoveMenu ( const FName MenuName ) Unregisters a menu by name
void RemoveSection ( const FName MenuName, const FName Section ) Removes a section from a given menu
void RemoveSubstitutionDuringGenerate ( const FName InMenu ) Remove substitute one menu for another during generate
void SaveCustomizations () Save menu customizations to ini files
void SetEditMenusMode ( bool bEnable ) Enables adding command to open edit menu dialog to each menu
void SetSectionLabel ( const FName MenuName, const FName SectionName, const FText Label ) Sets a section's displayed label text.
void SetSectionPosition ( const FName MenuName, const FName SectionName, const FName OtherSectionName, const EToolMenuInsertType PositionT... ) Sets where to insert a section into a menu when generating relative to other section names.
bool SplitMenuPath ( const FName MenuPath, FName& OutLeft, FName& OutRight ) Break apart a menu path into components
UToolMenus &... TryGet () Try to get UToolMenus without forcing ToolMenus module to load.
void UnregisterOwner ( FToolMenuOwner Owner ) Unregister everything associated with the given owner without forcing ToolMenus module to load.
void UnregisterOwnerByName ( FName InOwnerName ) Removes all entries that were registered under a specific owner name
void UnregisterRuntimeMenuCustomizationOwner ( const FName InOwnerName ) Unregister runtime customization settings for a specific owner name
void UnRegisterStartupCallback ( const void* UserPointer ) Unregister a startup callback delegate by pointer
void UnRegisterStartupCallback ( FDelegateHandle InHandle ) Unregister a startup callback delegate by handle
void UnregisterStringCommandHandler ( const FName InName ) Removes a string based command handler.

Overridden from UObject

Type Name Description
void BeginDestroy () Called before destroying the object.

Typedefs

Name Description
FEditMenuDelegate Delegate that opens a menu editor
FGenerateWidgetEvent  
FShouldDisplayExtensionPoints Displaying extension points is for debugging menus

Constants


Ask questions and help your peers Developer Forums

Write your own tutorials or read those from others Learning Library