diff options
| -rw-r--r-- | doc/emacs/frames.texi | 50 | ||||
| -rw-r--r-- | doc/lispref/display.texi | 76 | ||||
| -rw-r--r-- | doc/lispref/elisp.texi | 1 | ||||
| -rw-r--r-- | doc/lispref/text.texi | 5 |
4 files changed, 119 insertions, 13 deletions
diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi index 35b3f83ab33..383ae7fd6ee 100644 --- a/doc/emacs/frames.texi +++ b/doc/emacs/frames.texi | |||
| @@ -1152,11 +1152,11 @@ change the variable @code{x-gtk-file-dialog-help-text} to @code{nil}. | |||
| 1152 | @section Tooltips | 1152 | @section Tooltips |
| 1153 | @cindex tooltips | 1153 | @cindex tooltips |
| 1154 | 1154 | ||
| 1155 | @dfn{Tooltips} are small windows that display text information at | 1155 | @dfn{Tooltips} are small special frames that display text |
| 1156 | the current mouse position. They activate when there is a pause in | 1156 | information at the current mouse position. They activate when there |
| 1157 | mouse movement over some significant piece of text in a window, or the | 1157 | is a pause in mouse movement over some significant piece of text in a |
| 1158 | mode line, or some other part of the Emacs frame such as a tool bar | 1158 | window, or the mode line, or some other part of the Emacs frame such |
| 1159 | button or menu item. | 1159 | as a tool bar button or menu item. |
| 1160 | 1160 | ||
| 1161 | @findex tooltip-mode | 1161 | @findex tooltip-mode |
| 1162 | You can toggle the use of tooltips with the command @kbd{M-x | 1162 | You can toggle the use of tooltips with the command @kbd{M-x |
| @@ -1164,11 +1164,41 @@ tooltip-mode}. When Tooltip mode is disabled, the help text is | |||
| 1164 | displayed in the echo area instead. To control the use of tooltips at | 1164 | displayed in the echo area instead. To control the use of tooltips at |
| 1165 | startup, customize the variable @code{tooltip-mode}. | 1165 | startup, customize the variable @code{tooltip-mode}. |
| 1166 | 1166 | ||
| 1167 | @vindex tooltip-delay | 1167 | The following variables provide customization options for tooltip |
| 1168 | The variables @code{tooltip-delay} specifies how long Emacs should | 1168 | display: |
| 1169 | wait before displaying a tooltip. For additional customization | 1169 | |
| 1170 | options for displaying tooltips, use @kbd{M-x customize-group | 1170 | @vtable @code |
| 1171 | @key{RET} tooltip @key{RET}}. | 1171 | @item tooltip-delay |
| 1172 | This variable specifies how long Emacs should wait before displaying | ||
| 1173 | the first tooltip. The value is in seconds. | ||
| 1174 | |||
| 1175 | @item tooltip-short-delay | ||
| 1176 | This variable specifies how long Emacs should wait before displaying | ||
| 1177 | subsequent tooltips on different items, having already displayed the | ||
| 1178 | first tooltip. The value is in seconds. | ||
| 1179 | |||
| 1180 | @item tooltip-hide-delay | ||
| 1181 | The number of seconds since displaying a tooltip to hide it, if the | ||
| 1182 | mouse doesn't move. | ||
| 1183 | |||
| 1184 | @item tooltip-x-offset | ||
| 1185 | @itemx tooltip-y-offset | ||
| 1186 | The X and Y offsets, in pixels, of the left top corner of the tooltip | ||
| 1187 | from the mouse pointer position. Note that these are ignored if | ||
| 1188 | @code{tooltip-frame-parameters} was customized to include, | ||
| 1189 | respectively, the @code{left} and @code{top} parameters. The values | ||
| 1190 | of the offsets should be chosen so that the tooltip doesn't cover the | ||
| 1191 | mouse pointer's hot spot, or it might interfere with clicking the | ||
| 1192 | mouse. | ||
| 1193 | |||
| 1194 | @item tooltip-frame-parameters | ||
| 1195 | The frame parameters used for displaying tooltips. @xref{Frame | ||
| 1196 | Parameters,,, elisp, The Emacs Lisp Reference Manual}, and also | ||
| 1197 | @ref{Tooltips,,, elisp, The Emacs Lisp Reference Manual}. | ||
| 1198 | @end vtable | ||
| 1199 | |||
| 1200 | For additional customization options for displaying tooltips, use | ||
| 1201 | @kbd{M-x customize-group @key{RET} tooltip @key{RET}}. | ||
| 1172 | 1202 | ||
| 1173 | @vindex x-gtk-use-system-tooltips | 1203 | @vindex x-gtk-use-system-tooltips |
| 1174 | If Emacs is built with GTK+ support, it displays tooltips via GTK+, | 1204 | If Emacs is built with GTK+ support, it displays tooltips via GTK+, |
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 9ea9548582f..010dcb2fd1f 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi | |||
| @@ -34,6 +34,7 @@ that Emacs presents to the user. | |||
| 34 | * Character Display:: How Emacs displays individual characters. | 34 | * Character Display:: How Emacs displays individual characters. |
| 35 | * Beeping:: Audible signal to the user. | 35 | * Beeping:: Audible signal to the user. |
| 36 | * Window Systems:: Which window system is being used. | 36 | * Window Systems:: Which window system is being used. |
| 37 | * Tooltips:: Tooltip display in Emacs. | ||
| 37 | * Bidirectional Display:: Display of bidirectional scripts, such as | 38 | * Bidirectional Display:: Display of bidirectional scripts, such as |
| 38 | Arabic and Farsi. | 39 | Arabic and Farsi. |
| 39 | @end menu | 40 | @end menu |
| @@ -6968,6 +6969,81 @@ indicator of Emacs capabilities on a given display type. Instead, use | |||
| 6968 | @code{display-graphic-p} or any of the other @code{display-*-p} | 6969 | @code{display-graphic-p} or any of the other @code{display-*-p} |
| 6969 | predicates described in @ref{Display Feature Testing}. | 6970 | predicates described in @ref{Display Feature Testing}. |
| 6970 | 6971 | ||
| 6972 | @node Tooltips | ||
| 6973 | @section Tooltips | ||
| 6974 | @cindex tooltips | ||
| 6975 | @dfn{Tooltips} are special frames (@pxref{Frames}) that are used to | ||
| 6976 | display helpful hints (a.k.a.@: ``tips'') related to the current | ||
| 6977 | position of the mouse pointer. Emacs uses tooltips to display help | ||
| 6978 | strings about active portions of text (@pxref{Special Properties}) and | ||
| 6979 | about various UI elements, such as menu items (@pxref{Extended Menu | ||
| 6980 | Items}) and tool-bar buttons (@pxref{Tool Bar}). | ||
| 6981 | |||
| 6982 | @defun tooltip-mode | ||
| 6983 | Tooltip Mode is a minor mode that enables display of tooltips. | ||
| 6984 | Turning off this mode causes the tooltips be displayed in the echo | ||
| 6985 | area. On text-mode (a.k.a.@: ``TTY'') frames, tooltips are always | ||
| 6986 | displayed in the echo area. | ||
| 6987 | @end defun | ||
| 6988 | |||
| 6989 | @vindex x-gtk-use-system-tooltips | ||
| 6990 | When Emacs is built with GTK+ support, it by default displays tooltips | ||
| 6991 | using GTK+ functions, and the appearance of the tooltips is then | ||
| 6992 | controlled by GTK+ settings. GTK+ tooltips can be disabled by | ||
| 6993 | changing the value of the variable @code{x-gtk-use-system-tooltips} to | ||
| 6994 | @code{nil}. The rest of this subsection describes how to control | ||
| 6995 | non-GTK+ tooltips, which are presented by Emacs itself. | ||
| 6996 | |||
| 6997 | Since tooltips are special frames, they have their frame parameters | ||
| 6998 | (@pxref{Frame Parameters}). Unlike other frames, the frame parameters | ||
| 6999 | for tooltips are stored in a special variable. | ||
| 7000 | |||
| 7001 | @defvar tooltip-frame-parameters | ||
| 7002 | This customizable option holds the frame parameters used for | ||
| 7003 | displaying tooltips. Any font and color parameters are ignored, and | ||
| 7004 | the corresponding attributes of the @code{tooltip} face are used | ||
| 7005 | instead. If @code{left} or @code{top} parameters are included, they | ||
| 7006 | are used as absolute frame-relative coordinates where the tooltip | ||
| 7007 | should be shown. (Mouse-relative position of the tooltip can be | ||
| 7008 | customized using the variables described in @ref{Tooltips,,, emacs, | ||
| 7009 | The GNU Emacs Manual}.) Note that the @code{left} and @code{top} | ||
| 7010 | parameters, if present, override the values of mouse-relative offsets. | ||
| 7011 | @end defvar | ||
| 7012 | |||
| 7013 | @vindex tooltip@r{ face} | ||
| 7014 | The @code{tooltip} face determines the appearance of text shown in | ||
| 7015 | tooltips. It should generally use a variable-pitch font of size that | ||
| 7016 | is preferably smaller than the default frame font. | ||
| 7017 | |||
| 7018 | @findex tooltip-help-tips | ||
| 7019 | @defvar tooltip-functions | ||
| 7020 | This abnormal hook is a list of functions to call when Emacs needs to | ||
| 7021 | display a tooltip. Each function is called with a single argument | ||
| 7022 | @var{event} which is a copy of the last mouse movement event. If a | ||
| 7023 | function on this list actually displays the tooltip, it should return | ||
| 7024 | non-@code{nil}, and then the rest of the functions will not be | ||
| 7025 | called. The default value of this variable is a single function | ||
| 7026 | @code{tooltip-help-tips}. | ||
| 7027 | @end defvar | ||
| 7028 | |||
| 7029 | If you write your own function to be put on the | ||
| 7030 | @code{tooltip-functions} list, you may need to know the buffer of the | ||
| 7031 | mouse event that triggered the tooltip display. The following | ||
| 7032 | function provides that information. | ||
| 7033 | |||
| 7034 | @defun tooltip-event-buffer event | ||
| 7035 | This function returns the buffer over which @var{event} occurred. | ||
| 7036 | Call it with the argument of the function from | ||
| 7037 | @code{tooltip-functions} to obtain the buffer whose text triggered the | ||
| 7038 | tooltip. Note that the event might occur not over a buffer (e.g., | ||
| 7039 | over the tool bar), in which case this function will return | ||
| 7040 | @code{nil}. | ||
| 7041 | @end defun | ||
| 7042 | |||
| 7043 | Other aspects of tooltip display are controlled by several | ||
| 7044 | customizable settings; see @ref{Tooltips,,, emacs, The GNU Emacs | ||
| 7045 | Manual}. | ||
| 7046 | |||
| 6971 | @node Bidirectional Display | 7047 | @node Bidirectional Display |
| 6972 | @section Bidirectional Display | 7048 | @section Bidirectional Display |
| 6973 | @cindex bidirectional display | 7049 | @cindex bidirectional display |
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi index 4c1541e98c6..a3bff0b07ac 100644 --- a/doc/lispref/elisp.texi +++ b/doc/lispref/elisp.texi | |||
| @@ -1380,6 +1380,7 @@ Emacs Display | |||
| 1380 | * Character Display:: How Emacs displays individual characters. | 1380 | * Character Display:: How Emacs displays individual characters. |
| 1381 | * Beeping:: Audible signal to the user. | 1381 | * Beeping:: Audible signal to the user. |
| 1382 | * Window Systems:: Which window system is being used. | 1382 | * Window Systems:: Which window system is being used. |
| 1383 | * Tooltips:: Tooltip display in Emacs. | ||
| 1383 | * Bidirectional Display:: Display of bidirectional scripts, such as | 1384 | * Bidirectional Display:: Display of bidirectional scripts, such as |
| 1384 | Arabic and Farsi. | 1385 | Arabic and Farsi. |
| 1385 | 1386 | ||
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 37492929e74..1ad665f0e5b 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi | |||
| @@ -3202,12 +3202,11 @@ or shorter, higher or lower, wider or narrow, or replaced with an image. | |||
| 3202 | 3202 | ||
| 3203 | @item help-echo | 3203 | @item help-echo |
| 3204 | @kindex help-echo @r{(text property)} | 3204 | @kindex help-echo @r{(text property)} |
| 3205 | @cindex tooltip | 3205 | @cindex tooltip for help strings |
| 3206 | @anchor{Text help-echo} | 3206 | @anchor{Text help-echo} |
| 3207 | If text has a string as its @code{help-echo} property, then when you | 3207 | If text has a string as its @code{help-echo} property, then when you |
| 3208 | move the mouse onto that text, Emacs displays that string in the echo | 3208 | move the mouse onto that text, Emacs displays that string in the echo |
| 3209 | area, or in the tooltip window (@pxref{Tooltips,,, emacs, The GNU Emacs | 3209 | area, or in the tooltip window (@pxref{Tooltips}). |
| 3210 | Manual}). | ||
| 3211 | 3210 | ||
| 3212 | If the value of the @code{help-echo} property is a function, that | 3211 | If the value of the @code{help-echo} property is a function, that |
| 3213 | function is called with three arguments, @var{window}, @var{object} and | 3212 | function is called with three arguments, @var{window}, @var{object} and |