Class drawable

awesome drawable API

Furthermore to the classes described here, one can also use signals as described in signals.

Info:

Signals

button::press
button::release
mouse::enter
mouse::leave
mouse::move
property::geometry
property::height
property::width
property::x
property::y
property::surface

Methods

drawable:drawable () Drawable object.
drawable:instances () Get the number of instances.
drawable:set_index_miss_handler (cb) Set a __index metamethod for all drawable instances.
drawable:set_newindex_miss_handler (cb) Set a __newindex metamethod for all drawable instances.
drawable:refresh () Refresh a drawable’s content.
drawable:geometry () Get drawable geometry.


Signals

button::press
button::release
mouse::enter
mouse::leave
mouse::move
property::geometry
property::height
property::width
property::x
property::y
property::surface

Methods

drawable:drawable ()
Drawable object.
drawable:instances ()
Get the number of instances.

Returns:

    The number of drawable objects alive.
drawable:set_index_miss_handler (cb)
Set a __index metamethod for all drawable instances.
  • cb function The meta-method
drawable:set_newindex_miss_handler (cb)
Set a __newindex metamethod for all drawable instances.
  • cb function The meta-method
drawable:refresh ()
Refresh a drawable’s content. This has to be called whenever some drawing to the drawable’s surface has been done and should become visible.
drawable:geometry ()
Get drawable geometry. The geometry consists of x, y, width and height.

Returns:

    table A table with drawable coordinates and geometry.
generated by LDoc 1.4.6 Last updated 2022-09-28 18:14:15