You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#preflight 6272a74d2f6d177be3c6fdda #rb Matt.Kuhlenschmidt #ROBOMERGE-OWNER: Lauren.Barnes #ROBOMERGE-AUTHOR: lauren.barnes #ROBOMERGE-SOURCE: CL 20057269 via CL 20070159 via CL 20072035 via CL 20072203 #ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690) #ROBOMERGE-CONFLICT from-shelf [CL 20105363 by Lauren Barnes in ue5-main branch]
70 lines
2.4 KiB
C++
70 lines
2.4 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "Fonts/SlateFontInfo.h"
|
|
#include "Framework/SlateDelegates.h"
|
|
#include "Styling/AppStyle.h"
|
|
#include "IPropertyTableColumn.h"
|
|
#include "IPropertyTableUtilities.h"
|
|
#include "IPropertyTableCell.h"
|
|
#include "IPropertyTableCustomColumn.h"
|
|
#include "Editor/PropertyEditor/Private/UserInterface/PropertyTable/PropertyTableConstants.h"
|
|
|
|
class IPropertyTableCellPresenter;
|
|
|
|
/**
|
|
* A property table custom column used to display text cells in a chosen font
|
|
*/
|
|
class FCustomFontColumn : public IPropertyTableCustomColumn
|
|
{
|
|
public:
|
|
FCustomFontColumn(FSlateFontInfo InFont = FAppStyle::GetFontStyle( PropertyTableConstants::NormalFontStyle ), FOnClicked InOnChangeFontButtonClicked = NULL, FOnInt32ValueCommitted InOnFontSizeValueCommitted = NULL)
|
|
: Font(InFont)
|
|
, OnChangeFontButtonClicked(InOnChangeFontButtonClicked)
|
|
, OnFontSizeValueCommitted(InOnFontSizeValueCommitted)
|
|
{}
|
|
|
|
/** Begin IPropertyTableCustomColumn interface */
|
|
virtual bool Supports( const TSharedRef< IPropertyTableColumn >& Column, const TSharedRef< IPropertyTableUtilities >& Utilities ) const override;
|
|
virtual TSharedPtr< SWidget > CreateColumnLabel( const TSharedRef< IPropertyTableColumn >& Column, const TSharedRef< IPropertyTableUtilities >& Utilities, const FName& Style ) const override;
|
|
virtual TSharedPtr< IPropertyTableCellPresenter > CreateCellPresenter( const TSharedRef< IPropertyTableCell >& Cell, const TSharedRef< IPropertyTableUtilities >& Utilities, const FName& Style ) const override;
|
|
/** End IPropertyTableCustomColumn interface */
|
|
|
|
private:
|
|
|
|
/** Font to use for this column's cells */
|
|
FSlateFontInfo Font;
|
|
|
|
/** List of properties that this Custom Font Column should be used to display */
|
|
TArray<FProperty*> SupportedProperties;
|
|
|
|
/** Function to call when Change Font button clicked */
|
|
FOnClicked OnChangeFontButtonClicked;
|
|
|
|
/** Function to call when Font Size SpinBox's Value is committed */
|
|
FOnInt32ValueCommitted OnFontSizeValueCommitted;
|
|
|
|
public:
|
|
void SetFont(FSlateFontInfo InFont)
|
|
{
|
|
Font = InFont;
|
|
}
|
|
|
|
void AddSupportedProperty(FProperty* Property)
|
|
{
|
|
SupportedProperties.Add(Property);
|
|
}
|
|
|
|
void SetOnChangeFontButtonClicked(FOnClicked InOnClicked)
|
|
{
|
|
OnChangeFontButtonClicked = InOnClicked;
|
|
}
|
|
|
|
void SetOnFontSizeValueCommitted(FOnInt32ValueCommitted InOnFontSizeValueCommitted)
|
|
{
|
|
OnFontSizeValueCommitted = InOnFontSizeValueCommitted;
|
|
}
|
|
};
|
|
|