On Thu, Dec 05, 2002 at 05:49:55PM +0000, Angus Leeming wrote:

> 
> Umm. I've just had a look at what you do about this in the Qt frontend :-(
> 
> It seems that both frontends suffer in the same way. Selections are made by 
> setting a global callback and then hoping we find the right WorkArea. All 
> works today because we have only one WorkArea but it's pretty nasty.
> 
> It appears that this is one thing for which a
>       BufferView * LyXGUI::currentBufferView();
> might really, truly be needed.
> 
> After all, that's effectively what we are doing now. Hence I feel that there 
> is more than a little justification for LFUN_MOUSE_ENTER/LEAVE lfuns, if only 
> to set current_view.
> 
> Please tell me I'm wrong with this analysis.

X selection is application global, hence dealing with it should be
refactored into lyx_gui class :

        lyx_gui::getClipboard(BufferView & bv);

        lyx_gui::putClipboard(string const & str);

What's the problem with doing this ?

xforms may indeed need a work area for handling the get/put, but this
can be any work_area at all, since it's not workarea specific. Such a
requirement should be behind the frontends firewall IMHO.

regards
john
-- 
"Yeah, I woke up in the day accidentally once, the moon was on fire for some
 reason and I couldn't see very well and all the bandwidth disappeared, it was
 very scary :("
        - Orion

Reply via email to