Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
TextBiDi Namespace Reference

Classes

struct  FTextDirectionInfo
 
class  ITextBiDi
 

Enumerations

enum class  ETextDirection : uint8 { LeftToRight , RightToLeft , Mixed }
 

Functions

TUniquePtr< ITextBiDiCreateTextBiDi ()
 
ETextDirection ComputeTextDirection (const FText &InText)
 
ETextDirection ComputeTextDirection (const FString &InString)
 
ETextDirection ComputeTextDirection (const TCHAR *InString, const int32 InStringStartIndex, const int32 InStringLen)
 
ETextDirection ComputeTextDirection (const FText &InText, const ETextDirection InBaseDirection, TArray< FTextDirectionInfo > &OutTextDirectionInfo)
 
ETextDirection ComputeTextDirection (const FString &InString, const ETextDirection InBaseDirection, TArray< FTextDirectionInfo > &OutTextDirectionInfo)
 
ETextDirection ComputeTextDirection (const TCHAR *InString, const int32 InStringStartIndex, const int32 InStringLen, const ETextDirection InBaseDirection, TArray< FTextDirectionInfo > &OutTextDirectionInfo)
 
ETextDirection ComputeBaseDirection (const FText &InText)
 
ETextDirection ComputeBaseDirection (const FString &InString)
 
ETextDirection ComputeBaseDirection (const TCHAR *InString, const int32 InStringStartIndex, const int32 InStringLen)
 
bool IsControlCharacter (const TCHAR InChar)
 

Detailed Description

Unicode Bidirectional text support http://www.unicode.org/reports/tr9/

Enumeration Type Documentation

◆ ETextDirection

Lists the potential reading directions for text

Enumerator
LeftToRight 

Contains only LTR text - requires simple LTR layout

RightToLeft 

Contains only RTL text - requires simple RTL layout

Mixed 

Contains both LTR and RTL text - requires more complex layout using multiple runs of text

Definition at line 1294 of file Text.h.

Function Documentation

◆ ComputeBaseDirection() [1/3]

ETextDirection TextBiDi::ComputeBaseDirection ( const FString & InString)

◆ ComputeBaseDirection() [2/3]

ETextDirection TextBiDi::ComputeBaseDirection ( const FText & InText)

Utility function which will compute the base direction of the given text. This provides the text flow direction that should be used when combining bidirectional text runs together.

Returns
RightToLeft if the first character in the string has a bidirectional character type of R or AL, otherwise LeftToRight.

◆ ComputeBaseDirection() [3/3]

ETextDirection TextBiDi::ComputeBaseDirection ( const TCHAR * InString,
const int32 InStringStartIndex,
const int32 InStringLen )

◆ ComputeTextDirection() [1/6]

ETextDirection TextBiDi::ComputeTextDirection ( const FString & InString)

◆ ComputeTextDirection() [2/6]

ETextDirection TextBiDi::ComputeTextDirection ( const FString & InString,
const ETextDirection InBaseDirection,
TArray< FTextDirectionInfo > & OutTextDirectionInfo )

◆ ComputeTextDirection() [3/6]

ETextDirection TextBiDi::ComputeTextDirection ( const FText & InText)

Utility function which will compute the reading direction of the given text.

Note
You may want to use the version that returns you the advanced layout data in the Mixed case.
Returns
LeftToRight if all of the text is LTR, RightToLeft if all of the text is RTL, or Mixed if the text contains both LTR and RTL text.

◆ ComputeTextDirection() [4/6]

ETextDirection TextBiDi::ComputeTextDirection ( const FText & InText,
const ETextDirection InBaseDirection,
TArray< FTextDirectionInfo > & OutTextDirectionInfo )

Utility function which will compute the reading direction of the given text, as well as populate any advanced layout data for the text. The base direction is the overall reading direction of the text (see ComputeBaseDirection). This will affect where some characters (such as brackets and quotes) are placed within the resultant FTextDirectionInfo data.

Returns
LeftToRight if all of the text is LTR, RightToLeft if all of the text is RTL, or Mixed if the text contains both LTR and RTL text.

◆ ComputeTextDirection() [5/6]

ETextDirection TextBiDi::ComputeTextDirection ( const TCHAR * InString,
const int32 InStringStartIndex,
const int32 InStringLen )

◆ ComputeTextDirection() [6/6]

ETextDirection TextBiDi::ComputeTextDirection ( const TCHAR * InString,
const int32 InStringStartIndex,
const int32 InStringLen,
const ETextDirection InBaseDirection,
TArray< FTextDirectionInfo > & OutTextDirectionInfo )

◆ CreateTextBiDi()

TUniquePtr< ITextBiDi > TextBiDi::CreateTextBiDi ( )

Create a re-usable BiDi object. This may yield better performance than the utility functions if you're performing a lot of BiDi requests, as this object can re-use allocated data between requests.

◆ IsControlCharacter()

bool TextBiDi::IsControlCharacter ( const TCHAR InChar)

Utility function which tests to see whether the given character is a bidirectional control character.