All of the types of components described in this section are implemented completely in python in PyUI. As such, they can all be sub-classed by user code to be extended and have their functionality customized by python code.
The Desktop
In any PyUI application there is single space in which everything
is drawn. This is known as the desktop. It is a rectangular two-dimensional
plane that hosts all the other user interface components. In most
renderers, the desktop is opaque - it has a background that can
contain an image, a fill color or a view into 3D world. There
is a single desktop object. It can be retrieved by calling pyui.desktop.getDesktop().
Widgets
Widgets are GUI objects that are interactive and provide functionality.
This include list boxes, edit boxes, scroll bars, buttons and
labels. There many kinds of widgets all derived from the pyui.widgets.Base
class. Widgets can be contained in other Widgets.
Panels
Panels are a special type of widgets that is designed to contain
other widgets. Widgets within a panel are placed procedurally
by "layout managers". There are special types of panels
such as the TabbedPanel and SplitterPanel for more direct control
over the layout of widgets within the panel.
Windows
Windows higher level objects that are containers of widgets. They
are managed by the desktop and so can overlap each other but are
still drawn in the correct order. Each Window contains a default
Panel which in turn contains widgets and other Panels. Most user
code will use Frames rather than Windows.
Frames
Frames are a special type of Window that has a title bar, a frame
border and functionality for resizing and moving. Frames still
have a default Panel within them, but it is enclosed within the
title bar and frame border.
Dialogs
Dialogs are special types of Frames that provide specific functionality.
For example, there is a ConsoleDialog which is an interactive
python console - it allows text to be entered and executed as
python code, then displays the resulting output in a scrolling
area. Dialogs may be "modal" - they may require that
the user interact with them before any other UI interactions can
take place. The StdDialog is an example of a modal dialog.
Layout Managers
Layout Managers are objects that control the placement of widgets
within Panels. There are a number of built-in Layout Managers
such as the GridLayoutManager and BorderLayoutManager that do
common types of widget placement.
Renderers
Renderers are the back-end to the widget construction front-end.
They are responsible for actually drawing the rectangles, images,
text and lines on the screen; and handling user input and mapping
it into PyUI events.
(C) Sean Riley 2002