Files
UnrealEngine/Engine/Source/Developer/ToolWidgets/Public/Sidebar/ISidebarDrawerContent.h
Brandyn / Techy fcc1b09210 init
2026-04-04 15:40:51 -05:00

38 lines
1.1 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Misc/Optional.h"
#include "Templates/SharedPointer.h"
class FName;
class FText;
class SWidget;
class ISidebarDrawerContent : public TSharedFromThis<ISidebarDrawerContent>
{
public:
virtual ~ISidebarDrawerContent() {}
/** Gets the unique Id used to identify the sidebar drawer. */
virtual FName GetUniqueId() const = 0;
/** Gets the section unique Id used to identify the drawer section. */
virtual FName GetSectionId() const = 0;
/** Gets the section text to display on the section button. */
virtual FText GetSectionDisplayText() const = 0;
/** Returns true if this section should be displayed. */
virtual bool ShouldShowSection() const { return true; }
/** Sets the optional slot height stretch coefficient. If not set, auto sizes the slot. */
virtual TOptional<float> GetSectionFillHeight() const { return 1.f; }
/** Gets the section sort order. Lower values will be put at the above higher values. */
virtual int32 GetSortOrder() const { return 0; }
/** Constructs the content widget for a sidebar drawer. */
virtual TSharedRef<SWidget> CreateContentWidget() = 0;
};