]> code.delx.au - gnu-emacs/blobdiff - man/frames.texi
Add a provide statement.
[gnu-emacs] / man / frames.texi
index bd49e582316ded0598049bd343627f684bd99129..5fb4181408ec7a8286dc0e38de00a101ddb490be 100644 (file)
@@ -1,5 +1,5 @@
 @c This is part of the Emacs manual.
-@c Copyright (C) 1985, 86, 87, 93, 94, 95, 97, 99, 2000, 2001
+@c Copyright (C) 1985, 86, 87, 93, 94, 95, 97, 99, 2000, 2001, 2004
 @c   Free Software Foundation, Inc.
 @c See file emacs.texi for copying conditions.
 @node Frames, International, Windows, Top
@@ -31,8 +31,7 @@ so that you can use many of the features described in this chapter.
 
 @cindex MS Windows
   Emacs compiled for MS Windows mostly supports the same features as
-under X.  However, images, tool bars, and tooltips are not yet
-available in Emacs version 21.1 on MS-Windows.
+under X.
 
 @menu
 * Mouse Commands::      Moving, cutting, and pasting, with the mouse.
@@ -49,10 +48,11 @@ available in Emacs version 21.1 on MS-Windows.
 * Frame Parameters::    Changing the colors and other modes of frames.
 * Scroll Bars::                How to enable and disable scroll bars; how to use them.
 * Wheeled Mice::        Using mouse wheels for scrolling.
+* Drag and drop::       Using drag and drop to open files and insert text.
 * Menu Bars::          Enabling and disabling the menu bar.
 * Tool Bars::           Enabling and disabling the tool bar.
 * Dialog Boxes::        Controlling use of dialog boxes.
-* Tooltips::            Showing "tooltips", AKA "ballon help" for active text.
+* Tooltips::            Showing "tooltips", AKA "balloon help" for active text.
 * Mouse Avoidance::     Moving the mouse pointer out of the way.
 * Non-Window Terminals::  Multiple frames on terminals that show only one.
 * XTerm Mouse::         Using the mouse in an XTerm terminal emulator.
@@ -70,7 +70,7 @@ commands for copying between Emacs and other X client programs.
   If you select a region with any of these mouse commands, and then
 immediately afterward type the @key{DELETE} function key, it deletes the
 region that you selected.  The @key{BACKSPACE} function key and the
-ASCII character @key{DEL} do not do this; if you type any other key
+@acronym{ASCII} character @key{DEL} do not do this; if you type any other key
 in between the mouse command and @key{DELETE}, it does not do this.
 
 @findex mouse-set-region
@@ -141,7 +141,7 @@ click on a character with ``symbol'' syntax (such as underscore, in C
 mode), it sets the region around the symbol surrounding that character.
 
 If you click on a character with open-parenthesis or close-parenthesis
