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 framemanager.AuiManager
to manage
three text controls in a frame window:
import wx
import wx.lib.agw.aui as aui
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, aui.AuiPaneInfo().Left().Caption("Pane Number One"))
self._mgr.AddPane(text2, aui.AuiPaneInfo().Bottom().Caption("Pane Number Two"))
self._mgr.AddPane(text3, aui.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()
event.Skip()
# our normal wxApp-derived class, as usual
app = wx.App(0)
frame = MyFrame(None)
app.SetTopWindow(frame)
frame.Show()
app.MainLoop()
Current wxAUI Version Tracked: wxWidgets 2.9.5 (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:
ModernDockArt
). Windows XP only, requires Mark Hammond’s
pywin32 package (winxptheme);AUI_MGR_ANIMATE_FRAMES
, which fade-out floating panes when
they are closed (all platforms which support frames transparency) and show a moving rectangle
when they are docked and minimized (Windows < Vista and GTK only);AuiPaneInfo
which allow to set/get the flags described above;EVT_AUI_PANE_DOCKING
, EVT_AUI_PANE_DOCKED
, EVT_AUI_PANE_FLOATING
and EVT_AUI_PANE_FLOATED
are
available for all panes except toolbar panes;AuiManager
style AUI_MGR_AERO_DOCKING_GUIDES
;AuiManager
style
AUI_MGR_PREVIEW_MINIMIZED_PANES
and by hovering with the mouse on the minimized pane toolbar tool;AuiManager
style AUI_MGR_WHIDBEY_DOCKING_GUIDES
;AUI_MGR_USE_NATIVE_MINIFRAMES
style;AUI_MGR_SMOOTH_DOCKING
style (similar to PyQT docking style);AUI_NB_HIDE_ON_SINGLE_TAB
, a la lib.agw.flatnotebook
;AUI_NB_SMART_TABS
, a la lib.agw.flatnotebook
;AUI_NB_USE_IMAGES_DROPDOWN
, which allows to show tab images
on the tab dropdown menu instead of bare check menu items (a la lib.agw.flatnotebook
);AuiNotebook
)AuiNotebook
)AUI_NB_CLOSE_ON_TAB_LEFT
, which draws the tab close button on
the left instead of on the right (a la Camino browser);AuiNotebook
(experimental);AuiNotebook
tab area;AUI_NB_TAB_FLOAT
, which allows the floating of single tabs.
Known limitation: when the notebook is more or less full screen, tabs cannot be dragged far
enough outside of the notebook to become floating pages;AUI_NB_DRAW_DND_TAB
(on by default), which draws an image
representation of a tab while dragging;AuiNotebook
unsplit functionality, which unsplit a splitted AuiNotebook
when double-clicking on a sash;AuiNotebook
(as thumbnails) by using the NotebookPreview
method of AuiNotebook
;AuiNotebook
page;AuiNotebook
;AUI_NB_ORDER_BY_ACCESS
, which orders the tabs by last access time
inside the Tab Navigator dialog;AUI_NB_NO_TAB_FOCUS
, allowing the developer not to draw the tab
focus rectangle on tne AuiNotebook
tabs.AUI_TB_PLAIN_BACKGROUND
style that allows to easy setup a plain background to the AUI toolbar,
without the need to override drawing methods. This style contrasts with the default behaviour
of the AuiToolBar
that draws a background gradient and this break the window design when
putting it within a control that has margin between the borders and the toolbar (example: put
AuiToolBar
within a StaticBoxSizer
that has a plain background);AuiToolBar
allow item alignment: http://trac.wxwidgets.org/ticket/10174;AuiToolBar
automatically assign new id for tools: http://trac.wxwidgets.org/ticket/10173;AuiToolBar
Allow right-click on any kind of button: http://trac.wxwidgets.org/ticket/10079;AuiToolBar
idle update only when visible: http://trac.wxwidgets.org/ticket/10075;AuiToolBar
tools with [counter]clockwise rotation. This allows to propose a
variant of the minimizing functionality with a rotated button which keeps the caption of the pane
as label;AUI_MINIMIZE_POS_TOOLBAR
flag, which allows to minimize a pane inside
an existing toolbar. Limitation: if the minimized icon in the toolbar ends up in the overflowing
items (i.e., a menu is needed to show the icon), this style will not work.tabmdi.AuiMDIParentFrame
and friends, they do not work correctly at present;AuiPaneInfo
to show the caption bar of docked panes
on the left instead of on the top (with caption text rotated by 90 degrees then). This is
similar to what wxDockIt did - DONE;AuiManager
;EVT_AUI_PANE_FLOATING/ED
and EVT_AUI_PANE_DOCKING/ED
) - DONE, to some extent;AUI_NB_LEFT
and AUI_NB_RIGHT
tab locations in AuiNotebook
;AuiDefaultToolBarArt
into a separate module (as with tabart.py and dockart.py) and
provide more arts for toolbars (maybe from lib.agw.flatmenu
?)lib.agw.flatmenu
, from dropdown menus in AuiNotebook
to
toolbars and menu positioning;AUI library is distributed under the wxPython license.
Latest Revision: Andrea Gavana @ 09 Jan 2014, 22.00 GMT
Version 1.3.
aui_constants |
This module contains all the constants used by wxPython-AUI. |
aui_switcherdialog |
Description |
aui_utilities |
This module contains some common functions used by lib.agw.aui to |
auibar |
auibar.py contains an implementation of AuiToolBar , which is a completely owner-drawn |
auibook |
auibook.py contains a notebook control which implements many features common in |
dockart |
Dock art provider code - a dock provider provides all drawing functionality to |
framemanager |
Description |
tabart |
Tab art provider code - a tab provider provides all drawing functionality to |
tabmdi |