UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
GridSlot.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 "Layout/Margin.h"
11
12#include "GridSlot.generated.h"
13
18UCLASS(MinimalAPI)
20{
22
23public:
24
25 UE_DEPRECATED(5.1, "Direct access to Padding is deprecated. Please use the getter or setter.")
27 UPROPERTY(EditAnywhere, BlueprintReadWrite, Getter, Setter, BlueprintSetter="SetPadding", Category="Layout|Grid Slot")
29
30 UE_DEPRECATED(5.1, "Direct access to HorizontalAlignment is deprecated. Please use the getter or setter.")
32 UPROPERTY(EditAnywhere, BlueprintReadWrite, Getter, Setter, BlueprintSetter="SetHorizontalAlignment", Category="Layout|Grid Slot")
33 TEnumAsByte<EHorizontalAlignment> HorizontalAlignment;
34
35 UE_DEPRECATED(5.1, "Direct access to VerticalAlignment is deprecated. Please use the getter or setter.")
37 UPROPERTY(EditAnywhere, BlueprintReadWrite, Getter, Setter, BlueprintSetter="SetVerticalAlignment", Category="Layout|Grid Slot")
38 TEnumAsByte<EVerticalAlignment> VerticalAlignment;
39
40 UE_DEPRECATED(5.1, "Direct access to Row is deprecated. Please use the getter or setter.")
42 UPROPERTY(EditAnywhere, BlueprintReadWrite, Getter, Setter, BlueprintSetter="SetRow", meta=( UIMin = "0" ), Category="Layout|Grid Slot")
43 int32 Row;
44
46 UE_DEPRECATED(5.1, "Direct access to RowSpan is deprecated. Please use the getter or setter.")
47 UPROPERTY(EditAnywhere, BlueprintReadWrite, Getter, Setter, BlueprintSetter="SetRowSpan", Category="Layout|Grid Slot")
48 int32 RowSpan;
49
50 UE_DEPRECATED(5.1, "Direct access to Column is deprecated. Please use the getter or setter.")
52 UPROPERTY(EditAnywhere, BlueprintReadWrite, Getter, Setter, BlueprintSetter="SetColumn", meta=( UIMin = "0" ), Category="Layout|Grid Slot")
53 int32 Column;
54
56 UE_DEPRECATED(5.1, "Direct access to ColumnSpan is deprecated. Please use the getter or setter.")
57 UPROPERTY(EditAnywhere, BlueprintReadWrite, Getter, Setter, BlueprintSetter="SetColumnSpan", Category="Layout|Grid Slot")
58 int32 ColumnSpan;
59
60 UE_DEPRECATED(5.1, "Direct access to Layer is deprecated. Please use the getter or setter.")
62 UPROPERTY(EditAnywhere, BlueprintReadWrite, Getter, Setter, BlueprintSetter="SetLayer", Category="Layout|Grid Slot")
63 int32 Layer;
64
65 UE_DEPRECATED(5.1, "Direct access to Nudge is deprecated. Please use the getter or setter.")
67 UPROPERTY(EditAnywhere, BlueprintReadWrite, Getter, Setter, BlueprintSetter="SetNudge", Category="Layout|Grid Slot")
68 FVector2D Nudge;
69
70public:
71
72 UMG_API FMargin GetPadding() const;
73
74 UFUNCTION(BlueprintCallable, Category="Layout|Border Slot")
75 UMG_API void SetPadding(FMargin InPadding);
76
78 UMG_API int32 GetRow() const;
79
81 UFUNCTION(BlueprintCallable, Category="Layout|Grid Slot")
82 UMG_API void SetRow(int32 InRow);
83
85 UMG_API int32 GetRowSpan() const;
86
88 UFUNCTION(BlueprintCallable, Category="Layout|Grid Slot")
89 UMG_API void SetRowSpan(int32 InRowSpan);
90
92 UMG_API int32 GetColumn() const;
93
95 UFUNCTION(BlueprintCallable, Category="Layout|Grid Slot")
96 UMG_API void SetColumn(int32 InColumn);
97
99 UMG_API int32 GetColumnSpan() const;
100
102 UFUNCTION(BlueprintCallable, Category="Layout|Grid Slot")
103 UMG_API void SetColumnSpan(int32 InColumnSpan);
104
106 UMG_API int32 GetLayer() const;
107
109 UFUNCTION(BlueprintCallable, Category = "Layout|Grid Slot")
110 UMG_API void SetLayer(int32 InLayer);
111
113 UMG_API FVector2D GetNudge() const;
114
116 UFUNCTION(BlueprintCallable, Category = "Layout|Grid Slot")
117 UMG_API void SetNudge(FVector2D InNudge);
118
120 UMG_API EHorizontalAlignment GetHorizontalAlignment() const;
121
123 UFUNCTION(BlueprintCallable, Category="Layout|Grid Slot")
124 UMG_API void SetHorizontalAlignment(EHorizontalAlignment InHorizontalAlignment);
125
127 UMG_API EVerticalAlignment GetVerticalAlignment() const;
128
130 UFUNCTION(BlueprintCallable, Category="Layout|Grid Slot")
131 UMG_API void SetVerticalAlignment(EVerticalAlignment InVerticalAlignment);
132
133 // UPanelSlot interface
134 UMG_API virtual void SynchronizeProperties() override;
135 // End of UPanelSlot interface
136
138 UMG_API void BuildSlot(TSharedRef<SGridPanel> GridPanel);
139
140 UMG_API virtual void ReleaseSlateResources(bool bReleaseChildren) override;
141
142#if WITH_EDITOR
143 UMG_API virtual bool NudgeByDesigner(const FVector2D& NudgeDirection, const TOptional<int32>& GridSnapSize) override;
144 UMG_API virtual void SynchronizeFromTemplate(const UPanelSlot* const TemplateSlot) override;
145#endif //WITH_EDITOR
146
147private:
149 SGridPanel::FSlot* Slot;
150};
#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 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
EHorizontalAlignment
Definition SlateEnums.h:174
EVerticalAlignment
Definition SlateEnums.h:194
Definition SGridPanel.h:37
Definition SGridPanel.h:19
Definition EnumAsByte.h:22
Definition SharedPointer.h:153
Definition GridSlot.h:20
Definition PanelSlot.h:13
Definition Margin.h:17
Definition Optional.h:131