Index

C/C++ Functions

txTextGetSelect

DT_SWORD txTextGetSelect(DT_TXDOC text_doc, DT_SLONG first_char[], DT_SLONG last_char[], DT_SLONG max_array_len)

Short Description: Get text selection(s)

This function retrieves the boundaries of the active text selection(s).

Parameters

ParameterDescription

text_doc

Handle of the associated text document instance.

first_char

An output array of start positions of the selected character range(s).

last_char

An output array of end positions of the selected character range(s).

max_array_len

The size of the first_char and last_char arrays, i.e. the maximum number of selected character ranges these two arrays can hold.

When the text document is configured to support only a single selected character range (i.e. a single text selection), it is sufficient for max_array_len to be 1. When the text document is enabled to support multiple (non-contiguous) or block (rectangular) text selections, your application should use larger first_char and last_char arrays and set the max_array_len value accordingly.

Return Value

When the text document is configured to support only a single selected character range (i.e. a single text selection), this value will be 1. When the text document is enabled to support multiple (non-contiguous) or block (rectangular) text selections, this value will be the number of currently selected character ranges. See the txTextSetParams function for details on how to enable multiple and block selections. The value 0 means that there are no selected character ranges in the text document.

Note

In D-Type Unicode Text Module API, the cursor is a single text selection with equal start and end position (i.e. the length of the selected character range is zero).

Related Functions

txTextSetSelect

 

Index