TextT.getSelection

Gets the text from the specified selection.

template TextT(TStruct)
string
getSelection
(,
out int startOffset
,
out int endOffset
)

Parameters

selectionNum int

The selection number. The selected regions are assigned numbers that correspond to how far the region is from the start of the text. The selected region closest to the beginning of the text region is assigned the number 0, etc. Note that adding, moving or deleting a selected region can change the numbering.

startOffset int

passes back the start position of the selected region

endOffset int

passes back the end position of (e.g. offset immediately past) the selected region

Return: a newly allocated string containing the selected text. Use g_free() to free the returned string.

Meta