UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
GridPanel.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"
7#include "Widgets/SWidget.h"
9#include "GridPanel.generated.h"
10
12class SGridPanel;
13class UGridSlot;
14
18UCLASS(MinimalAPI)
20{
22
23public:
24
26 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Fill Rules")
27 TArray<float> ColumnFill;
28
30 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Fill Rules")
31 TArray<float> RowFill;
32
33public:
34
35 UFUNCTION(BlueprintCallable, Category="Widget")
36 UMG_API UGridSlot* AddChildToGrid(UWidget* Content, int32 InRow = 0, int32 InColumn = 0);
37
38 UFUNCTION(BlueprintCallable, Category = "Widget")
39 UMG_API void SetColumnFill(int32 ColumnIndex, float Coefficient);
40
41 UFUNCTION(BlueprintCallable, Category = "Widget")
42 UMG_API void SetRowFill(int32 RowIndex, float Coefficient);
43
44 UFUNCTION(BlueprintCallable, Category = "Widget")
45 UMG_API void ClearFill();
46
47public:
48
49 // UWidget interface
51 // End of UWidget interface
52
54
55#if WITH_EDITOR
56 UMG_API virtual const FText GetPaletteCategory() override;
57#endif
58
59protected:
60
61 // UPanelWidget
62 UMG_API virtual UClass* GetSlotClass() const override;
63 UMG_API virtual void OnSlotAdded(UPanelSlot* Slot) override;
64 UMG_API virtual void OnSlotRemoved(UPanelSlot* Slot) override;
65 // End UPanelWidget
66
67protected:
68
70
71protected:
72 // UWidget interface
73 UMG_API virtual TSharedRef<SWidget> RebuildWidget() override;
74 // End of UWidget interface
75};
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
Definition Text.h:385
Definition SGridPanel.h:19
Definition Array.h:670
Definition SharedPointer.h:692
Definition SharedPointer.h:153
Definition Class.h:3793
Definition GridPanel.h:20
TSharedPtr< SGridPanel > MyGridPanel
Definition GridPanel.h:69
Definition GridSlot.h:20
virtual UMG_API void ReleaseSlateResources(bool bReleaseChildren) override
Definition GridSlot.cpp:24
virtual UMG_API void SynchronizeProperties() override
Definition GridSlot.cpp:177
Definition PanelSlot.h:13
Definition PanelWidget.h:15
Definition Widget.h:217