Klasse InlineViewSwitcher

Alle implementierten Schnittstellen:
PointerInterface

public class InlineViewSwitcher extends Widget
A view switcher that uses a toggle group.

<picture>
<source srcset="inline-view-switcher-dark.png" media="(prefers-color-scheme: dark)">
<img src="inline-view-switcher.png" alt="inline-view-switcher">
</picture>

A view switcher showing pages of an [class@ViewStack] within an
[class@ToggleGroup], similar to [class@ViewSwitcher].

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

<picture>
<source srcset="inline-view-switcher-display-modes-dark.png" media="(prefers-color-scheme: dark)">
<img src="inline-view-switcher-display-modes.png" alt="inline-view-switcher-display-modes">
</picture>

## 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.

<picture>
<source srcset="inline-view-switcher-style-classes-dark.png" media="(prefers-color-scheme: dark)">
<img src="inline-view-switcher-style-classes.png" alt="inline-view-switcher-style-classes">
</picture>

## Accessibility

The internal toggle group uses the `GTK_ACCESSIBLE_ROLE_TAB_LIST` role. Its
toggles use the `GTK_ACCESSIBLE_ROLE_TAB` role.

https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.InlineViewSwitcher.html

  • Konstruktordetails

    • InlineViewSwitcher

      public InlineViewSwitcher(PointerContainer pointer)
    • InlineViewSwitcher

      public InlineViewSwitcher()
      Creates a new `AdwInlineViewSwitcher`.
  • Methodendetails

    • getClassHandler

      public static ClassHandler getClassHandler()
    • getCanShrink

      public boolean getCanShrink()
      Gets whether the toggles can be smaller than the natural size of their
      contents.
      Gibt zurück:
      whether the toggles can shrink
    • getDisplayMode

      public int getDisplayMode()
      Gets the display mode of @self.
      Gibt zurück:
      the display mode
    • getHomogeneous

      public boolean getHomogeneous()
      Gets whether all toggles within @self take the same size.
      Gibt zurück:
      whether all toggles take the same size
    • getStack

      public ViewStack getStack()
      Gets the stack @self controls.
      Gibt zurück:
      The stack of @self
    • setCanShrink

      public void setCanShrink(boolean 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 [property@ToggleGroup:can-shrink].
      Parameter:
      can_shrink - whether the toggles can shrink
    • setDisplayMode

      public void setDisplayMode(int mode)
      Sets the display mode of @self.

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

      <picture>
      <source srcset="inline-view-switcher-display-modes-dark.png" media="(prefers-color-scheme: dark)">
      <img src="inline-view-switcher-display-modes.png" alt="inline-view-switcher-display-modes">
      </picture>
      Parameter:
      mode - the display mode
    • setHomogeneous

      public void setHomogeneous(boolean homogeneous)
      Sets whether all toggles within @self take the same size.
      Parameter:
      homogeneous - whether all toggles should take the same size
    • setStack

      public void setStack(@Nullable ViewStack stack)
      Sets the stack to control.
      Parameter:
      stack - a stack
    • asAccessible

      public Accessible asAccessible()
      Implements interface Accessible. Call this to get access to interface functions.
      Setzt außer Kraft:
      asAccessible in Klasse Widget
      Gibt zurück:
      Accessible
    • asBuildable

      public Buildable asBuildable()
      Implements interface Buildable. Call this to get access to interface functions.
      Setzt außer Kraft:
      asBuildable in Klasse Widget
      Gibt zurück:
      Buildable
    • asConstraintTarget

      public ConstraintTarget asConstraintTarget()
      Implements interface ConstraintTarget. Call this to get access to interface functions.
      Setzt außer Kraft:
      asConstraintTarget in Klasse Widget
      Gibt zurück:
      ConstraintTarget
    • asOrientable

      public Orientable asOrientable()
      Implements interface Orientable. Call this to get access to interface functions.
      Gibt zurück:
      Orientable
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()