Files
UnrealEngineUWP/Engine/Source/Editor/CurveEditor/Public/SCurveEditorToolProperties.h
max chen c2ab4f99c8 Curve Editor: Change left and right bounds for the transform tool to FFrameNumber
Add frame number customizations for tool properties panel
Moved SCurveEditorToolProperties.h to public
Fixed tool properties not getting updated on reselection

#jira UE-194391
#rb mike.zyracki

[CL 27643380 by max chen in ue5-main branch]
2023-09-06 13:53:40 -04:00

56 lines
1.5 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "ICurveEditorToolExtension.h"
#include "Templates/SharedPointer.h"
#include "Widgets/DeclarativeSyntaxSupport.h"
#include "Widgets/SCompoundWidget.h"
class FCurveEditor;
class IStructureDetailsView;
struct FPropertyChangedEvent;
/**
* Widget to show curve editor tool extension properties
*/
class CURVEEDITOR_API SCurveEditorToolProperties : public SCompoundWidget
{
public:
SLATE_BEGIN_ARGS(SCurveEditorToolProperties)
{}
SLATE_END_ARGS()
SCurveEditorToolProperties() : ToolId(FCurveEditorToolID::Unset()) {}
void Construct(const FArguments& InArgs, TSharedRef<FCurveEditor> InCurveEditor, FCurveEditorToolID ToolId);
/**
* Called when the curve editor tool changes
* Sets the new tool ID and rebuilds the details view
*/
void OnToolChanged(FCurveEditorToolID NewToolId);
/** The details view for tool properties */
TSharedPtr<class IStructureDetailsView> GetStructureDetailsView() const { return DetailsView; }
private:
/**
* Rebuilds details view
* Called either by the tool itself when it's properties change or when the curve editor tool changes
*/
void RebuildProperties();
/**
* Called when the user enters in a new value for one of the properties
* Calls OnToolOptionsUpdated on the current tool
*/
void OnFinishedChangingProperties(const FPropertyChangedEvent& PropertyChangedEvent);
private:
TWeakPtr<FCurveEditor> WeakCurveEditor;
TSharedPtr<IStructureDetailsView> DetailsView;
FCurveEditorToolID ToolId;
};