// Copyright 2020-2024 CesiumGS, Inc. and Contributors #pragma once #include "Internationalization/Text.h" #include "UObject/NameTypes.h" class IDetailCategoryBuilder; class IDetailGroup; class IDetailLayoutBuilder; class CesiumButtonGroup : public TSharedFromThis { public: CesiumButtonGroup(); /// /// Adds a button to this group. When pressed, the button will invoke the /// provided UFunction. If a name is not specified, the label on the button is /// derived automatically from the name of the function. /// /// void AddButtonForUFunction( UFunction* Function, const FText& Label = FText::GetEmpty()); void Finish(IDetailLayoutBuilder& DetailBuilder, IDetailCategoryBuilder& Category); private: struct Impl; TUniquePtr pImpl; }; class CesiumCustomization { public: /// /// Adds a new group to the given category. This is equivalent to calling /// `Category.AddGroup` except that it allows the label to span the entire row /// rather than confining it to the "name" column for no apparent reason. /// /// The category to which to add the group. /// The name of the group. /// The display name of the group. /// True if the group should appear in the advanced /// section of the category. /// True if the group should start /// expanded. /// The newly-created group. static IDetailGroup& CreateGroup( IDetailCategoryBuilder& Category, FName GroupName, const FText& LocalizedDisplayName, bool bForAdvanced = false, bool bStartExpanded = false); /// /// Creates a new group of action buttons. Be sure to call Finish on the /// returned instance after the last button has been added. /// static TSharedPtr CreateButtonGroup(); };