Handles user manipulation of the receiver in its ruler view.
- macOS 10.0+
The event that represents the user manipulation being attempted on the ruler marker.
YESto indicate that the receiver is a new marker being added to its ruler view,
YES if the user manipulation was allowed,
NO if it was not allowed.
NSRuler objects invoke this method automatically to add a new marker or to move or remove an existing marker. You should never need to invoke it directly.
If the receiver is a new marker being added to its ruler view (
YES), the receiver queries the ruler view's client before adding itself to the ruler view. If the client responds to
ruler and that method returns
NO, this method immediately returns
NO, and the new marker isn’t added.
If the receiver is not a new marker being added to its ruler view (
NO), this method attempts to move or remove an existing marker, once again based on responses from the ruler view's client view. If the receiver is neither movable nor removable, this method immediately returns
NO. Further, if the ruler view's client responds to
ruler and returns
NO, this method returns
NO, indicating the receiver can’t be moved.
If the receiver is being added or moved, this method queries the client view using
ruler, respectively. If the client responds to the method, the return value is used as the receiver’s location. These methods are invoked repeatedly as the receiver is dragged within the ruler view.
If the receiver is an existing marker being removed (dragged off the ruler), this method queries the client view using
ruler. If the client responds to this method and returns
NO, the marker is pinned to the ruler view's baseline (following the cursor on the baseline if it’s movable).
When the user releases the mouse button, this method informs the client view of the marker’s new status using
ruler as appropriate. The client view can use this notification to set the marker’s represented object, modify its state and redisplay (for example, adjusting text layout around a new tab stop), or take whatever other action it might need.
YES and the user dragged the new marker away from the ruler, the marker isn’t added, no message is sent, and this method returns
See Ruler and Paragraph Style Programming Topics for more information on these client methods.