Open 3D Engine AzFramework 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.
AZ::DocumentPropertyEditor::ExpanderSettings Class Reference

This serializable class stores and loads the DocumentPropertyEditor settings such as tree node expansion state. More...

#include <ExpanderSettings.h>

Inherited by AZ::DocumentPropertyEditor::LabeledRowDPEExpanderSettings.

Public Types

using PathType = AZ::IO::Path
 
using ExpanderStateMap = AZStd::unordered_map< PathType, bool >
 
using CleanExpanderStateCallback = AZStd::function< bool(ExpanderStateMap &)>
 

Public Member Functions

 AZ_RTTI (ExpanderSettings, "{7DECB0A1-A1AB-41B2-B31F-E52D3C3014A6}")
 
 ExpanderSettings (const AZ::DocumentPropertyEditor::DocumentAdapter *adapter=nullptr, const AZStd::string &settingsRegistryKey=AZStd::string(), const AZStd::string &propertyEditorName=AZStd::string())
 
void SetExpanderStateForRow (const AZ::Dom::Path &rowPath, bool isExpanded)
 
bool GetExpanderStateForRow (const AZ::Dom::Path &rowPath)
 
bool HasSavedExpanderStateForRow (const AZ::Dom::Path &rowPath) const
 
void RemoveExpanderStateForRow (const AZ::Dom::Path &rowPath)
 
bool WereSettingsLoaded () const
 
bool ShouldEraseStateWhenRowRemoved () const
 
void SetCleanExpanderStateCallback (CleanExpanderStateCallback function)
 

Static Public Member Functions

static void Reflect (AZ::ReflectContext *context)
 

Public Attributes

ExpanderStateMap m_expandedElementStates
 Serialized map of expanded element states.
 

Static Public Attributes

static constexpr const char * RootSettingsFilepath = "user/Registry/DocumentPropertyEditor"
 Root filepath for DocumentPropertyEditor settings files.
 
static constexpr const char * RootSettingsRegistryPath = "/O3DE/DocumentPropertyEditor"
 Root SettingsRegistry path where DPE settings are stored.
 

Protected Member Functions

virtual PathType GetStringPathForDomPath (const AZ::Dom::Path &rowPath) const
 
void SaveExpanderStates ()
 
bool LoadExpanderStates ()
 
void SaveAndCleanExpanderStates ()
 

Protected Attributes

CleanExpanderStateCallback m_cleanExpanderStateCallback
 Optional callback to clean locally stored state before saving.
 
bool m_wereSettingsLoaded = false
 
bool m_shouldSettingsPersist = false
 
bool m_eraseStateWhenRowRemoved = false
 
SettingsRegistrar m_settingsRegistrar
 
AZ::IO::Path m_settingsFilepath
 
AZStd::string m_fullSettingsRegistryPath
 
AZStd::string m_settingsRegistryBasePath
 
const AZ::DocumentPropertyEditor::DocumentAdapterm_adapter
 

Detailed Description

This serializable class stores and loads the DocumentPropertyEditor settings such as tree node expansion state.

Constructor & Destructor Documentation

◆ ExpanderSettings()

AZ::DocumentPropertyEditor::ExpanderSettings::ExpanderSettings ( const AZ::DocumentPropertyEditor::DocumentAdapter adapter = nullptr,
const AZStd::string &  settingsRegistryKey = AZStd::string(),
const AZStd::string &  propertyEditorName = AZStd::string() 
)
Parameters
settingsRegistryKeyif settingsRegistryKey or propertyEditorName is empty, the expander state will only be stored in-memory (temporary)

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