engine
 
载入中...
搜索中...
未找到
Public 成员函数 | Protected 成员函数 | 所有成员列表
FMenuBuilder类 参考

Vertical menu builder 更多...

#include <MultiBoxBuilder.h>

+ 类 FMenuBuilder 继承关系图:

Public 成员函数

void AddMenuSeparator (FName InExtensionHook=NAME_None)
 Adds a separator
 
void AddSearchWidget ()
 Adds the widget the multibox will use for searching
 
void AddSubMenu (const TAttribute< FText > &InMenuLabel, const TAttribute< FText > &InToolTip, const FNewMenuDelegate &InSubMenu, const FUIAction &InUIAction, FName InExtensionHook, const EUserInterfaceActionType InUserInterfaceActionType, const bool bInOpenSubMenuOnClick=false, const FSlateIcon &InIcon=FSlateIcon(), const bool bInShouldCloseWindowAfterMenuSelection=true)
 Adds a sub-menu which is a menu within a menu 更多...
 
void AddWidget (TSharedRef< SWidget > InWidget, const FText &Label, bool bNoIndent=false, bool bSearchable=true)
 Adds any widget to the menu 更多...
 
void AddWrapperSubMenu (const FText &InMenuLabel, const FText &InToolTip, const FOnGetContent &InSubMenu, const FSlateIcon &InIcon)
 Adds a sub-menu which is a menu within a menu 更多...
 
void AddWrapperSubMenu (const FText &InMenuLabel, const FText &InToolTip, const TSharedPtr< SWidget > &InSubMenu, const FSlateIcon &InIcon)
 Adds a sub-menu which is a menu within a menu 更多...
 
void BeginSection (FName InExtensionHook, const TAttribute< FText > &InHeadingText=TAttribute< FText >())
 Starts a section on to the extender section hook stack 更多...
 
void EndSection ()
 Ends the current section
 
 FMenuBuilder (const bool bInShouldCloseWindowAfterMenuSelection, TSharedPtr< const FUICommandList > InCommandList, TSharedPtr< FExtender > InExtender=TSharedPtr< FExtender >(), const bool bCloseSelfOnly=false, const ISlateStyle *InStyleSet=&FCoreStyle::Get(), bool bInSearchable=true, FName InMenuName=NAME_None)
 Constructor 更多...
 
virtual TSharedRef< class SWidget > MakeWidget (FMultiBox::FOnMakeMultiBoxBuilderOverride *InMakeMultiBoxBuilderOverride=nullptr, uint32 MaxHeight=1000) override
 Creates a widget for this MultiBox 更多...
 
- Public 成员函数 继承自 FBaseMenuBuilder
void AddMenuEntry (const TAttribute< FText > &InLabel, const TAttribute< FText > &InToolTip, const FSlateIcon &InIcon, const FUIAction &UIAction, FName InExtensionHook=NAME_None, const EUserInterfaceActionType UserInterfaceActionType=EUserInterfaceActionType::Button, FName InTutorialHighlightName=NAME_None)
 Adds a menu entry without the use of a command 更多...
 
void AddMenuEntry (const TSharedPtr< const FUICommandInfo > InCommand, FName InExtensionHook=NAME_None, const TAttribute< FText > &InLabelOverride=TAttribute< FText >(), const TAttribute< FText > &InToolTipOverride=TAttribute< FText >(), const FSlateIcon &InIconOverride=FSlateIcon(), FName InTutorialHighlightName=NAME_None)
 Adds a menu entry 更多...
 
 FBaseMenuBuilder (const EMultiBoxType InType, const bool bInShouldCloseWindowAfterMenuSelection, TSharedPtr< const FUICommandList > InCommandList, bool bInCloseSelfOnly, TSharedPtr< FExtender > InExtender=TSharedPtr< FExtender >(), const ISlateStyle *InStyleSet=&FCoreStyle::Get(), FName InTutorialHighlightName=NAME_None, FName InMenuName=NAME_None)
 Constructor 更多...
 
