 Usage:  ret_event=readevent(which_event{, di, row_num, col_num})   

 

 Input:



  which_event            0 for key; 1 for mouse 

                         

  di                     display 

                         

  row_num                integer 

                         

  col_num                integer 

                         

                         

                         

 Output:



  ret_event              a complex object: 

                         

                         1, if this event happened 

                         

                         0, if this event didn't happen 

                         

                         ret_event can include following elements: 

                         

                         

  ret_event.key          the string of the key if a key has been pressed 

                         

  ret_event.keysym       the integer code of the key if a key has been pressed 

                         (the mapping of keys to integer codes may vary with the operating 

                         system) 

                         

  ret_event.button       one of the integers 1,2,3, returning which mouse button has been pressed 

                         

  ret_event.xy           (only if called with 4 arguments) 

                         

                         a (1x2) vector of integers, returning the window coordinates of 

                         the mouse pointer if a mouse button has been pressed (e.g. 0~0 

                         is the upper left corner of the window) 

                         

  ret_event.xyreal       (only if called with 4 arguments and the plotted data has 2 dimensions) 

                         

                         a (1x2) integer vector returning the real coordinates of the mouse 

                         pointer in the data space. 

                         

--------------------------------------------------------------

(C) MD*TECH Method and Data Technologies, 21.9.2000

