![]() |
ATSUSetLayoutControls |
||||
Header: | ATSUnicode.h | Carbon status: | Supported | |
Sets text layout attributes in a text layout object.
OSStatus ATSUSetLayoutControls ( ATSUTextLayout iLayout, ItemCount iAttributeCount, ATSUAttributeTag iTag[], ByteCount iValueSize[], ATSUAttributeValuePtr iValue[] );
A reference to an initialized text layout object whose attributes you want to set. You cannot pass NULL for this parameter.
The number of attributes you want to set. This value should correspond to the number of elements in the iTag and iValueSize arrays.
An array of attribute tags. Each element in the array must contain a valid tag that corresponds to the text layout attribute value you wish to set. See
An array of attribute sizes. Each element in the array must contain the size (in bytes) of the corresponding text layout attribute value being set. If you pass a size that is less than required, ATSUSetLayoutControls returns the result code kATSUInvalidAttributeSizeErr, and the function sets no attributes. If, after having checked all the given sizes and found them acceptable, ATSUSetLayoutControls sets text layout attributes. You cannot pass NULL for this parameter.
An array of attribute value pointers. Each pointer in the array must reference a valid value and correspond to a tag in the iTag array. If you pass an invalid or undefined value, ATSUSetLayoutControls returns the result code kATSUInvalidAttributeValueErr. You cannot pass NULL for this parameter.
A result code. If there is a function error, ATSUSetLayoutControls will not set any text layout attributes in the text layout object.
The ATSUSetLayoutControls function enables you to set multipe text layout attribute values in a text layout object. Any unset style run attributes are assigned default values.
To set text layout attributes in a single line of a text layout object, call the function ATSUSetLineControls. Note that when you set a text layout attribute value for a line, this value will override the value of the text layout attribute set for the text layout object containing the line. This is true even if the attributes for the line are set before those of the entire text layout object containing the line.
ATSUSetLayoutControls may allocate memory in your application heap, unless you designate a different heap by calling the function ATSUCreateMemorySetting.
Available beginning with ATSUI 1.0.
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)