/* * Copyright (c) 2021-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * Provide text decoration. * * @interface SpanInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Provide text decoration. * * @interface SpanInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * Provide text decoration. * * @interface SpanInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ interface SpanInterface { /** * Called when text is entered in span. * * @param { string | Resource } value * @returns { SpanAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Called when text is entered in span. * * @param { string | Resource } value * @returns { SpanAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * Called when text is entered in span. * * @param { string | Resource } value * @returns { SpanAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ (value: string | Resource): SpanAttribute; } /** * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ declare class SpanAttribute extends CommonMethod { /** * Called when the font is set. * * @param { Font } value - the span font size and weight and family and style. * @returns { SpanAttribute } The attribute of the span. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ font(value: Font): SpanAttribute; /** * Called when the font color is set. * * @param { ResourceColor } value * @returns { SpanAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Called when the font color is set. * * @param { ResourceColor } value * @returns { SpanAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * Called when the font color is set. * * @param { ResourceColor } value * @returns { SpanAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ fontColor(value: ResourceColor): SpanAttribute; /** * Called when the font size is set. * * @param { number | string | Resource } value * @returns { SpanAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Called when the font size is set. * * @param { number | string | Resource } value * @returns { SpanAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * Called when the font size is set. * * @param { number | string | Resource } value * @returns { SpanAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ fontSize(value: number | string | Resource): SpanAttribute; /** * Called when the font style of a font is set. * * @param { FontStyle } value * @returns { SpanAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Called when the font style of a font is set. * * @param { FontStyle } value * @returns { SpanAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * Called when the font style of a font is set. * * @param { FontStyle } value * @returns { SpanAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ fontStyle(value: FontStyle): SpanAttribute; /** * Called when the font weight is set. * * @param { number | FontWeight | string } value * @returns { SpanAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Called when the font weight is set. * * @param { number | FontWeight | string } value * @returns { SpanAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * Called when the font weight is set. * * @param { number | FontWeight | string } value * @returns { SpanAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ fontWeight(value: number | FontWeight | string): SpanAttribute; /** * Called when the font list of text is set. * * @param { string | Resource } value * @returns { SpanAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Called when the font list of text is set. * * @param { string | Resource } value * @returns { SpanAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * Called when the font list of text is set. * * @param { string | Resource } value * @returns { SpanAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ fontFamily(value: string | Resource): SpanAttribute; /** * Called when the text decoration of the text is set. * * @param { object } value * @returns { SpanAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Called when the text decoration of the text is set. * * @param { object } value * @returns { SpanAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * Called when the text decoration of the text is set. * * @param { object } value * @returns { SpanAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ decoration(value: { type: TextDecorationType; color?: ResourceColor }): SpanAttribute; /** * Called when the distance between text fonts is set. * * @param { number | string } value * @returns { SpanAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Called when the distance between text fonts is set. * * @param { number | string } value * @returns { SpanAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * Called when the distance between text fonts is set. * * @param { number | string } value * @returns { SpanAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ letterSpacing(value: number | string): SpanAttribute; /** * Called when the type of letter in the text font is set. * * @param { TextCase } value * @returns { SpanAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Called when the type of letter in the text font is set. * * @param { TextCase } value * @returns { SpanAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * Called when the type of letter in the text font is set. * * @param { TextCase } value * @returns { SpanAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ textCase(value: TextCase): SpanAttribute; /** * Called when the line height of the span is set. * * @param { Length } value - The line height of the span. * @returns { SpanAttribute } The attribute of the span. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ lineHeight(value: Length): SpanAttribute; } /** * Defines Span Component. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Defines Span Component. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * Defines Span Component. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ declare const Span: SpanInterface; /** * Defines Span Component instance. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Defines Span Component instance. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @form */ /** * Defines Span Component instance. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 * @form */ declare const SpanInstance: SpanAttribute;