| Home | Trees | Indices | Help |
|---|
|
|
object --+
|
LayoutBase
This class is at the core of the layout engine. The two MixIn classes L{VBoxLayoutMixin}
and L{HBoxLayoutMixin} specialise on this by reimplementing the C{resizeToContent} and
the C{expandContent} methods.
Dynamic Layouting
-----------------
The layout is calculated in the L{Widget.show} method. Thus if you modify the layout,
by adding or removing child widgets for example, you have to call L{widgets.Widget.adaptLayout}
so that the changes ripple through the widget hierachy.
Internals
---------
At the core the layout engine works in two passes:
Before a root widget loaded by the XML code is shown, its resizeToContent method
is called recursively (walking the widget containment relation in post order).
This shrinks all HBoxes and VBoxes to their minimum heigt and width.
After that the expandContent method is called recursively in the same order,
which will re-align the widgets if there is space left AND if a Spacer is contained.
Inside bare Container instances (without a Layout MixIn) absolute positioning
can be used.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
|
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Sat Feb 11 00:00:29 2012 | http://epydoc.sourceforge.net |