[]
        
(Showing Draft Content)

GrapeCity.Documents.DX.DirectWrite.ITextAnalysisSource

Interface ITextAnalysisSource

Namespace
GrapeCity.Documents.DX.DirectWrite
Assembly
GcDocs.DX.Windows.dll

IDWriteTextAnalysisSource

[Guid("688e1a58-5094-47c8-adc8-fbcea60ae92b")]
[Shadow(typeof(TextAnalysisSourceShadow))]
public interface ITextAnalysisSource : ICallbackable, IDisposable
Inherited Members
System.IDisposable.Dispose()

Properties

ReadingDirection

Gets the paragraph reading direction.

ReadingDirection ReadingDirection { get; }

Property Value

ReadingDirection

The reading direction of the current paragraph.

Methods

GetLocaleName(int, out int)

Gets the locale name on the range affected by the text analysis.

string GetLocaleName(int textPosition, out int textLength)

Parameters

textPosition int

The text position to examine.

textLength int

Contains the length of the text being affected by the text analysis up to the next differing locale.

Returns

string

the locale name on the range affected by the text analysis

Remarks

The localeName reference must remain valid until the next call or until the analysis returns.

GetNumberSubstitution(int, out int)

Gets the number substitution from the text range affected by the text analysis.

NumberSubstitution GetNumberSubstitution(int textPosition, out int textLength)

Parameters

textPosition int

The starting position from which to report.

textLength int

Contains the length of the text, in characters, remaining in the text range up to the next differing number substitution.

Returns

NumberSubstitution

the number substitution from the text range affected by the text analysis.

Remarks

Any implementation should return the number substitution with an incremented reference count, and the analysis will release when finished with it (either before the next call or before it returns). However, the sink callback may hold onto it after that.

GetTextAtPosition(int)

Gets a block of text starting at the specified text position.

string GetTextAtPosition(int textPosition)

Parameters

textPosition int

The first position of the piece to obtain. All positions are in UTF16 code units, not whole characters, which matters when supplementary characters are used.

Returns

string

a block of text

Remarks

Returning NULL indicates the end of text, which is the position after the last character. This function is called iteratively for each consecutive block, tying together several fragmented blocks in the backing store into a virtual contiguous string. Although applications can implement sparse textual content that maps only part of the backing store, the application must map any text that is in the range passed to any analysis functions.

GetTextBeforePosition(int)

Gets a block of text immediately preceding the specified position.

string GetTextBeforePosition(int textPosition)

Parameters

textPosition int

The position immediately after the last position of the block of text to obtain.

Returns

string

text immediately preceding the specified position

Remarks

NULL indicates no chunk available at the specified position, either because textPosition equals 0, textPosition is greater than the entire text content length, or the queried position is not mapped into the application's backing store. Although applications can implement sparse textual content that maps only part of the backing store, the application must map any text that is in the range passed to any analysis functions.