UDocumentation
UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ITextDecorator.h
Go to the documentation of this file.
1
// Copyright Epic Games, Inc. All Rights Reserved.
2
#pragma once
3
4
#include "
CoreMinimal.h
"
5
#include "
SlateGlobals.h
"
6
#include "
Framework/Text/IRun.h
"
7
#include "
Framework/Text/ISlateRun.h
"
8
9
class
ISlateStyle
;
10
11
#if WITH_FANCY_TEXT
12
13
struct
FTextRunParseResults
14
{
15
FTextRunParseResults
( FString InName,
const
FTextRange
&
InOriginalRange
)
16
:
Name
( InName )
17
,
OriginalRange
(
InOriginalRange
)
18
,
MetaData
()
19
{
20
21
}
22
23
FTextRunParseResults
( FString InName,
const
FTextRange
&
InOriginalRange
,
const
FTextRange
&
InContentRange
)
24
:
Name
( InName )
25
,
OriginalRange
(
InOriginalRange
)
26
,
ContentRange
(
InContentRange
)
27
,
MetaData
()
28
{
29
30
}
31
32
FString
Name
;
33
FTextRange
OriginalRange
;
34
FTextRange
ContentRange
;
35
TMap< FString, FTextRange >
MetaData
;
36
};
37
38
struct
FTextLineParseResults
39
{
40
public
:
41
42
FTextLineParseResults
()
43
:
Range
( )
44
, Runs()
45
{
46
47
}
48
49
FTextLineParseResults
(
const
FTextRange
& InRange)
50
:
Range
( InRange )
51
, Runs()
52
{
53
54
}
55
56
FTextRange
Range
;
57
TArray< FTextRunParseResults >
Runs;
58
};
59
60
struct
FTextRunInfo
:
FRunInfo
61
{
62
FTextRunInfo
( FString InName,
const
FText
&
InContent
)
63
:
FRunInfo
(
MoveTemp
(InName) )
64
,
Content
(
InContent
)
65
{
66
67
}
68
69
FText
Content
;
70
};
71
72
class
ITextDecorator
73
{
74
public
:
75
76
virtual
~ITextDecorator
() {}
77
78
virtual
bool
Supports(
const
FTextRunParseResults
& RunInfo,
const
FString&
Text
)
const
= 0;
79
80
virtual
TSharedRef< ISlateRun >
Create
(
const
TSharedRef<class FTextLayout>
& TextLayout,
const
FTextRunParseResults
& RunInfo,
const
FString& OriginalText,
const
TSharedRef< FString >
&
ModelText
,
const
ISlateStyle
* Style ) = 0;
81
};
82
83
#endif
//WITH_FANCY_TEXT
CoreMinimal.h
StaticCastSharedRef
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition
SharedPointer.h:127
EDatasmithElementType::MetaData
@ MetaData
IRun.h
ISlateRun.h
SlateGlobals.h
EArchiveValueType::Text
@ Text
MoveTemp
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTemp(T &&Obj) noexcept
Definition
UnrealTemplate.h:520
EVersePackageType::Content
@ Content
EVariantTypes::Name
@ Name
ECreateIfNeeded::Create
@ Create
FText
Definition
Text.h:385
ISlateStyle
Definition
ISlateStyle.h:18
TArray
Definition
Array.h:670
TMap
Definition
UnrealString.h.inl:34
TSharedRef
Definition
SharedPointer.h:153
EEnvTestFilterType::Range
@ Range
Definition
EnvQueryTypes.h:81
FRunInfo
Definition
IRun.h:14
FTextRange
Definition
UnrealString.h:234
Engine
Source
Runtime
Slate
Public
Framework
Text
ITextDecorator.h
Generated by
1.9.8