/** * ZUI ScrollView Component * Scrollable container with scroll bar indicator */ import { LayoutComponent, LayoutComponentProps } from '../core/Component'; import type { Rect, Direction, Size, PaddingInput, ScrollEvent } from '../core/types'; export interface ScrollViewProps extends LayoutComponentProps { /** Scroll direction */ direction?: Direction; /** Show scroll bar indicator */ showScrollBar?: boolean; /** Auto-hide scroll bar after 2 seconds */ scrollBarAutoHide?: boolean; /** Container width */ width?: Size; /** Container height */ height?: Size; /** Internal padding */ padding?: PaddingInput; /** Initial scroll offset */ initialOffset?: number; /** Scroll event callback */ onScroll?: (event: ScrollEvent) => void; /** Scroll end callback */ onScrollEnd?: () => void; } /** * ScrollView component for scrollable content * * @example * ```ts * const scrollView = new ScrollView({ * width: 480, * height: 400, * direction: 'vertical', * showScrollBar: true, * children: [ * new Text({ text: 'Long content...' }), * // ... more children * ], * onScroll: (event) => { * console.log('Scrolled to:', event.offset); * }, * }); * ``` */ export declare class ScrollView extends LayoutComponent { readonly type = "ScrollView"; private scrollBarBgWidget; private scrollBarWidget; private scrollOffset; private contentSize; private scrollBarVisible; private autoHideTimer; protected getDefaultProps(): Partial; protected onMount(): void; protected onDestroy(): void; protected calculateLayout(parentRect?: Rect): void; protected createWidgets(): void; protected updateWidgets(): void; protected destroyWidgets(): void; private getScrollBarPosition; private startAutoHideTimer; private showScrollBar; private hideScrollBar; /** * Scroll to specific offset */ scrollTo(offset: number, animated?: boolean): void; /** * Scroll by delta amount */ scrollBy(delta: number, animated?: boolean): void; /** * Get current scroll offset */ getScrollOffset(): number; /** * Get maximum scroll offset */ getMaxScrollOffset(): number; /** * Check if content is scrollable */ isScrollable(): boolean; } /** * Create a ScrollView component */ export declare function createScrollView(props: ScrollViewProps): ScrollView; //# sourceMappingURL=ScrollView.d.ts.map