gtk.stack_switcher
Module for StackSwitcher class
Types 3
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].
StackSwitcher self()Returns `this`, for use in `with` statements.StackSwitcherGidBuilder builder()Get builder for [gtk.stack_switcher.StackSwitcher] Returns: New builder objectgtk.stack.Stack getStack()Retrieves the stack. Returns: the stackvoid setStack(gtk.stack.Stack stack = null)Sets the stack to control.Fluent builder implementation template for gtk.stack_switcher.StackSwitcher
T stack(gtk.stack.Stack propval)Set `stack` property. Params: propval = The stack. Returns: Builder instance for fluent chainingFluent builder for gtk.stack_switcher.StackSwitcher
StackSwitcher build()Create object from builder. Returns: New object