Returns a potentially modified location to which the marker should be added.
SDK
- macOS 10.0+
Framework
- App
Kit
Declaration
- (CGFloat)rulerView:(NSRuler View *)ruler willAddMarker:(NSRuler Marker *)marker atLocation:(CGFloat)location;
Parameters
aRulerView
The ruler view sending the message.
aMarker
The marker to be added.
location
The new location for the marker, in the ruler view’s coordinates.
Return Value
The modified location to which the marker should be added.
Discussion
This method ensures that the proposed location
of a
lies within the appropriate bounds for the receiver’s text container, returning the modified location. Appropriate bounds are those of the text container minus its line fragment padding.
Typically, the ruler view's width matches that of its text view.