Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

PtTextGetSelection()

Get the selected range from a PtText widget

Synopsis:

int PtTextGetSelection( PtWidget_t *widget,
                        int *start,
                        int *end );

Description:

This function gets the currently selected range from a PtText widget. It returns the number of characters currently selected and sets the provided integers to the actual range. All characters from start up to but not including end are currently selected.

Both start and end are 0-based. So, for example, if start returns as 0, it indicates the first character in the widget's text buffer.

Returns:

The number of characters currently selected, or -1 if the specified widget isn't a PtText widget.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PtText, PtTextSetSelection()