Files
UnrealEngine/Engine/Source/Runtime/AdvancedWidgets/Public/Widgets/PropertyViewer/SStringPropertyValue.h
2025-05-18 13:04:45 +08:00

38 lines
852 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Widgets/SCompoundWidget.h"
#include "Framework/PropertyViewer/PropertyPath.h"
#include "Framework/PropertyViewer/PropertyValueFactory.h"
namespace UE::PropertyViewer
{
class INotifyHook;
/** */
class SStringPropertyValue : public SCompoundWidget
{
public:
static ADVANCEDWIDGETS_API TSharedPtr<SWidget> CreateInstance(const FPropertyValueFactory::FGenerateArgs Args);
public:
SLATE_BEGIN_ARGS(SStringPropertyValue) {}
SLATE_ARGUMENT(FPropertyPath, Path);
SLATE_ARGUMENT(INotifyHook*, NotifyHook);
SLATE_END_ARGS()
ADVANCEDWIDGETS_API void Construct(const FArguments& InArgs);
private:
FText GetText() const;
void OnTextCommitted(const FText& InText, ETextCommit::Type InCommitType);
FPropertyPath Path;
INotifyHook* NotifyHook = nullptr;
};
} //namespace