Class

AdwSidebarItem

unstable since: 1.9

Description [src]

class Adw.SidebarItem : GObject.Object
{
  /* No available fields */
}

An item within AdwSidebarSection.

Sidebar items must have a title, set via AdwSidebarItem:title.

Sidebar items should, but are not required to, have an icon. Icons can be set from an icon name, via AdwSidebarItem:icon-name, or a GdkPaintable, via AdwSidebarItem:icon-paintable.

Items can also have subtitles, set with the AdwSidebarItem:subtitle property. Subtitles should be used sparingly.

To add a tooltip, use AdwSidebarItem:tooltip. Tooltips always use Pango markup.

Items can have an arbitrary suffix widget, set with the AdwSidebarItem:suffix properties. It will be displayed at the end of its row, or before the arrow in the ADW_SIDEBAR_MODE_PAGE mode.

To hide or disable the item, use the AdwSidebarItem:visible and AdwSidebarItem:enabled properties respectively.

To access the items’s section, use AdwSidebarItem:section.

It’s also possible to access the index of the item in both the section and the sidebar, using adw_sidebar_item_get_section_index() and adw_sidebar_item_get_index() respectively.

Dragging content over sidebar items activates them by default. To disable this behavior, set AdwSidebarItem:drag-motion-activate to FALSE.

AdwSidebarItem is derivable, and applications that need to associate each page with data can store it in the items themselves this way.

Available since: 1.9

Hierarchy

hierarchy this AdwSidebarItem ancestor_0 GObject ancestor_0--this

Ancestors

Constructors

adw_sidebar_item_new

Creates a new AdwSidebarItem with title as its title.

unstable since: 1.9

Instance methods

adw_sidebar_item_get_drag_motion_activate

Gets whether self will be activated on pointer motion during Drag-and-Drop.

unstable since: 1.9

adw_sidebar_item_get_enabled

Gets whether self is enabled.

unstable since: 1.9

adw_sidebar_item_get_icon_name

Gets the icon name for item.

unstable since: 1.9

adw_sidebar_item_get_icon_paintable

Gets the paintable used as the icon for item.

unstable since: 1.9

adw_sidebar_item_get_index

Gets index of self within its AdwSidebar.

unstable since: 1.9

adw_sidebar_item_get_section

Gets the section self is in.

unstable since: 1.9

adw_sidebar_item_get_section_index

Gets index of self within its AdwSidebarSection.

unstable since: 1.9

adw_sidebar_item_get_subtitle

Gets the subtitle of self.

unstable since: 1.9

adw_sidebar_item_get_suffix

Gets the suffix widget for self.

unstable since: 1.9

adw_sidebar_item_get_title

Gets the title of self.

unstable since: 1.9

adw_sidebar_item_get_tooltip

Gets the tooltip of self.

unstable since: 1.9

adw_sidebar_item_get_use_underline

Gets whether an underline in the title indicates a mnemonic.

unstable since: 1.9

adw_sidebar_item_get_visible

Gets whether self is visible.

unstable since: 1.9

adw_sidebar_item_set_drag_motion_activate

Sets whether to activate self on pointer motion during Drag-and-Drop.

unstable since: 1.9

adw_sidebar_item_set_enabled

Sets whether self is enabled.

unstable since: 1.9

adw_sidebar_item_set_icon_name

Sets the icon name for item.

unstable since: 1.9

adw_sidebar_item_set_icon_paintable

Sets the paintable to use as the icon for item.

unstable since: 1.9

adw_sidebar_item_set_subtitle

Sets the subtitle of self.

unstable since: 1.9

adw_sidebar_item_set_suffix

Sets the suffix widget for self.

unstable since: 1.9

adw_sidebar_item_set_title

Sets the title of self.

unstable since: 1.9

adw_sidebar_item_set_tooltip

Sets the tooltip of self.

unstable since: 1.9

adw_sidebar_item_set_use_underline

Sets whether an underline in the title indicates a mnemonic.

unstable since: 1.9

adw_sidebar_item_set_visible

Sets whether self is visible.

unstable since: 1.9

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Properties

Adw.SidebarItem:drag-motion-activate

Whether to activate the item on pointer motion during Drag-and-Drop.

unstable since: 1.9

Adw.SidebarItem:enabled

Whether the item is enabled.

unstable since: 1.9

Adw.SidebarItem:icon-name

The icon name for this item.

unstable since: 1.9

Adw.SidebarItem:icon-paintable

The paintable to use as the icon for this item.

unstable since: 1.9

Adw.SidebarItem:section

The section the item is in.

unstable since: 1.9

Adw.SidebarItem:subtitle

Subtitle of the item.

unstable since: 1.9

Adw.SidebarItem:suffix

The suffix widget for this item.

unstable since: 1.9

Adw.SidebarItem:title

Title of the item.

unstable since: 1.9

Adw.SidebarItem:tooltip

The tooltip of the item.

unstable since: 1.9

Adw.SidebarItem:use-underline

Whether an underline in the title indicates a mnemonic.

unstable since: 1.9

Adw.SidebarItem:visible

Whether the item is visible.

unstable since: 1.9

Signals

Signals inherited from GObject (1)
GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

Class structure

struct AdwSidebarItemClass {
  GObjectClass parent_class;
  
}

No description available.

Class members
parent_class: GObjectClass

The parent class.