2019-12-26 14:45:42 -05:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
2014-03-14 14:13:41 -04:00
|
|
|
|
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3209340)
#lockdown Nick.Penwarden
#rb none
==========================
MAJOR FEATURES + CHANGES
==========================
Change 3209340 on 2016/11/23 by Ben.Marsh
Convert UE4 codebase to an "include what you use" model - where every header just includes the dependencies it needs, rather than every source file including large monolithic headers like Engine.h and UnrealEd.h.
Measured full rebuild times around 2x faster using XGE on Windows, and improvements of 25% or more for incremental builds and full rebuilds on most other platforms.
* Every header now includes everything it needs to compile.
* There's a CoreMinimal.h header that gets you a set of ubiquitous types from Core (eg. FString, FName, TArray, FVector, etc...). Most headers now include this first.
* There's a CoreTypes.h header that sets up primitive UE4 types and build macros (int32, PLATFORM_WIN64, etc...). All headers in Core include this first, as does CoreMinimal.h.
* Every .cpp file includes its matching .h file first.
* This helps validate that each header is including everything it needs to compile.
* No engine code includes a monolithic header such as Engine.h or UnrealEd.h any more.
* You will get a warning if you try to include one of these from the engine. They still exist for compatibility with game projects and do not produce warnings when included there.
* There have only been minor changes to our internal games down to accommodate these changes. The intent is for this to be as seamless as possible.
* No engine code explicitly includes a precompiled header any more.
* We still use PCHs, but they're force-included on the compiler command line by UnrealBuildTool instead. This lets us tune what they contain without breaking any existing include dependencies.
* PCHs are generated by a tool to get a statistical amount of coverage for the source files using it, and I've seeded the new shared PCHs to contain any header included by > 15% of source files.
Tool used to generate this transform is at Engine\Source\Programs\IncludeTool.
[CL 3209342 by Ben Marsh in Main branch]
2016-11-23 15:48:37 -05:00
|
|
|
#include "Framework/Text/SlateHyperlinkRun.h"
|
|
|
|
|
#include "Widgets/DeclarativeSyntaxSupport.h"
|
|
|
|
|
#include "Fonts/FontMeasure.h"
|
|
|
|
|
#include "Framework/Application/SlateApplication.h"
|
|
|
|
|
#include "Framework/Text/WidgetLayoutBlock.h"
|
2014-07-23 08:23:21 -04:00
|
|
|
|
|
|
|
|
#if WITH_FANCY_TEXT
|
|
|
|
|
|
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3209340)
#lockdown Nick.Penwarden
#rb none
==========================
MAJOR FEATURES + CHANGES
==========================
Change 3209340 on 2016/11/23 by Ben.Marsh
Convert UE4 codebase to an "include what you use" model - where every header just includes the dependencies it needs, rather than every source file including large monolithic headers like Engine.h and UnrealEd.h.
Measured full rebuild times around 2x faster using XGE on Windows, and improvements of 25% or more for incremental builds and full rebuilds on most other platforms.
* Every header now includes everything it needs to compile.
* There's a CoreMinimal.h header that gets you a set of ubiquitous types from Core (eg. FString, FName, TArray, FVector, etc...). Most headers now include this first.
* There's a CoreTypes.h header that sets up primitive UE4 types and build macros (int32, PLATFORM_WIN64, etc...). All headers in Core include this first, as does CoreMinimal.h.
* Every .cpp file includes its matching .h file first.
* This helps validate that each header is including everything it needs to compile.
* No engine code includes a monolithic header such as Engine.h or UnrealEd.h any more.
* You will get a warning if you try to include one of these from the engine. They still exist for compatibility with game projects and do not produce warnings when included there.
* There have only been minor changes to our internal games down to accommodate these changes. The intent is for this to be as seamless as possible.
* No engine code explicitly includes a precompiled header any more.
* We still use PCHs, but they're force-included on the compiler command line by UnrealBuildTool instead. This lets us tune what they contain without breaking any existing include dependencies.
* PCHs are generated by a tool to get a statistical amount of coverage for the source files using it, and I've seeded the new shared PCHs to contain any header included by > 15% of source files.
Tool used to generate this transform is at Engine\Source\Programs\IncludeTool.
[CL 3209342 by Ben Marsh in Main branch]
2016-11-23 15:48:37 -05:00
|
|
|
#include "Widgets/Input/SRichTextHyperlink.h"
|
|
|
|
|
#include "Framework/Text/ShapedTextCache.h"
|
|
|
|
|
#include "Framework/Text/RunUtils.h"
|
2014-03-14 14:13:41 -04:00
|
|
|
|
2014-09-12 06:48:53 -04:00
|
|
|
TSharedRef< FSlateHyperlinkRun > FSlateHyperlinkRun::Create( const FRunInfo& InRunInfo, const TSharedRef< const FString >& InText, const FHyperlinkStyle& InStyle, FOnClick NavigateDelegate, FOnGenerateTooltip InTooltipDelegate, FOnGetTooltipText InTooltipTextDelegate )
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
2014-09-12 06:48:53 -04:00
|
|
|
return MakeShareable( new FSlateHyperlinkRun( InRunInfo, InText, InStyle, NavigateDelegate, InTooltipDelegate, InTooltipTextDelegate ) );
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
|
2014-09-12 06:48:53 -04:00
|
|
|
TSharedRef< FSlateHyperlinkRun > FSlateHyperlinkRun::Create( const FRunInfo& InRunInfo, const TSharedRef< const FString >& InText, const FHyperlinkStyle& InStyle, FOnClick NavigateDelegate, FOnGenerateTooltip InTooltipDelegate, FOnGetTooltipText InTooltipTextDelegate, const FTextRange& InRange )
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
2014-09-12 06:48:53 -04:00
|
|
|
return MakeShareable( new FSlateHyperlinkRun( InRunInfo, InText, InStyle, NavigateDelegate, InTooltipDelegate, InTooltipTextDelegate, InRange ) );
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FTextRange FSlateHyperlinkRun::GetTextRange() const
|
|
|
|
|
{
|
|
|
|
|
return Range;
|
|
|
|
|
}
|
|
|
|
|
|
2014-06-09 11:14:37 -04:00
|
|
|
void FSlateHyperlinkRun::SetTextRange( const FTextRange& Value )
|
|
|
|
|
{
|
|
|
|
|
Range = Value;
|
|
|
|
|
}
|
|
|
|
|
|
2014-03-14 14:13:41 -04:00
|
|
|
int16 FSlateHyperlinkRun::GetBaseLine( float Scale ) const
|
|
|
|
|
{
|
|
|
|
|
const TSharedRef< FSlateFontMeasure > FontMeasure = FSlateApplication::Get().GetRenderer()->GetFontMeasureService();
|
2014-10-30 17:05:23 -04:00
|
|
|
return FontMeasure->GetBaseline( Style.TextStyle.Font, Scale ) - FMath::Min(0.0f, Style.TextStyle.ShadowOffset.Y * Scale);
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int16 FSlateHyperlinkRun::GetMaxHeight( float Scale ) const
|
|
|
|
|
{
|
|
|
|
|
const TSharedRef< FSlateFontMeasure > FontMeasure = FSlateApplication::Get().GetRenderer()->GetFontMeasureService();
|
2014-10-30 17:05:23 -04:00
|
|
|
return FontMeasure->GetMaxCharacterHeight( Style.TextStyle.Font, Scale ) + FMath::Abs(Style.TextStyle.ShadowOffset.Y * Scale);
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
|
2015-11-04 16:14:13 -05:00
|
|
|
FVector2D FSlateHyperlinkRun::Measure( int32 StartIndex, int32 EndIndex, float Scale, const FRunTextContext& TextContext ) const
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
2014-10-30 17:05:23 -04:00
|
|
|
const FVector2D ShadowOffsetToApply((EndIndex == Range.EndIndex) ? FMath::Abs(Style.TextStyle.ShadowOffset.X * Scale) : 0.0f, FMath::Abs(Style.TextStyle.ShadowOffset.Y * Scale));
|
2014-10-08 05:42:44 -04:00
|
|
|
|
2014-03-14 14:13:41 -04:00
|
|
|
if ( EndIndex - StartIndex == 0 )
|
|
|
|
|
{
|
2014-10-30 17:05:23 -04:00
|
|
|
return FVector2D( ShadowOffsetToApply.X * Scale, GetMaxHeight( Scale ) );
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
|
2016-01-22 08:13:18 -05:00
|
|
|
// Use the full text range (rather than the run range) so that text that spans runs will still be shaped correctly
|
|
|
|
|
return ShapedTextCacheUtil::MeasureShapedText(TextContext.ShapedTextCache, FCachedShapedTextKey(FTextRange(0, Text->Len()), Scale, TextContext, Style.TextStyle.Font), FTextRange(StartIndex, EndIndex), **Text) + ShadowOffsetToApply;
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
|
2015-11-04 16:14:13 -05:00
|
|
|
int8 FSlateHyperlinkRun::GetKerning( int32 CurrentIndex, float Scale, const FRunTextContext& TextContext ) const
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
2015-11-04 16:14:13 -05:00
|
|
|
TSharedRef< ILayoutBlock > FSlateHyperlinkRun::CreateBlock( int32 StartIndex, int32 EndIndex, FVector2D Size, const FLayoutBlockTextContext& TextContext, const TSharedPtr< IRunRenderer >& Renderer )
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
2014-09-12 05:28:34 -04:00
|
|
|
FText ToolTipText;
|
|
|
|
|
TSharedPtr<IToolTip> ToolTip;
|
|
|
|
|
|
|
|
|
|
if(TooltipDelegate.IsBound())
|
|
|
|
|
{
|
|
|
|
|
ToolTip = TooltipDelegate.Execute(RunInfo.MetaData);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
const FString* Url = RunInfo.MetaData.Find(TEXT("href"));
|
|
|
|
|
if(TooltipTextDelegate.IsBound())
|
|
|
|
|
{
|
|
|
|
|
ToolTipText = TooltipTextDelegate.Execute(RunInfo.MetaData);
|
|
|
|
|
}
|
|
|
|
|
else if(Url != nullptr)
|
|
|
|
|
{
|
|
|
|
|
ToolTipText = FText::FromString(*Url);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-03-14 14:13:41 -04:00
|
|
|
TSharedRef< SWidget > Widget = SNew( SRichTextHyperlink, ViewModel )
|
|
|
|
|
.Style( &Style )
|
|
|
|
|
.Text( FText::FromString( FString( EndIndex - StartIndex, **Text + StartIndex ) ) )
|
2014-09-12 05:28:34 -04:00
|
|
|
.ToolTip( ToolTip )
|
|
|
|
|
.ToolTipText( ToolTipText )
|
2015-11-04 16:14:13 -05:00
|
|
|
.OnNavigate( this, &FSlateHyperlinkRun::OnNavigate )
|
|
|
|
|
.TextShapingMethod( TextContext.TextShapingMethod );
|
2014-09-18 08:10:53 -04:00
|
|
|
|
|
|
|
|
// We need to do a prepass here as CreateBlock can be called after the main Slate prepass has been run,
|
|
|
|
|
// which can result in the hyperlink widget not being correctly setup before it is painted
|
|
|
|
|
Widget->SlatePrepass();
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
Children.Add( Widget );
|
|
|
|
|
|
2015-11-04 16:14:13 -05:00
|
|
|
return FWidgetLayoutBlock::Create( SharedThis( this ), Widget, FTextRange( StartIndex, EndIndex ), Size, TextContext, Renderer );
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void FSlateHyperlinkRun::OnNavigate()
|
|
|
|
|
{
|
2014-08-07 06:46:11 -04:00
|
|
|
NavigateDelegate.Execute( RunInfo.MetaData );
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
|
2021-07-20 13:19:19 -04:00
|
|
|
int32 FSlateHyperlinkRun::OnPaint(const FPaintArgs& PaintArgs, const FTextArgs& TextArgs, const FGeometry& AllottedGeometry, const FSlateRect& MyCullingRect, FSlateWindowElementList& OutDrawElements, int32 LayerId, const FWidgetStyle& InWidgetStyle, bool bParentEnabled) const
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
2021-07-20 13:19:19 -04:00
|
|
|
const TSharedRef< FWidgetLayoutBlock > WidgetBlock = StaticCastSharedRef< FWidgetLayoutBlock >(TextArgs.Block);
|
2014-03-14 14:13:41 -04:00
|
|
|
|
2014-09-04 15:41:07 -04:00
|
|
|
// The block size and offset values are pre-scaled, so we need to account for that when converting the block offsets into paint geometry
|
|
|
|
|
const float InverseScale = Inverse(AllottedGeometry.Scale);
|
|
|
|
|
|
2021-07-20 13:19:19 -04:00
|
|
|
const FGeometry WidgetGeometry = AllottedGeometry.MakeChild(TransformVector(InverseScale, TextArgs.Block->GetSize()), FSlateLayoutTransform(TransformPoint(InverseScale, TextArgs.Block->GetLocationOffset())));
|
|
|
|
|
return WidgetBlock->GetWidget()->Paint(PaintArgs, WidgetGeometry, MyCullingRect, OutDrawElements, LayerId, InWidgetStyle, bParentEnabled);
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
|
2014-07-28 06:53:40 -04:00
|
|
|
const TArray< TSharedRef<SWidget> >& FSlateHyperlinkRun::GetChildren()
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
2014-07-28 06:53:40 -04:00
|
|
|
return Children;
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void FSlateHyperlinkRun::ArrangeChildren( const TSharedRef< ILayoutBlock >& Block, const FGeometry& AllottedGeometry, FArrangedChildren& ArrangedChildren ) const
|
|
|
|
|
{
|
|
|
|
|
const TSharedRef< FWidgetLayoutBlock > WidgetBlock = StaticCastSharedRef< FWidgetLayoutBlock >( Block );
|
2014-09-04 15:41:07 -04:00
|
|
|
|
|
|
|
|
// The block size and offset values are pre-scaled, so we need to account for that when converting the block offsets into paint geometry
|
|
|
|
|
const float InverseScale = Inverse(AllottedGeometry.Scale);
|
|
|
|
|
|
|
|
|
|
ArrangedChildren.AddWidget(
|
|
|
|
|
AllottedGeometry.MakeChild(WidgetBlock->GetWidget(), TransformVector(InverseScale, Block->GetSize()), FSlateLayoutTransform(TransformPoint(InverseScale, Block->GetLocationOffset())))
|
|
|
|
|
);
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
|
2014-07-21 06:48:45 -04:00
|
|
|
int32 FSlateHyperlinkRun::GetTextIndexAt( const TSharedRef< ILayoutBlock >& Block, const FVector2D& Location, float Scale, ETextHitPoint* const OutHitPoint ) const
|
2014-06-09 11:14:37 -04:00
|
|
|
{
|
2014-08-07 06:46:11 -04:00
|
|
|
const FVector2D& BlockOffset = Block->GetLocationOffset();
|
|
|
|
|
const FVector2D& BlockSize = Block->GetSize();
|
|
|
|
|
|
|
|
|
|
const float Left = BlockOffset.X;
|
|
|
|
|
const float Top = BlockOffset.Y;
|
|
|
|
|
const float Right = BlockOffset.X + BlockSize.X;
|
|
|
|
|
const float Bottom = BlockOffset.Y + BlockSize.Y;
|
|
|
|
|
|
|
|
|
|
const bool ContainsPoint = Location.X >= Left && Location.X < Right && Location.Y >= Top && Location.Y < Bottom;
|
|
|
|
|
|
|
|
|
|
if ( !ContainsPoint )
|
|
|
|
|
{
|
|
|
|
|
return INDEX_NONE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const FTextRange BlockRange = Block->GetTextRange();
|
2016-01-22 08:13:18 -05:00
|
|
|
const FLayoutBlockTextContext BlockTextContext = Block->GetTextContext();
|
2014-08-07 06:46:11 -04:00
|
|
|
|
2016-01-22 08:13:18 -05:00
|
|
|
// Use the full text range (rather than the run range) so that text that spans runs will still be shaped correctly
|
|
|
|
|
const int32 Index = ShapedTextCacheUtil::FindCharacterIndexAtOffset(BlockTextContext.ShapedTextCache, FCachedShapedTextKey(FTextRange(0, Text->Len()), Scale, BlockTextContext, Style.TextStyle.Font), BlockRange, **Text, Location.X - BlockOffset.X);
|
2014-08-07 06:46:11 -04:00
|
|
|
if (OutHitPoint)
|
|
|
|
|
{
|
2016-01-22 08:13:18 -05:00
|
|
|
*OutHitPoint = RunUtils::CalculateTextHitPoint(Index, BlockRange, BlockTextContext.TextDirection);
|
2014-08-07 06:46:11 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return Index;
|
2014-06-09 11:14:37 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FVector2D FSlateHyperlinkRun::GetLocationAt( const TSharedRef< ILayoutBlock >& Block, int32 Offset, float Scale ) const
|
|
|
|
|
{
|
2016-01-22 08:13:18 -05:00
|
|
|
const FVector2D& BlockOffset = Block->GetLocationOffset();
|
|
|
|
|
const FTextRange& BlockRange = Block->GetTextRange();
|
|
|
|
|
const FLayoutBlockTextContext BlockTextContext = Block->GetTextContext();
|
|
|
|
|
|
|
|
|
|
// Use the full text range (rather than the run range) so that text that spans runs will still be shaped correctly
|
|
|
|
|
const FTextRange RangeToMeasure = RunUtils::CalculateOffsetMeasureRange(Offset, BlockRange, BlockTextContext.TextDirection);
|
|
|
|
|
const FVector2D OffsetLocation = ShapedTextCacheUtil::MeasureShapedText(BlockTextContext.ShapedTextCache, FCachedShapedTextKey(FTextRange(0, Text->Len()), Scale, BlockTextContext, Style.TextStyle.Font), RangeToMeasure, **Text);
|
|
|
|
|
|
|
|
|
|
return BlockOffset + OffsetLocation;
|
2014-06-09 11:14:37 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void FSlateHyperlinkRun::Move(const TSharedRef<FString>& NewText, const FTextRange& NewRange)
|
|
|
|
|
{
|
|
|
|
|
Text = NewText;
|
|
|
|
|
Range = NewRange;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TSharedRef<IRun> FSlateHyperlinkRun::Clone() const
|
|
|
|
|
{
|
2014-09-12 06:48:53 -04:00
|
|
|
return FSlateHyperlinkRun::Create(RunInfo, Text, Style, NavigateDelegate, TooltipDelegate, TooltipTextDelegate, Range);
|
2014-06-09 11:14:37 -04:00
|
|
|
}
|
|
|
|
|
|
2014-08-07 06:46:11 -04:00
|
|
|
void FSlateHyperlinkRun::AppendTextTo(FString& AppendToText) const
|
2014-06-09 11:14:37 -04:00
|
|
|
{
|
|
|
|
|
AppendToText.Append(**Text + Range.BeginIndex, Range.Len());
|
|
|
|
|
}
|
|
|
|
|
|
2014-08-07 06:46:11 -04:00
|
|
|
void FSlateHyperlinkRun::AppendTextTo(FString& AppendToText, const FTextRange& PartialRange) const
|
2014-06-09 11:14:37 -04:00
|
|
|
{
|
|
|
|
|
check(Range.BeginIndex <= PartialRange.BeginIndex);
|
|
|
|
|
check(Range.EndIndex >= PartialRange.EndIndex);
|
|
|
|
|
|
|
|
|
|
AppendToText.Append(**Text + PartialRange.BeginIndex, PartialRange.Len());
|
|
|
|
|
}
|
|
|
|
|
|
2014-08-07 06:46:11 -04:00
|
|
|
const FRunInfo& FSlateHyperlinkRun::GetRunInfo() const
|
|
|
|
|
{
|
|
|
|
|
return RunInfo;
|
|
|
|
|
}
|
|
|
|
|
|
2014-09-18 08:09:29 -04:00
|
|
|
ERunAttributes FSlateHyperlinkRun::GetRunAttributes() const
|
|
|
|
|
{
|
|
|
|
|
return ERunAttributes::SupportsText;
|
|
|
|
|
}
|
|
|
|
|
|
2014-09-12 06:48:53 -04:00
|
|
|
FSlateHyperlinkRun::FSlateHyperlinkRun( const FRunInfo& InRunInfo, const TSharedRef< const FString >& InText, const FHyperlinkStyle& InStyle, FOnClick InNavigateDelegate, FOnGenerateTooltip InTooltipDelegate, FOnGetTooltipText InTooltipTextDelegate )
|
2014-08-07 06:46:11 -04:00
|
|
|
: RunInfo( InRunInfo )
|
|
|
|
|
, Text( InText )
|
2014-03-14 14:13:41 -04:00
|
|
|
, Range( 0, Text->Len() )
|
|
|
|
|
, Style( InStyle )
|
|
|
|
|
, NavigateDelegate( InNavigateDelegate )
|
2014-09-12 06:48:53 -04:00
|
|
|
, TooltipDelegate( InTooltipDelegate )
|
|
|
|
|
, TooltipTextDelegate( InTooltipTextDelegate )
|
2014-03-14 14:13:41 -04:00
|
|
|
, ViewModel( MakeShareable( new FSlateHyperlinkRun::FWidgetViewModel() ) )
|
|
|
|
|
, Children()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2014-09-12 06:48:53 -04:00
|
|
|
FSlateHyperlinkRun::FSlateHyperlinkRun( const FRunInfo& InRunInfo, const TSharedRef< const FString >& InText, const FHyperlinkStyle& InStyle, FOnClick InNavigateDelegate, FOnGenerateTooltip InTooltipDelegate, FOnGetTooltipText InTooltipTextDelegate, const FTextRange& InRange )
|
2014-08-07 06:46:11 -04:00
|
|
|
: RunInfo( InRunInfo )
|
|
|
|
|
, Text( InText )
|
2014-03-14 14:13:41 -04:00
|
|
|
, Range( InRange )
|
|
|
|
|
, Style( InStyle )
|
|
|
|
|
, NavigateDelegate( InNavigateDelegate )
|
2014-09-12 06:48:53 -04:00
|
|
|
, TooltipDelegate( InTooltipDelegate )
|
|
|
|
|
, TooltipTextDelegate( InTooltipTextDelegate )
|
2014-03-14 14:13:41 -04:00
|
|
|
, ViewModel( MakeShareable( new FSlateHyperlinkRun::FWidgetViewModel() ) )
|
|
|
|
|
, Children()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FSlateHyperlinkRun::FSlateHyperlinkRun( const FSlateHyperlinkRun& Run )
|
2014-08-07 06:46:11 -04:00
|
|
|
: RunInfo( Run.RunInfo )
|
|
|
|
|
, Text( Run.Text )
|
2014-03-14 14:13:41 -04:00
|
|
|
, Range( Run.Range )
|
|
|
|
|
, Style( Run.Style )
|
|
|
|
|
, NavigateDelegate( Run.NavigateDelegate )
|
2014-09-12 06:48:53 -04:00
|
|
|
, TooltipDelegate( Run.TooltipDelegate )
|
|
|
|
|
, TooltipTextDelegate( Run.TooltipTextDelegate )
|
2014-03-14 14:13:41 -04:00
|
|
|
, ViewModel( MakeShareable( new FSlateHyperlinkRun::FWidgetViewModel() ) )
|
|
|
|
|
, Children()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2014-07-23 08:23:21 -04:00
|
|
|
|
|
|
|
|
|
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3209340)
#lockdown Nick.Penwarden
#rb none
==========================
MAJOR FEATURES + CHANGES
==========================
Change 3209340 on 2016/11/23 by Ben.Marsh
Convert UE4 codebase to an "include what you use" model - where every header just includes the dependencies it needs, rather than every source file including large monolithic headers like Engine.h and UnrealEd.h.
Measured full rebuild times around 2x faster using XGE on Windows, and improvements of 25% or more for incremental builds and full rebuilds on most other platforms.
* Every header now includes everything it needs to compile.
* There's a CoreMinimal.h header that gets you a set of ubiquitous types from Core (eg. FString, FName, TArray, FVector, etc...). Most headers now include this first.
* There's a CoreTypes.h header that sets up primitive UE4 types and build macros (int32, PLATFORM_WIN64, etc...). All headers in Core include this first, as does CoreMinimal.h.
* Every .cpp file includes its matching .h file first.
* This helps validate that each header is including everything it needs to compile.
* No engine code includes a monolithic header such as Engine.h or UnrealEd.h any more.
* You will get a warning if you try to include one of these from the engine. They still exist for compatibility with game projects and do not produce warnings when included there.
* There have only been minor changes to our internal games down to accommodate these changes. The intent is for this to be as seamless as possible.
* No engine code explicitly includes a precompiled header any more.
* We still use PCHs, but they're force-included on the compiler command line by UnrealBuildTool instead. This lets us tune what they contain without breaking any existing include dependencies.
* PCHs are generated by a tool to get a statistical amount of coverage for the source files using it, and I've seeded the new shared PCHs to contain any header included by > 15% of source files.
Tool used to generate this transform is at Engine\Source\Programs\IncludeTool.
[CL 3209342 by Ben Marsh in Main branch]
2016-11-23 15:48:37 -05:00
|
|
|
#endif //WITH_FANCY_TEXT
|