jbakam wrote:
> On Wednesday, February 1, 2017 at 3:04:03 PM UTC+1, Bram Moolenaar wrote:
> > This should be possible in a way similar to what the netbeans interface
> does.
>
> I am not really familiar with the netbeans interface but I can see it is
> socket-based. My client-server is based on message queues though. Are they
> going to be compatible?
I'm not saying you should use the netbeans interface, but use the code
of netbeans, since that's know to work.
> > Triggering the evaluation happens in general_beval_cb(). It calls
> > netbeans_beval_cb(). This can work by setting 'balloonexpr', but have
> > it return an empty string, so that nothing shows up yet. Thus that
> > already works.
>
> Right. This is what I already use to catch the mouse hover event. I thought
> having it supported in a more explicit way (e.g. autocmd event) would be a
> good alternative approach.
>
> > Showing the balloon (tooltip) happens with the "showBalloon" netbeans
> > command, which calls gui_mch_post_balloon().
>
> So, if I understood you well, we can send "showBalloon" to the Vim in
> order to get the tooltip shown?
No, we need to call gui_mch_post_balloon() somehow.
> > We would need a way to make this work with a channel command. Using "call"
> > is > probably the simplest, then we only need to add a function that shows
> > the balloon.
>
> I am not sure if I understand this. Channel command? Is it a Vim API
> function that we could invoke via --remote-send clientserver
> interface? And in that case we wouldn't be using netbeans interface?
This has nothing to do with the client-server interface.
The channel can receive commands, see :help channel-commands.
Thus all we need is to implement a function in evalfunc.c to show the
balloon. This function could also be invoked from a channel callback.
> > Another thing that would be nice: Also make this work in the terminal.
> > Could be implemented like we have the popup menu. Should be as simple
> > as balloon_show(). For completenes we could add balloon_hide().
> > Perhaps you could implement that?
>
> I can't promise anything but I think I could give it a try. I am not
> familiar with the Vim code-base.
It's plain C. The tricky part is to draw a balloon in a terminal, and
undraw it properly. The popup menu comes closes, the code is in
popupmnu.c
--
VOICE OVER: As the horrendous Black Beast lunged forward, escape for Arthur
and his knights seemed hopeless, when, suddenly ... the animator
suffered a fatal heart attack.
ANIMATOR: Aaaaagh!
VOICE OVER: The cartoon peril was no more ... The Quest for Holy Grail could
continue.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.