About my projects, examples and tutorials
Gnome::Gtk4::StackSidebar

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.

Uml Diagram§

UNKNOWN image§

=for image :class<inline> :src<asset_files/images/plantuml/StackSidebar.png> :width<70\%>

Class initialization§

new§

:native-object§

Create an object using a native object from an object of the same type found elsewhere. See also Gnome::N::TopLevelSupportClass.

multi method new ( N-Object() :$native-object! )
Code

new-stacksidebar§

Creates a new Gnome::Gtk4::StackSidebar.

method new-stacksidebar ( --> Gnome::Gtk4::StackSidebar )
Code

Methods§

get-stack§

Retrieves the stack.

method get-stack (--> N-Object )
Code

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 )
Code