Page Contents

This Page

MainWindow

class enaml.widgets.main_window.MainWindow(parent=None, **kwargs)[source]

Bases: enaml.widgets.window.Window

A top level main window widget.

MainWindow widgets are top level widgets which provide additional functionality beyond frame decoration. A MainWindow may optionally contain a MenuBar, any number of ToolBars, a StatusBar, and any number of DockPanes. Like Window, a MainWindow can have at most one central Container widget, which will be expanded to fit into the available space.

menu_bar = None

A read only property which returns the window’s MenuBar.

tool_bars = None

A read only property which returns the window’s ToolBars.

dock_panes = None

A read only property which returns the window’s DockPanes.

__implements__

alias of __NoInterface__

Backends

Qt

Inheritance diagram of enaml.qt.qt_main_window.QtMainWindow

class enaml.qt.qt_main_window.QtMainWindow(object_id, parent, session)[source]

Bases: enaml.qt.qt_window.QtWindow

A Qt implementation of an Enaml MainWindow.

create_widget(parent, tree)[source]

Create the underlying widget QMainWindow widget.

init_layout()[source]

Initialize the layout for the underlying widget.

components()[source]

Get a dictionary of the main window components.

Returns:result (dict) – A dicionary of main window components categorized by their function.
child_removed(child)[source]

Handle the child removed event for a QtMainWindow.

child_added(child)[source]

Handle the child added event for a QtMainWindow.

set_visible(visible)[source]

Set the visibility of the underlying control.

This is an overridden parent class method which keeps track of the visible flag set by the Enaml widget.

Wx

Inheritance diagram of enaml.wx.wx_main_window.WxMainWindow

class enaml.wx.wx_main_window.WxMainWindow(object_id, parent, session)[source]

Bases: enaml.wx.wx_window.WxWindow

A Wx implementation of an Enaml MainWindow.

create_widget(parent, tree)[source]

Create the underlying wx.Frame widget and dock manager.

init_layout()[source]

Perform the layout initialization for the main window.

components()[source]

Get a dictionary of the main window components.

Returns:result (dict) – A dicionary of main window components categorized by their function.
child_removed(child)[source]

Handle the child removed event for a WxMainWindow.

child_added(child)[source]

Handle the child added event for a WxMainWindow.