FSyntaxHighlighterTextLayoutMarshaller

Get/set the raw text to/from a text layout, and also inject syntax highlighting

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Slate

Header

/Engine/Source/Runtime/Slate/Public/Framework/Text/SyntaxHighlighterTextLayoutMarshaller.h

Include

#include "Framework/Text/SyntaxHighlighterTextLayoutMarshaller.h"

Syntax

class FSyntaxHighlighterTextLayoutMarshaller : public FPlainTextLayoutMarshaller

Remarks

Get/set the raw text to/from a text layout, and also inject syntax highlighting

Variables

Name Description

Protected variable

bool

 

bSyntaxHighlightingEnabled

True if syntax highlighting is enabled, false to fallback to plain text

Protected variable

TSharedPtr< FSy...

 

Tokenizer

Tokenizer used to style the text

Constructors

Destructors

Functions

Name Description

Public function

void

 

EnableSyntaxHighlighting

(
    const bool bEnable
)

Public function Const

bool

 

IsSyntaxHighlightingEnabled()

Protected function

void

 

ParseTokens

(
    const FString& SourceString,
    FTextLayout& TargetTextLayout,
    TArray< FSyntaxTokenizer::FTokenize...
)

Overridden from ITextLayoutMarshaller

Name Description

Public function Virtual Const

bool

 

RequiresLiveUpdate()

Return true if the marshaller requires the text be updated "live" (eg, because it inserts formatting directly into the source text) Returning true will cause SetText to be called every time the source text is changed, which is costly, but required for things like syntax highlighting

Public function Virtual

void

 

SetText

(
    const FString& SourceString,
    FTextLayout& TargetTextLayout
)

ITextLayoutMarshaller.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss