forked from NativeScript/NativeScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathspan.d.ts
More file actions
76 lines (63 loc) · 2.18 KB
/
span.d.ts
File metadata and controls
76 lines (63 loc) · 2.18 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
declare module "text/span" {
import colorModule = require("color");
import bindable = require("ui/core/bindable");
import formattedString = require("text/formatted-string");
/**
* A class used to create a single part of formatted string with a common text properties.
*/
class Span extends bindable.Bindable {
/**
* Gets or sets the font family of the span.
*/
public fontFamily: string;
/**
* Gets or sets the font size of the span.
*/
public fontSize: number;
/**
* Gets or sets the font attributes of the span.
* It could be set to more than one value e.g. (Bold | Italic).
*/
public fontAttributes: number;
/**
* Gets or sets the font foreground color of the span.
*/
public foregroundColor: colorModule.Color;
/**
* Gets or sets the font background color of the span.
*/
public backgroundColor: colorModule.Color;
/**
* Gets or sets underline for the span.
*/
public underline: number;
/**
* Gets or sets strikethrough for the span.
*/
public strikethrough: number;
/**
* A collection of modifiers build upon all text related properties.
*/
public spanModifiers: Array<any>;
/**
* Gets or sets the text for the span.
*/
public text: string;
/**
* An instance of the parent formatted string (used internally to support some short hand property settings).
*/
public parentFormattedString: formattedString.FormattedString;
/**
* Updates all span modifiers according to current values of all text related properties.
*/
public updateSpanModifiers(parent: formattedString.FormattedString): void;
/**
* Initializes a process of updating a span (text related property(s)).
*/
public beginEdit(): void;
/**
* Ends the process previously initiated by beginEdit and updates the span modifiers collection.
*/
public endEdit(): void;
}
}