UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
SColorGradingPicker.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 "Misc/Attribute.h"
7#include "Input/Reply.h"
13
15UE_DEPRECATED(5.5, "Color grading widgets and associated types have moved to the AdvancedWidgets module.")
17
22{
24 Contrast,
25 Gamma,
26 Gain,
27 Offset,
29};
30
31
37class UE_DEPRECATED(5.5, "Color grading widgets and associated types have moved to the AdvancedWidgets module.") SColorGradingPicker
38 : public SCompoundWidget
39{
40public:
43
44 // Delegate called when the widget Color Data changed
46
47
48 SLATE_BEGIN_ARGS(SColorGradingPicker)
52 , _MainDelta(0.01f)
60 { }
61
64 SLATE_ARGUMENT(TOptional<float>, SliderValueMin)
65 SLATE_ARGUMENT(TOptional<float>, SliderValueMax)
67
68
69 SLATE_ATTRIBUTE(bool, SupportDynamicSliderMaxValue)
71 SLATE_ATTRIBUTE(bool, SupportDynamicSliderMinValue)
72
73 SLATE_ARGUMENT( float, MainDelta )
74
75
76 SLATE_ARGUMENT(float, MainShiftMultiplier)
78 SLATE_ARGUMENT(float, MainCtrlMultiplier)
79
80 SLATE_ARGUMENT_DEPRECATED( int32, MainShiftMouseMovePixelPerDelta, 5.4, "Shift Mouse Move Pixel Per Delta is deprecated and incrementing by a fixed delta per pixel is no longer supported. Please use ShiftMultiplier and CtrlMultiplier which will multiply the step per mouse move")
81
83 SLATE_ARGUMENT( EColorGradingModes, ColorGradingModes)
85
90
93 SLATE_EVENT(FOnGetCurrentVector4Value, OnQueryCurrentColor)
95
97 SLATE_EVENT(FSimpleDelegate, OnBeginSliderMovement)
98
100 SLATE_EVENT(FSimpleDelegate, OnEndSliderMovement)
101
104
107
109
111 APPFRAMEWORK_API ~SColorGradingPicker();
112
113public:
114
120 APPFRAMEWORK_API void Construct(const FArguments& InArgs );
121
122 FOnNumericEntryBoxDynamicSliderMinMaxValueChanged& GetOnNumericEntryBoxDynamicSliderMaxValueChangedDelegate() { return OnNumericEntryBoxDynamicSliderMaxValueChanged; }
123 FOnNumericEntryBoxDynamicSliderMinMaxValueChanged& GetOnNumericEntryBoxDynamicSliderMinValueChangedDelegate() { return OnNumericEntryBoxDynamicSliderMinValueChanged; }
124
128
129protected:
130
131 APPFRAMEWORK_API void TransformLinearColorRangeToColorGradingRange(FVector4 &VectorValue) const;
132 APPFRAMEWORK_API void TransformColorGradingRangeToLinearColorRange(FVector4 &VectorValue) const;
133 APPFRAMEWORK_API void TransformColorGradingRangeToLinearColorRange(float &FloatValue);
134
135 APPFRAMEWORK_API TOptional<float> OnGetMainValue() const;
136 APPFRAMEWORK_API void OnMainValueChanged(float InValue, bool ShouldCommitValueChanges);
137 APPFRAMEWORK_API void OnMainValueCommitted(float InValue, ETextCommit::Type CommitType);
138
139 APPFRAMEWORK_API FLinearColor GetCurrentLinearColor();
140
141 APPFRAMEWORK_API bool IsEntryBoxEnabled() const;
142
143 // Callback for value changes in the color spectrum picker.
144 APPFRAMEWORK_API void HandleCurrentColorValueChanged(const FLinearColor& NewValue, bool ShouldCommitValueChanges);
145
146 APPFRAMEWORK_API void HandleColorWheelMouseCaptureBegin(const FLinearColor& InValue);
147 APPFRAMEWORK_API void HandleColorWheelMouseCaptureEnd(const FLinearColor& InValue);
148
149 APPFRAMEWORK_API void OnBeginSliderMovement();
150 APPFRAMEWORK_API void OnEndSliderMovement(float NewValue);
151 APPFRAMEWORK_API void AdjustRatioValue(FVector4 &NewValue);
152
153 bool bIsMouseDragging;
154 FVector4 StartDragRatio;
155
156 float SliderValueMin;
157 float SliderValueMax;
158 float MainDelta;
159 float MainShiftMultiplier;
160 float MainCtrlMultiplier;
161
163 EColorGradingModes ColorGradingModes;
165
166 TSharedPtr<SNumericEntryBox<float>> NumericEntryBoxWidget;
167
169 FOnColorGradingPickerValueChanged OnColorCommitted;
170
172 FOnGetCurrentVector4Value OnQueryCurrentColor;
174 FOnNumericEntryBoxDynamicSliderMinMaxValueChanged OnNumericEntryBoxDynamicSliderMaxValueChanged;
175 FOnNumericEntryBoxDynamicSliderMinMaxValueChanged OnNumericEntryBoxDynamicSliderMinValueChanged;
176
177 FSimpleDelegate ExternalBeginSliderMovementDelegate;
178 FSimpleDelegate ExternalEndSliderMovementDelegate;
179 FSimpleDelegate ExternalBeginMouseCaptureDelegate;
180 FSimpleDelegate ExternalEndMouseCaptureDelegate;
181};
Color grading widgets and associated types have moved to the AdvancedWidgets module EColorGradingModes
Definition SColorGradingPicker.h:22
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
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
#define SLATE_ATTRIBUTE(AttrType, AttrName)
Definition DeclarativeSyntaxSupport.h:192
#define SLATE_ARGUMENT_DEPRECATED(ArgType, ArgName, DeprecationVersion, DeprecationMessage)
Definition DeclarativeSyntaxSupport.h:215
#define SLATE_BEGIN_ARGS(InWidgetType)
Definition DeclarativeSyntaxSupport.h:63
#define SLATE_EVENT(DelegateName, EventName)
Definition DeclarativeSyntaxSupport.h:458
#define SLATE_END_ARGS()
Definition DeclarativeSyntaxSupport.h:116
#define SLATE_ARGUMENT(ArgType, ArgName)
Definition DeclarativeSyntaxSupport.h:208
#define DECLARE_DELEGATE_RetVal_OneParam(ReturnValueType, DelegateName, Param1Type)
Definition DelegateCombinations.h:54
#define DECLARE_MULTICAST_DELEGATE_FourParams(DelegateName, Param1Type, Param2Type, Param3Type, Param4Type)
Definition DelegateCombinations.h:76
#define DECLARE_DELEGATE_TwoParams(DelegateName, Param1Type, Param2Type)
Definition DelegateCombinations.h:57
return true
Definition ExternalRpcRegistry.cpp:601
#define PRAGMA_ENABLE_DEPRECATION_WARNINGS
Definition GenericPlatformCompilerPreSetup.h:12
#define PRAGMA_DISABLE_DEPRECATION_WARNINGS
Definition GenericPlatformCompilerPreSetup.h:8
void Construct(const FArguments &InArgs)
uint32 Offset
Definition VulkanMemory.cpp:4033
Definition AdvancedWidgets.Build.cs:6
Definition SCompoundWidget.h:22
Definition SharedPointer.h:692
Definition SharedPointer.h:1295
Type
Definition SlateEnums.h:291
@ false
Definition radaudio_common.h:23
Definition Color.h:48
Definition Optional.h:131