Instance Method

drawCharactersInRange:forContentView:

Draw the glyphs for the requested character range as they are drawn in the given content view.

Declaration

- (void)drawCharactersInRange:(NSRange)range forContentView:(NSView *)view;

Parameters

range

The character range.

view

The content view.

Discussion

If the character range partially intersects a glyph range, then the full glyph is drawn to avoid additional layout.

The given range is guaranteed to be completely contained by the given view. When this method is called, a drawing context effectively identical to the one provided to the view’s drawRect: method is configured. This method is mainly used to draw find indicator contents, so implementations should check -the view property drawingFindIndicator to ensure that the text will be easily readable against the background of the find indicator when it returns YES. If this method is not implemented, then the find indicator will be drawn using the content view’s drawRect: method instead.