Instance Method

containsPoint:

Overridden by subclasses to return whether a point lies within the receiver’s region or on the region’s edge—not simply within its bounding rectangle.

Declaration

- (BOOL)containsPoint:(NSPoint)point;

Parameters

aPoint

The point in question.

Return Value

YES if aPoint lies within the receiver’s region or on the region’s edge—not simply within its bounding rectangle—NO otherwise.

Discussion

For example, if the receiver defines a donut shape and aPoint lies in the hole, this method returns NO. This method can be used for hit testing of mouse events.

The default NSTextContainer implementation merely checks that aPoint lies within its bounding rectangle.

See Also

Deprecated

- initWithContainerSize:

Initializes a text container with a specified bounding rectangle.

Deprecated
- lineFragmentRectForProposedRect:sweepDirection:movementDirection:remainingRect:

Overridden by subclasses to calculate and return the longest rectangle available in the proposed rectangle for displaying text, or NSZeroRect if there is none according to the receiver’s region definition.

Deprecated
containerSize

The size of the receiver’s bounding rectangle.

Deprecated