comparison lisp/packages/balloon-help.el @ 98:0d2f883870bc r20-1b1

Import from CVS: tag r20-1b1
author cvs
date Mon, 13 Aug 2007 09:13:56 +0200
parents 131b0175ea99
children a145efe76779
comparison
equal deleted inserted replaced
97:498bf5da1c90 98:0d2f883870bc
1 ;;; Balloon help for XEmacs (requires 19.12 or later) 1 ;;; Balloon help for XEmacs (requires 19.12 or later)
2 ;;; Copyright (C) 1995 Kyle E. Jones 2 ;;; Copyright (C) 1995, 1997 Kyle E. Jones
3 ;;; 3 ;;;
4 ;;; This program is free software; you can redistribute it and/or modify 4 ;;; This program is free software; you can redistribute it and/or modify
5 ;;; it under the terms of the GNU General Public License as published by 5 ;;; it under the terms of the GNU General Public License as published by
6 ;;; the Free Software Foundation; either version 1, or (at your option) 6 ;;; the Free Software Foundation; either version 1, or (at your option)
7 ;;; any later version. 7 ;;; any later version.
15 ;;; program's author (send electronic mail to kyle@uunet.uu.net) or from 15 ;;; program's author (send electronic mail to kyle@uunet.uu.net) or from
16 ;;; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 16 ;;; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA
17 ;;; 02139, USA. 17 ;;; 02139, USA.
18 ;;; 18 ;;;
19 ;;; Send bug reports to kyle@wonderworks.com 19 ;;; Send bug reports to kyle@wonderworks.com
20
21 ;;; Synched up with: Not in FSF.
22 20
23 ;; Balloon help pops up a small frame to display help text 21 ;; Balloon help pops up a small frame to display help text
24 ;; relating to objects that the mouse cursor passes over. 22 ;; relating to objects that the mouse cursor passes over.
25 ;; 23 ;;
26 ;; Installation: 24 ;; Installation:
57 ;; managers. So the window manager directives should not be 55 ;; managers. So the window manager directives should not be
58 ;; needed for XEmacs 19.13 and beyond. 56 ;; needed for XEmacs 19.13 and beyond.
59 57
60 (provide 'balloon-help) 58 (provide 'balloon-help)
61 59
62 (defvar balloon-help-version "1.02" 60 (defvar balloon-help-version "1.03"
63 "Version string for Balloon Help.") 61 "Version string for Balloon Help.")
64 62
65 (defvar balloon-help-mode t 63 (defvar balloon-help-mode t
66 "*Non-nil means Balloon help mode is enabled.") 64 "*Non-nil means Balloon help mode is enabled.")
67 65
93 See the documentation for the function load-sound-file to see how 91 See the documentation for the function load-sound-file to see how
94 define sounds.") 92 define sounds.")
95 93
96 (defvar balloon-help-frame-name nil 94 (defvar balloon-help-frame-name nil
97 "*The frame name to use for the frame to display the balloon help.") 95 "*The frame name to use for the frame to display the balloon help.")
96
97 (defvar balloon-help-aggressively-follow-mouse nil
98 "*Non-nil means the balloon should move with the mouse even if the mouse
99 is over the same object as the last mouse motion event.")
98 100
99 ;;; 101 ;;;
100 ;;; End of user variables. 102 ;;; End of user variables.
101 ;;; 103 ;;;
102 104
217 balloon-help-help-object-y 219 balloon-help-help-object-y
218 (+ top xtop-toolbar-height menubar-height 220 (+ top xtop-toolbar-height menubar-height
219 (event-y-pixel event)))) 221 (event-y-pixel event))))
220 (cond ((eq frame balloon-help-frame) t) 222 (cond ((eq frame balloon-help-frame) t)
221 ((eq object balloon-help-help-object) 223 ((eq object balloon-help-help-object)
222 (if (balloon-help-displayed) 224 (if (and (balloon-help-displayed)
225 balloon-help-aggressively-follow-mouse)
223 (balloon-help-move-help-frame))) 226 (balloon-help-move-help-frame)))
224 ((balloon-help-displayed) 227 ((balloon-help-displayed)
225 (setq balloon-help-help-object object) 228 (setq balloon-help-help-object object)
226 (balloon-help-display-help)) 229 (balloon-help-display-help))
227 (t 230 (t