SMetaDataView.h 945 B

1234567891011121314151617181920212223242526272829303132333435
  1. // Copyright 2017-2021 marynate. All Rights Reserved.
  2. #pragma once
  3. #include "CoreMinimal.h"
  4. #include "Widgets/DeclarativeSyntaxSupport.h"
  5. #include "Widgets/SCompoundWidget.h"
  6. class ITableRow;
  7. class STableViewBase;
  8. struct FMetaDataLine;
  9. /**
  10. * The widget to display metadata as a table of tag/value rows
  11. */
  12. class SMetaDataView : public SCompoundWidget
  13. {
  14. public:
  15. SLATE_BEGIN_ARGS(SMetaDataView) {}
  16. SLATE_END_ARGS()
  17. /**
  18. * Construct this widget. Called by the SNew() Slate macro.
  19. *
  20. * @param InArgs Declaration used by the SNew() macro to construct this widget
  21. * @param InMetaData The metadata tags/values to display in the table view widget
  22. */
  23. void Construct(const FArguments& InArgs, const TMap<FName, FString>& InMetadata);
  24. private:
  25. TArray< TSharedPtr< FMetaDataLine > > MetaDataLines;
  26. TSharedRef< ITableRow > OnGenerateRow(const TSharedPtr< FMetaDataLine > Item, const TSharedRef< STableViewBase >& OwnerTable);
  27. };