Files
UnrealEngineUWP/Engine/Source/Editor/PropertyEditor/Public/ISinglePropertyView.h
aurel cordonnier fc542f6cfd Merge from Release-Engine-Staging @ 18081189 to Release-Engine-Test
This represents UE4/Main @18073326, Release-5.0 @18081140 and Dev-PerfTest @18045971

[CL 18081471 by aurel cordonnier in ue5-release-engine-test branch]
2021-11-07 23:43:01 -05:00

61 lines
1.6 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Widgets/SCompoundWidget.h"
#include "Fonts/SlateFontInfo.h"
#include "PropertyEditorModule.h"
class FNotifyHook;
/**
* Init params for a single property
*/
struct FSinglePropertyParams
{
/** Override for the property name that will be displayed instead of the property name */
FText NameOverride;
/** Font to use instead of the default property font */
FSlateFontInfo Font;
/** Notify hook interface to use for some property change events */
FNotifyHook* NotifyHook;
/** Whether or not to show the name */
EPropertyNamePlacement::Type NamePlacement;
/** Whether to hide an asset thumbnail, if available */
bool bHideAssetThumbnail;
FSinglePropertyParams()
: NameOverride(FText::GetEmpty())
, Font()
, NotifyHook( NULL )
, NamePlacement( EPropertyNamePlacement::Left )
, bHideAssetThumbnail( false )
{
}
};
/**
* Represents a single property not in a property tree or details view for a single object
* Structs and Array properties cannot be used with this method
*/
class ISinglePropertyView : public SCompoundWidget
{
public:
/** Sets the object to view/edit on the widget */
virtual void SetObject( UObject* InObject ) = 0;
/** Sets a delegate called when the property value changes */
virtual void SetOnPropertyValueChanged( FSimpleDelegate& InOnPropertyValueChanged ) = 0;
/** Whether or not this widget has a valid property */
virtual bool HasValidProperty() const = 0;
virtual TSharedPtr<class IPropertyHandle> GetPropertyHandle() const = 0;
};