pub struct Row { /* private fields */ }Expand description
One row of a section (docs/settings.md), built by the row constructors.
Implementations§
Source§impl Row
impl Row
Sourcepub fn value_text(self, f: impl Fn(f64) -> String + 'static) -> Self
pub fn value_text(self, f: impl Fn(f64) -> String + 'static) -> Self
A slider’s value label, shown beside the control.
Sourcepub fn placeholder<M>(self, t: impl IntoText<M>) -> Self
pub fn placeholder<M>(self, t: impl IntoText<M>) -> Self
A text row’s placeholder.
Sourcepub fn destructive(self) -> Self
pub fn destructive(self) -> Self
An action drawn as destructive (red where the platform has a red).
Sourcepub fn confirm<M>(self, message: impl IntoText<M>) -> Self
pub fn confirm<M>(self, message: impl IntoText<M>) -> Self
An action that asks first: a confirm dialog with message, destructive when the
row is.
Sourcepub fn confirm_label<M>(self, label: impl IntoText<M>) -> Self
pub fn confirm_label<M>(self, label: impl IntoText<M>) -> Self
The confirm dialog’s own button label (“Reset” rather than the generic OK).
Sourcepub fn busy<M>(self, busy: impl IntoReactive<bool, M>) -> Self
pub fn busy<M>(self, busy: impl IntoReactive<bool, M>) -> Self
An action that shows a spinner and disables while this reads true: a
Signal<bool> or a closure.
Source§impl Row
impl Row
Sourcepub fn title<M>(self, t: impl IntoText<M>) -> Self
pub fn title<M>(self, t: impl IntoText<M>) -> Self
The row’s title (every row constructor takes one, this replaces it).
Sourcepub fn id(self, id: ElementId) -> Self
pub fn id(self, id: ElementId) -> Self
The element id of the row’s control (default pref-<key> for a pref row).
Sourcepub fn enabled<M>(self, enabled: impl IntoReactive<bool, M>) -> Self
pub fn enabled<M>(self, enabled: impl IntoReactive<bool, M>) -> Self
Gray the control out while this reads false: a Signal<bool>, or a derived condition
(|| !INCOGNITO.get()), tracked like any reactive read.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Row
impl !Send for Row
impl !Sync for Row
impl !UnwindSafe for Row
impl Freeze for Row
impl Unpin for Row
impl UnsafeUnpin for Row
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
Converts
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> ⓘ
Converts
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