It derives from <GtkWidget>.
A view switcher action bar.
An action bar letting you switch between multiple views contained in a
ViewStack, via an ViewSwitcher. It is designed to be put
at the bottom of a window and to be revealed only on really narrow
windows, e.g. on mobile phones. It can’t be revealed if there are less
than two pages.
<AdwViewSwitcherBar> is intended to be
used together with <AdwViewSwitcher> in a
header bar, and a Breakpoint showing the view switcher bar on
narrow sizes, while removing the view switcher from the header bar, as
follows:
<object class="AdwWindow">
<child>
<object class="AdwBreakpoint">
<condition>max-width: 550sp</condition>
<setter object="switcher_bar" property="reveal">True</setter>
<setter object="header_bar" property="title-widget"/>
</object>
</child>
<property name="content">
<object class="AdwToolbarView">
<child type="top">
<object class="AdwHeaderBar" id="header_bar">
<property name="title-widget">
<object class="AdwViewSwitcher">
<property name="stack">stack</property>
<property name="policy">wide</property>
</object>
</property>
</object>
</child>
<property name="content">
<object class="AdwViewStack" id="stack"/>
</property>
<child type="bottom">
<object class="AdwViewSwitcherBar" id="switcher_bar">
<property name="stack">stack</property>
</object>
</child>
</object>
</property>
</object>
It’s recommended to set ViewSwitcher:policy to
Adw.ViewSwitcherPolicy.wide in this case.
You may have to adjust the breakpoint condition for your specific pages.
<AdwViewSwitcherBar> has a single CSS node
with name‘ viewswitcherbar‘.
See also: ViewSwitcher, InlineViewSwitcher,
ViewSwitcherSidebar.
Whether the bar should be revealed or hidden.
Its value is a boolean.
Set it with (set! (view-switcher-bar:reveal self) value).
The stack the view switcher controls.
Its value is a <AdwViewStack>, or #f.
Set it with (set! (view-switcher-bar:stack self) value).
Gets whether self should be revealed or hidden.
Passed: a <AdwViewSwitcherBar>.
a view switcher bar
Returned: a boolean.
whether self is revealed
Gets the stack controlled by self.
Passed: a <AdwViewSwitcherBar>.
a view switcher bar
Returned: a <AdwViewStack>, or #f.
the stack
Creates a new <AdwViewSwitcherBar>.
Returned: a <GtkWidget>.
the newly created <AdwViewSwitcherBar>
Sets whether self should be revealed or hidden.
Passed: a <AdwViewSwitcherBar>.
a view switcher bar
Passed: a boolean.
whether to reveal self
Sets the stack controlled by self.
Passed: a <AdwViewSwitcherBar>.
a view switcher bar
Passed, or left out: a <AdwViewStack>, or
#f.
a stack