Files
UnrealEngineUWP/Engine/Source/Editor/PropertyEditor/Public/DetailsNameWidgetOverrideCustomization.h
karen jirak f745b1709d Details Panel - Add API to mutate just the property name customization for a specific property path for non-nested properties
- created FDetailsNameWidgetOverrideCustomization and function to get it on FDetailsViewPrivate, SDetailsView and FDetailsViewArgs to provide a customization that can override any Name widget
- FDetailsNameWidgetOverrideCustomization can override any non-nested property, using the CustomizeName function which takes a TSharedRef<SWidget> that is the name widget that would show without the new customization, and the FPropertyPath in order to be able to tell what properties to override.
- In SDetalsSingleItemRow added GetNameWidget to use the FDetailsNameWidgetOverrideCustomization to provide the name widget, if it has been provided

#jira UE-201379
#rb jordan.hoffmann, logan.buchy

[CL 31134537 by karen jirak in ue5-main branch]
2024-02-02 14:14:49 -05:00

34 lines
1.1 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Templates/SharedPointer.h"
class FPropertyPath;
class SWidget;
/**
* A customization applied to the whole details panel which can update any Name widget
*/
class FDetailsNameWidgetOverrideCustomization : public TSharedFromThis<FDetailsNameWidgetOverrideCustomization>
{
public:
/**
* default constructor
*/
PROPERTYEDITOR_API explicit FDetailsNameWidgetOverrideCustomization();
/**
* destructor
*/
PROPERTYEDITOR_API virtual ~FDetailsNameWidgetOverrideCustomization() = default;
/**
* @param InnerNameContent the unaltered content of the Name widget. It shows what would
* be there normally with no modification by this customization
* @param Path the FPropertyPath for the current property
* @return the new TSharedRef<SWidget> for the Name widget if one is provided, else it returns
* the default Name widget for the current property path
*/
PROPERTYEDITOR_API virtual TSharedRef<SWidget> CustomizeName( TSharedRef<SWidget> InnerNameContent, FPropertyPath& Path);
};