• 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/**
18 * Defines the options of CustomDialogController.
19 * @since 7
20 */
21declare interface CustomDialogControllerOptions {
22  /**
23   * Custom builder function.
24   * @since 7
25   */
26  builder: any;
27
28  /**
29   * Defines the cancel function.
30   * @since 7
31   */
32  cancel?: () => void;
33
34  /**
35   * Defines if use auto cancel when click on the outside of the dialog.
36   * @since 7
37   */
38  autoCancel?: boolean;
39
40  /**
41   * Defines the dialog alignment of the screen.
42   * @since 7
43   */
44  alignment?: DialogAlignment;
45
46  /**
47   * Defines the dialog offset.
48   * @since 7
49   */
50  offset?: Offset;
51
52  /**
53   * Defines if use custom style.
54   * @since 7
55   */
56  customStyle?: boolean;
57
58  /**
59   * Grid count of dialog.
60   * @since 8
61   */
62  gridCount?: number;
63}
64
65/**
66 * Use the CustomDialogController class to display the custom pop-up window.
67 * @since 7
68 */
69declare class CustomDialogController {
70  /**
71   * The constructor transfers parameter settings.
72   * @since 7
73   */
74  constructor(value: CustomDialogControllerOptions);
75
76  /**
77   * Display the content of the customized pop-up window. If the content has been displayed, it does not take effect.
78   * @since 7
79   */
80  open();
81
82  /**
83   * Closes the custom pop-up window. If the window is closed, the window does not take effect.
84   * @since 7
85   */
86  close();
87}
88