Gtk.StackSwitcher¶
Example¶
- Subclasses:
None
Methods¶
- Inherited:
Gtk.Widget (183), GObject.Object (37), Gtk.Accessible (17), Gtk.Buildable (1), Gtk.Orientable (2)
- Structs:
class |
|
|
|
|
Virtual Methods¶
- Inherited:
Gtk.Widget (25), GObject.Object (7), Gtk.Accessible (6), Gtk.Buildable (9)
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w/c |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Gtk.StackSwitcher(**kwargs)¶
- Bases:
- Abstract:
No
Shows a row of buttons to switch between
GtkStackpages.<picture> <source srcset=”stackswitcher-dark.png” media=”(prefers-color-scheme: dark)”> <img alt=”An example
Gtk.StackSwitcher" src=”stackswitcher.png”> </picture>It acts as a controller for the associated
GtkStack.All the content for the buttons comes from the properties of the stacks [class`Gtk`.StackPage] objects; the button visibility in a
GtkStackSwitcherwidget is controlled by the visibility of the child in theGtkStack.It is possible to associate multiple
GtkStackSwitcherwidgets with the sameGtkStackwidget.- CSS nodes
GtkStackSwitcherhas a single CSS node named stackswitcher and style class .stack-switcher.When circumstances require it,
GtkStackSwitcheradds the .needs-attention style class to the widgets representing the stack pages.- Accessibility
GtkStackSwitcheruses the [enum`Gtk`.AccessibleRole.tab_list] role and uses the [enum`Gtk`.AccessibleRole.tab] role for its buttons.- Orientable
Since GTK 4.4,
GtkStackSwitcherimplementsGtkOrientableallowing the stack switcher to be made vertical withgtk_orientable_set_orientation().