On Tue, Nov 04, 2003 at 10:36:51AM +0000, Angus Leeming wrote:
> Andre Poenitz wrote:
> 
> Woo! Things move on bloody quickly!
> 
> I find it frankly amazing that the LCursor class shrinks to almost 
> nothing. I even feel I understand how it works which is just 
> gob-smacking!
> 
> 
> Index: cursor.h
> +       /// mainly used as stack, but wee need random access
> Swap wee for we.
> 
> Index: lyxfunc.C
> -                       FuncRequest cmd(view(), LFUN_INSET_EDIT, "left");
> -                       par.inset()->dispatch(cmd);
> +                       par.inset()->edit(view(), true);
> 
> I don't really see why you are introducing a new function here. Why 
> can't this be handled by the dispatch machinery?

edit() is the IL related part of LFUN_INSET_EDIT handling. There are a
few non-IL related parts of LFUN_INSET_EDIT handling that are still in
dispatch(), mostly disguised LFUN_MOUSE_* handlers.

This patch rectifies the situation a bit by moving the mouse stuff to
LFUN_MOUSE and the IL stuff out of dispatch().

edit() will die in the end.

> Index: insets/insetbase.C
> +       /// cursor enters
> +       virtual void edit(BufferView * bv, bool left);
> Shouldn't we really use the concept of  'front' and 'back' here, 

I don't care, this is the old naming we had there since day one.

> rather than 'left' and 'right'? I'm thinking the current notation 
> sits uncomfortably with the RtL stuff.

Maybe. As I said I am not concerned about names. Feel free to apply
'perl -pi -e'-style patches at will.

> 
> also, why not introduce a new 
>         enum EnterInset {FRONT, BACK};
> It will be more readable to have
>         cursor.pos())->edit(bv(), FRONT;
> don't you think?

Grrr.

Windmills.

> 
> Index: insets/insetbibitem.C
> -       case LFUN_INSET_EDIT:
> +       case LFUN_MOUSE_PRESS:
> PRESS or RELEASE? Honestly, I don't know. I do see, however, that the 
> graphics inset acts on MOUSE_RELEASE.

RELEASE is probably better.

> Index: insets/insetcite.C
> -       case LFUN_INSET_EDIT:
> -               InsetCommandMailer("citation", *this).showDialog(cmd.view());
> +
> +       case LFUN_MOUSE_PRESS:
> +               InsetCommandMailer("bibitem", *this).showDialog(cmd.view());
> I don't think I want to open the "bibitem" dialog here ;-)

Maybe ;-}

Andre'

Reply via email to