Package wx :: Module aui

[frames | no frames]

## Module wx.aui

The wx.aui moduleis an Advanced User Interface library that aims to implement "cutting-edge" interface usability and design features so developers can quickly and easily create beautiful and usable application interfaces.

Vision and Design Principles

wx.aui attempts to encapsulate the following aspects of the user interface:

> - Frame Management: Frame management provides the means to open, move and hide common controls that are needed to interact with the document, and allow these configurations to be saved into different perspectives and loaded at a later time.
> - Toolbars: Toolbars are a specialized subset of the frame management system and should behave similarly to other docked components. However, they also require additional functionality, such as "spring-loaded" rebar support, "chevron" buttons and end-user customizability.
> - Modeless Controls: Modeless controls expose a tool palette or set of options that float above the application content while allowing it to be accessed. Usually accessed by the toolbar, these controls disappear when an option is selected, but may also be "torn off" the toolbar into a floating frame of their own.
> - Look and Feel: Look and feel encompasses the way controls are drawn, both when shown statically as well as when they are being moved. This aspect of user interface design incorporates "special effects" such as transparent window dragging as well as frame animation.

wx.aui adheres to the following principles

> - Use native floating frames to obtain a native look and feel for all platforms;
> - Use existing wxPython code where possible, such as sizer implementation for frame management;
> - Use standard wxPython coding conventions.

Usage

The following example shows a simple implementation that utilizes `wx.aui.FrameManager` to manage three text controls in a frame window:

    import wx
    import wx.aui

    class MyFrame(wx.Frame):

        def __init__(self, parent, id=-1, title='wx.aui Test',
                     size=(800, 600), style=wx.DEFAULT_FRAME_STYLE):
            wx.Frame.__init__(self, parent, id, title, pos, size, style)

            self._mgr = wx.aui.AuiManager(self)

            # create several text controls
            text1 = wx.TextCtrl(self, -1, 'Pane 1 - sample text',
                                wx.DefaultPosition, wx.Size(200,150),
                                wx.NO_BORDER | wx.TE_MULTILINE)

            text2 = wx.TextCtrl(self, -1, 'Pane 2 - sample text',
                                wx.DefaultPosition, wx.Size(200,150),
                                wx.NO_BORDER | wx.TE_MULTILINE)

            text3 = wx.TextCtrl(self, -1, 'Main content window',
                                wx.DefaultPosition, wx.Size(200,150),
                                wx.NO_BORDER | wx.TE_MULTILINE)

            # add the panes to the manager
            self._mgr.AddPane(text1, wx.LEFT, 'Pane Number One')
            self._mgr.AddPane(text2, wx.BOTTOM, 'Pane Number Two')
            self._mgr.AddPane(text3, wx.CENTER)

            # tell the manager to 'commit' all the changes just made
            self._mgr.Update()

            self.Bind(wx.EVT_CLOSE, self.OnClose)

        def OnClose(self, event):
            # deinitialize the frame manager
            self._mgr.UnInit()
            # delete the frame
            self.Destroy()

    app = wx.App()
    frame = MyFrame(None)
    frame.Show()
    app.MainLoop()

Classes
`AuiDefaultDockArt` | Proxy of C++ AuiDefaultDockArt class
`AuiDefaultTabArt` | Proxy of C++ AuiDefaultTabArt class
`AuiDockArt` | Proxy of C++ AuiDockArt class
`AuiDockInfo` | Proxy of C++ AuiDockInfo class
`AuiDockUIPart` | Proxy of C++ AuiDockUIPart class
`AuiFloatingFrame` | Proxy of C++ AuiFloatingFrame class
`AuiManager` | Proxy of C++ AuiManager class
`AuiManagerEvent` | Proxy of C++ AuiManagerEvent class
`AuiMDIChildFrame` | Proxy of C++ AuiMDIChildFrame class
`AuiMDIClientWindow` | Proxy of C++ AuiMDIClientWindow class
`AuiMDIParentFrame` | Proxy of C++ AuiMDIParentFrame class
`AuiNotebook` | Proxy of C++ AuiNotebook class
`AuiNotebookEvent` | Proxy of C++ AuiNotebookEvent class
`AuiNotebookPage` | Proxy of C++ AuiNotebookPage class
`AuiPaneButton` | Proxy of C++ AuiPaneButton class
`AuiPaneInfo` | Proxy of C++ AuiPaneInfo class
`AuiSimpleTabArt` | Proxy of C++ AuiSimpleTabArt class
`AuiTabArt` | Proxy of C++ AuiTabArt class
`AuiTabContainer` | Proxy of C++ AuiTabContainer class
`AuiTabContainerButton` | Proxy of C++ AuiTabContainerButton class
`AuiTabCtrl` | Proxy of C++ AuiTabCtrl class
`PyAuiDockArt` | This version of the `AuiDockArt` class has been instrumented to be subclassable in Python and to reflect all calls to the C++ base class methods to the Python methods implemented in the derived class.
`PyAuiTabArt` | This version of the `TabArt` class has been instrumented to be subclassable in Python and to reflect all calls to the C++ base class methods to the Python methods implemented in the derived class.

Function Summary
AuiMDIChildFrame | `PreAuiMDIChildFrame()`
AuiMDIClientWindow | `PreAuiMDIClientWindow()`
AuiMDIParentFrame | `PreAuiMDIParentFrame()`
AuiNotebook | `PreAuiNotebook()`

Generated by Epydoc 2.1.20050511.rpd on Thu Mar 22 12:12:52 2007 | http://epydoc.sf.net