Files
UnrealEngineUWP/Engine/Source/Editor/AnimationModifiers/Private/SAnimationModifierContentBrowserWindow.h
ryan durand 627baf970a Updating copyright for Engine Editor.
#rnx
#rb none


#ROBOMERGE-SOURCE: CL 10869241 via CL 10869527 via CL 10869904
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870586 by ryan durand in Main branch]
2019-12-26 15:33:43 -05:00

67 lines
2.3 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Widgets/SCompoundWidget.h"
#include "Widgets/SWindow.h"
#include "Widgets/Input/SButton.h"
#include "Templates/SharedPointer.h"
#include "Containers/Array.h"
class SButton;
class SComboButton;
class SModifierListView;
class SMenuAnchor;
class UAnimationModifier;
class UAnimSequence;
class IDetailsView;
struct FModifierListviewItem;
/** UI slate widget allowing the user to add Animation Modifier(s) to a selection of Animation Sequences */
class SAnimationModifierContentBrowserWindow : public SCompoundWidget
{
public:
SLATE_BEGIN_ARGS(SAnimationModifierContentBrowserWindow)
: _WidgetWindow()
{}
SLATE_ARGUMENT(TSharedPtr<SWindow>, WidgetWindow)
SLATE_ARGUMENT(TArray<UAnimSequence*>, AnimSequences)
SLATE_END_ARGS()
public:
SAnimationModifierContentBrowserWindow() {}
void Construct(const FArguments& InArgs);
virtual bool SupportsKeyboardFocus() const override { return true; }
virtual FReply OnKeyDown(const FGeometry& MyGeometry, const FKeyEvent& InKeyEvent) override;
protected:
/** Callback for when the user picks a specific animation modifier class */
void OnModifierPicked(UClass* PickedClass);
/** Callback for when the user wants to remove modifier(s) from the listview */
void RemoveModifiersCallback(const TArray<TWeakObjectPtr<UAnimationModifier>>& ModifiersToRemove);
/** Creates the details view widget used to show Animation Modifier object details */
void CreateInstanceDetailsView();
/** Button callback, this applies all currently set up Animation Modifiers to the previously selected Animation Sequences */
FReply OnApply();
/** Button callback, closes the dialog/window */
FReply OnCancel();
/** Check to see whether or not the user can apply the modifiers in the current state */
bool CanApply() const;
private:
/** Window owning this window */
TWeakPtr<SWindow> WidgetWindow;
TSharedPtr<IDetailsView> ModifierInstanceDetailsView;
TSharedPtr<SMenuAnchor> AddModifierCombobox;
TSharedPtr<SModifierListView> ModifierListView;
/** Data structures used by the Modifier List View widget */
TArray<TSharedPtr<FModifierListviewItem>> ModifierItems;
/** Current set of Animation Modifiers that would be added during Apply */
TArray<UAnimationModifier*> Modifiers;
/** Previously user-selected Animation Sequences */
TArray<UAnimSequence*> AnimSequences;
};