Stack#
- class ignis.widgets.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 import widgets stack = widgets.Stack( child=[ widgets.StackPage( title="page 1", child=widgets.Label(label="welcome to page 1!") ), widgets.StackPage( title="page 2", child=widgets.Label(label="welcome to page 2!") ), widgets.StackPage( title="page 3", child=widgets.Label(label="welcome to page 3!") ), ] ) widgets.Box( vertical=True, # you should add both StackSwitcher and Stack. child=[widgets.StackSwitcher(stack=stack), stack], )
- class ignis.widgets.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.StackSwitcher(*args: Any, **kwargs: Any)#
Bases:
Gtk.StackSwitcherThe StackSwitcher shows a row of buttons to switch between
Stackpages.- Parameters:
**kwargs -- Properties to set.