* feature request: tooltip-show-at-point
@ 2004-03-05 7:31 Masatake YAMATO
2004-03-08 21:05 ` Miles Bader
2004-03-09 6:24 ` Eli Zaretskii
0 siblings, 2 replies; 5+ messages in thread
From: Masatake YAMATO @ 2004-03-05 7:31 UTC (permalink / raw)
With tooltip I'd like to show the eldoc's output at the point, not
at the echo area. I wrote a patch for the purpose.
The main part of the patch is the following function:
(require 'avoid)
(defun eldoc-tooltip (text)
(let* ((P (mouse-avoidance-point-position))
(frame (car P))
(x (cadr P))
(y (cddr P))
(oP (mouse-position))
(oframe (car oP))
(ox (cadr oP))
(oy (cddr oP)))
(set-mouse-position frame x y)
(tooltip-show text)
(set-mouse-position oframe ox oy)))
(eldoc-tooltip "California, here I am.")
This function works, however too slow to follow the point motion
in real time. How do you think to provide a built-in function which
show the tooltip at point?
Regards
Masatake YAMATO
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: feature request: tooltip-show-at-point
2004-03-05 7:31 feature request: tooltip-show-at-point Masatake YAMATO
@ 2004-03-08 21:05 ` Miles Bader
2004-03-10 5:36 ` Masatake YAMATO
2004-03-11 7:00 ` Masatake YAMATO
2004-03-09 6:24 ` Eli Zaretskii
1 sibling, 2 replies; 5+ messages in thread
From: Miles Bader @ 2004-03-08 21:05 UTC (permalink / raw)
Cc: emacs-devel
On Fri, Mar 05, 2004 at 04:31:50PM +0900, Masatake YAMATO wrote:
> This function works, however too slow to follow the point motion
> in real time. How do you think to provide a built-in function which
> show the tooltip at point?
Would it be enough to be able to move an existing tooltip? That shouldn't
be too slow, and seems like a more general primitive.
-Miles
--
`The suburb is an obsolete and contradictory form of human settlement'
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: feature request: tooltip-show-at-point
2004-03-05 7:31 feature request: tooltip-show-at-point Masatake YAMATO
2004-03-08 21:05 ` Miles Bader
@ 2004-03-09 6:24 ` Eli Zaretskii
1 sibling, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2004-03-09 6:24 UTC (permalink / raw)
Cc: emacs-devel
> Date: Fri, 05 Mar 2004 16:31:50 +0900 (JST)
> From: Masatake YAMATO <jet@gyve.org>
>
> (require 'avoid)
> (defun eldoc-tooltip (text)
> (let* ((P (mouse-avoidance-point-position))
> (frame (car P))
> (x (cadr P))
> (y (cddr P))
> (oP (mouse-position))
> (oframe (car oP))
> (ox (cadr oP))
> (oy (cddr oP)))
> (set-mouse-position frame x y)
> (tooltip-show text)
> (set-mouse-position oframe ox oy)))
> (eldoc-tooltip "California, here I am.")
>
> This function works, however too slow to follow the point motion
> in real time. How do you think to provide a built-in function which
> show the tooltip at point?
Isn't the existing machinery on tooltip.el good enough for that? If
not, why not? In particular, it looks like adding your function to
the tooltip-hook list would be the solution (see tooltip-mode), no?
Or am I missing something?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: feature request: tooltip-show-at-point
2004-03-08 21:05 ` Miles Bader
@ 2004-03-10 5:36 ` Masatake YAMATO
2004-03-11 7:00 ` Masatake YAMATO
1 sibling, 0 replies; 5+ messages in thread
From: Masatake YAMATO @ 2004-03-10 5:36 UTC (permalink / raw)
Cc: emacs-devel
> On Fri, Mar 05, 2004 at 04:31:50PM +0900, Masatake YAMATO wrote:
> > This function works, however too slow to follow the point motion
> > in real time. How do you think to provide a built-in function which
> > show the tooltip at point?
>
> Would it be enough to be able to move an existing tooltip? That shouldn't
> be too slow, and seems like a more general primitive.
Is it easy to calculate (x, y) for moving?
> x-show-tip is a built-in function.
> (x-show-tip STRING &optional FRAME PARMS TIMEOUT DX DY)
Here, the unit of DX and DY are pixel, not character.
Is there easy way to get the (x, y) for the point?
I have to calculate it from character widths and heights?
BTW, "Eric M. Ludlam" <eric@siege-engine.com> worte:
1) A function that takes a frame, window, and buffer position and
returns an X/Y location on the screen that would allow
accurate tooltip positioning.
At this time, a means of positioning the mouse pointer over a
particular character is used to then position the tool-tip. That
requires that the mouse move. In addition, things like header lines,
split windows, and toolbars seem to effect the accuracy of that
mechanism.
How about for the point?
Masatake YAMATO
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: feature request: tooltip-show-at-point
2004-03-08 21:05 ` Miles Bader
2004-03-10 5:36 ` Masatake YAMATO
@ 2004-03-11 7:00 ` Masatake YAMATO
1 sibling, 0 replies; 5+ messages in thread
From: Masatake YAMATO @ 2004-03-11 7:00 UTC (permalink / raw)
[resending]
> On Fri, Mar 05, 2004 at 04:31:50PM +0900, Masatake YAMATO wrote:
> > This function works, however too slow to follow the point motion
> > in real time. How do you think to provide a built-in function which
> > show the tooltip at point?
>
> Would it be enough to be able to move an existing tooltip? That shouldn't
> be too slow, and seems like a more general primitive.
Is it easy to calculate (x, y) for moving?
> x-show-tip is a built-in function.
> (x-show-tip STRING &optional FRAME PARMS TIMEOUT DX DY)
Here, the unit of DX and DY are pixel, not character.
Is there easy way to get the (x, y) for the point?
I have to calculate it from character widths and heights?
BTW, "Eric M. Ludlam" <eric@siege-engine.com> worte:
1) A function that takes a frame, window, and buffer position and
returns an X/Y location on the screen that would allow
accurate tooltip positioning.
At this time, a means of positioning the mouse pointer over a
particular character is used to then position the tool-tip. That
requires that the mouse move. In addition, things like header lines,
split windows, and toolbars seem to effect the accuracy of that
mechanism.
How about for the point?
Masatake YAMATO
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-03-11 7:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-05 7:31 feature request: tooltip-show-at-point Masatake YAMATO
2004-03-08 21:05 ` Miles Bader
2004-03-10 5:36 ` Masatake YAMATO
2004-03-11 7:00 ` Masatake YAMATO
2004-03-09 6:24 ` Eli Zaretskii
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).