UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
Slider.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"
8#include "Widgets/SWidget.h"
9#include "Components/Widget.h"
10#include "Slider.generated.h"
11
12class SSlider;
13
19
25UCLASS(MinimalAPI)
27{
29
30public:
31 UE_DEPRECATED(5.1, "Direct access to Value is deprecated. Please use the getter or setter.")
33 UPROPERTY(EditAnywhere, BlueprintReadWrite, Getter, Setter, FieldNotify, BlueprintGetter="GetValue", BlueprintSetter="SetValue", Category="Appearance", meta=(UIMin="0", UIMax="1"))
35
37 UPROPERTY()
38 FGetFloat ValueDelegate;
39
40 UE_DEPRECATED(5.1, "Direct access to MinValue is deprecated. Please use the getter or setter.")
42 UPROPERTY(EditAnywhere, BlueprintReadWrite, Getter, Setter, BlueprintSetter="SetMinValue", Category="Appearance")
43 float MinValue;
44
45 UE_DEPRECATED(5.1, "Direct access to MaxValue is deprecated. Please use the getter or setter.")
47 UPROPERTY(EditAnywhere, BlueprintReadWrite, Getter, Setter, BlueprintSetter="SetMaxValue", Category="Appearance")
48 float MaxValue;
49
50public:
51 UE_DEPRECATED(5.1, "Direct access to WidgetStyle is deprecated. Please use the getter or setter.")
53 UPROPERTY(EditAnywhere, BlueprintReadWrite, Getter, Setter, Category="Style", meta=( DisplayName="Style" ))
54 FSliderStyle WidgetStyle;
55
56 UE_DEPRECATED(5.1, "Direct access to Orientation is deprecated. Please use the getter or setter.")
58 UPROPERTY(EditAnywhere, BlueprintReadWrite, Getter, Setter, Category=Appearance)
60
61 UE_DEPRECATED(5.1, "Direct access to SliderBarColor is deprecated. Please use the getter or setter.")
63 UPROPERTY(EditAnywhere, BlueprintReadWrite, Getter, Setter, BlueprintSetter="SetSliderBarColor", Category="Appearance")
64 FLinearColor SliderBarColor;
65
66 UE_DEPRECATED(5.1, "Direct access to SliderHandleColor is deprecated. Please use the getter or setter.")
68 UPROPERTY(EditAnywhere, BlueprintReadWrite, Getter, Setter, BlueprintSetter="SetSliderHandleColor", Category="Appearance")
69 FLinearColor SliderHandleColor;
70
71 UE_DEPRECATED(5.1, "Direct access to IndentHandle is deprecated. Please use the getter or setter.")
73 UPROPERTY(EditAnywhere, BlueprintReadWrite, Getter="HasIndentHandle", Setter, BlueprintSetter="SetIndentHandle", Category="Appearance", AdvancedDisplay)
74 bool IndentHandle;
75
76 UE_DEPRECATED(5.1, "Direct access to Locked is deprecated. Please use the getter or setter.")
78 UPROPERTY(EditAnywhere, BlueprintReadWrite, Getter="IsLocked", Setter, BlueprintSetter="SetLocked", Category="Appearance", AdvancedDisplay)
79 bool Locked;
80
82 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Appearance, AdvancedDisplay)
83 bool MouseUsesStep;
84
86 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Appearance, AdvancedDisplay)
87 bool RequiresControllerLock;
88
89 UE_DEPRECATED(5.1, "Direct access to StepSize is deprecated. Please use the getter or setter.")
91 UPROPERTY(EditAnywhere,BlueprintReadWrite, Getter, Setter, BlueprintSetter="SetStepSize", Category="Appearance", meta=(UIMin="0", UIMax="1"))
92 float StepSize;
93
95 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Interaction")
96 bool IsFocusable;
97
99 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Interaction")
101
102public:
103
105 UPROPERTY(BlueprintAssignable, Category="Widget Event")
106 FOnMouseCaptureBeginEvent OnMouseCaptureBegin;
107
109 UPROPERTY(BlueprintAssignable, Category="Widget Event")
110 FOnMouseCaptureEndEvent OnMouseCaptureEnd;
111
113 UPROPERTY(BlueprintAssignable, Category = "Widget Event")
114 FOnControllerCaptureBeginEvent OnControllerCaptureBegin;
115
117 UPROPERTY(BlueprintAssignable, Category = "Widget Event")
118 FOnControllerCaptureEndEvent OnControllerCaptureEnd;
119
121 UPROPERTY(BlueprintAssignable, Category="Widget Event")
123
125 UFUNCTION(BlueprintCallable, Category="Behavior")
126 UMG_API float GetValue() const;
127
129 UFUNCTION(BlueprintCallable, Category = "Behavior")
130 UMG_API float GetNormalizedValue() const;
131
133 UFUNCTION(BlueprintCallable, Category="Behavior")
134 UMG_API void SetValue(float InValue);
135
137 UMG_API float GetMinValue() const;
138
140 UFUNCTION(BlueprintCallable, Category = "Behavior")
141 UMG_API void SetMinValue(float InValue);
142
144 UMG_API float GetMaxValue() const;
145
147 UFUNCTION(BlueprintCallable, Category = "Behavior")
148 UMG_API void SetMaxValue(float InValue);
149
151 UMG_API const FSliderStyle& GetWidgetStyle() const;
152
154 UMG_API void SetWidgetStyle(const FSliderStyle& InStyle);
155
157 UMG_API EOrientation GetOrientation() const;
158
161
163 UMG_API bool HasIndentHandle() const;
164
166 UFUNCTION(BlueprintCallable, Category="Behavior")
168
170 UMG_API bool IsLocked() const;
171
173 UFUNCTION(BlueprintCallable, Category="Behavior")
174 UMG_API void SetLocked(bool InValue);
175
177 UMG_API float GetStepSize() const;
178
180 UFUNCTION(BlueprintCallable, Category="Behavior")
181 UMG_API void SetStepSize(float InValue);
182
184 UMG_API FLinearColor GetSliderBarColor() const;
185
187 UFUNCTION(BlueprintCallable, Category="Appearance")
189
191 UMG_API FLinearColor GetSliderHandleColor() const;
192
194 UFUNCTION(BlueprintCallable, Category="Appearance")
196
197 // UWidget interface
198 UMG_API virtual void SynchronizeProperties() override;
199 // End of UWidget interface
200
201 // UVisual interface
202 UMG_API virtual void ReleaseSlateResources(bool bReleaseChildren) override;
203 // End of UVisual interface
204
205#if WITH_EDITOR
206 UMG_API virtual const FText GetPaletteCategory() override;
207#endif
208
209protected:
212
213 // UWidget interface
214 UMG_API virtual TSharedRef<SWidget> RebuildWidget() override;
215 // End of UWidget interface
216
217 UMG_API void HandleOnValueChanged(float InValue);
218 UMG_API void HandleOnMouseCaptureBegin();
219 UMG_API void HandleOnMouseCaptureEnd();
220 UMG_API void HandleOnControllerCaptureBegin();
221 UMG_API void HandleOnControllerCaptureEnd();
222
223#if WITH_ACCESSIBILITY
224 UMG_API virtual TSharedPtr<SWidget> GetAccessibleWidget() const override;
225#endif
226
228};
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define DECLARE_DYNAMIC_MULTICAST_DELEGATE(DelegateName)
Definition DelegateCombinations.h:38
#define DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(DelegateName, Param1Type, Param1Name)
Definition DelegateCombinations.h:53
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define UFUNCTION(...)
Definition ObjectMacros.h:745
#define GENERATED_UCLASS_BODY(...)
Definition ObjectMacros.h:768
#define UCLASS(...)
Definition ObjectMacros.h:776
USkinnedMeshComponent float
Definition SkinnedMeshComponent.h:60
EOrientation
Definition SlateEnums.h:261
Definition Text.h:385
Definition SSlider.h:23
SLATE_API float GetStepSize() const
Definition SSlider.cpp:580
SLATE_API void SetIndentHandle(TAttribute< bool > InIndentHandle)
Definition SSlider.cpp:551
SLATE_API bool IsLocked() const
Definition SSlider.cpp:169
SLATE_API float GetNormalizedValue() const
Definition SSlider.cpp:520
bool bPreventThrottling
Definition SSlider.h:279
SLATE_API void SetValue(TAttribute< float > InValueAttribute)
Definition SSlider.cpp:532
float MaxValue
Definition SSlider.h:260
SLATE_API float GetValue() const
Definition SSlider.cpp:515
float GetMaxValue() const
Definition SSlider.h:124
SLATE_API void SetSliderHandleColor(TAttribute< FSlateColor > InSliderHandleColor)
Definition SSlider.cpp:575
float GetMinValue() const
Definition SSlider.h:121
SLATE_API void SetLocked(TAttribute< bool > InLocked)
Definition SSlider.cpp:556
SLATE_API void SetOrientation(EOrientation InOrientation)
Definition SSlider.cpp:561
SLATE_API void SetSliderBarColor(TAttribute< FSlateColor > InSliderBarColor)
Definition SSlider.cpp:570
const FSliderStyle * Style
Definition SSlider.h:245
TAttribute< float > StepSize
Definition SSlider.h:257
SLATE_API void SetStepSize(TAttribute< float > InStepSize)
Definition SSlider.cpp:585
float MinValue
Definition SSlider.h:259
Definition EnumAsByte.h:22
Definition SharedPointer.h:692
Definition SharedPointer.h:153
Definition Slider.h:27
PROPERTY_BINDING_IMPLEMENTATION(float, Value)
TSharedPtr< SSlider > MySlider
Definition Slider.h:211
Definition Widget.h:217
@ false
Definition radaudio_common.h:23
Definition Color.h:48
Definition SlateTypes.h:1340