Instance Method

cellFrameForTextContainer:proposedLineFragment:glyphPosition:characterIndex:

Returns the frame of the cell to draw at the specified position in a text container.

Required.

Declaration

- (NSRect)cellFrameForTextContainer:(NSTextContainer *)textContainer proposedLineFragment:(NSRect)lineFrag glyphPosition:(NSPoint)position characterIndex:(NSUInteger)charIndex;

Parameters

textContainer

The text container that contains the glyph.

lineFrag

The line fragment that contains the glyph.

position

The position of the glyph in the text container.

charIndex

The index of the character.

Discussion

The proposed line fragment is specified by lineFrag.

See Also

Proiding the Cell Metrics

- cellSize

Returns the size of the attachment’s icon.

Required.

- cellBaselineOffset

Returns the text position where you draw the attachment cell’s image, relative to the current point established in the glyph layout.

Required.