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.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.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:
- integer Width.
- 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.