/* * Copyright (c) 2021 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. */ import {CommonMethod, Color, Resource} from "./common"; export declare enum FontStyle { Normal, Italic } export declare enum FontWeight { Lighter, Normal, Regular, Medium, Bold, Bolder } export declare enum TextAlign { Center, Start, End } export declare enum TextOverflow { Clip, Ellipsis, None } export declare enum TextDecorationType { None, Underline, Overline, LineThrough } export declare enum TextCase { Normal, LowerCase, UpperCase } export declare class TextExtend extends TextAttribute { } interface Text extends TextAttribute { (content?: string | Resource): Text; } declare class TextAttribute extends CommonMethod { fontColor(value: Color | number | string | Resource): T; fontSize(value: number | string | Resource): T; minFontSize(value: number | string | Resource): T; maxFontSize(value: number | string | Resource): T; fontStyle(value: FontStyle): T; fontWeight(value: number | FontWeight | string): T; textAlign(value: TextAlign): T; lineHeight(value: number | string | Resource): T; textOverflow(value: { overflow: TextOverflow }): T; fontFamily(value: string | Resource): T; maxLines(value: number): T; decoration(value: { type: TextDecorationType, color?: Color | number | string | Resource }): T; letterSpacing(value: number | string): T; textCase(value: TextCase): T; baselineOffset(value: number | string): T; } export declare const TextInterface: Text;