Files
UnrealEngineUWP/Engine/Source/Editor/UnrealEd/Public/DragTool_ViewportChange.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

52 lines
1.5 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Editor/UnrealEdTypes.h"
#include "EditorDragTools.h"
class FCanvas;
class FEditorViewportClient;
class FLevelEditorViewportClient;
class FSceneView;
/**
* Draws a line in the current viewport and display the view options
*/
class FDragTool_ViewportChange : public FDragTool
{
public:
explicit FDragTool_ViewportChange(FLevelEditorViewportClient* InviewportClient);
/**
* Starts a mouse drag behavior. The start location is snapped to the editor constraints if bUseSnapping is true.
*
* @param InViewportClient The viewport client in which the drag event occurred.
* @param InStart Where the mouse was when the drag started (world space).
* @param InStartScreen Where the mouse was when the drag started (screen space).
*/
virtual void StartDrag(FEditorViewportClient* InViewportClient, const FVector& InStart, const FVector2D& InStartScreen) override;
/**
* Ends a mouse drag behavior (the user has let go of the mouse button).
*/
virtual void EndDrag() override;
/* Updates the drag tool's end location with the specified delta. The end location is
* snapped to the editor constraints if bUseSnapping is true.
*
* @param InDelta A delta of mouse movement.
*/
virtual void AddDelta(const FVector& InDelta) override;
virtual void Render(const FSceneView* View, FCanvas* Canvas) override;
private:
FLevelEditorViewportClient* LevelViewportClient;
ELevelViewportType ViewOption;
FVector2D ViewOptionOffset;
};