Open 3D Engine AzToolsFramework API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AzToolsFramework::AssetBrowser::SourceFileCreatorDetails Struct Reference

#include <AssetBrowserBus.h>

Public Types

using SourceFileCreatorFunctionType = AZStd::function< void(const AZStd::string &, const AZ::Uuid &)>
 

Public Member Functions

 SourceFileCreatorDetails (const AZStd::string &identifier, const AZStd::string &displayText, QIcon icon, SourceFileCreatorFunctionType functionToCall)
 

Public Attributes

AZStd::string m_identifier
 choose something unique for your opener. It may be used to restore state. it will not be shown to user.
 
AZStd::string m_displayText
 
QIcon m_iconToUse
 optional. Same as m_displayText. Used when there's ambiguity. If empty, no icon.
 
SourceFileCreatorFunctionType m_creator
 

Detailed Description

This struct is used to respond about being able to create source files. See AssetBrowserInteractionNotifications::OpenSourceFileInEditor below

Member Typedef Documentation

◆ SourceFileCreatorFunctionType

using AzToolsFramework::AssetBrowser::SourceFileCreatorDetails::SourceFileCreatorFunctionType = AZStd::function<void(const AZStd::string& , const AZ::Uuid& )>

You provide a function to call if your creator is chosen to handle the create operation. Using a lambda is the prefered method to use for performance reasons.

Member Data Documentation

◆ m_creator

SourceFileCreatorFunctionType AzToolsFramework::AssetBrowser::SourceFileCreatorDetails::m_creator

This is the function to call. If you fill a nullptr in here, then the default operating system behavior will be suppressed but no creator will be opened. This will also cause the 'create' option in context menus to disappear if the only creators are nullptr ones.

◆ m_displayText

AZStd::string AzToolsFramework::AssetBrowser::SourceFileCreatorDetails::m_displayText

m_displayText is used when more than one listener offers to create this kind of file and we need the user to pick which one they want. They will be offered all the available creators in a menu which shows this text, and the one they pick will get its SourceFileCreatorFunctionType called.


The documentation for this struct was generated from the following file: