Module: drawable
awesome drawable API.
Furthermore to the classes described here, one can also use signals as
described in signals.
-
drawable.drawable (surface)
-
Drawable object.
Parameters:
- surface
The drawable's cairo surface.
-
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.
Parameters:
- cb
function
The meta-method
-
drawable.set_newindex_miss_handler (cb)
-
Set a __newindex metamethod for all drawable instances.
Parameters:
- cb
function
The meta-method
-
: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.
-
:geometry ()
-> table
-
Get drawable geometry. The geometry consists of x, y, width and height.
Returns:
table
A table with drawable coordinates and geometry.
-
button::press
-
-
button::release
-
-
mouse::enter
-
-
mouse::leave
-
-
mouse::move
-
-
property::geometry
-
-
property::height
-
-
property::width
-
-
property::x
-
-
property::y
-
-
property::surface
-