File: xgetmouse.cat

package info (click to toggle)
scilab 2.6-4
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 54,632 kB
  • ctags: 40,267
  • sloc: ansic: 267,851; fortran: 166,549; sh: 10,005; makefile: 4,119; tcl: 1,070; cpp: 233; csh: 143; asm: 135; perl: 130; java: 39
file content (43 lines) | stat: -rw-r--r-- 1,240 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
xgetmouse          Scilab Group          Scilab Function          xgetmouse
NAME
   xgetmouse - get the current position of the mouse
  
CALLING SEQUENCE
 rep=xgetmouse([flag])
PARAMETERS
 rep    : vector of size 3, [x,y,ibutton].
        
 flag   : integer. If present, the click event queue is not cleared when
        entering  xgetmouse.
        
DESCRIPTION
   If the mouse is located in the current graphics window, xgetmouse returns
  in rep the current mouse position (x,y) and the value ibutton.   The
  ibutton value indicates the action of the button at this point:
  
 - if ibutton is -5 -4 or -2 then left , middle or right button
      was released
     
 - if ibutton is 0, 1 or 2, then the left, middle or right button
      was pressed.  If the mouse is not located in the current graphics window,
     xgetmouse waits.
     
EXAMPLE
 xselect(); xbasc(); xsetech([0 0 1 1],[0 0 100 100])
 xset("alufunction",6)
 xtitle(" drawing a rectangle ")
 [b,x0,y0]=xclick(); rep=[x0,y0,-1]; x=x0; y=y0;
 xrect(x0,y0,x-x0,y-y0)
 while rep(3)==-1 then
     rep=xgetmouse(0)
     xrect(x0,y0,x-x0,y0-y)
     x=rep(1); y=rep(2);
     xrect(x0,y0,x-x0,y0-y)
 end
 xset("alufunction",3)
SEE ALSO
   locate, xclick
  
AUTHOR
   S. Steer