text-range

Generic Function

Package: common-graphics

Arguments: multi-line-text-widget-or-window start end return-crlf

Returns a string consisting of the text from index start to index end in either a multi-line-editable-text control or a text-edit-pane. If either start or end are outside the range of zero to the length of all the text, these indices are constrained to be within that range, and the length of the returned string will then be less than (- end start).

If return-crlf is true, any line breaks in the control will be represented by CR/LF's (a carriage return character followed by a linefeed character) in the string that is returned. If return-crlf is nil (the default), then the returned string will contain single LF's instead. The trade-off is that single LF's are the newline convention in Allegro, but the Windows multi-line text editing control (used in CG for both rich-edit-pane and text-edit-pane windows) internally uses CR/LF's. Returning CR/LF's may be necessary if your application requires that character positions in a string obtained from a text control need to match the internal positions used by functions such as get-selection and set-selection.

The length of the actual returned string is returned as a second value.

Common Graphics and IDE documentation is described in About Common Graphics and IDE documentation in cgide.htm.

The documentation is described in introduction.htm and the index is in index.htm.

Copyright (c) 1998-2000, Franz Inc. Berkeley, CA., USA. All rights reserved.

Created 2000.10.5.