Currently CPCollectionView arranges its items by starting at the top-left, filling each (fixed width) row left-to-right and adjusting its height as necessary to fit in the required number of rows.
As far as I can gather Cocoa doesn't have this either but it would be useful to have an alternative mode which would render items top-to-bottom, filling fixed-height columns and adjusting the width to fit.
This would then allow it to be used for rendering lists of items which scroll horizontally.
The only required change to the interface would be an additional accessor to set/get the "grow" direction.
I'll have a go at this myself if I get the time.
I've commited a patch for this at: http://github.com/maport/cappuccino/commit/93cc5700c8e39e84fded1a4b4ba3d69f03a12dd8
This adds a new orientation property which can be set to CPCollectionViewHorizontalOrientation to "orient" the view horizontally rather than the standard vertical arrangement:
In this orientation the view has fixed height, items are arranged in columns starting on the left and the width is varied.
It is particularly useful if you want to render a one row list that scrolls horizontally.
The patched CPCollectionView should be completely backward compatible and users who don't use setOrientation shouldn't encounter any differences. However I have deprecated setVerticalMargin in favour of a new setDivisionMargin method since the "vertical margin" is the margin between rows in the standard vertical orientation but becomes the margin between columns in the the horizontal orientation.
Any better suggestions than setDivisionMargin welcome; a "division" is the general term I am using to represent a row or column.
Milestone: Someday. Labels: #needs-review, AppKit, feature. What's next? This issue is pending an architectural or implementation design decision and should be discussed or voted on.
No one else has requested it.
Milestone: Someday. Labels: #wont-fix, AppKit, feature. What's next? A reviewer or core team member has decided against acting upon this issue.