- Public 成员函数 继承自 FMultiBoxBuilder
void AddEditableText (const FText &InLabel, const FText &InToolTip, const FSlateIcon &InIcon, const TAttribute< FText > &InTextAttribute, const FOnTextCommitted &InOnTextCommitted=FOnTextCommitted(), const FOnTextChanged &InOnTextChanged=FOnTextChanged(), bool bInReadOnly=false)
 Adds an editable text entry 更多...
 
bool ExtendersEnabled () const
 
 FMultiBoxBuilder (const EMultiBoxType InType, FMultiBoxCustomization InCustomization, const bool bInShouldCloseWindowAfterMenuSelection, const TSharedPtr< const FUICommandList > &InCommandList, TSharedPtr< FExtender > InExtender=TSharedPtr< FExtender >(), FName InTutorialHighlightName=NAME_None, FName InMenuName=NAME_None)
 Constructor 更多...
 
FMultiBoxCustomization GetCustomization () const
 
TSharedRef< class FMultiBox > GetMultiBox ()
 Get the multi-box being built. 更多...
 
const FName & GetStyleName () const
 
const ISlateStyle * GetStyleSet () const
 
TSharedPtr< const FUICommandList > GetTopCommandList ()
 
virtual TSharedRef< class SWidget > MakeWidget (FMultiBox::FOnMakeMultiBoxBuilderOverride *InMakeMultiBoxBuilderOverride=nullptr, uint32 MaxHeight=INT_MAX)
 Creates a widget for this MultiBox 更多...
 
void PopCommandList ()
 Pops the current command list.
 
void PopExtender ()
 Pops the current extender.
 
void PushCommandList (const TSharedRef< const FUICommandList > CommandList)
 Pushes a new command list onto the stack. 更多...
 
void PushExtender (TSharedRef< FExtender > InExtender)
 Pushes a new extender onto the stack. 更多...
 
void SetExtendersEnabled (bool bEnabled)
 Sets extender support
 
void SetStyle (const ISlateStyle *InStyleSet, const FName &InStyleName)
 Sets the style to use on the multibox widgets
 

Protected 成员函数

virtual void ApplyHook (FName InExtensionHook, EExtensionHook::Position HookPosition) override
 FMultiBoxBuilder interface
 
virtual void ApplySectionBeginning () override
 Applies the beginning of a section, including the header and relevant separator
 
virtual void ApplyHook (FName InExtensionHook, EExtensionHook::Position HookPosition)=0
 Applies any potential extension hooks at the current place
 
virtual void ApplySectionBeginning ()
 Applies the beginning of a section, including the header and relevant separator
 

额外继承的成员函数

- Protected 属性 继承自 FBaseMenuBuilder
bool bCloseSelfOnly
 True if clicking on a menu entry closes itself only and its children and not the entire stack
 
- Protected 属性 继承自 FMultiBoxBuilder
bool bExtendersEnabled
 If extenders are enabled
 
TArray< TSharedPtr< const FUICommandList > > CommandListStack
 A stack of command lists which map command infos to delegates that should be called. 更多...
 
TArray< TSharedPtr< class FExtender > > ExtenderStack
 The extender stack holding all the possible extensions for this menu builder
 
FName MenuName
 Name of the menu
 
TSharedRef< class FMultiBox > MultiBox
 The MultiBox we're building up
 
FName TutorialHighlightName
 Name to identify this widget and highlight during tutorials
 

详细描述

Vertical menu builder

构造及析构函数说明

◆ FMenuBuilder()

FMenuBuilder::FMenuBuilder ( const bool  bInShouldCloseWindowAfterMenuSelection,
TSharedPtr< const FUICommandList >  InCommandList,
TSharedPtr< FExtender >  InExtender = TSharedPtr<FExtender>(),
const bool  bCloseSelfOnly = false,
const ISlateStyle *  InStyleSet = &FCoreStyle::Get(),
bool  bInSearchable = true,
FName  InMenuName = NAME_None 
)
inline

