Gnome::Gtk4::StackSidebar
Description
A Gnome::Gtk4::StackSidebar uses a sidebar to switch between Gnome::Gtk4::Stack pages.
In order to use a Gnome::Gtk4::StackSidebar, you simply use a Gnome::Gtk4::Stack to organize your UI flow, and add the sidebar to your sidebar area. You can use .set-stack()
to connect the Gnome::Gtk4::StackSidebar to the Gnome::Gtk4::Stack.
CSS nodes
Gnome::Gtk4::StackSidebar has a single CSS node with name stacksidebar and style class .sidebar.
When circumstances require it, Gnome::Gtk4::StackSidebar adds the .needs-attention style class to the widgets representing the stack pages.
Class initialization
new
:native-object
Create an object using a native object from elsewhere. See also Gnome::N::TopLevelSupportClass.
multi method new ( N-Object :$native-object! )
new-stacksidebar
Creates a new Gnome::Gtk4::StackSidebar.
method new-stacksidebar ( --> Gnome::Gtk4::StackSidebar \)
Methods
get-stack
Retrieves the stack.
method get-stack (--> N-Object )
Return value; the associated Gnome::Gtk4::Stack or undefined if none has been set explicitly.
set-stack
Set the Gnome::Gtk4::Stack associated with this Gnome::Gtk4::StackSidebar.
The sidebar widget will automatically update according to the order and items within the given Gnome::Gtk4::Stack.
method set-stack ( N-Object() $stack )
$stack; a Gnome::Gtk4::Stack.