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
//! A link inside a rich-text paragraph.
//!
//! The paragraph stays one rich-text node, so its text wraps and selects as
//! one; each link in it is a child node of that paragraph with no box of its
//! own. Laying out the paragraph places the link where its words fell: the
//! link's bounds are the box of its first laid-out line, and the pointer hits
//! it anywhere on its words and what follows them (its target), line by line.
//! Being a node, a link takes the keyboard focus, is a Tab stop, takes clicks
//! and Enter, shows a pointer cursor and is listed by inspection tools like
//! any control. The paragraph paints the link's states (hover and keyboard
//! focus colors, fills and focus ring) from the link's laid-out lines.
use ;
use crate::;
/// Which spans of its paragraph a link covers, and how the paragraph paints
/// its states.
pub
pub
/// The bytes `range` of `text` (the concatenated `spans`) without the bytes
/// of the `generated` spans. `generated` is sorted, as a paragraph records
/// it, so spans and ranges are walked together once: linear in both, for a
/// paragraph with many links that renders on every streamed update.
pub