Module wonderful.element

The Element class.

Classes and inheritance

wonderful.element.Element The base element class.

Class Element

Element:__new__(args) Construct a new element instance.
Element:getDisplay() Get the tree's display instance.
Element:isFreeTree() Check whether the tree is free, i.e., not rooted at a Document instance.
Element:dumpTree(func, stream) Pretty-print the tree rooted at self into the stream.


Classes and inheritance

wonderful.element.Element
The base element class.

Parent classes:

Class Element

Element:__new__(args)
Construct a new element instance.

Parameters:

  • args
Element:getDisplay()
Get the tree's display instance.

Returns:

    wonderful.display.Display the display instance

Or

    nil the tree is free

See also:

Element:isFreeTree()
Check whether the tree is free, i.e., not rooted at a Document instance.

Returns:

    boolean
Element:dumpTree(func, stream)
Pretty-print the tree rooted at self into the stream.

Calls func for each element. Returned values are passed to string.format and appended to the element line.

The stream will be automatically closed.

Parameters:

  • func function(element) the function to call
  • stream {write=function,close=function} the stream
generated by LDoc 1.4.6 Last updated 2019-07-27 21:32:05