diff options
| author | Richard M. Stallman | 1994-04-28 18:52:49 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-04-28 18:52:49 +0000 |
| commit | fb9b5ab767668ac4d0c9a45f45b51cd96bd49cc9 (patch) | |
| tree | d9b222c98aecb7da4538973516d18eee66e30bb7 | |
| parent | 7435bd25826dc4dc9c4ea549c966dc44f743f890 (diff) | |
| download | emacs-fb9b5ab767668ac4d0c9a45f45b51cd96bd49cc9.tar.gz emacs-fb9b5ab767668ac4d0c9a45f45b51cd96bd49cc9.zip | |
*** empty log message ***
| -rw-r--r-- | lispref/frames.texi | 85 |
1 files changed, 57 insertions, 28 deletions
diff --git a/lispref/frames.texi b/lispref/frames.texi index 15580559dba..82c4936c753 100644 --- a/lispref/frames.texi +++ b/lispref/frames.texi | |||
| @@ -108,7 +108,7 @@ and width. | |||
| 108 | * Parameter Access:: How to change a frame's parameters. | 108 | * Parameter Access:: How to change a frame's parameters. |
| 109 | * Initial Parameters:: Specifying frame parameters when you make a frame. | 109 | * Initial Parameters:: Specifying frame parameters when you make a frame. |
| 110 | * X Frame Parameters:: Individual parameters documented. | 110 | * X Frame Parameters:: Individual parameters documented. |
| 111 | * Size And Position:: Changing the size and position of a frame. | 111 | * Size and Position:: Changing the size and position of a frame. |
| 112 | @end menu | 112 | @end menu |
| 113 | 113 | ||
| 114 | @node Parameter Access | 114 | @node Parameter Access |
| @@ -174,10 +174,12 @@ The screen position of the left edge, in pixels. | |||
| 174 | The screen position of the top edge, in pixels. | 174 | The screen position of the top edge, in pixels. |
| 175 | 175 | ||
| 176 | @item height | 176 | @item height |
| 177 | The height of the frame contents, in pixels. | 177 | The height of the frame contents, in characters. (To get the height in |
| 178 | pixels, call @code{frame-pixel-height}; see @ref{Size and Position}.) | ||
| 178 | 179 | ||
| 179 | @item width | 180 | @item width |
| 180 | The width of the frame contents, in pixels. | 181 | The width of the frame contents, in characters. (To get the height in |
| 182 | pixels, call @code{frame-pixel-width}; see @ref{Size and Position}.) | ||
| 181 | 183 | ||
| 182 | @item window-id | 184 | @item window-id |
| 183 | The number of the X window for the frame. | 185 | The number of the X window for the frame. |
| @@ -260,7 +262,7 @@ application's window. (It is not certain this will be implemented; try | |||
| 260 | it and see if it works.) | 262 | it and see if it works.) |
| 261 | @end table | 263 | @end table |
| 262 | 264 | ||
| 263 | @node Size And Position | 265 | @node Size and Position |
| 264 | @subsection Frame Size And Position | 266 | @subsection Frame Size And Position |
| 265 | 267 | ||
| 266 | You can read or change the size and position of a frame using the | 268 | You can read or change the size and position of a frame using the |
| @@ -300,12 +302,12 @@ the selected frame. | |||
| 300 | @end defun | 302 | @end defun |
| 301 | 303 | ||
| 302 | @defun set-frame-size frame cols rows | 304 | @defun set-frame-size frame cols rows |
| 303 | This function sets the size of @var{frame}, measured in | 305 | This function sets the size of @var{frame}, measured in characters; |
| 304 | characters; @var{cols} and @var{rows} specify the new width and height. | 306 | @var{cols} and @var{rows} specify the new width and height. |
| 305 | 307 | ||
| 306 | To set the size with values measured in pixels, use | 308 | To set the size based on values measured in pixels, use |
| 307 | @code{modify-frame-parameters} to set the @code{width} and @code{height} | 309 | @code{frame-char-height} and @code{frame-char-width} to convert |
| 308 | parameters. @xref{X Frame Parameters}. | 310 | them to units of characters. |
| 309 | @end defun | 311 | @end defun |
| 310 | 312 | ||
| 311 | The old-fashioned functions @code{set-screen-height} and | 313 | The old-fashioned functions @code{set-screen-height} and |
| @@ -402,19 +404,24 @@ direction. | |||
| 402 | @node Frames and Windows | 404 | @node Frames and Windows |
| 403 | @section Frames and Windows | 405 | @section Frames and Windows |
| 404 | 406 | ||
| 405 | All the non-minibuffer windows in a frame are arranged in a tree of | 407 | Each window is part of one and only one frame; you can get the frame |
| 406 | subdivisions; the root of this tree is available via the function | 408 | with @code{window-frame}. |
| 407 | @code{frame-root-window}. Each window is part of one and | ||
| 408 | only one frame; you can get the frame with @code{window-frame}. | ||
| 409 | |||
| 410 | @defun frame-root-window frame | ||
| 411 | This returns the root window of frame @var{frame}. | ||
| 412 | @end defun | ||
| 413 | 409 | ||
| 414 | @defun window-frame window | 410 | @defun window-frame window |
| 415 | This function returns the frame that @var{window} is on. | 411 | This function returns the frame that @var{window} is on. |
| 416 | @end defun | 412 | @end defun |
| 417 | 413 | ||
| 414 | All the non-minibuffer windows in a frame are arranged in a cyclic | ||
| 415 | order. The order runs from the frame's top window, which is at the | ||
| 416 | upper left corner, down and to the right, until it reaches the window at | ||
| 417 | the lower right corner (always the minibuffer window, if the frame has | ||
| 418 | one), and then it moves back to the top. | ||
| 419 | |||
| 420 | @defun frame-top-window frame | ||
| 421 | This returns the topmost, leftmost window of frame @var{frame}. | ||
| 422 | This is a window | ||
| 423 | @end defun | ||
| 424 | |||
| 418 | At any time, exactly one window on any frame is @dfn{selected within the | 425 | At any time, exactly one window on any frame is @dfn{selected within the |
| 419 | frame}. The significance of this designation is that selecting the | 426 | frame}. The significance of this designation is that selecting the |
| 420 | frame also selects this window. You can get the frame's current | 427 | frame also selects this window. You can get the frame's current |
| @@ -689,21 +696,26 @@ give access to the current position of the mouse. | |||
| 689 | @defun mouse-position | 696 | @defun mouse-position |
| 690 | This function returns a description of the position of the mouse. The | 697 | This function returns a description of the position of the mouse. The |
| 691 | value looks like @code{(@var{frame} @var{x} . @var{y})}, where @var{x} | 698 | value looks like @code{(@var{frame} @var{x} . @var{y})}, where @var{x} |
| 692 | and @var{y} are integers giving the position in pixels relative to the | 699 | and @var{y} are integers giving the position in characters relative to |
| 693 | top left corner of the inside of @var{frame}. | 700 | the top left corner of the inside of @var{frame}. |
| 694 | @end defun | 701 | @end defun |
| 695 | 702 | ||
| 696 | @defun set-mouse-position frame x y | 703 | @defun set-mouse-position frame x y |
| 697 | This function @dfn{warps the mouse} to position @var{x}, @var{y} in | 704 | This function @dfn{warps the mouse} to position @var{x}, @var{y} in |
| 698 | frame @var{frame}. The arguments @var{x} and @var{y} are integers, | 705 | frame @var{frame}. The arguments @var{x} and @var{y} are integers, |
| 699 | giving the position in pixels relative to the top left corner of the | 706 | giving the position in characters relative to the top left corner of the |
| 700 | inside of @var{frame}. | 707 | inside of @var{frame}. |
| 708 | @end defun | ||
| 701 | 709 | ||
| 702 | @cindex warping the mouse | 710 | @defun mouse-pixel-position |
| 703 | @cindex mouse warping | 711 | This function is like @code{mouse-position} except that it returns |
| 704 | Warping the mouse means changing the screen position of the mouse as if | 712 | coordinates in units of pixels rather than units of characters. |
| 705 | the user had moved the physical mouse---thus simulating the effect of | 713 | @end defun |
| 706 | actual mouse motion. | 714 | |
| 715 | @defun set-mouse-pixel-position frame x y | ||
| 716 | This function warps the mouse like @code{set-mouse-position} except that | ||
| 717 | @var{x} and @var{y} are in units of pixels rather than units of | ||
| 718 | characters. These coordinates are not required to be within the frame. | ||
| 707 | @end defun | 719 | @end defun |
| 708 | 720 | ||
| 709 | @need 3000 | 721 | @need 3000 |
| @@ -724,8 +736,8 @@ where the user actuated the button) or a list of this form: | |||
| 724 | @end example | 736 | @end example |
| 725 | 737 | ||
| 726 | @noindent | 738 | @noindent |
| 727 | where @var{xoffset} and @var{yoffset} are positions measured in | 739 | where @var{xoffset} and @var{yoffset} are coordinates, measured in |
| 728 | characters, counting from the top left corner of @var{window}'s frame. | 740 | pixels, counting from the top left corner of @var{window}'s frame. |
| 729 | 741 | ||
| 730 | If @var{position} is @code{t}, it means to use the current mouse | 742 | If @var{position} is @code{t}, it means to use the current mouse |
| 731 | position. If @var{position} is @code{nil}, it means to precompute the | 743 | position. If @var{position} is @code{nil}, it means to precompute the |
| @@ -779,17 +791,33 @@ what selection the user makes. The argument @var{contents} specifies | |||
| 779 | the alternatives to offer; it has this format: | 791 | the alternatives to offer; it has this format: |
| 780 | 792 | ||
| 781 | @example | 793 | @example |
| 782 | (@var{title} (@var{string} @var{value})@dots{}) | 794 | (@var{title} (@var{string} . @var{value})@dots{}) |
| 783 | @end example | 795 | @end example |
| 784 | 796 | ||
| 785 | @noindent | 797 | @noindent |
| 786 | which looks like the list that specifies a single pane for | 798 | which looks like the list that specifies a single pane for |
| 787 | @code{x-popup-menu}. | 799 | @code{x-popup-menu}. |
| 788 | 800 | ||
| 801 | The return value is @var{value} from the chosen alternative. | ||
| 802 | |||
| 803 | An element of the list may be just a string instead of a cons cell | ||
| 804 | @code{(@var{string} . @var{value})}. That makes a box that cannot | ||
| 805 | be selected. | ||
| 806 | |||
| 807 | If @code{nil} appears in the list, it separates the left-hand items from | ||
| 808 | the right-hand items; items that precede the @code{nil} appear on the | ||
| 809 | left, and items that follow the @code{nil} appear on the right. If you | ||
| 810 | don't include a @code{nil} in the list, then approximately half the | ||
| 811 | items appear on each side. | ||
| 812 | |||
| 789 | Dialog boxes always appear in the center of a frame; the argument | 813 | Dialog boxes always appear in the center of a frame; the argument |
| 790 | @var{position} specifies which frame. The possible values are as in | 814 | @var{position} specifies which frame. The possible values are as in |
| 791 | @code{x-popup-menu}, but the precise coordinates don't matter; only the | 815 | @code{x-popup-menu}, but the precise coordinates don't matter; only the |
| 792 | frame matters. | 816 | frame matters. |
| 817 | |||
| 818 | If your Emacs executable does not use an X toolkit, then it cannot | ||
| 819 | display a real dialog box; so instead it displays the same items in a | ||
| 820 | pop-up menu in the center of the frame. | ||
| 793 | @end defun | 821 | @end defun |
| 794 | 822 | ||
| 795 | @node X Selections | 823 | @node X Selections |
| @@ -1011,4 +1039,5 @@ width and height of an X Window frame, measured in pixels. | |||
| 1011 | 1039 | ||
| 1012 | @item | 1040 | @item |
| 1013 | x-pointer-shape, x-nontext-pointer-shape, x-mode-pointer-shape. | 1041 | x-pointer-shape, x-nontext-pointer-shape, x-mode-pointer-shape. |
| 1042 | x-cross-pointer-shape. | ||
| 1014 | @end ignore | 1043 | @end ignore |