pub struct ToggleBuilder { /* private fields */ }
Available on crate feature
v1_7
only.Expand description
A builder-pattern type to construct Toggle
objects.
Implementations§
source§impl ToggleBuilder
impl ToggleBuilder
sourcepub fn child(self, child: &impl IsA<Widget>) -> Self
pub fn child(self, child: &impl IsA<Widget>) -> Self
The toggle child.
When the child is set, icon and label are not displayed.
It’s recommended to still set the label, as it can still be used by the screen reader.
sourcepub fn icon_name(self, icon_name: impl Into<GString>) -> Self
pub fn icon_name(self, icon_name: impl Into<GString>) -> Self
The toggle icon name.
The icon will be displayed alone or next to the label, unless
child
is set.
sourcepub fn label(self, label: impl Into<GString>) -> Self
pub fn label(self, label: impl Into<GString>) -> Self
The toggle label.
The label will be displayed alone or next to the icon, unless
child
is set, but will stil be read out by the screen
reader.
sourcepub fn tooltip(self, tooltip: impl Into<GString>) -> Self
pub fn tooltip(self, tooltip: impl Into<GString>) -> Self
The tooltip of the toggle.
The tooltip can be marked up with the Pango text markup language.
sourcepub fn use_underline(self, use_underline: bool) -> Self
pub fn use_underline(self, use_underline: bool) -> Self
Whether an embedded underline in the label indicates a mnemonic.
See label
.
Auto Trait Implementations§
impl Freeze for ToggleBuilder
impl RefUnwindSafe for ToggleBuilder
impl !Send for ToggleBuilder
impl !Sync for ToggleBuilder
impl Unpin for ToggleBuilder
impl UnwindSafe for ToggleBuilder
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