UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ScrollBar.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"
10#include "Components/Widget.h"
11#include "ScrollBar.generated.h"
12
14UCLASS(Experimental, MinimalAPI)
16{
18
19public:
20
21 UE_DEPRECATED(5.2, "Direct access to WidgetStyle is deprecated. Please use the getter or setter.")
23 UPROPERTY(EditAnywhere, BlueprintReadWrite, Getter, Setter, Category="Style", meta=( DisplayName="Style" ))
24 FScrollBarStyle WidgetStyle;
25
26 UE_DEPRECATED(5.2, "Direct access to bAlwaysShowScrollbar is deprecated. Please use the getter or setter.")
28 UPROPERTY(EditAnywhere, BlueprintReadWrite, Getter = "IsAlwaysShowScrollbar", Setter = "SetAlwaysShowScrollbar", Category = "Behavior")
29 bool bAlwaysShowScrollbar;
30
31 UE_DEPRECATED(5.2, "Direct access to bAlwaysShowScrollbarTrack is deprecated. Please use the getter or setter.")
33 UPROPERTY(EditAnywhere, BlueprintReadWrite, Getter = "IsAlwaysShowScrollbarTrack", Setter = "SetAlwaysShowScrollbarTrack", Category = "Behavior")
34 bool bAlwaysShowScrollbarTrack;
35
36 UE_DEPRECATED(5.2, "Direct access to Orientation is deprecated. Please use the getter. Note that the orientation of a scrollbar is only set at construction and is not modifiable at runtime.")
38 UPROPERTY(EditAnywhere, BlueprintReadOnly, Getter, Category="Behavior")
40
41 UE_DEPRECATED(5.2, "Direct access to Thickness is deprecated. Please use the getter or setter.")
43 UPROPERTY(EditAnywhere, BlueprintReadWrite, Getter, Setter, Category="Behavior")
44 FVector2D Thickness;
45
46 UE_DEPRECATED(5.2, "Direct access to Padding is deprecated. Please use the getter or setter.")
48 UPROPERTY(EditAnywhere, BlueprintReadWrite, Getter, Setter, Category = "Behavior")
50
51public:
52
61 UFUNCTION(BlueprintCallable, Category="Scrolling")
63
64 //~ Begin UWidget Interface
65 UMG_API virtual void SynchronizeProperties() override;
66 //~ End UWidget Interface
67
68 //~ Begin UVisual Interface
69 UMG_API virtual void ReleaseSlateResources(bool bReleaseChildren) override;
70 //~ End UVisual Interface
71
72 //~ Begin UObject Interface
73#if WITH_EDITORONLY_DATA
74 UMG_API virtual void Serialize(FArchive& Ar) override;
75#endif // if WITH_EDITORONLY_DATA
76 //~ End UObject Interface
77
78#if WITH_EDITOR
79 //~ Begin UWidget Interface
80 UMG_API virtual const FText GetPaletteCategory() override;
81 //~ End UWidget Interface
82#endif
83
85 UMG_API const FScrollBarStyle& GetWidgetStyle() const;
87 UMG_API void SetWidgetStyle(const FScrollBarStyle& InWidgetStyle);
88
90 UMG_API bool IsAlwaysShowScrollbar() const;
92 UMG_API void SetAlwaysShowScrollbar(bool bNewValue);
93
95 UMG_API bool IsAlwaysShowScrollbarTrack() const;
97 UMG_API void SetAlwaysShowScrollbarTrack(bool bNewValue);
98
100 UMG_API EOrientation GetOrientation() const;
101
103 UMG_API FVector2D GetThickness() const;
105 UMG_API void SetThickness(const FVector2D& InThickness);
106
108 UMG_API FMargin GetPadding() const;
110 UMG_API void SetPadding(const FMargin& InPadding);
111
112protected:
113
115
116protected:
117 //~ Begin UWidget Interface
118 UMG_API virtual TSharedRef<SWidget> RebuildWidget() override;
119 //~ End UWidget Interface
120
122 UMG_API void InitOrientation(EOrientation InOrientation);
123};
#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
void SetState(uint64 Value)
Definition LockFreeList.h:52
#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
EOrientation
Definition SlateEnums.h:261
Definition Archive.h:1208
Definition Text.h:385
Definition EnumAsByte.h:22
Definition SharedPointer.h:692
Definition SharedPointer.h:153
Definition ScrollBar.h:16
TSharedPtr< class SScrollBar > MyScrollBar
Definition ScrollBar.h:114
Definition Widget.h:217
Definition RobinHoodHashTable.h:18
Definition Margin.h:17
Definition SlateTypes.h:932