pub struct SidebarItemBuilder { /* private fields */ }v1_9 only.Expand description
A builder-pattern type to construct SidebarItem objects.
Implementations§
Source§impl SidebarItemBuilder
impl SidebarItemBuilder
Sourcepub fn drag_motion_activate(self, drag_motion_activate: bool) -> Self
pub fn drag_motion_activate(self, drag_motion_activate: bool) -> Self
Whether to activate the item on pointer motion during Drag-and-Drop.
This is needed to be able to drag content into the page the item represents, when the sidebar is used as a page switcher. However, it may be unwanted when dropping content onto the item itself, so it can be disabled.
Sourcepub fn icon_name(self, icon_name: impl Into<GString>) -> Self
pub fn icon_name(self, icon_name: impl Into<GString>) -> Self
The icon name for this item.
Mutually exclusive with icon-paintable.
Sourcepub fn icon_paintable(self, icon_paintable: &impl IsA<Paintable>) -> Self
pub fn icon_paintable(self, icon_paintable: &impl IsA<Paintable>) -> Self
The paintable to use as the icon for this item.
Mutually exclusive with icon-name.
Sourcepub fn suffix(self, suffix: &impl IsA<Widget>) -> Self
pub fn suffix(self, suffix: &impl IsA<Widget>) -> Self
The suffix widget for this item.
Suffix will be shown at the end of the item’s row, or before the arrow in the [enum@Adw.SidebarMode.PAGE] mode.
Sourcepub fn tooltip(self, tooltip: impl Into<GString>) -> Self
pub fn tooltip(self, tooltip: impl Into<GString>) -> Self
The tooltip of the item.
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 underline in the title indicates a mnemonic.
The mnemonic can be used to activate the item.
Sourcepub fn build(self) -> SidebarItem
pub fn build(self) -> SidebarItem
Build the SidebarItem.