annotate man/lispref/frames.texi @ 3533:6fe4bf5407a0

[xemacs-hg @ 2006-07-28 21:51:11 by viteno] Update xemacs_extra_name.
author viteno
date Fri, 28 Jul 2006 21:51:11 +0000
parents 576fb035e263
children 755ae5b97edb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1 @c -*-texinfo-*-
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2 @c This is part of the XEmacs Lisp Reference Manual.
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
3 @c Copyright (C) 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4 @c Copyright (C) 1995, 1996 Ben Wing.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5 @c See the file lispref.texi for copying conditions.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6 @setfilename ../../info/frames.info
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7 @node Frames, Consoles and Devices, Windows, Top
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8 @chapter Frames
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9 @cindex frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11 A @var{frame} is a rectangle on the screen that contains one or more
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
12 XEmacs windows (@pxref{Windows}). A frame initially contains a single
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
13 main window (plus perhaps an echo area), which you can subdivide
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
14 vertically or horizontally into smaller windows. Each window is
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
15 associated with a modeline (@pxref{Modeline Format}), and optionally two
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
16 scrollbars (@pxref{Scrollbars}). By default the vertical scrollbar is
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
17 on, the horizontal scrollbar is off.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
18
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
19 The frame may also contain menubars (@pxref{Menubar}), toolbars
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
20 (@pxref{Toolbar Intro}), and gutters (@pxref{Gutter Intro}). By default
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
21 there is one of each at the top of the frame, with menubar topmost,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
22 toolbar next, and gutter lowest, immediately above the windows.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
23 (Warning: the gutter is a new, experimental, and unstable feature of
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
24 XEmacs version 21.2.)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26 @cindex terminal frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27 @cindex X window frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28 When XEmacs runs on a text-only terminal, it starts with one
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29 @dfn{TTY frame}. If you create additional ones, XEmacs displays
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30 one and only one at any given time---on the terminal screen, of course.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32 When XEmacs communicates directly with an X server, it does not have a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33 TTY frame; instead, it starts with a single @dfn{X window frame}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34 It can display multiple X window frames at the same time, each in its
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35 own X window.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37 @defun framep object
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
38 This predicate returns @code{t} if @var{object} is a frame, and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39 @code{nil} otherwise.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42 @menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 * Creating Frames:: Creating additional frames.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44 * Frame Properties:: Controlling frame size, position, font, etc.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45 * Frame Titles:: Automatic updating of frame titles.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 * Deleting Frames:: Frames last until explicitly deleted.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47 * Finding All Frames:: How to examine all existing frames.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 * Frames and Windows:: A frame contains windows;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49 display of text always works through windows.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50 * Minibuffers and Frames:: How a frame finds the minibuffer to use.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51 * Input Focus:: Specifying the selected frame.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52 * Visibility of Frames:: Frames may be visible or invisible, or icons.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53 * Raising and Lowering:: Raising a frame makes it hide other X windows;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54 lowering it makes the others hide them.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
55 * Frame Configurations:: Saving the state of all frames.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56 * Frame Hooks:: Hooks for customizing frame behavior.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57 @end menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59 @xref{Display}, for related information.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
60
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
61 @node Creating Frames
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62 @section Creating Frames
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64 To create a new frame, call the function @code{make-frame}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
66 @deffn Command make-frame &optional props device
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67 This function creates a new frame on @var{device}, if @var{device}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
68 permits creation of frames. (An X server does; an ordinary terminal
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69 does not (yet).) @var{device} defaults to the selected device if omitted.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70 @xref{Consoles and Devices}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72 The argument @var{props} is a property list (a list of alternating
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73 keyword-value specifications) of properties for the new frame. (An alist
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74 is accepted for backward compatibility but should not be passed in.) Any
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
75 properties not mentioned in @var{props} default according to the value
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76 of the variable @code{default-frame-plist}. For X devices, properties
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77 not specified in @code{default-frame-plist} default in turn from
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78 @code{default-x-frame-plist} and, if not specified there, from the X
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
79 resources. For TTY devices, @code{default-tty-frame-plist} is consulted
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80 as well as @code{default-frame-plist}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82 The set of possible properties depends in principle on what kind of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83 window system XEmacs uses to display its frames. @xref{X Frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84 Properties}, for documentation of individual properties you can specify
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
85 when creating an X window frame.
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
86 @end deffn
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
87
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
88 @node Frame Properties
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89 @section Frame Properties
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91 A frame has many properties that control its appearance and behavior.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92 Just what properties a frame has depends on which display mechanism it
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
93 uses.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95 Frame properties exist for the sake of window systems. A terminal frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96 has few properties, mostly for compatibility's sake; only the height,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97 width and @code{buffer-predicate} properties really do something.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99 @menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100 * Property Access:: How to change a frame's properties.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101 * Initial Properties:: Specifying frame properties when you make a frame.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102 * X Frame Properties:: List of frame properties.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
103 * Size and Position:: Changing the size and position of a frame.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104 * Frame Name:: The name of a frame (as opposed to its title).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
105 @end menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
106
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107 @node Property Access
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
108 @subsection Access to Frame Properties
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
109
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
110 These functions let you read and change the properties of a frame.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
111
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
112 @defun frame-properties &optional frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
113 This function returns a plist listing all the properties of @var{frame}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114 and their values.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
116
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
117 @defun frame-property frame property &optional default
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
118 This function returns @var{frame}'s value for the property
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
119 @var{property}, or @var{default} if there is no such property.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
120 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
121
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
122 @defun set-frame-properties frame plist
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123 This function alters the properties of frame @var{frame} based on the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124 elements of property list @var{plist}. If you don't mention a property
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
125 in @var{plist}, its value doesn't change.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
126 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
128 @defun set-frame-property frame property value
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
129 This function sets the property @var{property} of frame @var{frame} to the
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
130 value @var{value}.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
131 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
132
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
133 @node Initial Properties
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
134 @subsection Initial Frame Properties
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
135
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
136 You can specify the properties for the initial startup frame by setting
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
137 @code{initial-frame-plist} in your @file{.emacs} file.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
138
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
139 @defvar initial-frame-plist
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
140 This variable's value is a plist of alternating property-value pairs
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
141 used when creating the initial X window frame.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
142
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
143 XEmacs creates the initial frame before it reads your @file{~/.emacs}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
144 file. After reading that file, XEmacs checks @code{initial-frame-plist},
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
145 and applies the property settings in the altered value to the already
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
146 created initial frame.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
147
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
148 If these settings affect the frame geometry and appearance, you'll see
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
149 the frame appear with the wrong ones and then change to the specified
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
150 ones. If that bothers you, you can specify the same geometry and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
151 appearance with X resources; those do take affect before the frame is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
152 created. @xref{Resources X,, X Resources, xemacs, The XEmacs User's Manual}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
153
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
154 X resource settings typically apply to all frames. If you want to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
155 specify some X resources solely for the sake of the initial frame, and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
156 you don't want them to apply to subsequent frames, here's how to achieve
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
157 this: specify properties in @code{default-frame-plist} to override the X
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
158 resources for subsequent frames; then, to prevent these from affecting
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
159 the initial frame, specify the same properties in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
160 @code{initial-frame-plist} with values that match the X resources.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
161 @end defvar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
162
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
163 If these properties specify a separate minibuffer-only frame via a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
164 @code{minibuffer} property of @code{nil}, and you have not yet created
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
165 one, XEmacs creates one for you.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
166
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
167 @defvar minibuffer-frame-plist
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
168 This variable's value is a plist of properties used when creating an
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
169 initial minibuffer-only frame---if such a frame is needed, according to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
170 the properties for the main initial frame.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
171 @end defvar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
172
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
173 @defvar default-frame-plist
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
174 This is a plist specifying default values of frame properties for
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
175 subsequent XEmacs frames (not the initial ones).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
176 @end defvar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
177
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
178 See also @code{special-display-frame-plist}, in @ref{Choosing Window}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
179
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
180 If you use options that specify window appearance when you invoke XEmacs,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
181 they take effect by adding elements to @code{default-frame-plist}. One
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
182 exception is @samp{-geometry}, which adds the specified position to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
183 @code{initial-frame-plist} instead. @xref{Command Arguments,,, xemacs,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
184 The XEmacs User's Manual}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
185
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
186 @node X Frame Properties
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
187 @subsection X Window Frame Properties
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
188
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
189 Just what properties a frame has depends on what display mechanism it
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
190 uses. Here is a table of the properties of an X window frame; of these,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
191 @code{name}, @code{height}, @code{width}, and @code{buffer-predicate}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
192 provide meaningful information in non-X frames.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
193
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
194 @table @code
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
195 @item name
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
196 The name of the frame. Most window managers display the frame's name in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
197 the frame's border, at the top of the frame. If you don't specify a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
198 name, and you have more than one frame, XEmacs sets the frame name based
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
199 on the buffer displayed in the frame's selected window.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
200
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
201 If you specify the frame name explicitly when you create the frame, the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
202 name is also used (instead of the name of the XEmacs executable) when
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
203 looking up X resources for the frame.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
204
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
205 @item display
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
206 The display on which to open this frame. It should be a string of the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
207 form @code{"@var{host}:@var{dpy}.@var{screen}"}, just like the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
208 @code{DISPLAY} environment variable.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
209
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
210 @item left
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
211 The screen position of the left edge, in pixels, with respect to the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
212 left edge of the screen. The value may be a positive number @var{pos},
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
213 or a list of the form @code{(+ @var{pos})} which permits specifying a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
214 negative @var{pos} value.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
215
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
216 A negative number @minus{}@var{pos}, or a list of the form @code{(-
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
217 @var{pos})}, actually specifies the position of the right edge of the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
218 window with respect to the right edge of the screen. A positive value
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
219 of @var{pos} counts toward the left. If the property is a negative
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
220 integer @minus{}@var{pos} then @var{pos} is positive!
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
221
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
222 @item top
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
223 The screen position of the top edge, in pixels, with respect to the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
224 top edge of the screen. The value may be a positive number @var{pos},
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
225 or a list of the form @code{(+ @var{pos})} which permits specifying a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
226 negative @var{pos} value.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
227
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
228 A negative number @minus{}@var{pos}, or a list of the form @code{(-
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
229 @var{pos})}, actually specifies the position of the bottom edge of the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
230 window with respect to the bottom edge of the screen. A positive value
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
231 of @var{pos} counts toward the top. If the property is a negative
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
232 integer @minus{}@var{pos} then @var{pos} is positive!
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
233
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
234 @item icon-left
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
235 The screen position of the left edge @emph{of the frame's icon}, in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
236 pixels, counting from the left edge of the screen. This takes effect if
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
237 and when the frame is iconified.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
238
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
239 @item icon-top
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
240 The screen position of the top edge @emph{of the frame's icon}, in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
241 pixels, counting from the top edge of the screen. This takes effect if
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
242 and when the frame is iconified.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
243
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
244 @item user-position
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
245 Non-@code{nil} if the screen position of the frame was explicitly
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
246 requested by the user (for example, with the @samp{-geometry} option).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
247 Nothing automatically makes this property non-@code{nil}; it is up to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
248 Lisp programs that call @code{make-frame} to specify this property as
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
249 well as specifying the @code{left} and @code{top} properties.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
250
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
251 @item height
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
252 The height of the frame contents, in characters. (To get the height in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
253 pixels, call @code{frame-pixel-height}; see @ref{Size and Position}.)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
254
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
255 @item width
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
256 The width of the frame contents, in characters. (To get the height in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
257 pixels, call @code{frame-pixel-width}; see @ref{Size and Position}.)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
258
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
259 @item window-id
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
260 The number of the X window for the frame.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
261
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
262 @item minibuffer
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
263 Whether this frame has its own minibuffer. The value @code{t} means
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
264 yes, @code{nil} means no, @code{only} means this frame is just a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
265 minibuffer. If the value is a minibuffer window (in some other frame),
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
266 the new frame uses that minibuffer. (Minibuffer-only and minibuffer-less
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
267 frames are not yet implemented in XEmacs.)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
268
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
269 @item buffer-predicate
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
270 The buffer-predicate function for this frame. The function
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
271 @code{other-buffer} uses this predicate (from the selected frame) to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
272 decide which buffers it should consider, if the predicate is not
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
273 @code{nil}. It calls the predicate with one arg, a buffer, once for
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
274 each buffer; if the predicate returns a non-@code{nil} value, it
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
275 considers that buffer.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
276
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
277 @item scroll-bar-width
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
278 The width of the vertical scroll bar, in pixels.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
279
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
280 @ignore Not in XEmacs
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
281 @item icon-type
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
282 The type of icon to use for this frame when it is iconified. If the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
283 value is a string, that specifies a file containing a bitmap to use.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
284 Any other non-@code{nil} value specifies the default bitmap icon (a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
285 picture of a gnu); @code{nil} specifies a text icon.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
286
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
287 @item icon-name
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
288 The name to use in the icon for this frame, when and if the icon
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
289 appears. If this is @code{nil}, the frame's title is used.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
290 @end ignore
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
291
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
292 @item cursor-color
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
293 The color for the cursor that shows point.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
294
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
295 @item border-color
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
296 The color for the border of the frame.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
297
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
298 @ignore Not in XEmacs
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
299 @item cursor-type
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
300 The way to display the cursor. The legitimate values are @code{bar},
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
301 @code{box}, and @code{(bar . @var{width})}. The symbol @code{box}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
302 specifies an ordinary black box overlaying the character after point;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
303 that is the default. The symbol @code{bar} specifies a vertical bar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
304 between characters as the cursor. @code{(bar . @var{width})} specifies
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
305 a bar @var{width} pixels wide.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
306 @end ignore
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
307
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
308 @item border-width
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
309 The width in pixels of the window border.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
310
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
311 @item internal-border-width
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
312 The distance in pixels between text and border.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
313
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
314 @item unsplittable
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
315 If non-@code{nil}, this frame's window is never split automatically.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
316
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
317 @item inter-line-space
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
318 The space in pixels between adjacent lines of text. (Not currently
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
319 implemented.)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
320
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
321 @item modeline
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
322 Whether the frame has a modeline.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
323 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
324
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
325 @node Size and Position
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
326 @subsection Frame Size And Position
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
327 @cindex size of frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
328 @cindex frame size
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
329 @cindex display lines
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
330 @cindex display columns
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
331 @cindex resize redisplay
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
332 @cindex frame position
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
333 @cindex position of frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
334
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
335 You can read or change the size and position of a frame using the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
336 frame properties @code{left}, @code{top}, @code{height}, and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
337 @code{width}. Whatever geometry properties you don't specify are chosen
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
338 by the window manager in its usual fashion.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
339
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
340 Here are some special features for working with sizes and positions:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
341
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
342 @defun set-frame-position frame left top
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
343 This function sets the position of the top left corner of @var{frame} to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
344 @var{left} and @var{top}. These arguments are measured in pixels, and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
345 count from the top left corner of the screen. Negative property values
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
346 count up or rightward from the top left corner of the screen.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
347 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
348
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
349 @defun frame-height &optional frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
350 @defunx frame-width &optional frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
351 These functions return the height and width of @var{frame}, measured in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
352 lines and columns. If you don't supply @var{frame}, they use the selected
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
353 frame.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
354 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
355
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
356 @defun frame-pixel-height &optional frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
357 @defunx frame-pixel-width &optional frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
358 These functions return the height and width of @var{frame}, measured in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
359 pixels. If you don't supply @var{frame}, they use the selected frame.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
360 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
361
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
362 @defun set-frame-size frame cols rows &optional pretend
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
363 This function sets the size of @var{frame}, measured in characters;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
364 @var{cols} and @var{rows} specify the new width and height. (If
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
365 @var{pretend} is non-@code{nil}, it means that redisplay should act as if
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
366 the frame's size is @var{cols} by @var{rows}, but the actual size
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
367 of the frame should not be changed. You should not normally use
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
368 this option.)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
369 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
370
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
371 You can also use the functions @code{set-frame-height} and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
372 @code{set-frame-width} to set the height and width individually.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
373 The frame is the first argument and the size (in rows or columns)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
374 is the second. (There is an optional third argument, @var{pretend},
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
375 which has the same purpose as the corresponding argument in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
376 @code{set-frame-size}.)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
377
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
378 @ignore @c Not in XEmacs
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
379 @defun x-parse-geometry geom
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
380 @cindex geometry specification
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
381 The function @code{x-parse-geometry} converts a standard X windows
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
382 geometry string to a plist that you can use as part of the argument to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
383 @code{make-frame}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
384
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
385 The plist describes which properties were specified in @var{geom}, and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
386 gives the values specified for them. Each element looks like
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
387 @code{(@var{property} . @var{value})}. The possible @var{property}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
388 values are @code{left}, @code{top}, @code{width}, and @code{height}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
389
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
390 For the size properties, the value must be an integer. The position
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
391 property names @code{left} and @code{top} are not totally accurate,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
392 because some values indicate the position of the right or bottom edges
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
393 instead. These are the @var{value} possibilities for the position
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
394 properties:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
395
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
396 @table @asis
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
397 @item an integer
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
398 A positive integer relates the left edge or top edge of the window to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
399 the left or top edge of the screen. A negative integer relates the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
400 right or bottom edge of the window to the right or bottom edge of the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
401 screen.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
402
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
403 @item @code{(+ @var{position})}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
404 This specifies the position of the left or top edge of the window
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
405 relative to the left or top edge of the screen. The integer
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
406 @var{position} may be positive or negative; a negative value specifies a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
407 position outside the screen.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
408
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
409 @item @code{(- @var{position})}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
410 This specifies the position of the right or bottom edge of the window
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
411 relative to the right or bottom edge of the screen. The integer
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
412 @var{position} may be positive or negative; a negative value specifies a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
413 position outside the screen.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
414 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
415
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
416 Here is an example:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
417
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
418 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
419 (x-parse-geometry "35x70+0-0")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
420 @result{} ((width . 35) (height . 70)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
421 (left . 0) (top - 0))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
422 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
423 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
424 @end ignore
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
425
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
426 @node Frame Name
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
427 @subsection The Name of a Frame (As Opposed to Its Title)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
428 @cindex frame name
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
429
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
430 Under X, every frame has a name, which is not the same as the title of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
431 the frame. A frame's name is used to look up its resources and does
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
432 not normally change over the lifetime of a frame. It is perfectly
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
433 allowable, and quite common, for multiple frames to have the same
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
434 name.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
435
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
436 @defun frame-name &optional frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
437 This function returns the name of @var{frame}, which defaults to the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
438 selected frame if not specified. The name of a frame can also be
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
439 obtained from the frame's properties. @xref{Frame Properties}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
440 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
441
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
442 @defvar default-frame-name
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
443 This variable holds the default name to assign to newly-created frames.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
444 This can be overridden by arguments to @code{make-frame}. This
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
445 must be a string.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
446 @end defvar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
447
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
448 @node Frame Titles
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
449 @section Frame Titles
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
450
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
451 Every frame has a title; most window managers display the frame title at
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
452 the top of the frame. You can specify an explicit title with the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
453 @code{name} frame property. But normally you don't specify this
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
454 explicitly, and XEmacs computes the title automatically.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
455
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
456 XEmacs computes the frame title based on a template stored in the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
457 variable @code{frame-title-format}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
458
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
459 @defvar frame-title-format
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
460 This variable specifies how to compute a title for a frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
461 when you have not explicitly specified one.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
462
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
463 The variable's value is actually a modeline construct, just like
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
464 @code{modeline-format}. @xref{Modeline Data}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
465 @end defvar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
466
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
467 @defvar frame-icon-title-format
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
468 This variable specifies how to compute the title for an iconified frame,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
469 when you have not explicitly specified the frame title. This title
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
470 appears in the icon itself.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
471 @end defvar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
472
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
473 @defun x-set-frame-icon-pixmap frame pixmap &optional mask
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
474 This function sets the icon of the given frame to the given image
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
475 instance, which should be an image instance object (as returned by
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
476 @code{make-image-instance}), a glyph object (as returned by
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
477 @code{make-glyph}), or @code{nil}. If a glyph object is given, the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
478 glyph will be instantiated on the frame to produce an image instance
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
479 object.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
480
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
481 If the given image instance has a mask, that will be used as the icon mask;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
482 however, not all window managers support this.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
483
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
484 The window manager is also not required to support color pixmaps,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
485 only bitmaps (one plane deep).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
486
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
487 If the image instance does not have a mask, then the optional
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
488 third argument may be the image instance to use as the mask (it must be
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
489 one plane deep).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
490 @xref{Glyphs}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
491 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
492
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
493 @node Deleting Frames
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
494 @section Deleting Frames
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
495 @cindex deletion of frames
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
496
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
497 Frames remain potentially visible until you explicitly @dfn{delete}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
498 them. A deleted frame cannot appear on the screen, but continues to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
499 exist as a Lisp object until there are no references to it.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
500
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
501 @deffn Command delete-frame &optional frame force
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
502 This function deletes the frame @var{frame}. By default, @var{frame} is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
503 the selected frame.
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
504
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
505 A frame may not be deleted if its minibuffer is used by other frames.
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
506 Normally, you cannot delete the last non-minibuffer-only frame (you must
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
507 use @code{save-buffers-kill-emacs} or @code{kill-emacs}). However, if
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
508 optional second argument @var{force} is non-@code{nil}, you can delete
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
509 the last frame. (This will automatically call
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
510 @code{save-buffers-kill-emacs}.)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
511 @end deffn
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
512
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
513 @defun frame-live-p frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
514 The function @code{frame-live-p} returns non-@code{nil} if the frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
515 @var{frame} has not been deleted.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
516 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
517
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
518 @ignore Not in XEmacs currently
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
519 Some window managers provide a command to delete a window. These work
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
520 by sending a special message to the program that operates the window.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
521 When XEmacs gets one of these commands, it generates a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
522 @code{delete-frame} event, whose normal definition is a command that
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
523 calls the function @code{delete-frame}. @xref{Misc Events}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
524 @end ignore
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
525
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
526 @node Finding All Frames
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
527 @section Finding All Frames
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
528
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
529 @defun frame-list
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
530 The function @code{frame-list} returns a list of all the frames that
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
531 have not been deleted. It is analogous to @code{buffer-list} for
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
532 buffers. The list that you get is newly created, so modifying the list
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
533 doesn't have any effect on the internals of XEmacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
534 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
535
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
536 @defun device-frame-list &optional device
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
537 This function returns a list of all frames on @var{device}. If
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
538 @var{device} is @code{nil}, the selected device will be used.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
539 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
540
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
541 @defun visible-frame-list &optional device
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
542 This function returns a list of just the currently visible frames.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
543 If @var{device} is specified only frames on that device will be returned.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
544 @xref{Visibility of Frames}. (TTY frames always count as
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
545 ``visible'', even though only the selected one is actually displayed.)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
546 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
547
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
548 @defun next-frame &optional frame which-frames which-devices
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
549 The function @code{next-frame} lets you cycle conveniently through all
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
550 the frames from an arbitrary starting point. It returns the ``next''
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
551 frame after @var{frame} in the cycle. If @var{frame} defaults to the
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
552 selected frame.
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
553
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
554 The second argument, @var{which-frames}, says which frames to consider:
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
555
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
556 @table @asis
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
557 @item @code{visible}
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
558 Consider only frames that are visible.
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
559
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
560 @item @code{iconic}
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
561 Consider only frames that are iconic.
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
562
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
563 @item @code{invisible}
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
564 Consider only frames that are invisible (this is different from iconic).
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
565
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
566 @item @code{visible-iconic}
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
567 Consider frames that are visible or iconic.
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
568
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
569 @item @code{invisible-iconic}
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
570 Consider frames that are invisible or iconic.
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
571
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
572 @item @code{nomini}
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
573 Consider all frames except minibuffer-only ones.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
574
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
575 @item @code{visible-nomini}
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
576 Like @code{visible} but omits minibuffer-only frames.
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
577
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
578 @item @code{iconic-nomini}
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
579 Like @code{iconic} but omits minibuffer-only frames.
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
580
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
581 @item @code{invisible-nomini}
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
582 Like @code{invisible} but omits minibuffer-only frames.
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
583
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
584 @item @code{visible-iconic-nomini}
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
585 Like @code{visible-iconic} but omits minibuffer-only frames.
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
586
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
587 @item @code{invisible-iconic-nomini}
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
588 Like @code{invisible-iconic} but omits minibuffer-only frames.
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
589
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
590 @item @code{nil}
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
591 Identical to @code{nomini}.
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
592
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
593 @item @var{window}
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
594 Consider only the window @var{window}'s frame and any frame now using
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
595 @var{window} as the minibuffer.
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
596
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
597 @item any other value
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
598 Consider all frames.
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
599 @end table
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
600
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
601 The optional argument @var{which-devices} further clarifies on which
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
602 devices to search for frames as specified by @var{which-frames}.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
603
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
604 @table @asis
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
605 @item @code{nil}
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
606 Consider all devices on the selected console.
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
607
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
608 @item @var{device}
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
609 Consider only the one device @var{device}.
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
610
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
611 @item @var{console}
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
612 Consider all devices on @var{console}.
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
613
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
614 @item @var{device-type}
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
615 Consider all devices with device type @var{device-type}.
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
616
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
617 @item @code{window-system}
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
618 Consider all devices on window system consoles.
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
619
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
620 @item anything else
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
621 Consider all devices without restriction.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
622 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
623 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
624
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
625 @defun previous-frame &optional frame which-frames which-devices
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
626 Like @code{next-frame}, but cycles through all frames in the opposite
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
627 direction.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
628 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
629
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
630 See also @code{next-window} and @code{previous-window}, in @ref{Cyclic
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
631 Window Ordering}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
632
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
633 @node Frames and Windows
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
634 @section Frames and Windows
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
635
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
636 Each window is part of one and only one frame; you can get the frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
637 with @code{window-frame}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
638
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
639 @defun frame-root-window &optional frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
640 This returns the root window of frame @var{frame}. @var{frame}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
641 defaults to the selected frame if not specified.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
642 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
643
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
644 @defun window-frame &optional window
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
645 This function returns the frame that @var{window} is on. @var{window}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
646 defaults to the selected window if omitted.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
647 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
648
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
649 All the non-minibuffer windows in a frame are arranged in a cyclic
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
650 order. The order runs from the frame's top window, which is at the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
651 upper left corner, down and to the right, until it reaches the window at
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
652 the lower right corner (always the minibuffer window, if the frame has
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
653 one), and then it moves back to the top.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
654
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
655 @defun frame-highest-window &optional frame position
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
656 This function returns the topmost, leftmost window of frame @var{frame}
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
657 at position @var{position}.
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
658
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
659 If omitted, @var{frame} defaults to the currently selected frame.
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
660
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
661 @var{position} is used to distinguish between multiple windows that abut
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
662 the top of the frame: 0 means the leftmost window abutting the top of
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
663 the frame, 1 the next-leftmost, etc. @var{position} can also be less
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
664 than zero: -1 means the rightmost window abutting the top of the frame,
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
665 -2 the next-rightmost, etc. If omitted, @var{position} defaults to 0,
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
666 i.e. the leftmost highest window. If there is no window at the given
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
667 @var{position}, @code{nil} is returned.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
668 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
669
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
670 The following three functions work similarly.
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
671
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
672 @defun frame-lowest-window &optional frame position
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
673 This function returns the lowest window on @var{frame} which is at
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
674 @var{position}.
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
675 @end defun
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
676
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
677 @defun frame-leftmost-window &optional frame position
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
678 This function returns the leftmost window on @var{frame} which is at
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
679 @var{position}.
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
680 @end defun
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
681
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
682 @defun frame-rightmost-window &optional frame position
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
683 This function returns the rightmost window on @var{frame} which is at
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
684 @var{position}.
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
685 @end defun
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
686
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
687
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
688 At any time, exactly one window on any frame is @dfn{selected within the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
689 frame}. The significance of this designation is that selecting the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
690 frame also selects this window. You can get the frame's current
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
691 selected window with @code{frame-selected-window}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
692
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
693 @defun frame-selected-window &optional frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
694 This function returns the window on @var{frame} that is selected within
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
695 @var{frame}. @var{frame} defaults to the selected frame if not
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
696 specified.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
697 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
698
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
699 Conversely, selecting a window for XEmacs with @code{select-window} also
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
700 makes that window selected within its frame. @xref{Selecting Windows}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
701
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
702 Another function that (usually) returns one of the windows in a frame is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
703 @code{minibuffer-window}. @xref{Minibuffer Misc}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
704
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
705 @node Minibuffers and Frames
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
706 @section Minibuffers and Frames
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
707
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
708 Normally, each frame has its own minibuffer window at the bottom, which
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
709 is used whenever that frame is selected. If the frame has a minibuffer,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
710 you can get it with @code{minibuffer-window} (@pxref{Minibuffer Misc}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
711
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
712 However, you can also create a frame with no minibuffer. Such a frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
713 must use the minibuffer window of some other frame. When you create the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
714 frame, you can specify explicitly the minibuffer window to use (in some
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
715 other frame). If you don't, then the minibuffer is found in the frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
716 which is the value of the variable @code{default-minibuffer-frame}. Its
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
717 value should be a frame which does have a minibuffer.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
718
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
719 @ignore Not yet in XEmacs
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
720 If you use a minibuffer-only frame, you might want that frame to raise
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
721 when you enter the minibuffer. If so, set the variable
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
722 @code{minibuffer-auto-raise} to @code{t}. @xref{Raising and Lowering}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
723 @end ignore
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
724
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
725 @defvar default-minibuffer-frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
726 This variable specifies the frame to use for the minibuffer window, by
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
727 default.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
728 @end defvar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
729
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
730 @node Input Focus
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
731 @section Input Focus
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
732 @cindex input focus
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
733 @cindex selected frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
734
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
735 At any time, one frame in XEmacs is the @dfn{selected frame}. The selected
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
736 window always resides on the selected frame. As the focus moves from
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
737 device to device, the selected frame on each device is remembered and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
738 restored when the focus moves back to that device.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
739
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
740 @defun selected-frame &optional device
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
741 This function returns the selected frame on @var{device}. If
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
742 @var{device} is not specified, the selected device will be used. If no
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
743 frames exist on the device, @code{nil} is returned.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
744 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
745
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
746 The X server normally directs keyboard input to the X window that the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
747 mouse is in. Some window managers use mouse clicks or keyboard events
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
748 to @dfn{shift the focus} to various X windows, overriding the normal
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
749 behavior of the server.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
750
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
751 Lisp programs can switch frames ``temporarily'' by calling
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
752 the function @code{select-frame}. This does not override the window
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
753 manager; rather, it escapes from the window manager's control until
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
754 that control is somehow reasserted.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
755
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
756 When using a text-only terminal, there is no window manager; therefore,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
757 @code{select-frame} is the only way to switch frames, and the effect
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
758 lasts until overridden by a subsequent call to @code{select-frame}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
759 Only the selected terminal frame is actually displayed on the terminal.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
760 Each terminal screen except for the initial one has a number, and the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
761 number of the selected frame appears in the mode line after the word
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
762 @samp{XEmacs} (@pxref{Modeline Variables}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
763
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
764 @defun select-frame frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
765 This function selects frame @var{frame}, temporarily disregarding the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
766 focus of the X server if any. The selection of @var{frame} lasts until
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
767 the next time the user does something to select a different frame, or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
768 until the next time this function is called.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
769
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
770 Note that @code{select-frame} does not actually cause the window-system
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
771 focus to be set to this frame, or the @code{select-frame-hook} or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
772 @code{deselect-frame-hook} to be run, until the next time that XEmacs is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
773 waiting for an event.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
774
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
775 Also note that when the variable @code{focus-follows-mouse} is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
776 non-@code{nil}, the frame selection is temporary and is reverted when
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
777 the current command terminates, much like the buffer selected by
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
778 @code{set-buffer}. In order to effect a permanent focus change use
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
779 @code{focus-frame}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
780 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
781
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
782 @defun focus-frame frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
783 This function selects @var{frame} and gives it the window system focus.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
784 The operation of @code{focus-frame} is not affected by the value of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
785 @code{focus-follows-mouse}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
786 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
787
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
788 @defspec save-selected-frame forms@dots{}
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
789 This special form records the selected frame, executes @var{forms} in
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
790 sequence, then restores the earlier selected frame. The value returned
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
791 is the value of the last form.
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
792 @end defspec
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
793
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
794 @defspec with-selected-frame frame forms@dots{}
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
795 This special form records the selected frame, then selects @var{frame}
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
796 and executes @var{forms} in sequence. After the last form is finished,
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
797 the earlier selected frame is restored. The value returned is the value
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
798 of the last form.
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
799 @end defspec
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
800
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
801 @ignore (FSF Emacs, continued from defun select-frame)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
802 XEmacs cooperates with the X server and the window managers by arranging
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
803 to select frames according to what the server and window manager ask
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
804 for. It does so by generating a special kind of input event, called a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
805 @dfn{focus} event. The command loop handles a focus event by calling
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
806 @code{handle-select-frame}. @xref{Focus Events}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
807
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
808 @deffn Command handle-switch-frame frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
809 This function handles a focus event by selecting frame @var{frame}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
810
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
811 Focus events normally do their job by invoking this command.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
812 Don't call it for any other reason.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
813 @end deffn
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
814
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
815 @defun redirect-frame-focus frame focus-frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
816 This function redirects focus from @var{frame} to @var{focus-frame}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
817 This means that @var{focus-frame} will receive subsequent keystrokes
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
818 intended for @var{frame}. After such an event, the value of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
819 @code{last-event-frame} will be @var{focus-frame}. Also, switch-frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
820 events specifying @var{frame} will instead select @var{focus-frame}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
821
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
822 If @var{focus-frame} is @code{nil}, that cancels any existing
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
823 redirection for @var{frame}, which therefore once again receives its own
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
824 events.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
825
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
826 One use of focus redirection is for frames that don't have minibuffers.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
827 These frames use minibuffers on other frames. Activating a minibuffer
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
828 on another frame redirects focus to that frame. This puts the focus on
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
829 the minibuffer's frame, where it belongs, even though the mouse remains
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
830 in the frame that activated the minibuffer.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
831
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
832 Selecting a frame can also change focus redirections. Selecting frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
833 @code{bar}, when @code{foo} had been selected, changes any redirections
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
834 pointing to @code{foo} so that they point to @code{bar} instead. This
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
835 allows focus redirection to work properly when the user switches from
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
836 one frame to another using @code{select-window}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
837
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
838 This means that a frame whose focus is redirected to itself is treated
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
839 differently from a frame whose focus is not redirected.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
840 @code{select-frame} affects the former but not the latter.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
841
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
842 The redirection lasts until @code{redirect-frame-focus} is called to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
843 change it.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
844 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
845 @end ignore
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
846
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
847 @node Visibility of Frames
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
848 @section Visibility of Frames
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
849 @cindex visible frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
850 @cindex invisible frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
851 @cindex iconified frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
852 @cindex frame visibility
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
853
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
854 An frame on a window system may be @dfn{visible}, @dfn{invisible}, or
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
855 @dfn{iconified}. If it is visible, you can see its contents. If it is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
856 iconified, the frame's contents do not appear on the screen, but an icon
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
857 does. If the frame is invisible, it doesn't show on the screen, not
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
858 even as an icon.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
859
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
860 Visibility is meaningless for TTY frames, since only the selected
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
861 one is actually displayed in any case.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
862
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
863 @defun make-frame-visible &optional frame
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
864 This function makes frame @var{frame} visible. If you omit @var{frame},
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
865 it makes the selected frame visible.
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
866 @end defun
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
867
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
868 @defun make-frame-invisible &optional frame force
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
869 This function makes frame @var{frame} invisible.
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
870 @end defun
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
871
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
872 @deffn Command iconify-frame &optional frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
873 This function iconifies frame @var{frame}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
874 @end deffn
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
875
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
876 @defun Command deiconify-frame &optional frame
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
877 This function de-iconifies frame @var{frame}. Under a window system,
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
878 this is equivalent to @code{make-frame-visible}.
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
879 @end defun
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
880
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
881 @defun frame-visible-p &optional frame
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
882 This returns whether @var{frame} is currently ``visible'' (actually in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
883 use for display). A frame that is not visible is not updated, and, if
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
884 it works through a window system, may not show at all.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
885 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
886
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
887 @defun frame-iconified-p &optional frame
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
888 This returns whether @var{frame} is iconified. Not all window managers
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
889 use icons; some merely unmap the window, so this function is not the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
890 inverse of @code{frame-visible-p}. It is possible for a frame to not
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
891 be visible and not be iconified either. However, if the frame is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
892 iconified, it will not be visible. (Under FSF Emacs, the functionality
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
893 of this function is obtained through @code{frame-visible-p}.)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
894 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
895
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
896 @defun frame-totally-visible-p &optional frame
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
897 This returns whether @var{frame} is not obscured by any other X
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
898 windows. On TTY frames, this is the same as @code{frame-visible-p}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
899 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
900
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
901 @ignore @c Not in XEmacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
902 The visibility status of a frame is also available as a frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
903 property. You can read or change it as such. @xref{X Frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
904 Properties}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
905
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
906 The user can iconify and deiconify frames with the window manager. This
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
907 happens below the level at which XEmacs can exert any control, but XEmacs
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
908 does provide events that you can use to keep track of such changes.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
909 @xref{Misc Events}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
910 @end ignore
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
911
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
912 @node Raising and Lowering
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
913 @section Raising and Lowering Frames
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
914
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
915 The X Window System uses a desktop metaphor. Part of this metaphor is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
916 the idea that windows are stacked in a notional third dimension
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
917 perpendicular to the screen surface, and thus ordered from ``highest''
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
918 to ``lowest''. Where two windows overlap, the one higher up covers the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
919 one underneath. Even a window at the bottom of the stack can be seen if
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
920 no other window overlaps it.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
921
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
922 @cindex raising a frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
923 @cindex lowering a frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
924 A window's place in this ordering is not fixed; in fact, users tend to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
925 change the order frequently. @dfn{Raising} a window means moving it
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
926 ``up'', to the top of the stack. @dfn{Lowering} a window means moving
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
927 it to the bottom of the stack. This motion is in the notional third
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
928 dimension only, and does not change the position of the window on the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
929 screen.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
930
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
931 You can raise and lower XEmacs's X windows with these functions:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
932
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
933 @deffn Command raise-frame &optional frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
934 This function raises frame @var{frame}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
935 @end deffn
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
936
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
937 @deffn Command lower-frame &optional frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
938 This function lowers frame @var{frame}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
939 @end deffn
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
940
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
941 You can also specify auto-raise (raising automatically when a frame is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
942 selected) or auto-lower (lowering automatically when it is deselected).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
943 Under X, most ICCCM-compliant window managers will have an option to do
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
944 this for you, but the following variables are provided in case you're
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
945 using a broken WM. (Under FSF Emacs, the same functionality is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
946 provided through the @code{auto-raise} and @code{auto-lower}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
947 frame properties.)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
948
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
949 @defvar auto-raise-frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
950 This variable's value is @code{t} if frames will be raised to the top
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
951 when selected.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
952 @end defvar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
953
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
954 @ignore Not in XEmacs
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
955 @defopt minibuffer-auto-raise
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
956 If this is non-@code{nil}, activation of the minibuffer raises the frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
957 that the minibuffer window is in.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
958 @end defopt
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
959 @end ignore
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
960
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
961 @defvar auto-lower-frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
962 This variable's value is @code{t} if frames will be lowered to the bottom
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
963 when no longer selected.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
964 @end defvar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
965
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
966 Auto-raising and auto-lowering is implemented through functions attached
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
967 to @code{select-frame-hook} and @code{deselect-frame-hook}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
968 (@pxref{Frame Hooks}). Under normal circumstances, you should not call
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
969 these functions directly.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
970
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
971 @defun default-select-frame-hook
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
972 This hook function implements the @code{auto-raise-frame} variable; it is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
973 for use as the value of @code{select-frame-hook}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
974 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
975
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
976 @defun default-deselect-frame-hook
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
977 This hook function implements the @code{auto-lower-frame} variable; it is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
978 for use as the value of @code{deselect-frame-hook}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
979 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
980
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
981 @node Frame Configurations
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
982 @section Frame Configurations
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
983 @cindex frame configuration
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
984
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
985 A @dfn{frame configuration} records the current arrangement of frames,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
986 all their properties, and the window configuration of each one.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
987
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
988 @defun current-frame-configuration
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
989 This function returns a frame configuration list that describes
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
990 the current arrangement of frames and their contents.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
991 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
992
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
993 @defun set-frame-configuration configuration &optional nodelete
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
994 This function restores the state of frames described by
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
995 @var{configuration}, which should be the return value from a previous
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
996 call to @code{current-frame-configuration}.
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
997
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
998 Each frame listed in @var{configuration} has its position, size, window
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
999 configuration, and other properties set as specified in
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1000 @var{configuration}.
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
1001
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
1002 Ordinarily, this function deletes all existing frames not listed in
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
1003 @var{configuration}. But if optional second argument @var{nodelete} is
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
1004 non-@code{nil}, the unwanted frames are iconified instead.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1005 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1006
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1007 @node Frame Hooks
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1008 @section Hooks for Customizing Frame Behavior
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1009 @cindex frame hooks
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1010
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1011 XEmacs provides many hooks that are called at various times during a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1012 frame's lifetime. @xref{Hooks}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1013
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1014 @defvar create-frame-hook
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1015 This hook is called each time a frame is created. The functions are called
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1016 with one argument, the newly-created frame.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1017 @end defvar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1018
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1019 @defvar delete-frame-hook
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1020 This hook is called each time a frame is deleted. The functions are called
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1021 with one argument, the about-to-be-deleted frame.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1022 @end defvar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1023
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1024 @defvar select-frame-hook
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1025 This is a normal hook that is run just after a frame is selected. The
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1026 function @code{default-select-frame-hook}, which implements auto-raising
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1027 (@pxref{Raising and Lowering}), is normally attached to this hook.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1028
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1029 Note that calling @code{select-frame} does not necessarily set the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1030 focus: The actual window-system focus will not be changed until the next
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1031 time that XEmacs is waiting for an event, and even then, the window
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1032 manager may refuse the focus-change request.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1033 @end defvar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1034
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1035 @defvar deselect-frame-hook
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1036 This is a normal hook that is run just before a frame is deselected
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1037 (and another frame is selected). The function
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1038 @code{default-deselect-frame-hook}, which implements auto-lowering
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1039 (@pxref{Raising and Lowering}), is normally attached to this hook.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1040 @end defvar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1041
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1042 @defvar map-frame-hook
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1043 This hook is called each time a frame is mapped (i.e. made visible).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1044 The functions are called with one argument, the newly mapped frame.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1045 @end defvar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1046
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1047 @defvar unmap-frame-hook
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1048 This hook is called each time a frame is unmapped (i.e. made invisible
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1049 or iconified). The functions are called with one argument, the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1050 newly unmapped frame.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1051 @end defvar