UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
PaintArgs.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 "Layout/Visibility.h"
7#include "Layout/Geometry.h"
8#include "SlateGlobals.h"
9
10class FHittestGrid;
11class FSlateRect;
13class SWidget;
14class SWindow;
15
16
23{
24 friend class SInvalidationPanel;
25 friend class SRetainerWidget;
26public:
29
30 [[nodiscard]] inline FPaintArgs WithNewParent(const SWidget* PaintParent) const
31 {
32 FPaintArgs Args(*this);
33 Args.PaintParentPtr = PaintParent;
34
35 return Args;
36 }
37
39 {
40 FPaintArgs NewArgs(PaintParentPtr, RootGrid, NewHitTestGrid, WindowOffset, CurrentTime, DeltaTime);
41 return NewArgs;
42 }
43
45
47 {
48 bInheritedHittestability = InInheritedHittestability;
49 }
50
52 {
53 return bInheritedHittestability;
54 }
55
57 {
58 return CurrentGrid;
59 }
60
61 const SWidget* GetPaintParent() const
62 {
63 return PaintParentPtr;
64 }
65
70
71 double GetCurrentTime() const
72 {
73 return CurrentTime;
74 }
75
76 float GetDeltaTime() const
77 {
78 return DeltaTime;
79 }
80
82 {
83 bDeferredPainting = InDeferredPaint;
84 }
85
86 bool GetDeferredPaint() const
87 {
88 return bDeferredPainting;
89 }
90
91private:
92
94 FHittestGrid& RootGrid;
95
97 FHittestGrid& CurrentGrid;
98
99 FVector2f WindowOffset;
100 const SWidget* PaintParentPtr;
101
102 double CurrentTime;
103 float DeltaTime;
104 uint8 bInheritedHittestability : 1;
105 uint8 bDeferredPainting : 1;
106
107};
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
uint8_t uint8
Definition binka_ue_file_header.h:8
Definition HittestGrid.h:30
Definition PaintArgs.h:23
bool GetInheritedHittestability() const
Definition PaintArgs.h:51
FHittestGrid & GetHittestGrid() const
Definition PaintArgs.h:56
FPaintArgs WithNewParent(const SWidget *PaintParent) const
Definition PaintArgs.h:30
double GetCurrentTime() const
Definition PaintArgs.h:71
UE::Slate::FDeprecateVector2DResult GetWindowToDesktopTransform() const
Definition PaintArgs.h:66
FPaintArgs WithNewHitTestGrid(FHittestGrid &NewHitTestGrid) const
Definition PaintArgs.h:38
void SetDeferredPaint(bool InDeferredPaint)
Definition PaintArgs.h:81
const SWidget * GetPaintParent() const
Definition PaintArgs.h:61
SLATECORE_API FPaintArgs InsertCustomHitTestPath(const SWidget *Widget, TSharedRef< ICustomHitTestPath > CustomHitTestPath) const
Definition PaintArgs.cpp:26
bool GetDeferredPaint() const
Definition PaintArgs.h:86
float GetDeltaTime() const
Definition PaintArgs.h:76
void SetInheritedHittestability(bool InInheritedHittestability)
Definition PaintArgs.h:46
Definition SlateRect.h:26
Definition HittestGrid.h:18
Definition SInvalidationPanel.h:29
Definition SRetainerWidget.h:40
Definition SWidget.h:165
Definition SWindow.h:243
Definition SharedPointer.h:153
FDeprecateSlateVector2D FDeprecateVector2DResult
Definition SlateVector2.h:469
Definition SlateVector2.h:485