1/* 2 * Copyright (c) 2023-2025 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 */ 36/** 37 * Declaration of the menu item on the right side. 38 * @syscap SystemCapability.ArkUI.ArkUI.Full 39 * @crossplatform 40 * @atomicservice 41 * @since 20 42 */ 43export declare class ComposeTitleBarMenuItem { 44 /** 45 * Icon resource for this menu item. 46 * @type { ResourceStr }. 47 * @syscap SystemCapability.ArkUI.ArkUI.Full 48 * @since 10 49 */ 50 /** 51 * Icon resource for this menu item. 52 * @type { ResourceStr }. 53 * @syscap SystemCapability.ArkUI.ArkUI.Full 54 * @atomicservice 55 * @since 11 56 */ 57 /** 58 * Icon resource for this menu item. 59 * @type { ResourceStr }. 60 * @syscap SystemCapability.ArkUI.ArkUI.Full 61 * @crossplatform 62 * @atomicservice 63 * @since 20 64 */ 65 value: ResourceStr; 66 67 /** 68 * Symbol resource for this menu item. 69 * @type { ?SymbolGlyphModifier }. 70 * @syscap SystemCapability.ArkUI.ArkUI.Full 71 * @atomicservice 72 * @since 18 73 */ 74 /** 75 * Symbol resource for this menu item. 76 * @type { ?SymbolGlyphModifier }. 77 * @syscap SystemCapability.ArkUI.ArkUI.Full 78 * @crossplatform 79 * @atomicservice 80 * @since 20 81 */ 82 symbolStyle?: SymbolGlyphModifier; 83 84 /** 85 * Icon label for this menu item. 86 * @type { ?ResourceStr }. 87 * @syscap SystemCapability.ArkUI.ArkUI.Full 88 * @atomicservice 89 * @since 13 90 */ 91 /** 92 * Icon label for this menu item. 93 * @type { ?ResourceStr }. 94 * @syscap SystemCapability.ArkUI.ArkUI.Full 95 * @crossplatform 96 * @atomicservice 97 * @since 20 98 */ 99 label?: ResourceStr; 100 101 /** 102 * Whether to enable this menu item. 103 * @type { ?boolean }. 104 * @syscap SystemCapability.ArkUI.ArkUI.Full 105 * @since 10 106 */ 107 /** 108 * Whether to enable this menu item. 109 * @type { ?boolean }. 110 * @syscap SystemCapability.ArkUI.ArkUI.Full 111 * @atomicservice 112 * @since 11 113 */ 114 /** 115 * Whether to enable this menu item. 116 * @type { ?boolean }. 117 * @syscap SystemCapability.ArkUI.ArkUI.Full 118 * @crossplatform 119 * @atomicservice 120 * @since 20 121 */ 122 isEnabled?: boolean; 123 124 /** 125 * Callback function when click on this menu item. 126 * @type { ?() => void }. 127 * @syscap SystemCapability.ArkUI.ArkUI.Full 128 * @since 10 129 */ 130 /** 131 * Callback function when click on this menu item. 132 * @type { ?() => void }. 133 * @syscap SystemCapability.ArkUI.ArkUI.Full 134 * @atomicservice 135 * @since 11 136 */ 137 /** 138 * Callback function when click on this menu item. 139 * @type { ?() => void }. 140 * @syscap SystemCapability.ArkUI.ArkUI.Full 141 * @crossplatform 142 * @atomicservice 143 * @since 20 144 */ 145 action?: () => void; 146 147 /** 148 * The accessibilityText of this menu item. 149 * @type { ?ResourceStr } 150 * @syscap SystemCapability.ArkUI.ArkUI.Full 151 * @atomicservice 152 * @since 18 153 */ 154 /** 155 * The accessibilityText of this menu item. 156 * @type { ?ResourceStr } 157 * @syscap SystemCapability.ArkUI.ArkUI.Full 158 * @crossplatform 159 * @atomicservice 160 * @since 20 161 */ 162 accessibilityText?: ResourceStr; 163 164 /** 165 * The accessibilityDescription of this menu item. 166 * @type { ?ResourceStr } 167 * @syscap SystemCapability.ArkUI.ArkUI.Full 168 * @atomicservice 169 * @since 18 170 */ 171 /** 172 * The accessibilityDescription of this menu item. 173 * @type { ?ResourceStr } 174 * @syscap SystemCapability.ArkUI.ArkUI.Full 175 * @crossplatform 176 * @atomicservice 177 * @since 20 178 */ 179 accessibilityDescription?: ResourceStr; 180 181 /** 182 * The accessibilityLevel of this menu item. 183 * @type { ?string } 184 * @default "auto".The options are as follows:<br/> 185 * "auto":The value is converted to "yes" or "no" based on the component. 186 * "yes": the current component is selectable for the accessibility service. 187 * "no": The current component is not selectable for the accessibility service. 188 * "no-hide-descendants":The current component and all its child components are not selectable<br/> 189 * for the accessibility service. 190 * @syscap SystemCapability.ArkUI.ArkUI.Full 191 * @atomicservice 192 * @since 18 193 */ 194 /** 195 * The accessibilityLevel of this menu item. 196 * @type { ?string } 197 * @default "auto".The options are as follows:<br/> 198 * "auto":The value is converted to "yes" or "no" based on the component. 199 * "yes": the current component is selectable for the accessibility service. 200 * "no": The current component is not selectable for the accessibility service. 201 * "no-hide-descendants":The current component and all its child components are not selectable<br/> 202 * for the accessibility service. 203 * @syscap SystemCapability.ArkUI.ArkUI.Full 204 * @crossplatform 205 * @atomicservice 206 * @since 20 207 */ 208 accessibilityLevel?: string; 209} 210 211/** 212 * Declaration of the composable title bar. 213 * @syscap SystemCapability.ArkUI.ArkUI.Full 214 * @since 10 215 */ 216/** 217 * Declaration of the composable title bar. 218 * @syscap SystemCapability.ArkUI.ArkUI.Full 219 * @atomicservice 220 * @since 11 221 */ 222/** 223 * Declaration of the composable title bar. 224 * @syscap SystemCapability.ArkUI.ArkUI.Full 225 * @crossplatform 226 * @atomicservice 227 * @since 20 228 */ 229@Component 230export declare struct ComposeTitleBar { 231 /** 232 * Avatar resource and event callback of this title bar. 233 * @type { ?ComposeTitleBarMenuItem }. 234 * @syscap SystemCapability.ArkUI.ArkUI.Full 235 * @since 10 236 */ 237 /** 238 * Avatar resource and event callback of this title bar. 239 * @type { ?ComposeTitleBarMenuItem }. 240 * @syscap SystemCapability.ArkUI.ArkUI.Full 241 * @atomicservice 242 * @since 11 243 */ 244 /** 245 * Avatar resource and event callback of this title bar. 246 * @type { ?ComposeTitleBarMenuItem }. 247 * @syscap SystemCapability.ArkUI.ArkUI.Full 248 * @crossplatform 249 * @atomicservice 250 * @since 20 251 */ 252 item?: ComposeTitleBarMenuItem; 253 254 /** 255 * Title of this title bar. 256 * @type { ResourceStr }. 257 * @syscap SystemCapability.ArkUI.ArkUI.Full 258 * @since 10 259 */ 260 /** 261 * Title of this title bar. 262 * @type { ResourceStr }. 263 * @syscap SystemCapability.ArkUI.ArkUI.Full 264 * @atomicservice 265 * @since 11 266 */ 267 /** 268 * Title of this title bar. 269 * @type { ResourceStr }. 270 * @syscap SystemCapability.ArkUI.ArkUI.Full 271 * @crossplatform 272 * @atomicservice 273 * @since 20 274 */ 275 title: ResourceStr; 276 277 /** 278 * Sub-title of this title bar. 279 * @type { ?ResourceStr }. 280 * @syscap SystemCapability.ArkUI.ArkUI.Full 281 * @since 10 282 */ 283 /** 284 * Sub-title of this title bar. 285 * @type { ?ResourceStr }. 286 * @syscap SystemCapability.ArkUI.ArkUI.Full 287 * @atomicservice 288 * @since 11 289 */ 290 /** 291 * Sub-title of this title bar. 292 * @type { ?ResourceStr }. 293 * @syscap SystemCapability.ArkUI.ArkUI.Full 294 * @crossplatform 295 * @atomicservice 296 * @since 20 297 */ 298 subtitle?: ResourceStr; 299 300 /** 301 * Menu items on the right side. 302 * @type { ?Array<ComposeTitleBarMenuItem> }. 303 * @syscap SystemCapability.ArkUI.ArkUI.Full 304 * @since 10 305 */ 306 /** 307 * Menu items on the right side. 308 * @type { ?Array<ComposeTitleBarMenuItem> }. 309 * @syscap SystemCapability.ArkUI.ArkUI.Full 310 * @atomicservice 311 * @since 11 312 */ 313 /** 314 * Menu items on the right side. 315 * @type { ?Array<ComposeTitleBarMenuItem> }. 316 * @syscap SystemCapability.ArkUI.ArkUI.Full 317 * @crossplatform 318 * @atomicservice 319 * @since 20 320 */ 321 menuItems?: Array<ComposeTitleBarMenuItem>; 322} 323