Files
UnrealEngineUWP/Engine/Source/Editor/PropertyEditor/Private/DetailRowMenuContextPrivate.h
george rolfe 87489cdd8b [PropertyEditor] Added UToolMenu extensibility to PropertyEditor context menu
#jira UE-197415
#rb karen.jirak

[CL 29743000 by george rolfe in ue5-main branch]
2023-11-15 06:54:35 -05:00

37 lines
679 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "UObject/Object.h"
#include "DetailRowMenuContextPrivate.generated.h"
class SDetailTableRowBase;
/** The private context provides the slate widget. */
UCLASS()
class UDetailRowMenuContextPrivate : public UObject
{
GENERATED_BODY()
public:
template <typename RowType>
TSharedPtr<RowType> GetRowWidget() const
{
if (const TWeakPtr<RowType> RowContextWeak = StaticCastWeakPtr<RowType>(Row);
RowContextWeak.IsValid())
{
if (TSharedPtr<RowType> RowContext = RowContextWeak.Pin())
{
return RowContext;
}
}
return nullptr;
}
public:
TWeakPtr<SDetailTableRowBase> Row;
};