Instance Method

rulerView:shouldMoveMarker:

Returns whether the marker should be moved.

Declaration

- (BOOL)rulerView:(NSRulerView *)ruler shouldMoveMarker:(NSRulerMarker *)marker;

Parameters

aRulerView

The ruler view sending the message.

aMarker

The marker to be moved.

Return Value

YES if aMarker can be moved, NO otherwise.

Discussion

This method controls whether an existing marker aMarker can be moved. The receiver checks for permission to make the change by invoking shouldChangeTextInRange:replacementString: and returning the return value of that message. If the change is allowed, the receiver is then sent a rulerView:didMoveMarker: message.

See Also

NSRulerView Client Methods

- rulerView:didMoveMarker:

Modifies the paragraph style of the paragraphs containing the selection to record the new location of the marker.

- rulerView:willMoveMarker:toLocation:

Returns a potentially modified location to which the marker should be moved.

- rulerView:didRemoveMarker:

Modifies the paragraph style of the paragraphs containing the selection—if possible—by removing the specified marker.

- rulerView:shouldRemoveMarker:

Returns whether the marker should be removed.

- rulerView:didAddMarker:

Modifies the paragraph style of the paragraphs containing the selection to accommodate a new marker.

- rulerView:shouldAddMarker:

Returns whether a new marker can be added.

- rulerView:willAddMarker:atLocation:

Returns a potentially modified location to which the marker should be added.

- rulerView:handleMouseDown:

Adds a left tab marker to the ruler at the location clicked.