Yves Forkl wrote:
> I have two questions regarding menus in XXE:
>
> 1) Which is the best way to change the mnemonic of the DocBook menu?
>
> Its mnemonic as defined in <INSTALLDIR>/addon/config/docbook/common.incl
> is D, which collides with the mnemonic for the file menu ("Datei") in
> the German GUI version. To change this, do I have to repeat the whole
> "menu" element in my configuration (which references the Docbook config
> by means of an "include"), or is there an easier, more elegeant way
> allowing to just redefine the menu's mnemonic?
The mnemonic processing in the <menu> configuration elements is wrong
and needs to be redesigned.
For now, you can only do this:
---
<menu label="DocBook" mnemonic="k">
<insert />
<separator />
<!-- ADD SOMETHING HERE -->
</menu>
</menu>
---
That is, redefine the DocBook menu (and its mnemonic) by augmenting it.
> 2) How to add a user-defined menu without chasing another added menu?
>
> I have defined a Character menu that I want to add to XXE's menu bar.
> From the documentation page on the "menu" command
> (<INSTALLDIR>/doc/configure/ch06s14.html) it is not clear to me what I
> have to do in order to include it - without chasing the DocBook menu,
> which is what currently happens. The config file I use is attached.
> How to specify the place where my menu will be inserted?
If it is not documented, that means that you cannot do it.
You'll have to wait for XXE ***V3*** in order to be able to do this.
However this will be a somewhat advanced customization:
[1] Define the "Characters" menu as below; plus give it a generic name
such as "configSpecificMenu2".
[2] Create a file (anywhere in ZZZ/addon/) called custom.xxe_gui
containing what follows:
---
<menuItems name="configSpecificMenuItems2">
<class>com.xmlmind.xmleditapp.kit.part.ConfigSpecificMenuItems</class>
<property name="specificationName">configSpecificMenu2</property>
</menuItems>
<menu name="configSpecificMenu2" label="Extras">
<menuItems name="configSpecificMenuItems2" />
</menu>
<menuBar name="menuBar">
<insert />
<menu name="configSpecificMenu2" />
</menuBar>
---
Notes:
[1] Your Characters menu, being completely generic, could be directly
defined in custom.xxe_gui. Doing this will be simple and quick in V3
(much much simpler than adding a second *config specific* menu as
described above)
[2] For now, for the kind of menu you want, a much simpler approach
would be to add a button containing a menu to the DocBook toolbar. See
http://www.xmlmind.com/xmleditor/_distrib/doc/configure/ch04s02s03.html
>
> ------------------------------------------------------------------------
>
> <?xml version='1.0' encoding='ISO-8859-1'?>
> <configuration name="myDocBook"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns="http://www.xmlmind.com/xmleditor/schema/configuration"
> xmlns:cfg="http://www.xmlmind.com/xmleditor/schema/configuration">
>
> <!-- **************************************************** -->
> <!-- *** "myDocBook" config:
> standard DocBook config with my extensions *** -->
> <!-- **************************************************** -->
>
> <!-- the DTD to which this configuration is assigned -->
> <detect>
>
> <dtdSystemId>http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd</dtdSystemId>
> </detect>
>
> <!-- ************************************************** -->
> <!-- include standard XXE DocBook configuration -->
>
> <include location="xxe-config:docbook/docbook.xxe" />
>
> <!-- ************************************************** -->
> <!-- include my config module for character entry -->
>
> <!-- label of menu to add -->
> <menu label="Characters" mnemonic="C">
>
> <menu label="Arrows" mnemonic="A">
> <item label="← ( larr )" mnemonic="l" command="insertString"
> parameter="←" />
> <item label="↑ ( uarr )" mnemonic="u" command="insertString"
> parameter="↑" />
> <item label="→ ( rarr )" mnemonic="r" command="insertString"
> parameter="→" />
> <item label="↓ ( darr )" mnemonic="d" command="insertString"
> parameter="↓" />
> <item label="↔ ( harr )" mnemonic="h" command="insertString"
> parameter="↔" />
> <separator />
> <item label="↵ ( crarr )" mnemonic="c" command="insertString"
> parameter="↵" />
> <separator />
> <item label="⇐ ( lArr, '1' )" mnemonic="1"
> command="insertString" parameter="⇐" />
> <item label="⇑ ( uArr, '2' )" mnemonic="2"
> command="insertString" parameter="⇑" />
> <item label="⇒ ( rArr, '3' )" mnemonic="3"
> command="insertString" parameter="⇒" />
> <item label="⇓ ( dArr, '4' )" mnemonic="4"
> command="insertString" parameter="⇓" />
> <item label="⇔ ( hArr, '5' )" mnemonic="5"
> command="insertString" parameter="⇔" />
> </menu>
> </menu>
>
> </configuration>