Module wonderful.layout
The abstract layout classes.
Classes and inheritance
wonderful.layout.Layout | The base layout class. |
Class Layout
Layout.scrollBox | |
Layout:__new__(args) | Construct a new instance. |
Layout:_compose(layoutBox) | Abstract method to compose children. |
Layout:requestComposition() | Flag the element to compose its children the next time Wonderful:compose
is called. |
Layout:commitComposition() | Checks whether composition is requested, and calls _compose if it is. |
Layout:sizeHint() | Abstract method to estimate the layout size, including its children. |
Layout:getBoundingBox() | Get the element's bounding box. |
Layout:getViewport() | Calculate the layout's viewport. |
Layout:getLayoutBox() | Calculate the layout box relative to which the layout's children are positioned. |
Classes and inheritance
Class Layout
- Layout.scrollBox
- Layout:__new__(args)
-
Construct a new instance.
Parameters:
- args table keyword argument table
- Layout:_compose(layoutBox)
-
Abstract method to compose children.
if you're making your own layout, provide an implementation for this method.
Calling this method forcefully composes the children, which is discouraged. Consider using requestComposition instead.
Parameters:
- layoutBox wonderful.geometry.Box the layout box relative to which elements are to be composed
See also:
- Layout:requestComposition()
-
Flag the element to compose its children the next time
Wonderful:compose
is called. - Layout:commitComposition()
-
Checks whether composition is requested, and calls _compose if it is. Does
nothing otherwise.
Returns:
-
boolean
whether composition was requested
See also:
- Layout:sizeHint()
-
Abstract method to estimate the layout size, including its children.
Returns:
- int the width
- int the height
- Layout:getBoundingBox()
-
Get the element's bounding box.
Returns:
- Layout:getViewport()
-
Calculate the layout's viewport.
Viewport is the actual visible area of an element.
Returns:
- Layout:getLayoutBox()
-
Calculate the layout box relative to which the layout's children are
positioned.
The layout box is the bounding box shifted by the values of the scroll box.
Returns: