0
|
1 @c -*-texinfo-*-
|
|
2 @c This is part of the XEmacs Lisp Reference Manual.
|
444
|
3 @c Copyright (C) 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
|
0
|
4 @c See the file lispref.texi for copying conditions.
|
|
5 @setfilename ../../info/mouse.info
|
|
6 @node Mouse
|
|
7 @chapter The Mouse
|
|
8 @cindex mouse
|
|
9
|
|
10 * Mouse Position:: Asking where the mouse is, or moving it.
|
|
11
|
|
12 @ignore @c Not in XEmacs.
|
|
13 @node Mouse Tracking
|
|
14 @section Mouse Tracking
|
|
15 @cindex mouse tracking
|
|
16 @cindex tracking the mouse
|
|
17
|
|
18 (deleted)
|
|
19 @end ignore
|
|
20
|
|
21 @ignore
|
|
22 @c These are not implemented yet.
|
|
23
|
|
24 These functions change the screen appearance instantaneously. The
|
|
25 effect is transient, only until the next ordinary XEmacs redisplay. That
|
|
26 is ok for mouse tracking, since it doesn't make sense for mouse tracking
|
|
27 to change the text, and the body of @code{track-mouse} normally reads
|
|
28 the events itself and does not do redisplay.
|
|
29
|
444
|
30 @defun x-contour-region window start end
|
|
31 This function draws lines to make a box around the text from @var{start}
|
0
|
32 to @var{end}, in window @var{window}.
|
|
33 @end defun
|
|
34
|
444
|
35 @defun x-uncontour-region window start end
|
0
|
36 This function erases the lines that would make a box around the text
|
444
|
37 from @var{start} to @var{end}, in window @var{window}. Use it to remove
|
0
|
38 a contour that you previously made by calling @code{x-contour-region}.
|
|
39 @end defun
|
|
40
|
|
41 @defun x-draw-rectangle frame left top right bottom
|
|
42 This function draws a hollow rectangle on frame @var{frame} with the
|
|
43 specified edge coordinates, all measured in pixels from the inside top
|
|
44 left corner. It uses the cursor color, the one used for indicating the
|
|
45 location of point.
|
|
46 @end defun
|
|
47
|
|
48 @defun x-erase-rectangle frame left top right bottom
|
|
49 This function erases a hollow rectangle on frame @var{frame} with the
|
|
50 specified edge coordinates, all measured in pixels from the inside top
|
|
51 left corner. Erasure means redrawing the text and background that
|
|
52 normally belong in the specified rectangle.
|
|
53 @end defun
|
|
54 @end ignore
|
|
55
|
|
56 @node Mouse Position
|
|
57 @section Mouse Position
|
|
58 @cindex mouse position
|
|
59 @cindex position of mouse
|
|
60
|
|
61 The functions @code{mouse-position}, @code{mouse-pixel-position},
|
|
62 @code{set-mouse-position} and @code{set-mouse-pixel-position} give
|
|
63 access to the current position of the mouse.
|
|
64
|
|
65 @defun mouse-position &optional device
|
|
66 This function returns a list (@var{window} @var{x} . @var{y}) giving the
|
|
67 current mouse window and position. The position is given in character
|
|
68 cells, where @samp{(0, 0)} is the upper-left corner.
|
|
69
|
|
70 @var{device} specifies the device on which to read the mouse position,
|
|
71 and defaults to the selected device. If the device is a mouseless
|
|
72 terminal or XEmacs hasn't been programmed to read its mouse position, it
|
|
73 returns the device's selected window for @var{window} and @code{nil} for
|
|
74 @var{x} and @var{y}.
|
|
75 @end defun
|
|
76
|
|
77 @defun mouse-pixel-position &optional device
|
|
78 This function returns a list (@var{window} @var{x} . @var{y}) giving the
|
|
79 current mouse window and position. The position is given in pixel
|
|
80 units, where @samp{(0, 0)} is the upper-left corner.
|
|
81
|
|
82 @var{device} specifies the device on which to read the mouse position,
|
|
83 and defaults to the selected device. If the device is a mouseless
|
|
84 terminal or XEmacs hasn't been programmed to read its mouse position, it
|
|
85 returns the device's selected window for @var{window} and @code{nil} for
|
|
86 @var{x} and @var{y}.
|
|
87 @end defun
|
|
88
|
|
89 @defun set-mouse-position window x y
|
|
90 This function @dfn{warps the mouse} to the center of character position
|
|
91 @var{x}, @var{y} in frame @var{window}. The arguments @var{x} and
|
|
92 @var{y} are integers, giving the position in characters relative to
|
|
93 the top left corner of @var{window}.
|
|
94
|
|
95 @cindex warping the mouse
|
|
96 @cindex mouse warping
|
|
97 Warping the mouse means changing the screen position of the mouse as if
|
|
98 the user had moved the physical mouse---thus simulating the effect of
|
|
99 actual mouse motion.
|
|
100 @end defun
|
|
101
|
|
102 @defun set-mouse-pixel-position window x y
|
|
103 This function @dfn{warps the mouse} to pixel position @var{x}, @var{y}
|
|
104 in frame @var{window}. The arguments @var{x} and @var{y} are integers,
|
|
105 giving the position in pixels relative to the top left corner of
|
|
106 @var{window}.
|
|
107 @end defun
|