File: xgetmouse.man

package info (click to toggle)
scilab 2.4-1
  • links: PTS
  • area: non-free
  • in suites: potato, slink
  • size: 55,196 kB
  • ctags: 38,019
  • sloc: ansic: 231,970; fortran: 148,976; tcl: 7,099; makefile: 4,585; sh: 2,978; csh: 154; cpp: 101; asm: 39; sed: 5
file content (46 lines) | stat: -rw-r--r-- 1,127 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
44
45
46
.TH xgetmouse  "September  1994" "Scilab Group" "Scilab Function"
.so ../sci.an
.SH NAME
xgetmouse - get current position of the mouse
.SH CALLING SEQUENCE
.nf
rep=xgetmouse([flag])
.fi
.SH PARAMETERS
.TP 10
rep
: a three vector: [x,y,ibutton] 
.TP
flag
: an integer. If present, the click event queue is not cleared when entering xclick
.SH DESCRIPTION
If the mouse is located in the current graphic window xgetmouse returns
in rep the current mouse position (x,y) and the value ibutton. 
The ibutton value indicate the button action at this point
 if ibutton==-1 then no button clicked
 if ibutton==0,1 or 2 then the left, middle or right button clicked

If the mouse is not located in the current graphic window xgetmouse waits
.SH EXAMPLE
.nf
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)
.fi
.SH SEE ALSO
locate, xclick
.SH AUTHOR
S. Steer