aboutsummaryrefslogtreecommitdiffstats
path: root/lispref
diff options
context:
space:
mode:
authorNick Roberts <[email protected]>2007-05-30 05:18:22 +0000
committerNick Roberts <[email protected]>2007-05-30 05:18:22 +0000
commitb9695a7afbd87241a9e187cb6c06d253bbc9e1e3 (patch)
tree9819d4357ddb5ff10de7427aa3f32ccd3aaac948 /lispref
parentdd2be8a2a7c36a17f5d4572b0eaa21740b285bea (diff)
(Click Events): Layout more logically. Describe
width and height. (Drag Events, Motion Events): Update to new format for position.
Diffstat (limited to 'lispref')
-rw-r--r--lispref/commands.texi50
1 files changed, 28 insertions, 22 deletions
diff --git a/lispref/commands.texi b/lispref/commands.texi
index 8354346c35..10f4555e1f 100644
--- a/lispref/commands.texi
+++ b/lispref/commands.texi
@@ -1196,12 +1196,7 @@ describe events by their types; thus, if there is a key binding for
@item @var{position}
This is the position where the mouse click occurred. The actual
format of @var{position} depends on what part of a window was clicked
-on. The various formats are described below.
-
-@item @var{click-count}
-This is the number of rapid repeated presses so far of the same mouse
-button. @xref{Repeat Events}.
-@end table
+on.
For mouse click events in the text area, mode line, header line, or in
the marginal areas, @var{position} has this form:
@@ -1223,6 +1218,12 @@ which the click occurred. It is one of the symbols @code{mode-line},
@code{header-line}, @code{vertical-line}, @code{left-margin},
@code{right-margin}, @code{left-fringe}, or @code{right-fringe}.
+In one special case, @var{pos-or-area} is a list containing a symbol (one
+of the symbols listed above) instead of just the symbol. This happens
+after the imaginary prefix keys for the event are inserted into the
+input stream. @xref{Key Sequence Input}.
+
+
@item @var{x}, @var{y}
These are the pixel-denominated coordinates of the click, relative to
the top left corner of @var{window}, which is @code{(0 . 0)}.
@@ -1238,6 +1239,7 @@ This is the object on which the click occurred. It is either
(@var{string} . @var{string-pos}) when there is a string-type text
property at the click position.
+@table @asis
@item @var{string}
This is the string on which the click occurred, including any
properties.
@@ -1245,6 +1247,7 @@ properties.
@item @var{string-pos}
This is the position in the string on which the click occurred,
relevant if properties at the click need to be looked up.
+@end table
@item @var{text-pos}
For clicks on a marginal area or on a fringe, this is the buffer
@@ -1267,8 +1270,12 @@ These are the pixel-denominated coordinates of the click, relative to
the top left corner of @var{object}, which is @code{(0 . 0)}. If
@var{object} is @code{nil}, the coordinates are relative to the top
left corner of the character glyph clicked on.
-@end table
+@item @var{width}, @var{height}
+These are the pixel-denominated width and height of @var{object}.
+@end table
+
+@sp 1
For mouse clicks on a scroll-bar, @var{position} has this form:
@example
@@ -1299,10 +1306,10 @@ of the symbols @code{above-handle}, @code{handle}, @code{below-handle},
@code{up}, @code{down}, @code{top}, @code{bottom}, and @code{end-scroll}.
@end table
-In one special case, @var{buffer-pos} is a list containing a symbol (one
-of the symbols listed above) instead of just the symbol. This happens
-after the imaginary prefix keys for the event are inserted into the
-input stream. @xref{Key Sequence Input}.
+@item @var{click-count}
+This is the number of rapid repeated presses so far of the same mouse
+button. @xref{Repeat Events}.
+@end table
@node Drag Events
@subsection Drag Events
@@ -1318,19 +1325,18 @@ position and the final position, like this:
@example
(@var{event-type}
- (@var{window1} @var{buffer-pos1} (@var{x1} . @var{y1}) @var{timestamp1})
- (@var{window2} @var{buffer-pos2} (@var{x2} . @var{y2}) @var{timestamp2})
- @var{click-count})
+ (@var{window1} START-POSITION)
+ (@var{window2} END-POSITION))
@end example
For a drag event, the name of the symbol @var{event-type} contains the
-prefix @samp{drag-}. For example, dragging the mouse with button 2 held
-down generates a @code{drag-mouse-2} event. The second and third
-elements of the event give the starting and ending position of the drag.
-Aside from that, the data have the same meanings as in a click event
-(@pxref{Click Events}). You can access the second element of any mouse
-event in the same way, with no need to distinguish drag events from
-others.
+prefix @samp{drag-}. For example, dragging the mouse with button 2
+held down generates a @code{drag-mouse-2} event. The second and third
+elements of the event give the starting and ending position of the
+drag. They have the same form as @var{position} in a click event
+(@pxref{Click Events}) that is not on the scroll bar part of the
+window. You can access the second element of any mouse event in the
+same way, with no need to distinguish drag events from others.
The @samp{drag-} prefix follows the modifier key prefixes such as
@samp{C-} and @samp{M-}.
@@ -1470,7 +1476,7 @@ of the mouse without any button activity. Mouse motion events are
represented by lists that look like this:
@example
-(mouse-movement (@var{window} @var{buffer-pos} (@var{x} . @var{y}) @var{timestamp}))
+(mouse-movement (POSITION))
@end example
The second element of the list describes the current position of the