UNPKG

@nativescript/core

Version:

A JavaScript library providing an easy to use api for interacting with iOS and Android platform APIs.

80 lines (79 loc) 4.61 kB
import { maxLinesProperty, textOverflowProperty } from './text-base-common'; import { ShadowCSSValues } from '../styling/css-shadow'; import { Font } from '../styling/font'; import { TextBaseCommon, formattedTextProperty, textAlignmentProperty, textDecorationProperty, textProperty, textTransformProperty, textShadowProperty, textStrokeProperty, letterSpacingProperty, whiteSpaceProperty, lineHeightProperty } from './text-base-common'; import { Color } from '../../color'; import { colorProperty, fontSizeProperty, fontInternalProperty, paddingLeftProperty, paddingTopProperty, paddingRightProperty, paddingBottomProperty, directionProperty } from '../styling/style-properties'; import { StrokeCSSValues } from '../styling/css-stroke'; import { FormattedString } from './formatted-string'; import { CoreTypes } from '../../core-types'; import { accessibilityIdentifierProperty } from '../../accessibility/accessibility-properties'; import { testIDProperty } from '../core/view'; export * from './text-base-common'; export interface TextTransformation { new (owner: TextBase): android.text.method.TransformationMethod; } export declare class TextBase extends TextBaseCommon { [textProperty.getDefault]: () => symbol | number; [textProperty.setNative]: (value: string | number | symbol) => void; [textStrokeProperty.setNative]: (value: StrokeCSSValues) => void; [formattedTextProperty.setNative]: (value: FormattedString) => void; [textTransformProperty.setNative]: (value: CoreTypes.TextTransformType) => void; [textAlignmentProperty.getDefault]: () => CoreTypes.TextAlignmentType; [textAlignmentProperty.setNative]: (value: CoreTypes.TextAlignmentType) => void; [whiteSpaceProperty.setNative]: (value: CoreTypes.WhiteSpaceType) => void; [textOverflowProperty.setNative]: (value: CoreTypes.TextOverflowType) => void; [directionProperty.setNative]: (value: CoreTypes.LayoutDirectionType) => void; [colorProperty.getDefault]: () => android.content.res.ColorStateList; [colorProperty.setNative]: (value: Color | android.content.res.ColorStateList) => void; [fontSizeProperty.getDefault]: () => { nativeSize: number; }; [fontSizeProperty.setNative]: (value: number | { nativeSize: number; }) => void; [fontInternalProperty.getDefault]: () => android.graphics.Typeface; [fontInternalProperty.setNative]: (value: Font | android.graphics.Typeface) => void; [textDecorationProperty.getDefault]: () => number; [textDecorationProperty.setNative]: (value: number | CoreTypes.TextDecorationType) => void; [textShadowProperty.getDefault]: () => { radius: number; offsetX: number; offsetY: number; color: number; }; [textShadowProperty.setNative]: (value: ShadowCSSValues) => void; [paddingTopProperty.getDefault]: () => CoreTypes.LengthType; [paddingTopProperty.setNative]: (value: CoreTypes.LengthType) => void; [paddingRightProperty.getDefault]: () => CoreTypes.LengthType; [paddingRightProperty.setNative]: (value: CoreTypes.LengthType) => void; [paddingBottomProperty.getDefault]: () => CoreTypes.LengthType; [paddingBottomProperty.setNative]: (value: CoreTypes.LengthType) => void; [paddingLeftProperty.getDefault]: () => CoreTypes.LengthType; [paddingLeftProperty.setNative]: (value: CoreTypes.LengthType) => void; [lineHeightProperty.getDefault]: () => number; [lineHeightProperty.setNative]: (value: number) => void; [letterSpacingProperty.getDefault]: () => number; [letterSpacingProperty.setNative]: (value: number) => void; [testIDProperty.setNative]: (value: string) => void; [accessibilityIdentifierProperty.setNative]: (value: string) => void; [maxLinesProperty.setNative]: (value: CoreTypes.MaxLinesType) => void; nativeViewProtected: org.nativescript.widgets.StyleableTextView; private _defaultTransformationMethod; private _paintFlags; private _minHeight; private _maxHeight; private _minLines; private _maxLines; private _tappable; private _defaultMovementMethod; get nativeTextViewProtected(): org.nativescript.widgets.StyleableTextView; initNativeView(): void; disposeNativeView(): void; resetNativeView(): void; createFormattedTextNative(value: FormattedString): globalAndroid.text.SpannableStringBuilder; private adjustLineBreak; _setNativeText(reset?: boolean): void; _setTappableState(tappable: boolean): void; } export declare function getTransformedText(text: string, textTransform: CoreTypes.TextTransformType): string;