Class StackSidebar

All Implemented Interfaces:
PointerInterface

public class StackSidebar extends Widget
A `GtkStackSidebar` uses a sidebar to switch between `GtkStack` pages.

In order to use a `GtkStackSidebar`, you simply use a `GtkStack` to
organize your UI flow, and add the sidebar to your sidebar area. You
can use [method@Gtk.StackSidebar.set_stack] to connect the `GtkStackSidebar`
to the `GtkStack`.

# CSS nodes

`GtkStackSidebar` has a single CSS node with name stacksidebar and
style class .sidebar.

When circumstances require it, `GtkStackSidebar` adds the
.needs-attention style class to the widgets representing the stack
pages.

https://docs.gtk.org/gtk4/class.StackSidebar.html

  • Constructor Details

    • StackSidebar

      public StackSidebar(PointerContainer pointer)
    • StackSidebar

      public StackSidebar()
      Creates a new `GtkStackSidebar`.
  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • getStack

      public Stack getStack()
      Retrieves the stack.
      Returns:
      the associated `GtkStack` or %NULL if none has been set explicitly
    • setStack

      public void setStack(@Nonnull Stack stack)
      Set the `GtkStack` associated with this `GtkStackSidebar`.

      The sidebar widget will automatically update according to
      the order and items within the given `GtkStack`.
      Parameters:
      stack - a `GtkStack`
    • asAccessible

      public Accessible asAccessible()
      Implements interface Accessible. Call this to get access to interface functions.
      Overrides:
      asAccessible in class Widget
      Returns:
      Accessible
    • asBuildable

      public Buildable asBuildable()
      Implements interface Buildable. Call this to get access to interface functions.
      Overrides:
      asBuildable in class Widget
      Returns:
      Buildable
    • asConstraintTarget

      public ConstraintTarget asConstraintTarget()
      Implements interface ConstraintTarget. Call this to get access to interface functions.
      Overrides:
      asConstraintTarget in class Widget
      Returns:
      ConstraintTarget
    • 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()