Commit Graph
2 Commits
Author SHA1 Message Date
David Richardson 0111408d5f AppKit: Replace legacy CPTableView rendering with view-backed rows and decoration views
Replace the legacy table view rendering methods with a view-backed architecture.
CPTableView now performs no drawing in -drawRect: by default. Subclasses
overriding a layer drawing method (background, selection, grid, or rows)
have that layer and all foreground layers drawn onto a canvas subview,
while column selection and vertical grid lines are presented as views within
a decoration container.

Row views display the state assigned by the table view. Calling
-setNeedsDisplay: flags visual invalidation, prompting the subsequent layout
pass to reconfigure visible row views. Visible rows remain synchronized during
layout, and the rendering state is invalidated whenever rows, columns, or the
exposed rect change.

- Aristo2: Define a group row background color.
- CPTableViewDrawingPassTest: Add unit tests covering the drawing pass.
2026-11-18 09:47:58 -06:00
David Richardson 18ac703f4e AppKit: Add previously missing public CPTableRowView with AppKit's row view API
- Replace _CPTableRowView with CPTableRowView: state properties, background colour with application and default values, viewAtColumn: and numberOfColumns

- Set all row view state from table view in one method at attach, selection change, full update and drop target change

- Write row view look in layoutSubviews instead of in setters

- Add rowViewAtRow:makeIfNecessary:, enumerateAvailableRowViewsUsingBlock:, didAddRowView:forRow: and didRemoveRowView:forRow:

- Accept row views in rowForView:

- Add tableView:rowViewForRow:, tableView:didAddRowView:forRow: and tableView:didRemoveRowView:forRow: delegate methods, and outline view equivalents

- Keep row views apart from data view loading, so column changes no longer recycle them

- Keep private row views below last row, reuse table-made row views from pool and delegate row views by identifier

- Return no unfocused selection colour for missing or CSS-based selection colour instead of raising

- Add CPTableRowView tests
2026-11-16 10:55:44 -06:00