Files
UnrealEngineUWP/Engine/Source/Runtime/Slate/Public/Framework/Text/IRichTextMarkupWriter.h
ryan durand 0f0464a30e Updating copyright for Engine Runtime.
#rnx
#rb none


#ROBOMERGE-OWNER: ryan.durand
#ROBOMERGE-AUTHOR: ryan.durand
#ROBOMERGE-SOURCE: CL 10869210 via CL 10869511 via CL 10869900
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870549 by ryan durand in Main branch]
2019-12-26 14:45:42 -05:00

48 lines
1011 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "SlateGlobals.h"
#include "Framework/Text/IRun.h"
#if WITH_FANCY_TEXT
/**
*/
class SLATE_API IRichTextMarkupWriter
{
public:
/** A single run in a rich-text line, contains the meta-information that was parsed out of it, as well as the lexical contents of the run */
struct FRichTextRun
{
FRichTextRun(const FRunInfo& InInfo, FString InText)
: Info(InInfo)
, Text(MoveTemp(InText))
{
}
FRunInfo Info;
FString Text;
};
/** A single line in a rich-text document, comprising of a number of styled runs */
struct FRichTextLine
{
TArray<FRichTextRun> Runs;
};
/**
* Virtual destructor
*/
virtual ~IRichTextMarkupWriter() {}
/**
* Write the provided array of line and run info, producing an output string containing the markup needed to persist the run layouts
*/
virtual void Write(const TArray<FRichTextLine>& InLines, FString& Output) = 0;
};
#endif //WITH_FANCY_TEXT