enaml.widgets.stack

Classes

Transition

An object representing an animated transition.

Stack

A component which displays its children as a stack of widgets, only one of which is visible at a time.

class enaml.widgets.stack.Transition[source]

Bases: Atom

An object representing an animated transition.

Once a transition is created, it should be considered read-only.

type

The type of transition effect to use.

direction

The direction of the transition effect. Some transition types will ignore the direction if it doesn’t apply to the effect.

duration

The duration of the transition, in milliseconds.

class enaml.widgets.stack.Stack(parent=None, **kwargs)[source]

Bases: ConstraintsWidget

A component which displays its children as a stack of widgets, only one of which is visible at a time.

index

The index of the visible widget in the stack. The widget itself does not provide a means to changing this index. That control must be supplied externally. If the given index falls outside of the range of stack items, no widget will be visible.

transition

The item transition to use when changing between stack items.

size_hint_mode

The size hint mode for the stack. The default is ‘union’ and means that the size hint of the stack is the union of all the stack item size hints. ‘current’ means the size hint of the stack will be the size hint of the current stack item.

hug_width

A Stack expands freely in height and width by default

hug_height

How strongly a widget hugs it’s height hint. This is equivalent to the constraint:

(height == hint) | hug_height
proxy

A reference to the ProxyStack widget.

stack_items()[source]

Get the stack items defined on the stack

activated

An event fired when an object’s proxy is activated. It is triggered once during the object lifetime, at the end of the activate_proxy method.

background

The background color of the widget.

destroyed

An event fired when an object has been destroyed. It is triggered once during the object lifetime, just before the object is removed from the tree structure.

enabled

Whether or not the widget is enabled.

initialized

An event fired when an object is initialized. It is triggered once during the object lifetime, at the end of the initialize method.

name

Export the ‘name’ attribute as a declarative member.

style_class

The style class to which this item belongs. Multiple classes can be separated with whitespace. An empty string indicates the widget does not belong to any style class.