1/* 2 * Copyright (c) 2022-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 * Defines the Menu Component. 18 * 19 * @interface MenuInterface 20 * @syscap SystemCapability.ArkUI.ArkUI.Full 21 * @since 9 22 */ 23/** 24 * Defines the Menu Component. 25 * 26 * @interface MenuInterface 27 * @syscap SystemCapability.ArkUI.ArkUI.Full 28 * @crossplatform 29 * @since 10 30 */ 31interface MenuInterface { 32 /** 33 * Creates the menu component. 34 * 35 * @returns { MenuAttribute } 36 * @syscap SystemCapability.ArkUI.ArkUI.Full 37 * @since 9 38 */ 39 /** 40 * Creates the menu component. 41 * 42 * @returns { MenuAttribute } 43 * @syscap SystemCapability.ArkUI.ArkUI.Full 44 * @crossplatform 45 * @since 10 46 */ 47 (): MenuAttribute; 48} 49 50/** 51 * Defines the Menu component attribute functions. 52 * 53 * @extends CommonMethod 54 * @syscap SystemCapability.ArkUI.ArkUI.Full 55 * @since 9 56 */ 57/** 58 * Defines the Menu component attribute functions. 59 * 60 * @extends CommonMethod 61 * @syscap SystemCapability.ArkUI.ArkUI.Full 62 * @crossplatform 63 * @since 10 64 */ 65declare class MenuAttribute extends CommonMethod<MenuAttribute> { 66 /** 67 * Sets the Menu text size. 68 * 69 * @param { Length } value - Indicates the font size of menu item. 70 * @returns { MenuAttribute } 71 * @syscap SystemCapability.ArkUI.ArkUI.Full 72 * @since 9 73 * @deprecated since 10 74 * @useinstead font 75 */ 76 fontSize(value: Length): MenuAttribute; 77 78 /** 79 * Sets the font style. 80 * Family and style are not supported currently and will be fixed in future. 81 * 82 * @param { Font } value - Indicates the font style of menu item. 83 * @returns { MenuAttribute } 84 * @syscap SystemCapability.ArkUI.ArkUI.Full 85 * @crossplatform 86 * @since 10 87 */ 88 font(value: Font): MenuAttribute; 89 90 /** 91 * Sets the Menu font color. 92 * 93 * @param { ResourceColor } value - Indicates the font color of menu item. 94 * @returns { MenuAttribute } 95 * @syscap SystemCapability.ArkUI.ArkUI.Full 96 * @crossplatform 97 * @since 10 98 */ 99 fontColor(value: ResourceColor): MenuAttribute; 100 101 /** 102 * Sets the radius of the corner around the menu. 103 * When the radius is less than the menu width, the default border radius is used. 104 * 105 * @param { Dimension | BorderRadiuses } value - the border radius. 106 * @returns { MenuAttribute } 107 * @syscap SystemCapability.ArkUI.ArkUI.Full 108 * @crossplatform 109 * @since 10 110 */ 111 radius(value: Dimension | BorderRadiuses): MenuAttribute; 112} 113 114/** 115 * Defines Menu Component. 116 * 117 * @syscap SystemCapability.ArkUI.ArkUI.Full 118 * @since 9 119 */ 120/** 121 * Defines Menu Component. 122 * 123 * @syscap SystemCapability.ArkUI.ArkUI.Full 124 * @crossplatform 125 * @since 10 126 */ 127declare const Menu: MenuInterface; 128 129/** 130 * Defines Menu Component instance. 131 * 132 * @syscap SystemCapability.ArkUI.ArkUI.Full 133 * @since 9 134 */ 135/** 136 * Defines Menu Component instance. 137 * 138 * @syscap SystemCapability.ArkUI.ArkUI.Full 139 * @crossplatform 140 * @since 10 141 */ 142declare const MenuInstance: MenuAttribute; 143