~ubuntu-branches/ubuntu/karmic/scilab/karmic

« back to all changes in this revision

Viewing changes to man/graphics/xgetmouse.man

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2002-03-21 16:57:43 UTC
  • Revision ID: james.westby@ubuntu.com-20020321165743-e9mv12c1tb1plztg
Tags: upstream-2.6
ImportĀ upstreamĀ versionĀ 2.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.TH xgetmouse  "September  1994" "Scilab Group" "Scilab Function"
 
2
.so ../sci.an
 
3
.SH NAME
 
4
xgetmouse - get the current position of the mouse
 
5
.SH CALLING SEQUENCE
 
6
.nf
 
7
rep=xgetmouse([flag])
 
8
.fi
 
9
.SH PARAMETERS
 
10
.TP 6
 
11
rep
 
12
: vector of size 3, [x,y,ibutton].
 
13
.TP
 
14
flag
 
15
: integer. If present, the click event queue is not cleared when entering 
 
16
xgetmouse.
 
17
.SH DESCRIPTION
 
18
If the mouse is located in the current graphics window, \fVxgetmouse\fR returns
 
19
in \fVrep\fR the current mouse position (x,y) and the value \fVibutton\fR.
 
20
 
 
21
The \fVibutton\fR value indicates the action of the button at this point:
 
22
.TP 3
 
23
- if \fVibutton\fR is -1 then no button was clicked.
 
24
.TP
 
25
- if \fVibutton\fR is -5 -4 or -2 then left , middle or right button
 
26
was released
 
27
.TP
 
28
- if \fVibutton\fR is 0, 1 or 2, then the left, middle or right button
 
29
was pressed.
 
30
 
 
31
If the mouse is not located in the current graphics window, \fVxgetmouse\fR
 
32
waits.
 
33
.SH EXAMPLE
 
34
.nf
 
35
xselect(); xbasc(); xsetech([0 0 1 1],[0 0 100 100])
 
36
xset("alufunction",6)
 
37
xtitle(" drawing a rectangle ")
 
38
[b,x0,y0]=xclick(); rep=[x0,y0,-1]; x=x0; y=y0;
 
39
xrect(x0,y0,x-x0,y-y0)
 
40
while rep(3)==-1 then
 
41
    rep=xgetmouse(0)
 
42
    xrect(x0,y0,x-x0,y0-y)
 
43
    x=rep(1); y=rep(2);
 
44
    xrect(x0,y0,x-x0,y0-y)
 
45
end
 
46
xset("alufunction",3)
 
47
.fi
 
48
.SH SEE ALSO
 
49
locate, xclick
 
50
.SH AUTHOR
 
51
S. Steer