GtkStackSwitcher — A controller for GtkStack
GObject ╰── GInitiallyUnowned ╰── GtkWidget ╰── GtkStackSwitcher
GtkStackSwitcher implements GtkAccessible, GtkBuildable and GtkConstraintTarget.
#include <gtk/gtk.h>
The GtkStackSwitcher widget acts as a controller for a GtkStack; it shows a row of buttons to switch between the various pages of the associated stack widget.
All the content for the buttons comes from the child properties of the GtkStack; the button visibility in a GtkStackSwitcher widget is controlled by the visibility of the child in the GtkStack.
It is possible to associate multiple GtkStackSwitcher widgets with the same GtkStack widget.
GtkStackSwitcher has a single CSS node named stackswitcher and style class .stack-switcher.
When circumstances require it, GtkStackSwitcher adds the .needs-attention style class to the widgets representing the stack pages.
GtkStackSwitcher uses the GTK_ACCESSIBLE_ROLE_TAB_LIST role and uses the GTK_ACCESSIBLE_ROLE_TAB for its buttons.
GtkWidget *
gtk_stack_switcher_new (void
);
Create a new GtkStackSwitcher.
a new GtkStackSwitcher.
void gtk_stack_switcher_set_stack (GtkStackSwitcher *switcher
,GtkStack *stack
);
Sets the stack to control.
switcher | ||
stack | a GtkStack. | [allow-none] |
GtkStack *
gtk_stack_switcher_get_stack (GtkStackSwitcher *switcher
);
Retrieves the stack. See gtk_stack_switcher_set_stack()
.
switcher |
the stack, or NULL
if none has been set explicitly.
[nullable][transfer none]
typedef struct _GtkStackSwitcher GtkStackSwitcher;
“stack”
property“stack” GtkStack *
Stack.
Owner: GtkStackSwitcher
Flags: Read / Write / Construct
© 2005–2020 The GNOME Project
Licensed under the GNU Lesser General Public License version 2.1 or later.
https://developer.gnome.org/gtk4/4.0/GtkStackSwitcher.html