SlicerPresenter
Shows contents of a Carousel one by one, and "slices" them into ribbons as it transitions between frames.
Parameters
to split the frame into when transitioning
indicates which direction the items fill travel when transitioning
indicates which part of the item starts moving first
indicates whether cuts are relative to the Carousel or the item
that determine the bounds of each item relative to the Carousel
Constructors
Functions
A Carousel will call this method when trying to do manual movement. This is a fundamentally different problem than it needs to solve when skipping through items (interpolate between indexes). This requires mapping pixel offsets to indexes. Only a Carousel's Presenter knows how items are laid out and can provide any information about "distance" between them. Hence, this API.
Creates/recycles PresentedItem given a Position
Called by Carousel to update the Presentation it should display.
Sets the bounds of item based on the result of adjust. This method tries to handle cases where the item being constrained adjusts its size after a bounds change. This would be the case for an item that maintains an aspect ratio for example. The calculation is run a second time in these cases to allow any constraint to adjust as needed.