Administration > Customizing Startup > Creating Custom Window Class Preferences Files
  
Creating Custom Window Class Preferences Files
If you use different document types, you can configure Arbortext Editor to save different window configuration preferences for each document type in the document type configuration file (.dcf). Window configuration information saved in the window class preferences file includes toolbar and window geometry. In addition, the following window configuration preferences can be saved for individual document types:
docmappercent
docmapshowattrs
docmapside
docmaptextdisplay
docmapwrapwidth
gentext
highlightinvalidmarkup
showattrs
showemptyelement
spellinteractive
tabletagdisplay
tabletoolbarautohide
tagdisplay
viewmode
When you edit a document with an associated window class, the window configuration preferences are saved in a separate section of the preferences file (.wcf). If desired, you can create a default window preferences file for a window class and store it in the Arbortext-path\custom\lib directory. Follow these steps to create a new window class and associated preferences file:
1. Determine a unique window class name.
2. Edit the document type's .dcf file to set the windowClass attribute on the Options element to that window class name.
Refer to Specifying a window class for more information on editing the .dcf file.
3. Create a new file called windowClassName.wcf in the Arbortext-path\custom\lib directory.
The Arbortext Editor installation contains the following custom window class preferences files in the Arbortext-path\lib directory:
docmapConfig.wcf
columnConfig.wcf
It is recommended that you copy one of those files as the basis for your custom window class preferences file. Be sure to rename the copied file to the name of your window class.
4. Edit the new .wcf file to set the desired window configuration preferences.
Use an Option element for each preference with the name attribute set to the name of the preference and the value attribute set to the preference's value.
Following is an example of a custom window class preferences file:
<?xml version="1.0" encoding="UTF-8"?>
<!--Arbortext, Inc., 1988-2006, v.4002-->
<!DOCTYPE WindowConfigurations PUBLIC "-//Arbortext//DTD WCF XML 2.0//EN"
"wcf.dtd">
<WindowConfigurations>
<!--
The primary editing environment for this class of document types
is a document map window. This works best since most data is tags
and attributes; it's important that attributes are shown.
-->
<WindowConfiguration name="docmapConfig">
<Preferences>
<Option name="viewmode" value="docmap"/>
<Option name="docmappercent" value="100"/>
<Option name="docmapshowattrs" value="on"/>
<!--
Some elements or comments do have possibly lengthy PCDATA content
so text must be able to wrap; use width of 6in so can see a lot
on one line.
-->
<Option name="docmaptextdisplay" value="wrap"/>
<Option name="docmapwrapwidth" value="6in"/>
<!--
Set options in case the user switches to edit view.
-->
<Option name="showattrs" value="on"/>
<Option name="spellinteractive" value="off"/>
<Option name="tagdisplay" value="full"/></Preferences>
</WindowConfiguration>
</WindowConfigurations>