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 * Icon label for this menu item. 54 * @type { ?ResourceStr }. 55 * @syscap SystemCapability.ArkUI.ArkUI.Full 56 * @atomicservice 57 * @since 13 58 */ 59 label?: ResourceStr; 60 61 /** 62 * Whether to enable this menu item. 63 * @type { ?boolean }. 64 * @syscap SystemCapability.ArkUI.ArkUI.Full 65 * @since 10 66 */ 67 /** 68 * Whether to enable this menu item. 69 * @type { ?boolean }. 70 * @syscap SystemCapability.ArkUI.ArkUI.Full 71 * @atomicservice 72 * @since 11 73 */ 74 isEnabled?: boolean; 75 76 /** 77 * Callback function when click on this menu item. 78 * @type { ?() => void }. 79 * @syscap SystemCapability.ArkUI.ArkUI.Full 80 * @since 10 81 */ 82 /** 83 * Callback function when click on this menu item. 84 * @type { ?() => void }. 85 * @syscap SystemCapability.ArkUI.ArkUI.Full 86 * @atomicservice 87 * @since 11 88 */ 89 action?: () => void; 90} 91 92/** 93 * Declaration of the tab item. 94 * @syscap SystemCapability.ArkUI.ArkUI.Full 95 * @since 10 96 */ 97/** 98 * Declaration of the tab item. 99 * @syscap SystemCapability.ArkUI.ArkUI.Full 100 * @atomicservice 101 * @since 11 102 */ 103export declare class TabTitleBarTabItem { 104 /** 105 * Text description for this tab item. 106 * @type { ResourceStr }. 107 * @syscap SystemCapability.ArkUI.ArkUI.Full 108 * @since 10 109 */ 110 /** 111 * Text description for this tab item. 112 * @type { ResourceStr }. 113 * @syscap SystemCapability.ArkUI.ArkUI.Full 114 * @atomicservice 115 * @since 11 116 */ 117 title: ResourceStr; 118 119 /** 120 * Icon resource for this tab item. 121 * @type { ?ResourceStr }. 122 * @syscap SystemCapability.ArkUI.ArkUI.Full 123 * @since 10 124 */ 125 /** 126 * Icon resource for this tab item. 127 * @type { ?ResourceStr }. 128 * @syscap SystemCapability.ArkUI.ArkUI.Full 129 * @atomicservice 130 * @since 11 131 */ 132 icon?: ResourceStr; 133} 134 135/** 136 * Declaration of the tabbed title bar. 137 * @syscap SystemCapability.ArkUI.ArkUI.Full 138 * @since 10 139 */ 140/** 141 * Declaration of the tabbed title bar. 142 * @syscap SystemCapability.ArkUI.ArkUI.Full 143 * @atomicservice 144 * @since 11 145 */ 146@Component 147export declare struct TabTitleBar { 148 /** 149 * Tab items on the left side. 150 * @type { ?Array<TabTitleBarItem> }. 151 * @syscap SystemCapability.ArkUI.ArkUI.Full 152 * @since 10 153 */ 154 /** 155 * Tab items on the left side. 156 * @type { ?Array<TabTitleBarItem> }. 157 * @syscap SystemCapability.ArkUI.ArkUI.Full 158 * @atomicservice 159 * @since 11 160 */ 161 tabItems: Array<TabTitleBarTabItem>; 162 163 /** 164 * Menu items on the right side. 165 * @type { Array<TabTitleBarMenuItem> }. 166 * @syscap SystemCapability.ArkUI.ArkUI.Full 167 * @since 10 168 */ 169 /** 170 * Menu items on the right side. 171 * @type { Array<TabTitleBarMenuItem> }. 172 * @syscap SystemCapability.ArkUI.ArkUI.Full 173 * @atomicservice 174 * @since 11 175 */ 176 menuItems?: Array<TabTitleBarMenuItem>; 177 178 /** 179 * Content builder. Each component corresponds to a tab item. 180 * The builder needs to be transferred. 181 * @type { () => void }. 182 * @syscap SystemCapability.ArkUI.ArkUI.Full 183 * @since 10 184 */ 185 /** 186 * Content builder. Each component corresponds to a tab item. 187 * The builder needs to be transferred. 188 * @type { () => void }. 189 * @syscap SystemCapability.ArkUI.ArkUI.Full 190 * @atomicservice 191 * @since 11 192 */ 193 @BuilderParam 194 swiperContent: () => void; 195} 196