Carbon


ATSUGetAllLineControls

Header: ATSUnicode.h Carbon status: Supported

Obtains text layout attribute information for a line of text.

OSStatus ATSUGetAllLineControls (
    ATSUTextLayout iLayout, 
    UniCharArrayOffset iLineStart, 
    ATSUAttributeInfo oAttributeInfoArray[], 
    ItemCount iTagValuePairArraySize, 
    ItemCount *oTagValuePairCount
);
Parameter descriptions
iLayout

A reference to an initialized text layout object that contains the line whose attribute information you want to obtain. You cannot pass NULL for this parameter.

iLineStart

The edge offset in backing store memory corresponding to the the beginning of the line whose attribute values you want to determine.

oAttributeInfoArray

An array of attribute tag/value size pairs. Before calling ATSUGetAllAttributes, 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 the tag and value size pairs corresponding to all previously set text layout attribute values in the line.

iTagValuePairArraySize

The maximum number of tag and value size pairs in the line. Typically, this is equivalent to the number of ATSUAttributeInfo structures in the oAttributeInfoArray array. To determine this value, see the discussion below.

oTagValuePairCount

On return, a pointer to the actual number of ATSUAttributeInfo structures in the line. This may be greater than the value you specified in the iTagValuePairArraySize parameter. You cannot pass NULL for this parameter.

function result

A result code.

DISCUSSION

The ATSUGetAllLineControls function determines all previously set text layout attributes contained in a line. You can pass a tag and value size pair that ATSUGetAllLineControls passes back as an element of the oAttributeInfoArray array to the function ATSUGetLineControl to determine the corresponding attribute value. The best way to use ATSUGetAllLineControls is to call it twice:

  1. Pass a reference to the text layout object containing the attribute in the iTextLayout parameter, NULL for the oAttributeInfoArray parameter, and 0 for the other parameters. ATSUGetAllLineControls returns the size of the oAttributeInfoArray array in the oTagValuePairCount parameter.
  2. Allocate enough space for an array of the returned size, then call the function again, passing a pointer in the oAttributeInfoArray parameter. On return, the pointer references the oAttributeInfoArray array.

To determine all previously set text layout attributes contained in a text layout object, call the function ATSUGetAllLayoutControls.

VERSION NOTES

Available beginning with ATSUI 1.1.

AVAILABILITY

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


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