Ruler classes departed from canonical NS versions, resulting in functional and visual gaps.:
markers were views that drew text characters and ignored their location argument, the ruler rebuilt its subviews on every update and had no origin offset, measurement units or reserved thicknesses, and CPTextView updated the ruler only on focus and typing attribute changes, had no ruler control methods, and never showed a right indent marker.
* AppKit.j: Import CPRulerMarker and CPRulerView.
* CPScrollView.j: Tile rulers by their required thickness, and give a ruler its scroll view when it is set.
* CPTextView/CPRulerMarker.j: Add CPRulerMarker as an object drawn by its ruler, with a marker location, an image and image origin, movability and removability, and tracking that adds, moves and removes markers through the client view.
* CPTextView/CPRulerView.j: Rewrite CPRulerView with an origin offset, registered measurement units defaulting to the user's region, reserved thicknesses for markers and an accessory view, Cocoa's client view methods, temporary ruler lines, and drawing in a single pass.
* CPTextView/CPTextView.j: Add usesRuler, isRulerVisible, setRulerVisible: and toggleRuler: with a Show Ruler or Hide Ruler title; update the ruler on every selection change; place tab stop, first line, head and tail indent markers relative to the start of the text, with SVG marker images and a context menu for changing tab types and resetting indents.
* Tests/Manual/TextEditor/DocumentWindowController.j: Show the ruler through setRulerVisible:.
Declare _clientView within the CPRulerView instance variable block.
This resolves a cold build compilation failure where the Objective-J parser flags assignments to the undeclared variable as illegal global variable creations.
CPRulerView.j declared CPRulerOrientation's constants directly,
with only a comment claiming it was a typedef.
No @typedef directive existed, so the type was unknown wherever used as an ivar or parameter type.
Added the missing @typedef CPRulerOrientation, matching the pattern already used for CPTextAlignment in CPText.j.
CPRulerView.j referenced CPTextTab (isKindOfClass: and alloc/init) without a declaration.
Added @class CPTextTab; to resolve the symbol reference. A forward declaration was utilized rather than importing CPParagraphStyle.j to minimize dependency coupling, despite the absence of a circular import risk.
Resolves build warning.
CPRulerView.j did not import CPScrollView.
A direct import would create a cycle, since CPScrollView.j already imports CPRulerView.j.
Added a forward declaration instead.