AUI is 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.
AUI attempts to encapsulate the following aspects of the user interface:
AUI adheres to the following principles:
The following example shows a simple implementation that uses AuiManager to manage three text controls in a frame window:
class MyFrame(wx.Frame):
def __init__(self, parent, id=-1, title="AUI Test", pos=wx.DefaultPosition,
size=(800, 600), style=wx.DEFAULT_FRAME_STYLE):
wx.Frame.__init__(self, parent, id, title, pos, size, style)
self._mgr = aui.AuiManager()
# notify AUI which frame to use
self._mgr.SetManagedWindow(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, AuiPaneInfo().Left().Caption("Pane Number One"))
self._mgr.AddPane(text2, AuiPaneInfo().Bottom().Caption("Pane Number Two"))
self._mgr.AddPane(text3, AuiPaneInfo().CenterPane())
# 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()
self.Destroy()
event.Skip()
# our normal wxApp-derived class, as usual
app = wx.PySimpleApp()
frame = MyFrame(None)
app.SetTopWindow(frame)
frame.Show()
app.MainLoop()
Current wxAUI Version Tracked: wxWidgets 2.9.0 (SVN HEAD)
The wxPython AUI version fixes the following bugs or implement the following missing features (the list is not exhaustive):
Plus the following features:
AuiManager:
AuiNotebook:
Implementation of the style AUI_NB_HIDE_ON_SINGLE_TAB, a la wx.lib.agw.flatnotebook;
Implementation of the style AUI_NB_SMART_TABS, a la wx.lib.agw.flatnotebook;
Implementation of the style AUI_NB_USE_IMAGES_DROPDOWN, which allows to show tab images on the tab dropdown menu instead of bare check menu items (a la wx.lib.agw.flatnotebook);
6 different tab arts are available, namely:
- Default “glossy” theme (as in wx.aui.AuiNotebook)
- Simple theme (as in wx.aui.AuiNotebook)
- Firefox 2 theme
- Visual Studio 2003 theme (VC71)
- Visual Studio 2005 theme (VC81)
- Google Chrome theme (only AUI_NB_TOP at the moment)
Enabling/disabling tabs;
Setting the colour of the tab’s text.
AuiToolBar:
AUI library is freeware and distributed under the wxPython license.
Latest revision: Andrea Gavana @ 31 Mar 2009, 21.00 GMT
Version 1.0.