• 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 TabTitleBarMenuItem {
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"
122   * @syscap SystemCapability.ArkUI.ArkUI.Full
123   * @atomicservice
124   * @since 18
125   */
126  accessibilityLevel?: string;
127}
128
129/**
130 * Declaration of the tab item.
131 * @syscap SystemCapability.ArkUI.ArkUI.Full
132 * @since 10
133 */
134/**
135 * Declaration of the tab item.
136 * @syscap SystemCapability.ArkUI.ArkUI.Full
137 * @atomicservice
138 * @since 11
139 */
140export declare class TabTitleBarTabItem {
141  /**
142   * Text description for this tab item.
143   * @type { ResourceStr }.
144   * @syscap SystemCapability.ArkUI.ArkUI.Full
145   * @since 10
146   */
147  /**
148   * Text description for this tab item.
149   * @type { ResourceStr }.
150   * @syscap SystemCapability.ArkUI.ArkUI.Full
151   * @atomicservice
152   * @since 11
153   */
154  title: ResourceStr;
155
156  /**
157   * Icon resource for this tab item.
158   * @type { ?ResourceStr }.
159   * @syscap SystemCapability.ArkUI.ArkUI.Full
160   * @since 10
161   */
162  /**
163   * Icon resource for this tab item.
164   * @type { ?ResourceStr }.
165   * @syscap SystemCapability.ArkUI.ArkUI.Full
166   * @atomicservice
167   * @since 11
168   */
169  icon?: ResourceStr;
170
171  /**
172   * Symbol resource for this tab item.
173   * @type { ?SymbolGlyphModifier }.
174   * @syscap SystemCapability.ArkUI.ArkUI.Full
175   * @atomicservice
176   * @since 18
177   */
178  symbolStyle?: SymbolGlyphModifier;
179}
180
181/**
182 * Declaration of the tabbed title bar.
183 * @syscap SystemCapability.ArkUI.ArkUI.Full
184 * @since 10
185 */
186/**
187 * Declaration of the tabbed title bar.
188 * @syscap SystemCapability.ArkUI.ArkUI.Full
189 * @atomicservice
190 * @since 11
191 */
192@Component
193export declare struct TabTitleBar {
194  /**
195   * Tab items on the left side.
196   * @type { ?Array<TabTitleBarItem> }.
197   * @syscap SystemCapability.ArkUI.ArkUI.Full
198   * @since 10
199   */
200  /**
201   * Tab items on the left side.
202   * @type { ?Array<TabTitleBarItem> }.
203   * @syscap SystemCapability.ArkUI.ArkUI.Full
204   * @atomicservice
205   * @since 11
206   */
207  tabItems: Array<TabTitleBarTabItem>;
208
209  /**
210   * Menu items on the right side.
211   * @type { Array<TabTitleBarMenuItem> }.
212   * @syscap SystemCapability.ArkUI.ArkUI.Full
213   * @since 10
214   */
215  /**
216   * Menu items on the right side.
217   * @type { Array<TabTitleBarMenuItem> }.
218   * @syscap SystemCapability.ArkUI.ArkUI.Full
219   * @atomicservice
220   * @since 11
221   */
222  menuItems?: Array<TabTitleBarMenuItem>;
223
224  /**
225   * Content builder. Each component corresponds to a tab item.
226   * The builder needs to be transferred.
227   * @type { () => void }.
228   * @syscap SystemCapability.ArkUI.ArkUI.Full
229   * @since 10
230   */
231  /**
232   * Content builder. Each component corresponds to a tab item.
233   * The builder needs to be transferred.
234   * @type { () => void }.
235   * @syscap SystemCapability.ArkUI.ArkUI.Full
236   * @atomicservice
237   * @since 11
238   */
239  @BuilderParam
240  swiperContent: () => void;
241}
242