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

wonderful.layout.Layout
The base layout class.

Handles element positioning.

Parent classes:

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:

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:

  1. int the width
  2. int the height
Layout:getBoundingBox()
Get the element's bounding box.

Returns:

    wonderful.geometry.Box
Layout:getViewport()
Calculate the layout's viewport.

Viewport is the actual visible area of an element.

Returns:

    wonderful.geometry.Box
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:

    wonderful.geometry.Box
generated by LDoc 1.4.6 Last updated 2019-07-27 21:32:05