Constructor

参数
bInShouldCloseWindowAfterMenuSelectionSets whether or not the window that contains this multibox should be destroyed after the user clicks on a menu item in this box
InCommandListThe action list that maps command infos to delegates that should be called for each command associated with a multiblock widget
bInCloseSelfOnlyTrue if clicking on a menu entry closes itself only and its children but not the entire stack

成员函数说明

◆ AddSubMenu()

void FMenuBuilder::AddSubMenu ( const TAttribute< FText > &  InMenuLabel,
const TAttribute< FText > &  InToolTip,
const FNewMenuDelegate &  InSubMenu,
const FUIAction &  InUIAction,
FName  InExtensionHook,
const EUserInterfaceActionType  InUserInterfaceActionType,
const bool  bInOpenSubMenuOnClick = false,
const FSlateIcon &  InIcon = FSlateIcon(),
const bool  bInShouldCloseWindowAfterMenuSelection = true 
)

Adds a sub-menu which is a menu within a menu

参数
InMenuLabelThe text that should be shown for the menu
InToolTipThe tooltip that should be shown when the menu is hovered over
InSubMenuSub-Menu object which creates menu entries for the sub-menu
InUIActionActions to execute on this menu item.
InExtensionHookThe section hook. Can be NAME_None
InUserInterfaceActionTypeType of interface action
bInOpenSubMenuOnClickSub-menu will open only if the sub-menu entry is clicked
InIconThe icon to use
bInShouldCloseWindowAfterMenuSelectionWhether the submenu should close after an item is selected

◆ AddWidget()

void FMenuBuilder::AddWidget ( TSharedRef< SWidget >  InWidget,
const FText &  Label,
bool  bNoIndent = false,
bool  bSearchable = true 
)

Adds any widget to the menu

参数
InWidgetThe widget that should be shown in the menu
InLabelOptional label text to be added to the left of the content
bNoIndentIf true, removes the padding from the left of the widget that lines it up with other menu items (default == false)
bSearchableIf true, widget will be searchable (default == true)

◆ AddWrapperSubMenu() [1/2]

void FMenuBuilder::AddWrapperSubMenu ( const FText &  InMenuLabel,
const FText &  InToolTip,
const FOnGetContent &  InSubMenu,
const FSlateIcon &  InIcon 
)

Adds a sub-menu which is a menu within a menu

参数
InMenuLabelThe text that should be shown for the menu
InToolTipThe tooltip that should be shown when the menu is hovered over
InSubMenuSub-Menu object which creates the sub-menu

◆ AddWrapperSubMenu() [2/2]

void FMenuBuilder::AddWrapperSubMenu ( const FText &  InMenuLabel,
const FText &  InToolTip,
const TSharedPtr< SWidget > &  InSubMenu,
const FSlateIcon &  InIcon 
)

Adds a sub-menu which is a menu within a menu

参数
InMenuLabelThe text that should be shown for the menu
InToolTipThe tooltip that should be shown when the menu is hovered over
InSubMenuSub-Menu object

◆ BeginSection()

void FMenuBuilder::BeginSection ( FName  InExtensionHook,
const TAttribute< FText > &  InHeadingText = TAttribute< FText >() 
)

Starts a section on to the extender section hook stack

参数
InExtensionHookThe section hook. Can be NAME_None
InHeadingTextThe heading text to use. If none, only a separator is used

◆ MakeWidget()

virtual TSharedRef< class SWidget > FMenuBuilder::MakeWidget ( FMultiBox::FOnMakeMultiBoxBuilderOverride *  InMakeMultiBoxBuilderOverride = nullptr,
uint32  MaxHeight = 1000 
)
overridevirtual

Creates a widget for this MultiBox

返回
New widget object

重载 FMultiBoxBuilder .


该类的文档由以下文件生成: