5#include "CoreMinimal.h"
6#include "Components/HorizontalBox.h"
7#include "AttachedFilesContainerWidget.generated.h"
12DECLARE_MULTICAST_DELEGATE(FOnFileRemoved);
20 void AddImage(
const FString& ImagePath);
22 bool HasFiles()
const;
23 TArray<FString> FilePaths()
const {
return SelectedFiles; }
24 FOnFileRemoved& OnFileRemoved() {
return FileRemoved; }
26 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category =
"UI")
27 TSubclassOf<UAttachedImageWidget> AttachedImageWidgetWidgetClass;
30 virtual TSharedRef<SWidget> RebuildWidget()
override;
34 TArray<TObjectPtr<UAttachedImageWidget>> AttachedImageWidgets;
37 TObjectPtr<UHorizontalBox> ImageHorizontalBox;
39 TArray<FString> SelectedFiles;
40 FOnFileRemoved FileRemoved;
42 void OnRemoved(
const FString& ImagePath,
const TObjectPtr<UAttachedImageWidget>& Widget);