1.30 <AdwInlineViewSwitcher>

Class: <AdwInlineViewSwitcher>

It derives from <GtkWidget>.

A view switcher that uses a toggle group.

A view switcher showing pages of an ViewStack within an ToggleGroup, similar to ViewSwitcher.

The toggles can display either an icon, a label or both. Use the InlineViewSwitcher:display-mode to control this.

CSS nodes

<AdwInlineViewSwitcher> has a single CSS node with the name inline-view-switcher.

Style classes

Like <AdwToggleGroup>, it can accept the ‘.flat‘ and ‘.round‘ style classes.

Accessibility

The internal toggle group uses the Gtk.AccessibleRole.tab-list role. Its toggles use the Gtk.AccessibleRole.tab role.

See also: ViewSwitcher, ViewSwitcherBar, ViewSwitcherSidebar.

Properties

Property: inline-view-switcher:can-shrink self

Whether the toggles can be smaller than the natural size of their contents.

If set to TRUE, the toggle labels will ellipsize.

See ToggleGroup:can-shrink.

Its value is a boolean.

Set it with (set! (inline-view-switcher:can-shrink self) value).

Property: inline-view-switcher:display-mode self

The display mode.

Determines what the toggles display: a label, an icon or both.

Its value is a <AdwInlineViewSwitcherDisplayMode> (or, to set it, one of its symbols).

Set it with (set! (inline-view-switcher:display-mode self) value).

Property: inline-view-switcher:homogeneous self

Whether all toggles take the same size.

Its value is a boolean.

Set it with (set! (inline-view-switcher:homogeneous self) value).

Property: inline-view-switcher:stack self

The stack the view switcher controls.

Its value is a <AdwViewStack>, or #f.

Set it with (set! (inline-view-switcher:stack self) value).

Procedures

Method: inline-view-switcher:get-can-shrink? self ⇒ %return
Method: get-can-shrink? self ⇒ %return

Gets whether the toggles can be smaller than the natural size of their contents.

self

Passed: a <AdwInlineViewSwitcher>.

an inline stack switcher

%return

Returned: a boolean.

whether the toggles can shrink

Method: inline-view-switcher:get-display-mode self ⇒ %return
Method: get-display-mode self ⇒ %return

Gets the display mode of self.

self

Passed: a <AdwInlineViewSwitcher>.

an inline stack switcher

%return

Returned: a <AdwInlineViewSwitcherDisplayMode>.

the display mode

Method: inline-view-switcher:get-homogeneous? self ⇒ %return
Method: get-homogeneous? self ⇒ %return

Gets whether all toggles within self take the same size.

self

Passed: a <AdwInlineViewSwitcher>.

an inline stack switcher

%return

Returned: a boolean.

whether all toggles take the same size

Method: inline-view-switcher:get-stack self ⇒ %return
Method: get-stack self ⇒ %return

Gets the stack self controls.

self

Passed: a <AdwInlineViewSwitcher>.

an inline stack switcher

%return

Returned: a <AdwViewStack>, or #f.

The stack of self

Procedure: inline-view-switcher:new ⇒ %return

Creates a new <AdwInlineViewSwitcher>.

%return

Returned: a <GtkWidget>.

the newly created <AdwInlineViewSwitcher>

Method: inline-view-switcher:set-can-shrink self can-shrink
Method: set-can-shrink self can-shrink

Sets whether the toggles can be smaller than the natural size of their contents.

If can-shrink is TRUE, the toggle labels will ellipsize.

See ToggleGroup:can-shrink.

self

Passed: a <AdwInlineViewSwitcher>.

an inline stack switcher

can-shrink

Passed: a boolean.

whether the toggles can shrink

Method: inline-view-switcher:set-display-mode self mode
Method: set-display-mode self mode

Sets the display mode of self.

Determines what the toggles display: a label, an icon or both.

self

Passed: a <AdwInlineViewSwitcher>.

an inline stack switcher

mode

Passed: a <AdwInlineViewSwitcherDisplayMode>, or one of its symbols.

the display mode

Method: inline-view-switcher:set-homogeneous self homogeneous
Method: set-homogeneous self homogeneous

Sets whether all toggles within self take the same size.

self

Passed: a <AdwInlineViewSwitcher>.

an inline stack switcher

homogeneous

Passed: a boolean.

whether all toggles should take the same size

Method: inline-view-switcher:set-stack self [stack]
Method: set-stack self [stack]

Sets the stack to control.

self

Passed: a <AdwInlineViewSwitcher>.

an inline stack switcher

stack

Passed, or left out: a <AdwViewStack>, or #f.

a stack