InlineViewSwitcher#
Added in version 1.7.
Superclasses: Widget, InitiallyUnowned, Object
Implemented Interfaces: Accessible, Buildable, ConstraintTarget, Orientable
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
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 <style-classes.html#flat_1>`__
and `.round <style-classes.html#round>`__ style classes.
Accessibility#
The internal toggle group uses the tab-list role.
Its toggles use the tab role.
See also: ViewSwitcher, ViewSwitcherBar,
ViewSwitcherSidebar.
Constructors#
Methods#
- class InlineViewSwitcher
- get_can_shrink() bool#
Gets whether the toggles can be smaller than the natural size of their contents.
Added in version 1.7.
- get_display_mode() InlineViewSwitcherDisplayMode#
Gets the display mode of
self.Added in version 1.7.
- get_homogeneous() bool#
Gets whether all toggles within
selftake the same size.Added in version 1.7.
- set_can_shrink(can_shrink: bool) None#
Sets whether the toggles can be smaller than the natural size of their contents.
If
can_shrinkisTRUE, the toggle labels will ellipsize.See
can_shrink.Added in version 1.7.
- Parameters:
can_shrink – whether the toggles can shrink
- set_display_mode(mode: InlineViewSwitcherDisplayMode) None#
Sets the display mode of
self.Determines what the toggles display: a label, an icon or both.
Added in version 1.7.
- Parameters:
mode – the display mode
Properties#
- class InlineViewSwitcher
-
- props.display_mode: InlineViewSwitcherDisplayMode#
The type of the None singleton.
Added in version 1.7.