Page Contents

This Page

Page

class enaml.widgets.page.Page(parent=None, **kwargs)[source]

Bases: enaml.widgets.widget.Widget

A widget which can be used as a page in a Notebook control.

A Page is a widget which can be used as a child of a Notebook control. It can have at most a single child widget which is an instance of Container.

title = None

The title to use for the page in the notebook.

tool_tip = None

The icon to user for the page in the notebook. The tool tip to use for a page when the user hovers a tab.

closable = None

Whether or not this individual page is closable. Note that the ‘tabs_closable’ flag on the parent Notebook must be set to True for this to have any effect.

page_widget = None

A read only property which returns the page’s page widget.

closed = None

An event fired when the user closes the page by clicking on the tab’s close button. This event is fired by the parent Notebook when the tab is closed. This event has no payload.

snapshot()[source]

Return the snapshot for the control.

bind()[source]

Bind the change handlers for the control.

on_action_closed(content)[source]

Handle the ‘closed’ action from the client widget.

open()[source]

Open the page in the Notebook.

Calling this method will also set the page visibility to True.

close()[source]

Close the page in the Notebook.

Calling this method will set the page visibility to False.

__implements__

alias of __NoInterface__

Backends

Qt

Inheritance diagram of enaml.qt.qt_page.QtPage

class enaml.qt.qt_page.QtPage(object_id, parent, session)[source]

Bases: enaml.qt.qt_widget.QtWidget

A Qt implementation of an Enaml notebook Page.

create_widget(parent, tree)[source]

Create the underlying page widget.

create(tree)[source]

Create and initialize the underlying widget.

init_layout()[source]

Initialize the layout for the underyling widget.

page_widget()[source]

Find and return the page widget child for this widget.

Returns:result (QWidget or None) – The page widget defined for this widget, or None if one is not defined.
child_removed(child)[source]

Handle the child removed event for a QtPage.

child_added(child)[source]

Handle the child added event for a QtPage.

on_page_closed()[source]

The signal handler for the ‘pageClosed’ signal.

on_action_set_title(content)[source]

Handle the ‘set_title’ action from the Enaml widget.

on_action_set_tool_tip(content)[source]

Handle the ‘set_tool_tip’ action from the Enaml widget.

on_action_set_closable(content)[source]

Handle the ‘set_closable’ action from the Enaml widget.

on_action_open(content)[source]

Handle the ‘open’ action from the Enaml widget.

on_action_close(content)[source]

Handle the ‘close’ action from the Enaml widget.

set_visible(visible)[source]

An overridden visibility setter which to opens|closes the notebook page.

set_enabled(enabled)[source]

An overridden enabled setter which sets the tab enabled state.

set_title(title)[source]

Set the title of the tab for this page.

set_closable(closable)[source]

Set whether or not this page is closable.

set_tool_tip(tool_tip)[source]

Set the tooltip of the tab for this page.

Wx

Inheritance diagram of enaml.wx.wx_page.WxPage

class enaml.wx.wx_page.WxPage(object_id, parent, session)[source]

Bases: enaml.wx.wx_widget.WxWidget

A Wx implementation of an Enaml notebook Page.

create_widget(parent, tree)[source]

Create the underlying wxPage widget.

create(tree)[source]

Create and initialize the page control.

init_layout()[source]

Initialize the layout of the notebook page.

page_widget()[source]

Find and return the page widget child for this widget.

Returns:result (wxWindow or None) – The page widget defined for this widget, or None if one is not defined.
child_removed(child)[source]

Handle the child removed event for a WxPage.

child_added(child)[source]

Handle the child added event for a WxPage.

on_page_closed(event)[source]

The event handler for the EVT_PAGE_CLOSED event.

on_action_set_title(content)[source]

Handle the ‘set_title’ action from the Enaml widget.

on_action_set_tool_tip(content)[source]

Handle the ‘set_tool_tip’ action from the Enaml widget.

on_action_set_closable(content)[source]

Handle the ‘set_closable’ action from the Enaml widget.

on_action_open(content)[source]

Handle the ‘open’ action from the Enaml widget.

on_action_close(content)[source]

Handle the ‘close’ action from the Enaml widget.

set_visible(visible)[source]

An overridden visibility setter which to opens|closes the notebook page.

set_enabled(enabled)[source]

An overridden enabled setter which sets the tab enabled state.

set_title(title)[source]

Set the title of the tab for this page.

set_closable(closable)[source]

Set whether or not this page is closable.

set_tool_tip(tool_tip)[source]

Set the tooltip of the tab for this page.