// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "IDetailCustomization.h" #include "Misc/Attribute.h" #include "Templates/SharedPointer.h" #include "Types/SlateEnums.h" // for ETextCommit, ESelectInfo class IDetailLayoutBuilder; class IDetailPropertyRow; class IPropertyHandle; class ITableRow; class STableViewBase; class UObject; class FXRDeviceVisualizationDetails : public IDetailCustomization { public: /** Makes a new instance of this detail layout class for a specific detail view requesting it */ static TSharedRef MakeInstance(); /** IDetailCustomization interface */ virtual void CustomizeDetails(IDetailLayoutBuilder& DetailLayout) override; private: void RefreshXRSourceList(); void SetSourcePropertyValue(const FName NewSystemName); void UpdateSourceSelection(TSharedPtr NewSelection); void CustomizeModelSourceRow(TSharedRef& Property, IDetailPropertyRow& PropertyRow); void OnResetSourceValue(TSharedPtr PropertyHandle); bool IsSourceValueModified(TSharedPtr PropertyHandle); FText OnGetSelectedSourceText() const; void OnSourceMenuOpened(); void OnSourceNameCommited(const FText& NewText, ETextCommit::Type InTextCommit); TSharedRef MakeSourceSelectionWidget(TSharedPtr Item, const TSharedRef& OwnerTable); void OnSourceSelectionChanged(TSharedPtr NewSelection, ESelectInfo::Type SelectInfo); void CustomizeCustomMeshRow(IDetailPropertyRow& PropertyRow); bool IsCustomMeshPropertyEnabled() const; TArray< TWeakObjectPtr > SelectedObjects; TSharedPtr XRSourceProperty; TArray< TSharedPtr > XRSourceNames; TAttribute UseCustomMeshAttr; TSharedPtr DisplayMaterialsProperty; static TMap< FName, TSharedPtr > CustomSourceNames; };