Class Core.Widget

Widget Base Class.

The base class used for all Widgets.

Properties

.style () set/get widget style.
.x () set/get x position.
.y () set/get y position.
.id () set/get widget id.

Methods

:clearStyle () clear any local properties on style.

Inherited

.anchorX () set/get anchorX.
.anchorY () set/get anchorY.


Properties

.style ()
set/get widget style. style can be a style name or a Style Object. Style Object must be appropriate style for Widget, eg style for Background widget comes from dUI.newBackgroundStyle().

Usage:

  • widget.style = 'widget-home-page'
  •  local wStyle = dUI.newTextStyle()
     widget.style = wStyle
.x ()
set/get x position.

Usage:

  • widget.x = 5
  • print( widget.x )
.y ()
set/get y position.

Usage:

  • widget.y = 5
  • print( widget.y )
.id ()
set/get widget id.

Usage:

  • widget.id = 'button-widget'
  • print( widget.id )

Methods

:clearStyle ()
clear any local properties on style. convenience method, calls clearProperties() on active style.

Usage:

    widget:clearStyle()

Inherited

.anchorX ()
set/get anchorX.

Usage:

  • widget.anchorX = 5
  • print( widget.anchorX )
.anchorY ()
set/get anchorY.

Usage:

  • widget.anchorY = 5
  • print( widget.anchorY )
generated by LDoc 1.4.3 Last updated 2015-05-14 11:55:05