How to configure single and multiple ribbons?
If a single ribbon configuration is required, the entire ribbon can be configured
in AppConfig.xml. This includes:
Defining the tabs that will be visible in the standard Word interface (i.e., no document
is loaded or the current active document is not a Quark XML Author document).
Defining the Quark XML Author tabs that will be visible when a Quark XML Author document
is the active document.
Defining the controls on Quark XML Author tabs that will be visible when a Quark XML
Author document is the active document.
If multiple ribbon configurations are necessary, ribbon configuration is split between
AppConfig.xml and the DocConfig file. Global UI definitions are placed in the <Ribbon>
node in AppConfig.xml. This includes:
Defining the tabs that will be visible in the standard Word interface (i.e., no document
is loaded or the current active document is not a Quark XML Author document).
Defining the Quark XML Author tabs which appear in all ribbon configurations when
a Quark XML Author document is the active document.
Defining the controls on Quark XML Author tabs which appear in all ribbon configurations
when a Quark XML Author document is the active document.
Each DocConfig file defines a separate ribbon configuration. The <Ribbon> node in
the DocConfig file defines only those tabs and controls that are visible for that
ribbon configuration. This includes:
For example, assume two document classes. Class A may contain tables. Class B cannot.
This necessitates the following configuration structure:
The <Ribbon> node in AppConfig.xml would define the Quark XML Author version of the
Insert tab and specify that it only appears when a Quark XML Author document is the
active document.
The <Ribbon> node in AppConfig.xml would specify that the native Word Insert tab not
appear when a Quark XML Author document is the active document.
The <Ribbon> node in the DocConfig for Class A would contain a button for inserting
tables.
The <Ribbon> node in the DocConfig for Class B would not contain a button for inserting
tables.
In this example, the resource file contains the strings for the XML Author Insert
tab label and the Insert Table button’s label, description, screentip, and keytip.
In addition, the resource file must be populated with the strings for user interface
labels, titles, descriptions, screentips, and keytips.
Specify the various attributes by concatenating the control’s id value with an underscore
followed by the attribute name. Consider the following menu item:
<menu id="XMLAuthor" image="QuarkXMLAuthor.ico" insertBeforeMso="FileNew" itemSize="large" visible="true">
To specify label and title values, add the following entries to the resource file:
- XMLAuthor_label = “New XML”
- XMLAuthor_title = “New Business Document”
This resource file is created and compiled the same as other resource files.