1 | import { View, AddChildFromBuilder } from '../core/view';
|
2 | import { FormattedString } from './formatted-string';
|
3 | import { Style } from '../styling/style';
|
4 | import { Length } from '../styling/style-properties';
|
5 | import { Property, CssProperty, InheritedCssProperty } from '../core/properties';
|
6 | import { CoreTypes } from '../../core-types';
|
7 | import { CSSShadow } from '../styling/css-shadow';
|
8 |
|
9 | export class TextBase extends View implements AddChildFromBuilder {
|
10 | |
11 |
|
12 |
|
13 |
|
14 | public readonly nativeTextViewProtected: any;
|
15 |
|
16 | |
17 |
|
18 |
|
19 | text: string;
|
20 |
|
21 | |
22 |
|
23 |
|
24 | formattedText: FormattedString;
|
25 |
|
26 | |
27 |
|
28 |
|
29 | fontSize: number;
|
30 |
|
31 | |
32 |
|
33 |
|
34 | letterSpacing: number;
|
35 |
|
36 | |
37 |
|
38 |
|
39 | lineHeight: number;
|
40 |
|
41 | |
42 |
|
43 |
|
44 | textAlignment: CoreTypes.TextAlignmentType;
|
45 |
|
46 | |
47 |
|
48 |
|
49 | textDecoration: CoreTypes.TextDecorationType;
|
50 |
|
51 | |
52 |
|
53 |
|
54 | textTransform: CoreTypes.TextTransformType;
|
55 |
|
56 | |
57 |
|
58 |
|
59 | textShadow: CSSShadow;
|
60 |
|
61 | |
62 |
|
63 |
|
64 | whiteSpace: CoreTypes.WhiteSpaceType;
|
65 |
|
66 | |
67 |
|
68 |
|
69 | padding: string | CoreTypes.LengthType;
|
70 |
|
71 | |
72 |
|
73 |
|
74 | paddingBottom: CoreTypes.LengthType;
|
75 |
|
76 | |
77 |
|
78 |
|
79 | paddingLeft: CoreTypes.LengthType;
|
80 |
|
81 | |
82 |
|
83 |
|
84 | paddingRight: CoreTypes.LengthType;
|
85 |
|
86 | |
87 |
|
88 |
|
89 | paddingTop: CoreTypes.LengthType;
|
90 |
|
91 | |
92 |
|
93 |
|
94 |
|
95 |
|
96 |
|
97 |
|
98 | _addChildFromBuilder(name: string, value: any): void;
|
99 |
|
100 |
|
101 | |
102 |
|
103 |
|
104 |
|
105 | _requestLayoutOnTextChanged(): void;
|
106 |
|
107 | |
108 |
|
109 |
|
110 | _setNativeText(reset?: boolean): void;
|
111 |
|
112 | |
113 |
|
114 |
|
115 | _isSingleLine: boolean;
|
116 |
|
117 | }
|
118 |
|
119 | export interface TextTransformation {
|
120 | new (owner: TextBase): any ;
|
121 | }
|
122 |
|
123 | export const textProperty: Property<TextBase, string>;
|
124 | export const formattedTextProperty: Property<TextBase, FormattedString>;
|
125 |
|
126 | export const textAlignmentProperty: InheritedCssProperty<Style, CoreTypes.TextAlignmentType>;
|
127 | export const textDecorationProperty: CssProperty<Style, CoreTypes.TextDecorationType>;
|
128 | export const textTransformProperty: CssProperty<Style, CoreTypes.TextTransformType>;
|
129 | export const textShadowProperty: CssProperty<Style, CSSShadow>;
|
130 | export const whiteSpaceProperty: CssProperty<Style, CoreTypes.WhiteSpaceType>;
|
131 | export const letterSpacingProperty: CssProperty<Style, number>;
|
132 | export const lineHeightProperty: CssProperty<Style, number>;
|
133 |
|
134 |
|
135 | export function getTransformedText(text: string, textTransform: CoreTypes.TextTransformType): string;
|
136 |
|
137 | export const resetSymbol: symbol;
|