aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-04-28 18:52:49 +0000
committerRichard M. Stallman1994-04-28 18:52:49 +0000
commitfb9b5ab767668ac4d0c9a45f45b51cd96bd49cc9 (patch)
treed9b222c98aecb7da4538973516d18eee66e30bb7
parent7435bd25826dc4dc9c4ea549c966dc44f743f890 (diff)
downloademacs-fb9b5ab767668ac4d0c9a45f45b51cd96bd49cc9.tar.gz
emacs-fb9b5ab767668ac4d0c9a45f45b51cd96bd49cc9.zip
*** empty log message ***
-rw-r--r--lispref/frames.texi85
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.
174The screen position of the top edge, in pixels. 174The screen position of the top edge, in pixels.
175 175
176@item height 176@item height
177The height of the frame contents, in pixels. 177The height of the frame contents, in characters. (To get the height in
178pixels, call @code{frame-pixel-height}; see @ref{Size and Position}.)
178 179
179@item width 180@item width
180The width of the frame contents, in pixels. 181The width of the frame contents, in characters. (To get the height in
182pixels, call @code{frame-pixel-width}; see @ref{Size and Position}.)
181 183
182@item window-id 184@item window-id
183The number of the X window for the frame. 185The number of the X window for the frame.
@@ -260,7 +262,7 @@ application's window. (It is not certain this will be implemented; try
260it and see if it works.) 262it 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
303This function sets the size of @var{frame}, measured in 305This function sets the size of @var{frame}, measured in characters;
304characters; @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
306To set the size with values measured in pixels, use 308To 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
308parameters. @xref{X Frame Parameters}. 310them 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
405All 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
406subdivisions; the root of this tree is available via the function 408with @code{window-frame}.
407@code{frame-root-window}. Each window is part of one and
408only one frame; you can get the frame with @code{window-frame}.
409
410@defun frame-root-window frame
411This returns the root window of frame @var{frame}.
412@end defun
413 409
414@defun window-frame window 410@defun window-frame window
415This function returns the frame that @var{window} is on. 411This 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
415order. The order runs from the frame's top window, which is at the
416upper left corner, down and to the right, until it reaches the window at
417the lower right corner (always the minibuffer window, if the frame has
418one), and then it moves back to the top.
419
420@defun frame-top-window frame
421This returns the topmost, leftmost window of frame @var{frame}.
422This is a window
423@end defun
424
418At any time, exactly one window on any frame is @dfn{selected within the 425At any time, exactly one window on any frame is @dfn{selected within the
419frame}. The significance of this designation is that selecting the 426frame}. The significance of this designation is that selecting the
420frame also selects this window. You can get the frame's current 427frame 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
690This function returns a description of the position of the mouse. The 697This function returns a description of the position of the mouse. The
691value looks like @code{(@var{frame} @var{x} . @var{y})}, where @var{x} 698value looks like @code{(@var{frame} @var{x} . @var{y})}, where @var{x}
692and @var{y} are integers giving the position in pixels relative to the 699and @var{y} are integers giving the position in characters relative to
693top left corner of the inside of @var{frame}. 700the 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
697This function @dfn{warps the mouse} to position @var{x}, @var{y} in 704This function @dfn{warps the mouse} to position @var{x}, @var{y} in
698frame @var{frame}. The arguments @var{x} and @var{y} are integers, 705frame @var{frame}. The arguments @var{x} and @var{y} are integers,
699giving the position in pixels relative to the top left corner of the 706giving the position in characters relative to the top left corner of the
700inside of @var{frame}. 707inside of @var{frame}.
708@end defun
701 709
702@cindex warping the mouse 710@defun mouse-pixel-position
703@cindex mouse warping 711This function is like @code{mouse-position} except that it returns
704Warping the mouse means changing the screen position of the mouse as if 712coordinates in units of pixels rather than units of characters.
705the user had moved the physical mouse---thus simulating the effect of 713@end defun
706actual mouse motion. 714
715@defun set-mouse-pixel-position frame x y
716This 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
718characters. 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
727where @var{xoffset} and @var{yoffset} are positions measured in 739where @var{xoffset} and @var{yoffset} are coordinates, measured in
728characters, counting from the top left corner of @var{window}'s frame. 740pixels, counting from the top left corner of @var{window}'s frame.
729 741
730If @var{position} is @code{t}, it means to use the current mouse 742If @var{position} is @code{t}, it means to use the current mouse
731position. If @var{position} is @code{nil}, it means to precompute the 743position. 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
779the alternatives to offer; it has this format: 791the 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
786which looks like the list that specifies a single pane for 798which looks like the list that specifies a single pane for
787@code{x-popup-menu}. 799@code{x-popup-menu}.
788 800
801The return value is @var{value} from the chosen alternative.
802
803An 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
805be selected.
806
807If @code{nil} appears in the list, it separates the left-hand items from
808the right-hand items; items that precede the @code{nil} appear on the
809left, and items that follow the @code{nil} appear on the right. If you
810don't include a @code{nil} in the list, then approximately half the
811items appear on each side.
812
789Dialog boxes always appear in the center of a frame; the argument 813Dialog 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
792frame matters. 816frame matters.
817
818If your Emacs executable does not use an X toolkit, then it cannot
819display a real dialog box; so instead it displays the same items in a
820pop-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
1013x-pointer-shape, x-nontext-pointer-shape, x-mode-pointer-shape. 1041x-pointer-shape, x-nontext-pointer-shape, x-mode-pointer-shape.
1042x-cross-pointer-shape.
1014@end ignore 1043@end ignore