Class element

A generic element every element must inherit from.

Info:

  • Copyright: Paul Liverman III (2016)
  • License: The MIT License (MIT)

Methods

element.new (parent, data) Constructor expects nothing, or a data table describing it.
element.debugDraw (self) Slightly modified from pop.debugDraw
element.setSize (w, h) Sets an element's width/height.
element.getSize (self) Returns an element's width and height.
element.setWidth (w) Sets an element's width.
element.getWidth (self) Returns an element's width.
element.setHeight (h) Sets an element's height.
element.getHeight (self) Returns an element's height.


Methods

element.new (parent, data)
Constructor expects nothing, or a data table describing it.

Parameters:

  • parent Element or false The parent element.
  • data table [opt] The data (state) for this element.

Returns:

    element self
element.debugDraw (self)
Slightly modified from pop.debugDraw

Parameters:

  • self

See also:

element.setSize (w, h)
Sets an element's width/height.

Parameters:

  • w integer [opt] Width.
  • h integer [opt] Height.

Returns:

    element self
element.getSize (self)
Returns an element's width and height.

Parameters:

  • self

Returns:

  1. integer Width.
  2. integer Height.
element.setWidth (w)
Sets an element's width.

Parameters:

  • w integer Width.

Returns:

    element self
element.getWidth (self)
Returns an element's width.

Parameters:

  • self

Returns:

    integer Width.
element.setHeight (h)
Sets an element's height.

Parameters:

  • h integer Height.

Returns:

    element self
element.getHeight (self)
Returns an element's height.

Parameters:

  • self

Returns:

    integer Height.
generated by LDoc 1.4.3 Last updated 2016-10-30 23:39:49