UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ScrollyZoomy.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "Input/CursorReply.h"
7#include "Input/Reply.h"
9
11class SWidget;
12
17{
18public:
19
26 virtual bool ScrollBy(const FVector2D& Offset) = 0;
27
34 virtual bool ZoomBy(const float Amount) = 0;
35};
36
37
46{
47public:
48
55
62 SLATE_API void Tick(const float DeltaTime, IScrollableZoomable& ScrollableZoomable);
63
71
81
92
100
109
116
122 SLATE_API bool IsRightClickScrolling() const;
123
132 SLATE_API bool NeedsSoftwareCursor() const;
133
143
153 SLATE_API int32 PaintSoftwareCursorIfNeeded(const FGeometry& AllottedGeometry, const FSlateRect& MyCullingRect, FSlateWindowElementList& OutDrawElements, int32 LayerId) const;
154
155private:
156
158 float AmountScrolledWhileRightMouseDown;
159
161 bool bShowSoftwareCursor;
162
164 FVector2f SoftwareCursorPosition;
165
167 bool UseInertialScrolling;
168
170 FInertialScrollManager HorizontalIntertia;
171
173 FInertialScrollManager VerticalIntertia;
174};
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
uint32 Offset
Definition VulkanMemory.cpp:4033
Definition CursorReply.h:16
Definition InertialScrollManager.h:15
Definition Reply.h:24
Definition ScrollyZoomy.h:46
SLATE_API FReply OnMouseButtonUp(const TSharedRef< SWidget > MyWidget, const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
Definition ScrollyZoomy.cpp:77
SLATE_API void OnMouseLeave(const TSharedRef< SWidget > MyWidget, const FPointerEvent &MouseEvent)
Definition ScrollyZoomy.cpp:153
SLATE_API FReply OnMouseWheel(const FPointerEvent &MouseEvent, IScrollableZoomable &ScrollableZoomable)
Definition ScrollyZoomy.cpp:163
SLATE_API FReply OnMouseMove(const TSharedRef< SWidget > MyWidget, IScrollableZoomable &ScrollableZoomable, const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
Definition ScrollyZoomy.cpp:113
SLATE_API bool NeedsSoftwareCursor() const
Definition ScrollyZoomy.cpp:195
SLATE_API int32 PaintSoftwareCursorIfNeeded(const FGeometry &AllottedGeometry, const FSlateRect &MyCullingRect, FSlateWindowElementList &OutDrawElements, int32 LayerId) const
Definition ScrollyZoomy.cpp:207
SLATE_API FReply OnMouseButtonDown(const FPointerEvent &MouseEvent)
Definition ScrollyZoomy.cpp:54
SLATE_API UE::Slate::FDeprecateVector2DResult GetSoftwareCursorPosition() const
Definition ScrollyZoomy.cpp:201
SLATE_API FCursorReply OnCursorQuery() const
Definition ScrollyZoomy.cpp:177
SLATE_API bool IsRightClickScrolling() const
Definition ScrollyZoomy.cpp:189
Definition SlateRect.h:26
Definition DrawElements.h:220
Definition ScrollyZoomy.h:17
virtual bool ScrollBy(const FVector2D &Offset)=0
virtual bool ZoomBy(const float Amount)=0
Definition SWidget.h:165
Definition SharedPointer.h:153
FDeprecateSlateVector2D FDeprecateVector2DResult
Definition SlateVector2.h:469
Definition Geometry.h:40
Definition Events.h:695