diff options
| author | Luc Teirlinck | 2005-05-02 02:06:38 +0000 |
|---|---|---|
| committer | Luc Teirlinck | 2005-05-02 02:06:38 +0000 |
| commit | 40823f2d3faabe8873789dffd7f7d1a1cb5c707c (patch) | |
| tree | d48ebc428fd9553a79d91ba43d43ace37d450ac2 /lispref/frames.texi | |
| parent | e3fbac653d44d4a3dd513479bc2cefcfd2664997 (diff) | |
| download | emacs-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/frames.texi')
| -rw-r--r-- | lispref/frames.texi | 35 |
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 | |||
| 1360 | what selection the user makes. | 1360 | what selection the user makes. |
| 1361 | 1361 | ||
| 1362 | The argument @var{position} specifies where on the screen to put the | 1362 | The argument @var{position} specifies where on the screen to put the |
| 1363 | menu. It can be either a mouse button event (which says to put the menu | 1363 | top left corner of the menu. It can be either a mouse button event |
| 1364 | where 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 |
| 1365 | list 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 |
| 1371 | where @var{xoffset} and @var{yoffset} are coordinates, measured in | 1372 | where @var{xoffset} and @var{yoffset} are coordinates, measured in |
| 1372 | pixels, counting from the top left corner of @var{window}'s frame. | 1373 | pixels, counting from the top left corner of @var{window}. @var{window} |
| 1374 | may be a window or a frame. | ||
| 1373 | 1375 | ||
| 1374 | If @var{position} is @code{t}, it means to use the current mouse | 1376 | If @var{position} is @code{t}, it means to use the current mouse |
| 1375 | position. If @var{position} is @code{nil}, it means to precompute the | 1377 | position. 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}, | |||
| 1377 | without actually displaying or popping up the menu. | 1379 | without actually displaying or popping up the menu. |
| 1378 | 1380 | ||
| 1379 | The argument @var{menu} says what to display in the menu. It can be a | 1381 | The argument @var{menu} says what to display in the menu. It can be a |
| 1380 | keymap or a list of keymaps (@pxref{Menu Keymaps}). Alternatively, it | 1382 | keymap or a list of keymaps (@pxref{Menu Keymaps}). In this case, the |
| 1381 | can have the following form: | 1383 | return 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 | ||
| 1385 | submenu.) Note that @code{x-popup-menu} does not actually execute the | ||
| 1386 | command bound to that sequence of events. | ||
| 1387 | |||
| 1388 | Alternatively, @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: | |||
| 1388 | where each pane is a list of form | 1395 | where 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 | ||
| 1394 | Each @var{line} should be a string, and each @var{item} should be the | 1401 | Each item should normally be a cons cell @code{(@var{line} . @var{value})}, |
| 1395 | value to return if that @var{line} is chosen. | 1402 | where @var{line} is a string, and @var{value} is the value to return if |
| 1403 | that @var{line} is chosen. An item can also be a string; this makes a | ||
| 1404 | non-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 | ||
| 1444 | The return value is @var{value} from the chosen alternative. | 1453 | The return value is @var{value} from the chosen alternative. |
| 1445 | 1454 | ||
| 1446 | An element of the list may be just a string instead of a cons cell | 1455 | As 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 | 1456 | string instead of a cons cell @code{(@var{string} . @var{value})}. |
| 1448 | be selected. | 1457 | That makes a box that cannot be selected. |
| 1449 | 1458 | ||
| 1450 | If @code{nil} appears in the list, it separates the left-hand items from | 1459 | If @code{nil} appears in the list, it separates the left-hand items from |
| 1451 | the right-hand items; items that precede the @code{nil} appear on the | 1460 | the right-hand items; items that precede the @code{nil} appear on the |
| @@ -1455,8 +1464,8 @@ items appear on each side. | |||
| 1455 | 1464 | ||
| 1456 | Dialog boxes always appear in the center of a frame; the argument | 1465 | Dialog 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 |
| 1459 | frame matters. | 1468 | window don't matter; only the frame matters. |
| 1460 | 1469 | ||
| 1461 | In some configurations, Emacs cannot display a real dialog box; so | 1470 | In some configurations, Emacs cannot display a real dialog box; so |
| 1462 | instead it displays the same items in a pop-up menu in the center of the | 1471 | instead it displays the same items in a pop-up menu in the center of the |