Create the drop indicator in mouseEntered if needed. This is the case where the collection view is a drop destination but not a drag source.
In _updateDragAndDropStateWithDraggingInfo... , handle the special case where the drop destination is 0 (includes item count == 0).
Test app: add an empty collection view acting as a drop destination for the first collectionView.
Setting the item prototype without first adding the collection view to a view would cause a crash, as would reloadContent.
This fix makes sure the collection view doesn't try to tile itself unless it has a frame.
There is not need to use that much arguments because the result is stored in ivars.
CPCollectionViewItem -copy: set properties correctly even if the collectionView overrides them.
Do not cache removed items in -reloadContent when the item prototype changes.
maxItemSize:
Interpreted as horiz/vertic expandable when zero size and the proto view has a CPViewWidth|HeightSizable. (per cocoa but not documented).
maxItemSize height support.
Fixed: incorrect position when num items < numberOfColumns.
Rewrote layout engine. Splitted the computation of size, columns count, rows count from the actual layout where we set the frame.
This will help when/if we support insertion/mutation of -content or view animations.
We can also be more lazy when the computation results stay the same.
Added shared -init. Whitespace cleaning.
CPCollectionviewCibTest:
Add ability to set the 2 kinds of prototypes, one loading its view from a cib, the other with a view outlet in the same cib.
Loaded protoype: the bound textfield can commit its value to the model.
UI for setting maxNumberOfColumns|Rows min|maxItemSize
With this commit CPCollectionView can load subviews from an external
cib. Outlets, actions and bindings between the view and the
prototype are restaured when the view is loaded.
- make every object calling getBinding:forObject: aware of this change
- implement _CPCheckBoxValueBinder to handle binding to the value of a checkbox Closes: #1083
- re-implement CPTextField's behavior for controller markers using the new binder class
- disabled some tests that are not compliant with Cocoa
This would break key-value binding setups where a CPCollectionView's content property was hooked up to a CPArrayController's content or arrangedObjects property since the CPArrayController maintains the same object and calls setValue:forKey: with the same object the CPCollectionView already has. Therefore we cannot skip calling reloadContent even when the incoming content array is the same one we got before, because most likely the contents have changed out from under us.