UNPKG

1.68 kBTypeScriptView Raw
1import { ScrollView as ScrollViewDefinition, ScrollEventData } from '.';
2import { ContentView } from '../content-view';
3import { Property } from '../core/properties';
4import { EventData } from '../../data/observable';
5import { CoreTypes } from '../../core-types';
6export declare abstract class ScrollViewBase extends ContentView implements ScrollViewDefinition {
7 static scrollEvent: string;
8 orientation: CoreTypes.OrientationType;
9 scrollBarIndicatorVisible: boolean;
10 isScrollEnabled: boolean;
11 private _addedScrollEvent;
12 addEventListener(arg: string, callback: (data: EventData) => void, thisArg?: any): void;
13 removeEventListener(arg: string, callback?: (data: EventData) => void, thisArg?: any): void;
14 initNativeView(): void;
15 disposeNativeView(): void;
16 protected attachNative(): void;
17 protected detachNative(): void;
18 get horizontalOffset(): number;
19 get verticalOffset(): number;
20 get scrollableWidth(): number;
21 get scrollableHeight(): number;
22 abstract scrollToVerticalOffset(value: number, animated: boolean): any;
23 abstract scrollToHorizontalOffset(value: number, animated: boolean): any;
24 abstract _onOrientationChanged(): any;
25}
26export interface ScrollViewBase {
27 on(eventNames: string, callback: (data: EventData) => void, thisArg?: any): void;
28 on(event: 'scroll', callback: (args: ScrollEventData) => void, thisArg?: any): void;
29}
30export declare const orientationProperty: Property<ScrollViewBase, CoreTypes.OrientationType>;
31export declare const scrollBarIndicatorVisibleProperty: Property<ScrollViewBase, boolean>;
32export declare const isScrollEnabledProperty: Property<ScrollViewBase, boolean>;