Class InlineViewSwitcher

All Implemented Interfaces:
Accessible, Buildable, ConstraintTarget, Orientable, Proxy

@Generated("org.javagi.JavaGI") public final class InlineViewSwitcher extends Widget implements Accessible, Buildable, ConstraintTarget, Orientable

A view switcher that uses a toggle group.

inline-view-switcher

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 InlineViewSwitcher:display-mode to control this.

inline-view-switcher-display-modes

CSS nodes

AdwInlineViewSwitcher has a single CSS node with the name inline-view-switcher.

Style classes

Like AdwToggleGroup, it can accept the .flat and .round style classes.

inline-view-switcher-style-classes

Accessibility

The internal toggle group uses the Gtk.AccessibleRole.tab-list role. Its toggles use the Gtk.AccessibleRole.tab role.

See also: ViewSwitcher, ViewSwitcherBar, ViewSwitcherSidebar.

Since:
1.7
  • Constructor Details

    • InlineViewSwitcher

      public InlineViewSwitcher(MemorySegment address)
      Create a InlineViewSwitcher instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • InlineViewSwitcher

      public InlineViewSwitcher()
      Create a new InlineViewSwitcher.
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the InlineViewSwitcher class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected InlineViewSwitcher asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class Widget
      Returns:
      the instance as if it were its parent type
    • getCanShrink

      public boolean getCanShrink()
      Gets whether the toggles can be smaller than the natural size of their contents.
      Returns:
      whether the toggles can shrink
      Since:
      1.7
    • getDisplayMode

      public InlineViewSwitcherDisplayMode getDisplayMode()
      Gets the display mode of self.
      Returns:
      the display mode
      Since:
      1.7
    • getHomogeneous

      public boolean getHomogeneous()
      Gets whether all toggles within this InlineViewSwitcher take the same size.
      Returns:
      whether all toggles take the same size
      Since:
      1.7
    • getStack

      public @Nullable ViewStack getStack()
      Gets the stack this InlineViewSwitcher controls.
      Returns:
      The stack of this InlineViewSwitcher
      Since:
      1.7
    • setCanShrink

      public void setCanShrink(boolean canShrink)

      Sets whether the toggles can be smaller than the natural size of their contents.

      If canShrink is TRUE, the toggle labels will ellipsize.

      See ToggleGroup:can-shrink.

      Parameters:
      canShrink - whether the toggles can shrink
      Since:
      1.7
    • setDisplayMode

      public void setDisplayMode(InlineViewSwitcherDisplayMode mode)

      Sets the display mode of self.

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

      inline-view-switcher-display-modes
      Parameters:
      mode - the display mode
      Since:
      1.7
    • setHomogeneous

      public void setHomogeneous(boolean homogeneous)
      Sets whether all toggles within this InlineViewSwitcher take the same size.
      Parameters:
      homogeneous - whether all toggles should take the same size
      Since:
      1.7
    • setStack

      public void setStack(@Nullable ViewStack stack)
      Sets the stack to control.
      Parameters:
      stack - a stack
      Since:
      1.7
    • builder

      public static InlineViewSwitcher.Builder<? extends InlineViewSwitcher.Builder> builder()
      A InlineViewSwitcher.Builder object constructs a InlineViewSwitcher with the specified properties. Use the various set...() methods to set properties, and finish construction with InlineViewSwitcher.Builder.build().
      Returns:
      the builder object