NSRulerView
A ruler and the markers above or to the side of a scroll view’s document view.
Declaration
class NSRulerViewOverview
Views within the scroll view can become clients of the ruler view, having it display markers for their elements, and receiving messages from the ruler view when the user manipulates the markers.
Principal Attributes
Displays markers that represent elements of the client view.
Displays in arbitrary units.
Provides for an accessory view containing extra controls.
Creation
hasHorizontalRuler (
NSScrollView)hasVerticalRuler (
NSScrollView)init(scrollView:orientation:) Designated initializer.
Commonly Used Methods
- clientView
Changes the ruler’s client view.
- markers
Sets the markers displayed by the ruler view.
- accessoryView
Sets the accessory view.
- trackMarker(_:withMouseEvent:)
Allows the user to add a new marker.
Overview
See NSRulerMarkerClientViewDelegation for delegate methods that may be of interest.
Topics
Creating a Ruler View
Altering measurement units
registerUnit(withName:abbreviation:unitToPointsConversionFactor:stepUpCycle:stepDownCycle:)measurementUnitsNSRulerView.UnitName