engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
ITextInputMethodContext类 参考abstract

Editable texts should implement this class and maintain an object of this type after registering it. 更多...

#include <ITextInputMethodSystem.h>

Public 成员函数

virtual void BeginComposition ()=0
 Begins composition.
 
virtual void EndComposition ()=0
 Ends composition. 更多...
 
virtual int32 GetCharacterIndexFromPoint (const FVector2D &InPoint)=0
 Gets the index of the code point at the point on the screen. 更多...
 
virtual void GetScreenBounds (FVector2D &OutPosition, FVector2D &OutSize)=0
 Measures the screen-space bounds of the display area available for text. 更多...
 
virtual void GetSelectionRange (uint32 &OutBeginIndex, uint32 &OutLength, ECaretPosition &OutCaretPosition)=0
 Gets the range of code point indices that are selected and which end of the selection the caret is at. 更多...
 
virtual bool GetTextBounds (const uint32 InBeginIndex, const uint32 InLength, FVector2D &OutPosition, FVector2D &OutSize)=0
 Measures the screen-space bounds of the text in the specified range of code points. 更多...
 
virtual void GetTextInRange (const uint32 InBeginIndex, const uint32 InLength, FString &OutString)=0
 Gets the code points in a range of indices. 更多...
 
virtual uint32 GetTextLength ()=0
 Returns the number of code points in the text. 更多...
 
virtual TSharedPtr< FGenericWindow > GetWindow ()=0
 Returns the window in which the text is displayed. 更多...
 
virtual bool IsComposing ()=0
 Returns whether or not this context is currently composing. 更多...
 
virtual bool IsReadOnly ()=0
 Returns whether or not this text is read-only. 更多...
 
virtual void SetSelectionRange (const uint32 InBeginIndex, const uint32 InLength, const ECaretPosition InCaretPosition)=0
 Sets the range of code point indices that are selected and which end of the selection the caret is at. 更多...
 
virtual void SetTextInRange (const uint32 InBeginIndex, const uint32 InLength, const FString &InString)=0
 Sets the code points in a range of indices. 更多...
 
virtual void UpdateCompositionRange (const int32 InBeginIndex, const uint32 InLength)=0
 Updates the range of code point indices being composed. 更多...
 

详细描述

Editable texts should implement this class and maintain an object of this type after registering it.

Methods of this class are called by the system to query contextual information about the state of the editable text. This information is used by the text input method system to provide appropriate processed input. Methods of this class are also called by the system to provide processed text input.

成员函数说明

◆ EndComposition()

virtual void ITextInputMethodContext::EndComposition ( )
pure virtual

Ends composition.

May or may not mean the composition was committed.

◆ GetCharacterIndexFromPoint()

virtual int32 ITextInputMethodContext::GetCharacterIndexFromPoint ( const FVector2D &  InPoint)
pure virtual

Gets the index of the code point at the point on the screen.

参数
InPointThe 2D point on the screen to test for a code point.
返回
The index of the code point at the point on the screen. INDEX_NONE if none was found.

◆ GetScreenBounds()

virtual void ITextInputMethodContext::GetScreenBounds ( FVector2D &  OutPosition,
FVector2D &  OutSize 
)
pure virtual

Measures the screen-space bounds of the display area available for text.

参数
OutPositionThe screen-space position of the top-left bound of the display area.
OutSizeThe screen-space size of the of the display area.

◆ GetSelectionRange()

virtual void ITextInputMethodContext::GetSelectionRange ( uint32 &  OutBeginIndex,
uint32 &  OutLength,
ECaretPosition &  OutCaretPosition 
)
pure virtual

Gets the range of code point indices that are selected and which end of the selection the caret is at.

参数
OutBeginIndexThe code point index at the beginning of the selection range.
OutLengthThe number of code points selected after the beginning index.
OutCaretPositionA flag indicating whether the caret is at the beginning or ending of the range. Irrelevant if the Length is zero.

◆ GetTextBounds()

virtual bool ITextInputMethodContext::GetTextBounds ( const uint32  InBeginIndex,
const uint32  InLength,
FVector2D &  OutPosition,
FVector2D &  OutSize 
)
pure virtual

Measures the screen-space bounds of the text in the specified range of code points.

参数
InBeginIndexThe code point index at the beginning of the range to measure.
InLengthThe number of code points to measure after the beginning index.
OutPositionThe screen-space position of the top-left bound of the specified range of code points.
OutSizeThe screen-space size of the of the specified range of code points.
返回
True if the specified range of code points is drawn clipped. False otherwise.

◆ GetTextInRange()

virtual void ITextInputMethodContext::GetTextInRange ( const uint32  InBeginIndex,
const uint32  InLength,
FString &  OutString 
)
pure virtual

Gets the code points in a range of indices.

参数
InBeginIndexThe code point index at the beginning of the range to get.
InLengthThe number of code points to get after the beginning index.
OutStringA string to store the code points being returned.

◆ GetTextLength()

virtual uint32 ITextInputMethodContext::GetTextLength ( )
pure virtual

Returns the number of code points in the text.

返回
The number of code points in the text.

◆ GetWindow()

virtual TSharedPtr< FGenericWindow > ITextInputMethodContext::GetWindow ( )
pure virtual

Returns the window in which the text is displayed.

返回
The window in which the text is displayed.

◆ IsComposing()

virtual bool ITextInputMethodContext::IsComposing ( )
pure virtual

Returns whether or not this context is currently composing.

注解
This should be set to true when BeginComposition is called, and false when EndComposition is called.
返回
True if we are composing, false otherwise.

◆ IsReadOnly()

virtual bool ITextInputMethodContext::IsReadOnly ( )
pure virtual

Returns whether or not this text is read-only.

返回
True if the text is read-only, false otherwise.

◆ SetSelectionRange()

virtual void ITextInputMethodContext::SetSelectionRange ( const uint32  InBeginIndex,
const uint32  InLength,
const ECaretPosition  InCaretPosition 
)
pure virtual

Sets the range of code point indices that are selected and which end of the selection the caret is at.

参数
InBeginIndexThe code point index at the beginning of the selection range.
InLengthThe number of code points selected after the beginning index.
InCaretPositionA flag indicating whether the caret is at the beginning or ending of the range. Irrelevant if the Length is zero.

◆ SetTextInRange()

virtual void ITextInputMethodContext::SetTextInRange ( const uint32  InBeginIndex,
const uint32  InLength,
const FString &  InString 
)
pure virtual

Sets the code points in a range of indices.

参数
InBeginIndexThe code point index at the beginning of the range to set.
InLengthThe number of code points to set after the beginning index.
InStringA string of the code points to be set.

◆ UpdateCompositionRange()

virtual void ITextInputMethodContext::UpdateCompositionRange ( const int32  InBeginIndex,
const uint32  InLength 
)
pure virtual

Updates the range of code point indices being composed.

These code points should be displayed in some manner to communicate they are being composed. IE: Highlighted and underlined.

参数
InBeginIndexThe code point index at the beginning of the range being composed.
InLengthThe number of code points to measure after the beginning index.

该类的文档由以下文件生成: