Class
AdwViewSwitcherBar
Description [src]
final class Adw.ViewSwitcherBar : Gtk.Widget {
/* No available fields */
}
A view switcher action bar.
An action bar letting you switch between multiple views contained in a
AdwViewStack, via an AdwViewSwitcher. 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
AdwViewSwitcherTitle.
A common use case is to bind the AdwViewSwitcherBar:reveal property
to AdwViewSwitcherTitle:title-visible to automatically reveal the
view switcher bar when the title label is displayed in place of the view
switcher, as follows:
<object class="GtkWindow">
<property name="titlebar">
<object class="AdwHeaderBar">
<property name="centering-policy">strict</property>
<property name="title-widget">
<object class="AdwViewSwitcherTitle" id="title">
<property name="stack">stack</property>
</object>
</property>
</object>
</property>
<property name="child">
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="AdwViewStack" id="stack"/>
</child>
<child>
<object class="AdwViewSwitcherBar">
<property name="stack">stack</property>
<binding name="reveal">
<lookup name="title-visible">title</lookup>
</binding>
</object>
</child>
</object>
</property>
</object>
CSS nodes
AdwViewSwitcherBar has a single CSS node with nameviewswitcherbar.
Constructors
adw_view_switcher_bar_new
Creates a new AdwViewSwitcherBar.
Instance methods
adw_view_switcher_bar_get_reveal
Gets whether self should be revealed or hidden.
adw_view_switcher_bar_get_stack
Gets the stack controlled by self.
adw_view_switcher_bar_set_reveal
Sets whether self should be revealed or hidden.
adw_view_switcher_bar_set_stack
Sets the stack controlled by self.
Properties
Adw.ViewSwitcherBar:reveal
Whether the bar should be revealed or hidden.
Adw.ViewSwitcherBar:stack
The stack the view switcher controls.