Open topic with navigation
<viz:cluster>.getClient
Returns the client that triggered the current callback
<viz:cluster>.getClient() |
|
Remarks
This command is only applicable inside a callback event. It returns the client that triggered the current event. The following events are supported by cluster clients:
viz.KEYDOWN_EVENT
viz.KEYUP_EVENT
viz.KEY_CHAR_EVENT
viz.MOUSEDOWN_EVENT
viz.MOUSEUP_EVENT
viz.DOUBLE_CLICK_EVENT
viz.MOUSEWHEEL_EVENT
viz.MOUSE_MOVE_EVENT
viz.WINDOW_SIZE_EVENT
viz.BUTTON_EVENT
viz.SLIDER_EVENT
viz.LIST_EVENT
Return Value
ID of the client that triggered current callback event.
Example
def onkey(key):
client = viz.cluster.getClient()
print('Key pressed on client',client)
viz.callback(viz.KEYDOWN_EVENT,onkey,mask=viz.ALLCLIENTS)
See also