Op 30-10-2011 8:53, PhilipPirrip schreef:
On 10/30/2011 08:32 AM, Vincent van Ravesteijn wrote:
We are trying to generalise the Insets a bit, so that we don't need a
special class of Insets for all latex commands there are out there. So,
like Abdel said, if this can be done via an InsetFlex it would be
preferable. But if you want a nice dialog to be able to select the
language, or you want to customise a lot of other properties of the
Inset, you will find that not all of that is supported yet.
A way to go would be allowing Flex insets to call some of the dialogs,
I can imagine a few examples:
- I made an autoref flex inset, say in a module, but I still need to
manually add the reference label as its contents. If I were allowed to
call the dialog for choosing cross-references from the inset
properties I'd profit a lot.
- I want to change the language of a flex inset. If I were allowed to
do that by calling a dialog (some advanced, that Abdel just proposed),
I would not have to hard-code the new inset.
- similar flexibility with text styles, bibliographic references, etc.
This makes me to think to introduce a "property editor" that a lot of
applications have. If you put the cursor in your Foreign Language Inset
in a Branch, the property editor will look like this:
[Branch]
Name: <my-branch-name> [..]
[Foreign Language Inset]
Language: <language> [..]
- you have a clear overview of all settings influencing the cursor location
- you may have a drop-down list showing all languages, or when you press
the 'Browse [..]' button this will take you to the Language selection
dialog.
- pressing the branch browse button will take you to the branch dialog
How hard would it be for the .layout infrastructure to support this?
You will need to have InsetLayout process LFUN_INSET_SETTINGS and call
the dialog. I'm not sure what problems you will encounter though.
Besides, I think this might be too limited. It might not be that often
the case that you have a new Inset that calls an already existing dialog.
Vincent