Martin Vermeer wrote:

> On Tue, Sep 02, 2003 at 03:39:49PM +0100, Angus Leeming spake thusly:
>  
>> Martin Vermeer wrote:
>  
>> You would invoke a new LFUN_INSET_SHOW_DIALOG. The code above should
>> be:
>> 
>>  switch (cmd.action) {
>> -               case LFUN_INSET_EDIT:
>> -                       InsetCommandMailer("toc",
>> *this).showDialog(cmd.view());
>> +               case LFUN_INSET_SHOW_DIALOG:
>> +               case LFUN_MOUSE_RELEASE:
>> +                       if (buttonBox().contained(cmd.x, cmd.y))
>> +                               InsetCommandMailer("toc",
>>                                                    
*this).showDialog(cmd.view());
>> 
>> Ie, it's up to the inset to decide what to do on receipt of an LFUN.
>> In this particular case, clicking on the button will have the same
>> effect as an outside request that the dialog be opened.
>> 
>> I think that Martin should now add the LFUN.
>  
> OK... the instructions in lfuns.h are clear enough.
> 
> But lyxfunc/getStatus ... looks mysterious to me. Does the
> following look about right:

Sorry to be a pain, but I've just looked at the 1.4.x source. I think that 
the LFUN exists already as LFUN_DIALOG_SHOW_NEXT_INSET. This LFUN is meant 
to move the cursor to either
        just in front of the next non-editable inset.
or 
        to the first position inside an editable inset.
and then open the associated dialog. However, I don't think that I got round 
to writing the code (I was feeling militant ;-)

The code itself is conceptually identical to that written by Jean-Marc to 
open/close the next collapsed inset from the current cursor position.

HTH,

-- 
Angus

Reply via email to