elements reference index

elements documentation (r105) | Reference Index || Help Contents || Manual elements || elements.add || elements.callbacks || elements.world || Box2D

elements.callbacks

elements callback subclass

- elements.callbacks.add - add a new callback
- elements.callbacks.get - get a list of callbacks

The subclass takes care of registering and delivering callbacks.
[[comment elements.callbacks]]
elements.callbacks.add

add a new callback
`elements.callbacks.add(callback_type, callback_handler, bodylist=None): return int`
Users can add callbacks for certain (or all) collisions
Parameters:
callback_type ......... see elements.locals and manual.html#callbacks
callback_handler ...... a function which should be executed on the specified event
shapelist (optional) .. which shapes should cause the callback -- leave empty for all
Return:
callback_id ... used to remove a callback later (int)
[[comment elements.callbacks.add]]

elements.callbacks.get

get a callback listing
`elements.callbacks.get(callback_type): return List`
Users can get callback listing
Parameters:
callback_type ......... see elements.locals and manual.html#callbacks
[[comment elements.callbacks.get]]