Carbon


ATSUGetSoftLineBreaks

Header: ATSUnicode.h Carbon status: Supported

Obtains all soft line breaks in a range of text.

OSStatus ATSUGetSoftLineBreaks (
    ATSUTextLayout iTextLayout, 
    UniCharArrayOffset iRangeStart, 
    UniCharCount iRangeLength, 
    ItemCount iMaximumBreaks, 
    UniCharArrayOffset oBreaks[], 
    ItemCount *oBreakCount
);
Parameter descriptions
iTextLayout

A reference to an initialized text layout object containing the range of text whose soft line break positions you wish to obtain. You cannot pass NULL for this parameter.

iRangeStart

The edge offset that corresponds to the beginning of the range of text whose soft line break positions you wish to obtain. To specify the beginning of the text buffer, pass the constant kATSUFromTextBeginning, described in “Text Offset and Length Constants”. To indicate the entire text buffer, pass kATSUFromTextBeginning in this parameter and the constant kATSUToTextEnd in the iRangeLength parameter. If the specified range of text is outside the text buffer, ATSUGetSoftLineBreaks returns the result code kATSUInvalidTextRangeErr.

iRangeLength

The length of the range of text whose soft line break positions you want to obtain. If you want the length to extend to the end of the text buffer, pass the constant kATSUToTextEnd, described in “Text Offset and Length Constants”. To indicate the entire text buffer, pass kATSUToTextEnd in this parameter and the constant kATSUFromTextBeginning in the iRangeStart parameter. If the specified range of text is outside the text buffer, ATSUGetSoftLineBreaks returns the result code kATSUInvalidTextRangeErr.

iMaximumBreaks

The maximum number of soft line breaks you want to obtain. Typically, this is equivalent to the number of elements you allocated for in the oBreaks array. To determine this value, see the discussion below.

oBreaks

An array of edge offsets that correspond to soft line breaks. Before calling ATSUGetSoftLineBreaks, pass a pointer to memory that you have allocated for this array. If you are uncertain of how much memory to allocate, see the discussion below. On return, an array of all the soft line breaks in the range of text.

oBreakCount

On return, a pointer to the actual number of soft line breaks in the range of text. This may be greater than the value you specified in the iMaximumBreaks parameter. You cannot pass NULL for this parameter.

function result

A result code.

VERSION NOTES

Available beginning with ATSUI 1.0.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.5 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)