Instance Method

rulerView:shouldRemoveMarker:

Returns whether the marker should be removed.

Declaration

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

Parameters

aRulerView

The ruler view sending the message.

aMarker

The marker to be removed.

Return Value

YES if aMarker can be removed, NO otherwise.

Discussion

Only markers that represent tab stops can be removed. This method returns YES if aMarker represents an NSTextTab object, NO otherwise. Because this method can be invoked repeatedly as the user drags a ruler marker, it returns that value immediately. If the change is allowed and the user actually removes the marker, the receiver is also sent a rulerView:didRemoveMarker: 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:shouldMoveMarker:

Returns whether 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: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.