-syntax, it sets the region around the parenthetical grouping (sexp)
+syntax, it sets the region around the parenthetical grouping
 which that character starts or ends.  If you click on a character with
 string-delimiter syntax (such as a singlequote or doublequote in C), it
 sets the region around the string constant (using heuristics to figure
@@ -183,9 +183,10 @@ to insert the text from the selection.
 command of the program operating the other window, to select the text
 you want.  Then yank it in Emacs with @kbd{C-y} or @kbd{Mouse-2}.
 
-  The standard coding system for X selections is @code{compound-text}.
-To specify another coding system for X selections, use @kbd{C-x
-@key{RET} x} or @kbd{C-x @key{RET} X}.  @xref{Specify Coding}.
+  The standard coding system for X selections is
+@code{compound-text-with-extensions}.  To specify another coding
+system for X selections, use @kbd{C-x @key{RET} x} or @kbd{C-x
+@key{RET} X}.  @xref{Specify Coding}.
 
   These cutting and pasting commands also work on MS-Windows.
 
@@ -229,6 +230,8 @@ dragging, the window scrolls at a steady rate until you move the mouse
 back into the window.  This way, you can mark regions that don't fit
 entirely on the screen.
 
+This way of setting the secondary selection does not alter the kill ring.
+
 @findex mouse-start-secondary
 @kindex M-Mouse-1
 @item M-Mouse-1
@@ -239,8 +242,9 @@ Set one endpoint for the @dfn{secondary selection}
 @kindex M-Mouse-3
 @item M-Mouse-3
 Make a secondary selection, using the place specified with @kbd{M-Mouse-1}
-as the other end (@code{mouse-secondary-save-then-kill}).  A second click
-at the same place kills the secondary selection just made.
+as the other end (@code{mouse-secondary-save-then-kill}).  This also
+puts the selected text in the kill ring.  A second click at the same
+place kills the secondary selection just made.
 
 @findex mouse-yank-secondary
 @kindex M-Mouse-2
@@ -273,7 +277,7 @@ particularly under OpenWindows and Gnome.
   The command @kbd{M-x menu-bar-enable-clipboard} makes the @code{Cut},
 @code{Paste} and @code{Copy} menu items, as well as the keys of the same
 names, all use the clipboard.
+
   You can customize the option @code{x-select-enable-clipboard} to make
 the Emacs yank functions consult the clipboard before the primary
 selection, and to make the kill functions to store in the clipboard as
@@ -299,9 +303,12 @@ message in the @samp{*Compilation*} buffer, you go to the source code
 for that error message.  If you click @kbd{Mouse-2} on a completion in
 the @samp{*Completions*} buffer, you choose that completion.
 
+@vindex mouse-highlight
   You can usually tell when @kbd{Mouse-2} has this special sort of
 meaning because the sensitive text highlights when you move the mouse
-over it.
+over it.  The variable @code{mouse-highlight} controls whether to do
+this highlighting always (even when such text appears where the mouse
+already is), never, or only immediately after you move the mouse.
 
 @node Menu Mouse Clicks
 @section Mouse Clicks for Menus
@@ -372,8 +379,7 @@ horizontally, above the place in the mode line where you click.
 
 @kindex C-Mouse-2 @r{(scroll bar)}
   @kbd{C-Mouse-2} on a scroll bar splits the corresponding window
-vertically, unless you are using an X toolkit's implementation of
-scroll bars.  @xref{Split Window}.
+vertically.  @xref{Split Window}.
 
   The commands above apply to areas of the mode line which do not have
 special mouse bindings of their own.  Some areas, such as the buffer
@@ -391,7 +397,7 @@ subcommands.  The difference is that @kbd{C-x 5} commands create a new
 frame rather than just a new window in the selected frame (@pxref{Pop
 Up Window}).  If an existing visible or iconified frame already displays
 the requested material, these commands use the existing frame, after
-raising or deiconifying as necessary. 
+raising or deiconifying as necessary.
 
   The various @kbd{C-x 5} commands differ in how they find or create the
 buffer to select:
@@ -444,6 +450,14 @@ parameter, as shown here:
 (add-to-list 'default-frame-alist '(font . "10x20"))
 @end example
 
+@noindent
+Here's a similar example for specifying a foreground color:
+
+@example
+(add-to-list 'default-frame-alist '(background-color . "blue"))
+@end example
+
+
 @node Frame Commands
 @section Frame Commands
 
@@ -478,6 +492,18 @@ frames on your terminal.
 Delete all frames except the selected one.
 @end table
 
+@vindex focus-follows-mouse
+  To make the command @kbd{C-x 5 o} work properly, you must tell Emacs
+how the system (or the window manager) generally handles
+focus-switching between windows.  There are two possibilities: either
+simply moving the mouse onto a window selects it (gives it focus), or
+you have to click on it in a suitable way to do so.  Unfortunately
+there is no way Emacs can find out automatically which way the system
+handles this, so you have to explicitly say, by setting the variable
+@code{focus-follows-mouse}.  If just moving the mouse onto a window
+selects it, that variable should be @code{t}; if a click is necessary,
+the variable should be @code{nil}.
+
 @node Speedbar
 @section Making and Using a Speedbar Frame
 @cindex speedbar
@@ -584,10 +610,16 @@ to set it.
 @code{special-display-buffer-names} or @code{special-display-regexps}
 can also be a list.  Then the first element is the buffer name or
 regular expression; the rest of the list specifies how to create the
-frame.  It can be an association list specifying frame parameter values;
-these values take precedence over parameter values specified in
-@code{special-display-frame-alist}.  Alternatively, it can have this
-form:
+frame.  It can be an association list specifying frame parameter
+values; these values take precedence over parameter values specified
+in @code{special-display-frame-alist}.  If you specify the symbol
+@code{same-window} as a ``frame parameter'' in this list, with a
+non-@code{nil} value, that means to use the selected window if
+possible.  If you use the symbol @code{same-frame} as a ``frame
+parameter'' in this list, with a non-@code{nil} value, that means to
+use the selected frame if possible.
+
+  Alternatively, the value can have this form:
 
 @example
 (@var{function} @var{args}...)
@@ -682,11 +714,14 @@ Press @kbd{S-Mouse-1} to activate this menu.
   In Emacs versions that use an X toolkit, the color-setting and
 font-setting functions don't affect menus and the menu bar, since they
 are displayed by their own widget classes.  To change the appearance of
-the menus and menu bar, you must use X resources (@pxref{Resources X}).
-@xref{Colors X}, regarding colors.  @xref{Font X}, regarding choice of
+the menus and menu bar, you must use X resources (@pxref{Resources}).
+@xref{Colors}, regarding colors.  @xref{Font X}, regarding choice of
 font.
 
-  For information on frame parameters and customization, see @ref{Frame
+  Colors, fonts, and other attributes of the frame's display can also
+be customized by setting frame parameters in the variable
+@code{default-frame-alist} (@pxref{Creating Frames}).  For a detailed
+description of frame parameters and customization, see @ref{Frame
 Parameters,,, elisp, The Emacs Lisp Reference Manual}.
 
 @node Scroll Bars
@@ -714,10 +749,8 @@ the level where you click up to the top of the window.  @kbd{Mouse-3}
 down to the level where you click.  By clicking repeatedly in the same
 place, you can scroll by the same distance over and over.
 
-  If you are using Emacs's own implementation of scroll bars, as opposed
-to scroll bars from an X toolkit, you can also click @kbd{C-Mouse-2} in
-the scroll bar to split a window vertically.  The split occurs on the
-line where you click.
+  You can also click @kbd{C-Mouse-2} in the scroll bar to split a
+window vertically.  The split occurs on the line where you click.
 
 @findex scroll-bar-mode
 @vindex scroll-bar-mode
@@ -729,11 +762,11 @@ frames yet to be created.  Customize the option @code{scroll-bar-mode}
 to control the use of scroll bars at startup.  You can use it to specify
 that they are placed at the right of windows if you prefer that.  You
 can use the X resource @samp{verticalScrollBars} to control the initial
-setting of Scroll Bar mode similarly.  @xref{Resources X}.
+setting of Scroll Bar mode similarly.  @xref{Resources}.
 
 @findex toggle-scroll-bar
   To enable or disable scroll bars for just the selected frame, use the
-@kbd{M-x toggle-scroll-bar} command.
+command @kbd{M-x toggle-scroll-bar}.
 
 @vindex scroll-bar-width
 @cindex width of the scroll bar
@@ -763,6 +796,51 @@ generating appropriate events for Emacs.
 @code{mouse-wheel-scroll-amount} determine where and by how much
 buffers are scrolled.
 
+@node Drag and drop
+@section Drag and drop in Emacs.
+
+@cindex drag and drop
+  Emacs supports drag and drop so that dropping of files and text is handled.
+Currently supported drag and drop protocols are XDND, Motif and the old
+KDE 1.x protocol.  There is no drag support yet.
+When text is dropped on Emacs, Emacs inserts the text where it is dropped.
+When a file is dragged from a file manager to Emacs, Emacs opens that file.
+As a special case, if a file is dropped on a dired buffer the file is
+copied or moved (depends on exactly how it is dragged and the application
+it was dragged from) to the directory the dired buffer is displaying.
+
+@vindex x-dnd-test-function
+@vindex x-dnd-known-types
+  When a user drags something from another application over Emacs, that other
+application expects Emacs to tell it if Emacs can handle the data that is
+dragged.  The variable @code{x-dnd-test-function} is used by Emacs to determine
+what to reply.  The default value is @code{x-dnd-default-test-function}
+which accepts drops if the type of the data to be dropped is present in
+@code{x-dnd-known-types}.  You can customize @code{x-dnd-test-function} and/or
+@code{x-dnd-known-types} if you want Emacs to accept or reject drops based
+on some other criteria.
+
+@vindex x-dnd-open-file-other-window
+  A file is normally opened in the window it is dropped on, but if you
+prefer the file to be opened in a new window you can customize the variable
+@code{x-dnd-open-file-other-window}.
+
+@vindex x-dnd-types-alist
+  If you want to change the way Emacs handles drop of different types
+or add a new type, you shall customize @code{x-dnd-types-alist}.  This
+requires detailed knowledge of what types other applications use
+for drag and drop.
+
+@vindex x-dnd-protocol-alist
+  When an URL is dropped on Emacs it may be a file, but it may also be
+another URL type (ftp, http, etc.).  Emacs first checks
+@code{x-dnd-protocol-alist} to determine what to do with the URL.  If there
+is no match there and if @code{browse-url-browser-function} is an alist,
+Emacs looks for a match there.  If no match is found the text for the URL
+is inserted.  If you want to alter Emacs behaviour you can customize these
+variables.
+
+
 @node Menu Bars
 @section Menu Bars
 @cindex Menu Bar mode
@@ -774,23 +852,24 @@ With no argument, this command toggles Menu Bar mode, a
 minor mode.  With an argument, the command turns Menu Bar mode on if the
 argument is positive, off if the argument is not positive.  You can use
 the X resource @samp{menuBarLines} to control the initial setting of
-Menu Bar mode.  @xref{Resources X}.
+Menu Bar mode.  @xref{Resources}.
 
 @kindex C-Mouse-3 @r{(when menu bar is disabled)}
   Expert users often turn off the menu bar, especially on text-only
 terminals, where this makes one additional line available for text.
 If the menu bar is off, you can still pop up a menu of its contents
-with @kbd{C-Mouse-3} on a display which supports popup menus.
+with @kbd{C-Mouse-3} on a display which supports pop-up menus.
 @xref{Menu Mouse Clicks}.
 
   @xref{Menu Bar}, for information on how to invoke commands with the
-menu bar.
+menu bar.  @xref{X Resources}, for how to customize the menu bar
+menus.
 
 @node Tool Bars
 @section Tool Bars
 @cindex Tool Bar mode
 @cindex mode, Tool Bar
-@cindex icons, tool bar
+@cindex icons, toolbar
 
 The @dfn{tool bar} is a line (or multiple lines) of icons at the top
 of the Emacs window.  You can click on these icons with the mouse
@@ -822,6 +901,21 @@ invoke the command to begin with.
 use of dialog boxes.  This also controls whether to use file selection
 windows (but those are not supported on all platforms).
 
+@vindex use-file-dialog
+  A file selection window is a special kind of dialog box for asking for
+file names.
+
+  You can customize the option @code{use-file-dialog} to suppress the
+use of file selection windows even if you still want other kinds
+of dialogs.  This option has no effect if you have suppressed all dialog
+boxes with the option @code{use-dialog-box}.
+
+@vindex x-use-old-gtk-file-dialog
+  For Gtk+ version 2.4, you can make Emacs use the old file dialog
+by setting the variable @code{x-use-old-gtk-file-dialog} to a non-@code{nil}
+value.  If Emacs is built with a Gtk+ version that has only one file dialog,
+the setting of this variable has no effect.
+
 @node Tooltips
 @section Tooltips (or ``Balloon Help'')
 
@@ -838,8 +932,12 @@ tooltip-mode}.  The customization group @code{tooltip} controls
 various aspects of how tooltips work.  When Tooltip mode is disabled,
 the help text is displayed in the echo area instead.
 
-  As of Emacs 21.1, tooltips are not supported on MS-Windows.
-So help text always appears in the echo area.
+@vindex tooltip-delay
+  The variables @code{tooltip-delay} specifies how long Emacs should
+wait before displaying a tooltip.  For additional customization
+options for displaying tooltips, use @kbd{M-x customize-group
+@key{RET} tooltip @key{RET}}.  @xref{X Resources}, for information on
+customizing the windows that display tooltips.
 
 @node Mouse Avoidance
 @section Mouse Avoidance
@@ -855,7 +953,7 @@ move the mouse in several ways:
 
 @table @code
 @item banish
-Move the mouse to the upper-right corner on any keypress;
+Move the mouse to the upper-right corner on any key-press;
 @item exile
 Move the mouse to the corner only if the cursor gets too close,
 and allow it to return once the cursor is out of the way;
@@ -917,3 +1015,7 @@ functionality is still available by holding down the @kbd{SHIFT} key
 when you press the mouse button.  The Linux console supports this
 mode if it has support for the mouse enabled, e.g.@: using the
 @command{gpm} daemon.
+
+@ignore
+   arch-tag: 7dcf3a31-a43b-45d4-a900-445b10d77e49
+@end ignore