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.

Backends

Qt

digraph inheritancec00d2262cd { rankdir=LR; width=8.0; ratio=compress; fontsize=14; size="8.0, 12.0"; "QtObject" [shape=box,style="setlinewidth(0.5)",fontsize=10,fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25]; "QtWidget" [style="setlinewidth(0.5)",URL="enaml.widgets.widget.Widget.html#enaml.qt.qt_widget.QtWidget",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25,shape=box,fontsize=10]; "QtObject" -> "QtWidget" [arrowsize=0.5,style="setlinewidth(0.5)"]; "QtMainWindow" [style="setlinewidth(0.5)",URL="#enaml.qt.qt_main_window.QtMainWindow",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25,shape=box,fontsize=10]; "QtWindow" -> "QtMainWindow" [arrowsize=0.5,style="setlinewidth(0.5)"]; "QtWindow" [style="setlinewidth(0.5)",URL="enaml.widgets.window.Window.html#enaml.qt.qt_window.QtWindow",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25,shape=box,fontsize=10]; "QtWidget" -> "QtWindow" [arrowsize=0.5,style="setlinewidth(0.5)"]; }

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

digraph inheritance9475562265 { rankdir=LR; width=8.0; ratio=compress; fontsize=14; size="8.0, 12.0"; "WxWindow" [style="setlinewidth(0.5)",URL="enaml.widgets.window.Window.html#enaml.wx.wx_window.WxWindow",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25,shape=box,fontsize=10]; "WxWidget" -> "WxWindow" [arrowsize=0.5,style="setlinewidth(0.5)"]; "WxWidget" [style="setlinewidth(0.5)",URL="enaml.widgets.widget.Widget.html#enaml.wx.wx_widget.WxWidget",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25,shape=box,fontsize=10]; "WxObject" -> "WxWidget" [arrowsize=0.5,style="setlinewidth(0.5)"]; "WxObject" [shape=box,style="setlinewidth(0.5)",fontsize=10,fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25]; "WxMainWindow" [style="setlinewidth(0.5)",URL="#enaml.wx.wx_main_window.WxMainWindow",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25,shape=box,fontsize=10]; "WxWindow" -> "WxMainWindow" [arrowsize=0.5,style="setlinewidth(0.5)"]; }

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.