Class

NSRulerMarker

A symbol on a ruler view, indicating a location for the graphics element it represents in the client of the ruler view.

Declaration

@interface NSRulerMarker : NSObject

Overview

An example of a marker is the representation of a margin or tab setting, or the edges of a graphic on the page.

Topics

Creating instances

- initWithRulerView:markerLocation:image:imageOrigin:

Initializes a newly allocated ruler marker, associating it with (but not adding it to) a specified ruler view and assigning the attributes provided.

Getting the ruler view

ruler

The receiver's ruler view.

Setting the image

image

The receiver’s image.

imageOrigin

The point in the receiver’s image that is positioned at the receiver’s location on the ruler view.

imageRectInRuler

The rectangle occupied by the receiver’s image.

thicknessRequiredInRuler

The amount of the receiver’s image that’s displayed above or to the left of the ruler view's baseline.

Setting movability

movable

A Boolean that indicates whether the user can move the receiver in its ruler view.

removable

A Boolean that indicates whether the user can remove the receiver from its ruler view.

Setting the location

markerLocation

The location of the receiver in the coordinate system of the ruler view's client view.

Setting the represented object

representedObject

The object the receiver represents.

Drawing and event handling

- drawRect:

Draws the receiver’s image that appears in the supplied rectangle.

dragging

A Boolean that indicates whether the receiver is being dragged.

- trackMouse:adding:

Handles user manipulation of the receiver in its ruler view.

Initializers

Relationships

Inherits From

Conforms To

See Also

Rulers

NSRulerView

A ruler and the markers above or to the side of a scroll view’s document view.