Page Contents

This Page

Stack

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

Bases: enaml.widgets.constraints_widget.ConstraintsWidget

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

index = None

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 = None

The transition to use when change between stack items. XXX Document the supported transitions.

stack_items = None

A read only property which returns the stack’s StackItems

snapshot()[source]

Returns the snapshot for the control.

bind()[source]

Bind the change handlers for the control.

on_action_index_changed(content)[source]

Handle the index_changed action from the client widget.

__implements__

alias of __NoInterface__

Backends

Qt

Inheritance diagram of enaml.qt.qt_stack.QtStack

class enaml.qt.qt_stack.QtStack(object_id, parent, session)[source]

Bases: enaml.qt.qt_constraints_widget.QtConstraintsWidget

A Qt implementation of an Enaml Stack.

create_widget(parent, tree)[source]

Create the underlying QStack widget.

create(tree)[source]

Create and initialize the underlying control.

init_layout()[source]

Initialize the layout of the underlying control.

child_removed(child)[source]

Handle the child removed event for a QtStack.

child_added(child)[source]

Handle the child added event for a QtStack.

on_layout_requested()[source]

Handle the layoutRequested signal from the QStack.

on_current_changed()[source]

Handle the currentChanged signal from the QStack.

on_action_set_index(content)[source]

Handle the ‘set_index’ action from the Enaml widget.

on_action_set_transition(content)[source]

Handle the ‘set_transition’ action from the Enaml widget.

set_index(index)[source]

Set the current index of the underlying widget.

set_transition(transition)[source]

Set the transition on the underlying widget.

Wx