On Wednesday 03 September 2003 9:23 am, Jean-Marc Lasgouttes wrote: > >>>>> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: > >> > >> Sigh. Jean Marc's code. Ask him how it is supposed to work. (He is > >> now around again.) As I said, I never tried to code up > >> LFUN_DIALOG_SHOW_NEXT_INSET. > >> > >> Angus > > Martin> Jean-Marc!?! > > Hello! > Could you summarize the question again? I am a bit lost... > JMarc
Summary follows: Martin would like to rework the way insets handle mouse clicks so that (for example) InsetBibtex's localDispatch function contains code like: 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 displayed. In order to achieve this, he needs to add code for (the currently empty) LFUN_DIALOG_SHOW_NEXT_INSET lfun, which I envisage as analogous to the LFUN_TOGGLE_INSET that you wrote. Ie, LFUN_DIALOG_SHOW_NEXT_INSET would move the cursor to either just in front of a non-editable inset or the first position inside an editable inset and would then call inset->localDispatch(FuncRequest(LFUN_INSET_SHOW_DIALOG)); to launch the dialog. Unfortunately, it appears that the code in toggleInset no longer moves the cursor. Hence the request for your expertise ;-) Angus