Stack#
- class ignis.widgets.Widget.Stack(*args: Any, **kwargs: Any)#
Bases:
Gtk.StackStack is a container which only shows one of its children at a time.
It does not provide a means for users to change the visible child. Instead, a separate widget such as
StackSwitchercan be used with Stack to provide this functionality.- Parameters:
**kwargs -- Properties to set.
- Overrided properties:
transition_type: The type of animation used to transition between pages. Available values:
Gtk.StackTransitionType.
from ignis.widgets import Widget stack = Widget.Stack( child=[ Widget.StackPage( title="page 1", child=Widget.Label(label="welcome to page 1!") ), Widget.StackPage( title="page 2", child=Widget.Label(label="welcome to page 2!") ), Widget.StackPage( title="page 3", child=Widget.Label(label="welcome to page 3!") ), ] ) Widget.Box( vertical=True, # you should add both StackSwitcher and Stack. child=[Widget.StackSwitcher(stack=stack), stack], )
- class ignis.widgets.Widget.StackPage(title: str, child: gi.repository.Gtk.Widget)#
Bases:
IgnisGObjectIntented to use with
Stack.- Parameters:
title (
str) -- The title. It will be used byStackSwitcherto displaychildin a tab bar.child (
Widget) -- The child widget.
Warning
It is not a widget.
- gproperty title: str#
read-only
The title. It will be used by
StackSwitcherto displaychildin a tab bar.
- gproperty child: gi.repository.Gtk.Widget#
read-only
The child widget.
- class ignis.widgets.Widget.StackSwitcher(*args: Any, **kwargs: Any)#
Bases:
Gtk.StackSwitcherThe StackSwitcher shows a row of buttons to switch between
Stackpages.- Parameters:
**kwargs -- Properties to set.