BeginCarousel#
func BeginCarousel(canvas *ui.Canvas, theme ui.Theme, bounds ui.Rect, itemCount, index int) CarouselBeginCarousel declares carousel state without retaining item data.
type Carousel struct {
// contains filtered or unexported fields
}Carousel is a clipped viewport with caller-owned offset, selected index, item count, and content extent. Keyboard routing, dragging, pointer capture, inertia, autoplay, observers, timers, and virtualization are runtime or application responsibilities and are intentionally absent from this recipe.
BeginCarousel#func BeginCarousel(canvas *ui.Canvas, theme ui.Theme, bounds ui.Rect, itemCount, index int) CarouselBeginCarousel declares carousel state without retaining item data.
BeginContent#func (carousel *Carousel) BeginContent() CarouselGeometryBeginContent pushes the viewport clip for caller-painted slides.
Content#func (carousel Carousel) Content(extent, offset float32) CarouselContent sets the caller-owned total axis extent and current scroll offset.
Controls#func (carousel Carousel) Controls(previousID ui.ID, previousLabel string, nextID ui.ID, nextLabel string) CarouselControls assigns stable previous and next action IDs and accessible labels.
Disabled#func (carousel Carousel) Disabled() CarouselDisabled keeps both control bounds and semantics while making them inert.
EndContent#func (carousel *Carousel) EndContent() CarouselGeometryEndContent closes the clip and paints both stable navigation controls.
Geometry#func (carousel Carousel) Geometry() CarouselGeometryGeometry returns clamped content and stable external control bounds.
ItemGeometry#func (carousel Carousel) ItemGeometry(index int, contentOffset, extent float32) CarouselItemGeometryItemGeometry translates one caller-supplied slide offset and extent along the carousel axis. It does not retain, measure, or virtualize the item.
Label#func (carousel Carousel) Label(label string) CarouselLabel names the carousel region for assistive technology.
Vertical#func (carousel Carousel) Vertical() CarouselVertical changes the content axis and control placement to vertical.