pub struct RowMark { /* private fields */ }Expand description
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.
A tone never comes on its own: 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);Implementations§
Source§impl RowMark
impl RowMark
Sourcepub fn sign(self, icon: impl Into<String>, tone: impl Into<String>) -> Self
pub fn sign(self, icon: impl Into<String>, tone: impl Into<String>) -> Self
The row’s icon becomes icon in the colour tone, both of the icon set and the theme:
"warning", "danger", "success" and the rest of the theme’s own tokens.
The two come together on purpose: a colour alone says nothing to a person who cannot tell it from another, and says nothing at all in the sixteen-colour or the ASCII mode.
Trait Implementations§
impl Eq for RowMark
impl StructuralPartialEq for RowMark
Auto Trait Implementations§
impl Freeze for RowMark
impl RefUnwindSafe for RowMark
impl Send for RowMark
impl Sync for RowMark
impl Unpin for RowMark
impl UnsafeUnpin for RowMark
impl UnwindSafe for RowMark
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more