Class
Adw.ViewSwitcher
Description [src]
final class Adw.ViewSwitcher : Gtk.Widget {
/* No available fields */
}
An adaptive view switcher.
An adaptive view switcher designed to switch between multiple views
contained in a GtkStack
in a similar fashion to
GtkStackSwitcher
.
Depending on the available width, the view switcher can adapt from a wide
mode showing the view’s icon and title side by side, to a narrow mode showing
the view’s icon and title one on top of the other, in a more compact way.
This can be controlled via the AdwViewSwitcher:policy
property.
CSS nodes
AdwViewSwitcher
has a single CSS node with name viewswitcher
.
Accessibility
AdwViewSwitcher
uses the GTK_ACCESSIBLE_ROLE_TAB_LIST
role and uses the
GTK_ACCESSIBLE_ROLE_TAB
for its buttons.
Constructors
adw_view_switcher_new
Creates a new AdwViewSwitcher
.
Instance methods
adw_view_switcher_get_narrow_ellipsize
Gets the ellipsizing position for the titles.
adw_view_switcher_get_policy
Gets the policy of self
.
adw_view_switcher_get_stack
Gets the stack controlled by self
.
adw_view_switcher_set_narrow_ellipsize
Sets the ellipsizing position for the titles.
adw_view_switcher_set_policy
Sets the policy of self
.
adw_view_switcher_set_stack
Sets the stack controlled by self
.
Properties
Adw.ViewSwitcher:narrow-ellipsize
The ellipsizing position for the titles.
Adw.ViewSwitcher:policy
The policy to determine which mode to use.
Adw.ViewSwitcher:stack
The stack the view switcher controls.