Scilab Function

seteventhandler - set an event handler for the current graphic window

Calling Sequence

seteventhandler(sfun_name)
seteventhandler('')

Parameters

Description

The function allows the user to set a particular event handler for the current graphic window. seteventhandler('') removes the handler. The event handler is defined by a Scilab function whose calling sequence must be function sfun_name(win,x,y,ibut), where
  • win represents the number of the window where the event had occured.
  • x,y are the coordinates of the pointer (in pixels), when the event has occured
  • ibutis the event type:

    ibut==0 : Left mouse button has been pressed

    ibut==-5 : Left mouse button has been released

    ibut==1 : Middle mouse button has been pressed

    ibut==-4 : Middle mouse button has been released

    ibut==2 : Right mouse button has been pressed

    ibut==-3 : Right mouse button has been released

    ibut==-1 : pointer has moved

    ibut > =32 : key with ascii code ascii(ibut) has been pressed

    ibut < =-32 : key with ascii code ascii(-ibut) has been released

    ibut==-1000 : graphic window has been closed
  • Examples

    See Also