Carbon


TXNGetIndexedRunInfoFromRange

Header: MacTextEditor.h Carbon status: Supported

Gets information about a run in a range.

OSStatus TXNGetIndexedRunInfoFromRange (
    TXNObject iTXNObject, 
    ItemCount iIndex, 
    UInt32 iStartOffset, 
    UInt32 iEndOffset, 
    UInt32 *oRunStartOffset, 
    UInt32 *oRunEndOffset, 
    TXNDataType *oRunDataType, 
    ItemCount iTypeAttributeCount, 
    TXNTypeAttributes *oTypeAttributes
);
Parameter descriptions
iTXNObject

A variable of type TXNObject. Pass the text object for the current text area.

iIndex

A variable of type ItemCount. The iIndex variable starts the count at 0.

iStartOffset

A variable of type TXNOffset. Pass the offset at which you want to start to obtain run information.

iEndOffset

A variable of type TXNOffset. Pass the offset at which you want run information to end.

oRunStartOffset

A pointer to an unsigned 32-bit integer. On return, points to a value that identifies the start of run relative to the beginning of the text, not the range.

oRunEndOffset

A pointer to an unsigned 32-bit integer. On return, points to a value that identifies the end of the run relative to the beginning of the text, not the range.

oRunDataType

A pointer to a variable of type TXNDataType. On return, a “Supported Data Types” value that identifies the type of data in the run.

iTypeAttributeCount

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

oTypeAttributes

A pointer to a structure of type TXNTypeAttributes. On input, you specify the attribute type (such as color) in the tag field and the attribute size in the size field. You can pass NULL for the data field. On return, the data field contains the attribute data. The data field is a union that servers either as a 32-bit integer or a 32-bit pointer, depending on the size field.

function result

A result code.

DISCUSSION

You should first call the TXNCountRunsInRange function to get the count. The TXNTypeAttributes structure must specify the text attribute in which the application is interested. In other words, the tag field must be set.

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)