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
77
78
79
80
81
82
83
84
//! What an application says about the look of one row of a [`FileManager`](super::FileManager).
//!
//! The manager knows names and folders; what an entry *means* to the application it cannot know.
//! A mark is how the application says it: a sign with a tone, a faint row, or both.
/// How one row of a file manager looks, beyond what the manager itself knows.
///
/// An application marks a row to say something about the entry the manager cannot know: that a
/// backup leaves it out, that it is ignored by a version control system, that it has not been
/// saved. Give one with [`FileManager::row_mark`](super::FileManager::row_mark).
///
/// A tone never comes on its own: [`sign`](Self::sign) takes the icon and the colour together, so
/// a marked row is still told apart where colours are off or cannot be told apart.
///
/// ```
/// use qframe::widgets::RowMark;
///
/// // An entry the backup leaves out: a warning sign, and the row faint.
/// let left_out = RowMark::new().sign("warning", "warning").faint(true);
/// assert_eq!(left_out.icon(), Some("warning"));
/// assert_eq!(left_out.tone(), Some("warning"));
/// assert!(left_out.is_faint());
///
/// // Faintness alone needs no sign: nothing is being said in colour.
/// let quiet = RowMark::new().faint(true);
/// assert_eq!(quiet.icon(), None);
/// ```