The gtk.stack_switcher.StackSwitcher shows a row of buttons to switch between gtk.stack.Stack pages.
It acts as a controller for the associated gtk.stack.Stack.
All the content for the buttons comes from the properties of the stacks gtk.stack_page.StackPage objects; the button visibility in a gtk.stack_switcher.StackSwitcher widget is controlled by the visibility of the child in the gtk.stack.Stack.
It is possible to associate multiple gtk.stack_switcher.StackSwitcher widgets with the same gtk.stack.Stack widget.
gtk.stack_switcher.StackSwitcher has a single CSS node named stackswitcher and style class .stack-switcher.
When circumstances require it, gtk.stack_switcher.StackSwitcher adds the .needs-attention style class to the widgets representing the stack pages.
gtk.stack_switcher.StackSwitcher uses the gtk.types.AccessibleRole.TabList role and uses the gtk.types.AccessibleRole.Tab for its buttons.
Since GTK 4.4, gtk.stack_switcher.StackSwitcher implements gtk.orientable.Orientable allowing the stack switcher to be made vertical with [gtk.orientable.Orientable.setOrientation].
The gtk.stack_switcher.StackSwitcher shows a row of buttons to switch between gtk.stack.Stack pages.
It acts as a controller for the associated gtk.stack.Stack.
All the content for the buttons comes from the properties of the stacks gtk.stack_page.StackPage objects; the button visibility in a gtk.stack_switcher.StackSwitcher widget is controlled by the visibility of the child in the gtk.stack.Stack.
It is possible to associate multiple gtk.stack_switcher.StackSwitcher widgets with the same gtk.stack.Stack widget.
CSS nodes
gtk.stack_switcher.StackSwitcher has a single CSS node named stackswitcher and style class .stack-switcher.
When circumstances require it, gtk.stack_switcher.StackSwitcher adds the .needs-attention style class to the widgets representing the stack pages.
Accessibility
gtk.stack_switcher.StackSwitcher uses the gtk.types.AccessibleRole.TabList role and uses the gtk.types.AccessibleRole.Tab for its buttons.
Orientable
Since GTK 4.4, gtk.stack_switcher.StackSwitcher implements gtk.orientable.Orientable allowing the stack switcher to be made vertical with [gtk.orientable.Orientable.setOrientation].