• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2023-2023 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 * @file
18 * @kit ArkUI
19 */
20
21
22
23
24
25/**
26 * Declaration of the menu item on the right side.
27 * @syscap SystemCapability.ArkUI.ArkUI.Full
28 * @since 10
29 */
30/**
31 * Declaration of the menu item on the right side.
32 * @syscap SystemCapability.ArkUI.ArkUI.Full
33 * @atomicservice
34 * @since 11
35 */
36export declare class ComposeTitleBarMenuItem {
37  /**
38   * Icon resource for this menu item.
39   * @type { ResourceStr }.
40   * @syscap SystemCapability.ArkUI.ArkUI.Full
41   * @since 10
42   */
43  /**
44   * Icon resource for this menu item.
45   * @type { ResourceStr }.
46   * @syscap SystemCapability.ArkUI.ArkUI.Full
47   * @atomicservice
48   * @since 11
49   */
50  value: ResourceStr;
51
52  /**
53   * Symbol resource for this menu item.
54   * @type { ?SymbolGlyphModifier }.
55   * @syscap SystemCapability.ArkUI.ArkUI.Full
56   * @atomicservice
57   * @since 18
58   */
59  symbolStyle?: SymbolGlyphModifier;
60
61  /**
62   * Icon label for this menu item.
63   * @type { ?ResourceStr }.
64   * @syscap SystemCapability.ArkUI.ArkUI.Full
65   * @atomicservice
66   * @since 13
67   */
68  label?: ResourceStr;
69
70  /**
71   * Whether to enable this menu item.
72   * @type { ?boolean }.
73   * @syscap SystemCapability.ArkUI.ArkUI.Full
74   * @since 10
75   */
76  /**
77   * Whether to enable this menu item.
78   * @type { ?boolean }.
79   * @syscap SystemCapability.ArkUI.ArkUI.Full
80   * @atomicservice
81   * @since 11
82   */
83  isEnabled?: boolean;
84
85  /**
86   * Callback function when click on this menu item.
87   * @type { ?() => void }.
88   * @syscap SystemCapability.ArkUI.ArkUI.Full
89   * @since 10
90   */
91  /**
92   * Callback function when click on this menu item.
93   * @type { ?() => void }.
94   * @syscap SystemCapability.ArkUI.ArkUI.Full
95   * @atomicservice
96   * @since 11
97   */
98  action?: () => void;
99
100  /**
101   * The accessibilityText of this menu item.
102   * @type { ?ResourceStr }
103   * @syscap SystemCapability.ArkUI.ArkUI.Full
104   * @atomicservice
105   * @since 18
106   */
107  accessibilityText?: ResourceStr;
108
109  /**
110   * The accessibilityDescription of this menu item.
111   * @type { ?ResourceStr }
112   * @syscap SystemCapability.ArkUI.ArkUI.Full
113   * @atomicservice
114   * @since 18
115   */
116  accessibilityDescription?: ResourceStr;
117
118  /**
119   * The accessibilityLevel of this menu item.
120   * @type { ?string }
121   * @default "auto".The options are as follows:<br/>
122   *     "auto":The value is converted to "yes" or "no" based on the component.
123   *     "yes": the current component is selectable for the accessibility service.
124   *     "no": The current component is not selectable for the accessibility service.
125   *     "no-hide-descendants":The current component and all its child components are not selectable<br/>
126   *     for the accessibility service.
127   * @syscap SystemCapability.ArkUI.ArkUI.Full
128   * @atomicservice
129   * @since 18
130   */
131  accessibilityLevel?: string;
132}
133
134/**
135 * Declaration of the composable title bar.
136 * @syscap SystemCapability.ArkUI.ArkUI.Full
137 * @since 10
138 */
139/**
140 * Declaration of the composable title bar.
141 * @syscap SystemCapability.ArkUI.ArkUI.Full
142 * @atomicservice
143 * @since 11
144 */
145@Component
146export declare struct ComposeTitleBar {
147  /**
148   * Avatar resource and event callback of this title bar.
149   * @type { ?ComposeTitleBarMenuItem }.
150   * @syscap SystemCapability.ArkUI.ArkUI.Full
151   * @since 10
152   */
153  /**
154   * Avatar resource and event callback of this title bar.
155   * @type { ?ComposeTitleBarMenuItem }.
156   * @syscap SystemCapability.ArkUI.ArkUI.Full
157   * @atomicservice
158   * @since 11
159   */
160  item?: ComposeTitleBarMenuItem;
161
162  /**
163   * Title of this title bar.
164   * @type { ResourceStr }.
165   * @syscap SystemCapability.ArkUI.ArkUI.Full
166   * @since 10
167   */
168  /**
169   * Title of this title bar.
170   * @type { ResourceStr }.
171   * @syscap SystemCapability.ArkUI.ArkUI.Full
172   * @atomicservice
173   * @since 11
174   */
175  title: ResourceStr;
176
177  /**
178   * Sub-title of this title bar.
179   * @type { ?ResourceStr }.
180   * @syscap SystemCapability.ArkUI.ArkUI.Full
181   * @since 10
182   */
183  /**
184   * Sub-title of this title bar.
185   * @type { ?ResourceStr }.
186   * @syscap SystemCapability.ArkUI.ArkUI.Full
187   * @atomicservice
188   * @since 11
189   */
190  subtitle?: ResourceStr;
191
192  /**
193   * Menu items on the right side.
194   * @type { ?Array<ComposeTitleBarMenuItem> }.
195   * @syscap SystemCapability.ArkUI.ArkUI.Full
196   * @since 10
197   */
198  /**
199   * Menu items on the right side.
200   * @type { ?Array<ComposeTitleBarMenuItem> }.
201   * @syscap SystemCapability.ArkUI.ArkUI.Full
202   * @atomicservice
203   * @since 11
204   */
205  menuItems?: Array<ComposeTitleBarMenuItem>;
206}
207