forked from NativeScript/NativeScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathformatted-string.d.ts
More file actions
76 lines (64 loc) · 2.61 KB
/
formatted-string.d.ts
File metadata and controls
76 lines (64 loc) · 2.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/**
* Contains the FormattedString and Span classes, which are used to create a formatted (rich text) strings.
*/
declare module "text/formatted-string" {
import spanModule = require("text/span");
import observable = require("data/observable");
import observableArray = require("data/observable-array");
import colorModule = require("color");
import view = require("ui/core/view");
/**
* A class used to create a formatted (rich text) string.
*/
class FormattedString extends observable.Observable {
/**
* An observable collection of Span objects used to define common text properties.
*/
public spans: observableArray.ObservableArray<spanModule.Span>;
/**
* Initializes a new instance of FormattedString class.
*/
constructor();
/**
* A human readable representation of the formatted string.
*/
public toString(): string;
/**
* Gets or sets the font family which will be used for all spans that not have a specific value for font family.
*/
public fontFamily: string;
/**
* Gets or sets the font size which will be used for all spans that not have a specific value for font size.
*/
public fontSize: number;
/**
* Gets or sets the font attributes which will be used for all spans that not have a specific value for font attributes.
*/
public fontAttributes: number;
/**
* Gets or sets the font foreground color which will be used for all spans that not have a specific value for font foreground color.
*/
public foregroundColor: colorModule.Color;
/**
* Gets or sets the font background color which will be used for all spans that not have a specific value for font background color.
*/
public backgroundColor: colorModule.Color;
/**
* Gets or sets underline which will be used for all spans that not have a specific value for underline.
*/
public underline: number;
/**
* Gets or sets strikethrough which will be used for all spans that not have a specific value for strikethrough.
*/
public strikethrough: number;
/**
* Propogates binding context through the spans collection.
* @param newBindingContext The value of the newly set binding context.
*/
public updateSpansBindingContext(newBindingContext: any): void
/**
* Gets the parent view of the formatted string.
*/
public parent: view.View;
}
}