Touch Interface Designer 2025.2
Create touch interface with a visual editor and manage all mobile inputs like gestures
Loading...
Searching...
No Matches
ComponentDecoratorGroup.h
Go to the documentation of this file.
1// Copyright 2025 Lost in Game Studio. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
7#include "ComponentDecoratorGroup.generated.h"
8
9class SOverlay;
10
12UCLASS(BlueprintType)
13class TOUCHINTERFACE_API UComponentDecoratorGroup : public UComponentDecorator
14{
15 GENERATED_BODY()
16
17public:
18 virtual TSharedRef<SWidget> CreateWidgetInstance() override;
19
20#if WITH_EDITOR
21 virtual void SynchronizeProperties() override;
22#endif
23
24 virtual float GetMaxHorizontalSize(const bool bRecursive = false) const override;
25
26 virtual float GetMaxVerticalSize(const bool bRecursive = false) const override;
27
28 virtual bool CanAcceptChildren() override { return true; }
29
30 // Add decorator as child in this group
31 UFUNCTION(Category="Decorator Group", BlueprintCallable)
32 void AddChild(UComponentDecorator* Decorator);
33
34 UFUNCTION(Category="Decorator Group", BlueprintCallable)
35 void InsertChildAt(UComponentDecorator* Decorator, int32 Index);
36
37 UFUNCTION(Category="Decorator Group", BlueprintCallable)
38 void Remove(UComponentDecorator* Decorator);
39
40 UFUNCTION(Category="Decorator Group", BlueprintCallable)
41 void RemoveByName(const FName Name);
42
43 UFUNCTION(Category="Decorator Group", BlueprintCallable)
44 void RemoveAt(const int32 Index);
45
46 UFUNCTION(Category="Decorator Group", BlueprintCallable)
47 void RemoveAll();
48
49 UFUNCTION(Category="Decorator Group", BlueprintCallable)
50 bool ContainDecoratorByName(const FName Name) const;
51
52 UFUNCTION(Category="Decorator Group", BlueprintCallable, BlueprintPure)
53 TArray<UComponentDecorator*> GetChildren(const bool bRecursive = false);
54
55 UFUNCTION(Category="Decorator Group", BlueprintCallable, BlueprintPure)
56 TArray<FName> GetChildrenName(bool bRecursive);
57
58 UFUNCTION(Category="Decorator Group", BlueprintCallable, BlueprintPure)
59 int32 GetDecoratorIndex(const FName Name);
60
61 UFUNCTION(Category="Decorator Group", BlueprintCallable, BlueprintPure)
62 bool GetDecoratorByName(const FName Name, UComponentDecorator*& DecoratorFound, bool bRecursive = false);
63
64
65 //TODO: Add all needed function to manage children
66
67 UPROPERTY()
68 TArray<TObjectPtr<UComponentDecorator>> Children;
69
70 TSharedPtr<SOverlay> OverlayWidget;
71};
BlueprintType
Definition ComponentDecorator_Animation.h:40
Definition ComponentDecoratorGroup.h:14
virtual TSharedRef< SWidget > CreateWidgetInstance() override
Definition ComponentDecoratorGroup.cpp:8
BlueprintCallable
Definition ComponentDecoratorGroup.h:52
BlueprintPure TArray< FName > GetChildrenName(bool bRecursive)
Definition ComponentDecoratorGroup.cpp:240
virtual float GetMaxHorizontalSize(const bool bRecursive=false) const override
Definition ComponentDecoratorGroup.cpp:35
BlueprintCallable void AddChild(UComponentDecorator *Decorator)
Definition ComponentDecoratorGroup.cpp:74
TArray< TObjectPtr< UComponentDecorator > > Children
Definition ComponentDecoratorGroup.h:68
virtual float GetMaxVerticalSize(const bool bRecursive=false) const override
Definition ComponentDecoratorGroup.cpp:54
BlueprintCallable void RemoveByName(const FName Name)
Definition ComponentDecoratorGroup.cpp:147
BlueprintPure int32 GetDecoratorIndex(const FName Name)
Definition ComponentDecoratorGroup.cpp:263
BlueprintCallable void RemoveAll()
Definition ComponentDecoratorGroup.cpp:179
virtual bool CanAcceptChildren() override
Definition ComponentDecoratorGroup.h:28
BlueprintCallable void Remove(UComponentDecorator *Decorator)
Definition ComponentDecoratorGroup.cpp:134
Category
Definition ComponentDecoratorGroup.h:31
BlueprintCallable bool ContainDecoratorByName(const FName Name) const
Definition ComponentDecoratorGroup.cpp:196
BlueprintPure bool GetDecoratorByName(const FName Name, UComponentDecorator *&DecoratorFound, bool bRecursive=false)
Definition ComponentDecoratorGroup.cpp:277
BlueprintCallable void InsertChildAt(UComponentDecorator *Decorator, int32 Index)
Definition ComponentDecoratorGroup.cpp:104
BlueprintCallable void RemoveAt(const int32 Index)
Definition ComponentDecoratorGroup.cpp:170
BlueprintPure TArray< UComponentDecorator * > GetChildren(const bool bRecursive=false)
Definition ComponentDecoratorGroup.cpp:217
TSharedPtr< SOverlay > OverlayWidget
Definition ComponentDecoratorGroup.h:70
UComponentDecorator()
Definition ComponentDecorator.cpp:19