• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2021 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * Content scroll direction.
18 * @since 8
19 */
20declare enum ScrollBarDirection {
21  /**
22   * Vertical scrolling is supported.
23   * @since 8
24   */
25  Vertical,
26
27  /**
28   * Horizontal scrolling is supported.
29   * @since 8
30   */
31  Horizontal,
32}
33
34/**
35 * Defines the options of ScrollBar.
36 * @since 8
37 */
38declare interface ScrollBarOptions {
39  /**
40   * Sets the scroller of scroll bar.
41   * @since 8
42   */
43  scroller: Scroller;
44
45  /**
46   * Sets the direction of scroll bar.
47   * @since 8
48   */
49  direction?: ScrollBarDirection;
50
51  /**
52   * Sets the state of scroll bar.
53   * @since 8
54   */
55  state?: BarState;
56}
57
58/**
59 * Provides interfaces for scroll bar.
60 * @since 8
61 */
62interface ScrollBarInterface {
63  /**
64   * Called when a ScrollBar container is set.
65   * @since 8
66   */
67  (value: ScrollBarOptions): ScrollBarAttribute;
68}
69
70/**
71 * Defines the scrollbar attribute functions.
72 * @since 8
73 */
74declare class ScrollBarAttribute extends CommonMethod<ScrollBarAttribute> {}
75
76/**
77 * Defines ScrollBar Component.
78 * @since 8
79 */
80declare const ScrollBar: ScrollBarInterface;
81
82/**
83 * Defines ScrollBar Component instance.
84 * @since 8
85 */
86declare const ScrollBarInstance: ScrollBarAttribute;
87