switch (event)
{
case kButton1Up:
EmitToto(Form("Clicked(%s)",GetObjectInfoSelf(x,y)));
break;
case kButton1Double:
//the following statement is required against other loop executions before returning (depending on the time between the clicks)
gPad->GetCanvas()->HandleInput((EEventType)-1,0,0);
EmitToto(Form("DoubleClicked(%s)",GetObjectInfoSelf(x,y)));
break;
}