pub struct ToggleBuilder { /* private fields */ }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 description(self, description: impl Into<GString>) -> Self
Available on crate feature v1_9 only.
pub fn description(self, description: impl Into<GString>) -> Self
v1_9 only.The description of the toggle.
The description will be read out when using screen reader. If not set,
tooltip will be used instead.
See [enum@Gtk.AccessibleProperty.description].
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 still 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.
Tooltip text will also be used as accessible description. Use
description to set it separately.
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.