Carbon


TXNSetTypeAttributes

Header: MacTextEditor.h Carbon status: Supported

Sets text attributes (such as size and style) for the current selection or the text defined by a range you specify.

OSStatus TXNSetTypeAttributes (
    TXNObject iTXNObject, 
    ItemCount iAttrCount, 
    TXNTypeAttributes iAttributes[], 
    TXNOffset iStartOffset, 
    TXNOffset iEndOffset
);
Parameter descriptions
iTXNObject

A variable of type TXNObject. Pass the text object that contains the current selection.

iAttrCount

A variable of type ItemCount. You use this to specify the number of type attributes in the iAttributes array.

iAttributes

An array of TXNTypeAttributes structures.You use this to specify the attributes you want to set. Values passed in the iAttributes array that are less than or equal to sizeof(UInt32) are passed by value. Values greater than sizeof(UInt32) are passed as a pointer. That is, the third field of the TXNTypeAttributes structure is a union that serves as either a 32-bit integer or a 32-bit pointer.

iStartOffset

A variable of type TXNOffset. You use this to specify the starting offset where you want the application to begin setting these attributes. If you want to use the current selection, set iStartOffset to kTXNUseCurrentSelection.

iEndOffset

A variable of type TXNOffset. You use this to specify the offset at which you want changes to stop. If you want to use the current selection, set iEndOffset to kTXNUseCurrentSelection (0xFFFFFFF).

function result

A result code.

AVAILABILITY

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


© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)