aboutsummaryrefslogtreecommitdiffstats
path: root/lispref
diff options
context:
space:
mode:
authorLuc Teirlinck2005-05-02 02:06:38 +0000
committerLuc Teirlinck2005-05-02 02:06:38 +0000
commit40823f2d3faabe8873789dffd7f7d1a1cb5c707c (patch)
treed48ebc428fd9553a79d91ba43d43ace37d450ac2 /lispref
parente3fbac653d44d4a3dd513479bc2cefcfd2664997 (diff)
downloademacs-40823f2d3faabe8873789dffd7f7d1a1cb5c707c.tar.gz
emacs-40823f2d3faabe8873789dffd7f7d1a1cb5c707c.zip
(Pop-Up Menus): Correct and clarify description of `x-popup-menu'.
(Dialog Boxes): Clarify description of `x-popup-dialog'.
Diffstat (limited to 'lispref')
-rw-r--r--lispref/frames.texi35
1 files changed, 22 insertions, 13 deletions
diff --git a/lispref/frames.texi b/lispref/frames.texi
index 712f05df597..d56c071ad1e 100644
--- a/lispref/frames.texi
+++ b/lispref/frames.texi
@@ -1360,8 +1360,9 @@ This function displays a pop-up menu and returns an indication of
1360what selection the user makes. 1360what selection the user makes.
1361 1361
1362The argument @var{position} specifies where on the screen to put the 1362The argument @var{position} specifies where on the screen to put the
1363menu. It can be either a mouse button event (which says to put the menu 1363top left corner of the menu. It can be either a mouse button event
1364where the user actuated the button) or a list of this form: 1364(which says to put the menu where the user actuated the button) or a
1365list of this form:
1365 1366
1366@example 1367@example
1367((@var{xoffset} @var{yoffset}) @var{window}) 1368((@var{xoffset} @var{yoffset}) @var{window})
@@ -1369,7 +1370,8 @@ where the user actuated the button) or a list of this form:
1369 1370
1370@noindent 1371@noindent
1371where @var{xoffset} and @var{yoffset} are coordinates, measured in 1372where @var{xoffset} and @var{yoffset} are coordinates, measured in
1372pixels, counting from the top left corner of @var{window}'s frame. 1373pixels, counting from the top left corner of @var{window}. @var{window}
1374may be a window or a frame.
1373 1375
1374If @var{position} is @code{t}, it means to use the current mouse 1376If @var{position} is @code{t}, it means to use the current mouse
1375position. If @var{position} is @code{nil}, it means to precompute the 1377position. If @var{position} is @code{nil}, it means to precompute the
@@ -1377,8 +1379,13 @@ key binding equivalents for the keymaps specified in @var{menu},
1377without actually displaying or popping up the menu. 1379without actually displaying or popping up the menu.
1378 1380
1379The argument @var{menu} says what to display in the menu. It can be a 1381The argument @var{menu} says what to display in the menu. It can be a
1380keymap or a list of keymaps (@pxref{Menu Keymaps}). Alternatively, it 1382keymap or a list of keymaps (@pxref{Menu Keymaps}). In this case, the
1381can have the following form: 1383return value is the list of events corresponding to the user's choice.
1384(This list has more than one element if the choice occurred in a
1385submenu.) Note that @code{x-popup-menu} does not actually execute the
1386command bound to that sequence of events.
1387
1388Alternatively, @var{menu} can have the following form:
1382 1389
1383@example 1390@example
1384(@var{title} @var{pane1} @var{pane2}...) 1391(@var{title} @var{pane1} @var{pane2}...)
@@ -1388,11 +1395,13 @@ can have the following form:
1388where each pane is a list of form 1395where each pane is a list of form
1389 1396
1390@example 1397@example
1391(@var{title} (@var{line} . @var{item})...) 1398(@var{title} @var{item1} @var{item2}...)
1392@end example 1399@end example
1393 1400
1394Each @var{line} should be a string, and each @var{item} should be the 1401Each item should normally be a cons cell @code{(@var{line} . @var{value})},
1395value to return if that @var{line} is chosen. 1402where @var{line} is a string, and @var{value} is the value to return if
1403that @var{line} is chosen. An item can also be a string; this makes a
1404non-selectable line in the menu.
1396@end defun 1405@end defun
1397 1406
1398 @strong{Usage note:} Don't use @code{x-popup-menu} to display a menu 1407 @strong{Usage note:} Don't use @code{x-popup-menu} to display a menu
@@ -1443,9 +1452,9 @@ which looks like the list that specifies a single pane for
1443 1452
1444The return value is @var{value} from the chosen alternative. 1453The return value is @var{value} from the chosen alternative.
1445 1454
1446An element of the list may be just a string instead of a cons cell 1455As for @code{x-popup-menu}, an element of the list may be just a
1447@code{(@var{string} . @var{value})}. That makes a box that cannot 1456string instead of a cons cell @code{(@var{string} . @var{value})}.
1448be selected. 1457That makes a box that cannot be selected.
1449 1458
1450If @code{nil} appears in the list, it separates the left-hand items from 1459If @code{nil} appears in the list, it separates the left-hand items from
1451the right-hand items; items that precede the @code{nil} appear on the 1460the right-hand items; items that precede the @code{nil} appear on the
@@ -1455,8 +1464,8 @@ items appear on each side.
1455 1464
1456Dialog boxes always appear in the center of a frame; the argument 1465Dialog boxes always appear in the center of a frame; the argument
1457@var{position} specifies which frame. The possible values are as in 1466@var{position} specifies which frame. The possible values are as in
1458@code{x-popup-menu}, but the precise coordinates don't matter; only the 1467@code{x-popup-menu}, but the precise coordinates or the individual
1459frame matters. 1468window don't matter; only the frame matters.
1460 1469
1461In some configurations, Emacs cannot display a real dialog box; so 1470In some configurations, Emacs cannot display a real dialog box; so
1462instead it displays the same items in a pop-up menu in the center of the 1471instead it displays the same items in a pop-up menu in the center of the