1<?xml version="1.0" encoding="UTF-8"?>
2<!--***********************************************************
3 *
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements.  See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership.  The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License.  You may obtain a copy of the License at
11 *
12 *   http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied.  See the License for the
18 * specific language governing permissions and limitations
19 * under the License.
20 *
21 ***********************************************************-->
22
23
24<!DOCTYPE oor:component-schema SYSTEM "../../../../component-schema.dtd">
25<oor:component-schema xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" oor:name="OptionsDialog" oor:package="org.openoffice.Office" xml:lang="en-US">
26  <info>
27    <author>PB</author>
28    <desc >Contains general structures used to hide a single option or an option
29      tabpage or a whole option group.</desc>
30  </info>
31  <templates>
32    <group oor:name="SingleOption">
33      <info>
34	<desc>Describes one single option.</desc>
35      </info>
36      <prop oor:name="Hide" oor:type="xs:boolean">
37	<info>
38	  <desc>Should this option be hidden?.</desc>
39	</info>
40      </prop>
41    </group>
42    <group oor:name="OptionsPage">
43      <info>
44	<desc>Describes one options tabpage.</desc>
45      </info>
46      <prop oor:name="Hide" oor:type="xs:boolean">
47	<info>
48	  <desc>Should this page be hidden?</desc>
49	</info>
50      </prop>
51      <set oor:name="Options" oor:node-type="SingleOption">
52	<info>
53	  <desc>An optional set to allow to hide single options of this page.</desc>
54	</info>
55      </set>
56    </group>
57    <group oor:name="OptionsGroup">
58      <info>
59	<desc>Describes a group of options tabpages.</desc>
60      </info>
61      <prop oor:name="Hide" oor:type="xs:boolean">
62	<info>
63	  <desc>Should this whole group of options tabpages be hidden?</desc>
64	</info>
65      </prop>
66      <set oor:name="Pages" oor:node-type="OptionsPage">
67	<info>
68	  <desc>An optional set to allow to hide single options tabpages of this
69	    group.</desc>
70	</info>
71      </set>
72    </group>
73
74    <group oor:name="Module">
75      <info>
76	<desc>Defines a Module. The options dialog displays entries in its tree
77	  view only if they are defined to belong to the Module for which the
78	  options dialog is being displayed. The exception is the options dialog
79	  which is invoked from the Extension Manager, where the Module is
80	  irrelevant.</desc>
81      </info>
82      <set oor:name="Nodes" oor:node-type="OrderedNode">
83	<info>
84	  <desc>A set member contains a Node (see type Node) which has been
85	    assigned to this Module. Also entities which do not own the Module
86	    may add members to the set. Please look at the specification for
87	    applying restrictions
88	    (http://specs.openoffice.org/appwide/packagemanager/options_dialog_for_extensions.odt)
89	    The actual Node|s are kept in a separate set (OptionsDialog/Nodes),
90	    to prevent redundancy, because a Node can be assigned to several
91	    Module|s. The position of a node (the tree view element) within the
92	    tree view of the options dialog is determined by the property Index
93	    of each set member. The position can be different dependent on the
94	    Module. Therefore the order is determined per Module. Only the owner
95	    of the Module should set the position (property Index).
96	    The order is undefined if two or more members have the same value for
97	    the Index property.
98	    See also the description for OrderedNode.
99	  </desc>
100	</info>
101      </set>
102    </group>
103
104    <group oor:name="Node">
105      <info>
106	<desc>Defines a node (the tree view element) which can be displayed in
107	  the tree view of the options dialog.</desc>
108      </info>
109      <prop oor:name="Label" oor:type="xs:string" oor:localized="true"
110	    oor:nillable="false">
111	<info>
112	  <desc>The localized name which is displayed next to the node in the
113	    options dialog. If two different nodes (the tree view element) happen
114	    to have the same localized name then both are displayed.</desc>
115	</info>
116      </prop>
117      <prop oor:name="OptionsPage" oor:type="xs:string">
118	<info>
119	  <desc>URL which references the dialog editor resource. This options
120	  page should only contain information for the user and should not
121	  accept input.</desc>
122	</info>
123      </prop>
124      <prop oor:name="AllModules" oor:type="xs:boolean">
125	<info>
126	  <desc>If true then this Node shall be displayed independent of the
127	    Module for which the options dialog is displayed -  that is, always.
128	    In this case it must not be assigned directly to one ore more
129	    Module|s. That is, it must not exist as member in Module/Nodes of no
130	    existing Module.
131	    This is an optimization so that an extension need not provide
132	    entries for all Module|s.
133	    The default value is false.
134	  </desc>
135	</info>
136	<value>false</value>
137      </prop>
138      <prop oor:name="GroupId" oor:type="xs:string">
139	<info>
140	  <desc>Identifies a group of Node|s. All nodes (the tree view elements)
141	    which refer to the same group are displayed next to each other. If
142	    this property is set then GroupIndex must also have a value. The
143	    group will be used by Node|s which have been added to existing
144	    Module|s. If one defines a Module AND Node|s which are used in this
145	    Module, then GroupId must not be set. In this case one uses
146	    Module/Nodes/Index to determine the position of the nodes (the tree
147	    view element).
148	    The empty string is no valid identifier and represents nil.
149	    See also GroupIndex.
150	  </desc>
151	</info>
152	<value></value>
153      </prop>
154      <prop oor:name="GroupIndex" oor:type="xs:int">
155	<info>
156	  <desc>The index of the Node within the group. The index starts with
157	    null. If this property is set then property GroupId must also have
158	    a value. If a Node of this group is displayed depends on the
159	    respective Module to which it is assigned. For example, if there are
160	    the Nodes A(index 0), B (index 1), and C (index 2) in a group,
161	    and B is assigned to a different Module, then only A and
162	    B are displayed together although there indices are 0 and 2 (B has 1).
163	    The value -1 is regarded as nil.
164	    Actually one could have allowed to define a group per Module, so that
165	    the order could be different depending on the Module. But this would
166	    have added more complexity to the data structures.
167	  </desc>
168	</info>
169	<value>-1</value>
170      </prop>
171      <set oor:name="Leaves" oor:node-type="Leaf">
172	<info>
173	  <desc>Leaves which are assigned to this node. Extensions can add to this
174	    set new Leaf|s.</desc>
175	</info>
176      </set>
177    </group>
178
179    <group oor:name="Leaf">
180      <info>
181	<desc>Defines a leaf (the tree view element). A Leaf must be assigned to
182	  exactly one Node. </desc>
183      </info>
184      <prop oor:name="Id" oor:type="xs:string">
185	<info>
186	  <desc>The unique identifier of the Leaf. This must be the extension
187	    identifier if this Leaf was defined by an extension.</desc>
188	</info>
189      </prop>
190      <prop oor:name="Label" oor:type="xs:string" oor:localized="true"
191	    oor:nillable="false">
192	<info>
193	  <desc>The localized name that is displayed for the leaf in the options
194	    dialog.</desc>
195	</info>
196      </prop>
197      <prop oor:name="OptionsPage" oor:type="xs:string" oor:nillable="false">
198	<info>
199	  <desc>A URL which references the window resource.</desc>
200	</info>
201      </prop>
202      <prop oor:name="EventHandlerService" oor:type="xs:string" oor:nillable="false">
203	<info>
204	  <desc>Name of the event handler service which is used as argument in
205	    com.sun.star.awt.XContainerWindowProvider.createContainerWindow. This
206	    handler does not even process events from the options page but also
207	    provides for saving and reading the respective values.</desc>
208	</info>
209      </prop>
210      <prop oor:name="GroupId" oor:type="xs:string">
211	<info>
212	  <desc>Identifies a group of Leaf|s. All Leaf|s which have the same
213	    GroupId form a group and the corresponding entries in the tree view
214	    are displayed next to each other.
215	    If this property is set then the property GroupIndex must
216	    also be set.
217	    The GroupIndex represents the position within the group. If one
218	    owns the Node (e.g. defined it oneself) then one can set the GroupId
219	    to the name of the Node to which this Leaf is assigned. The Leaf|s of
220	    this particular group are displayed first under the node (the tree
221	    view element) before any other groups.
222	    If one does not own the Node then one should not use the Node name as
223	    group id.
224	    The empty string is regarded as nil.
225	  </desc>
226	</info>
227	<value></value>
228      </prop>
229      <prop oor:name="GroupIndex" oor:type="xs:int">
230	<info>
231	  <desc>The index of the Leaf within the group. The index starts with
232	    null. If this property is set then GroupId must also have
233	    a value. If there are two Leaf|s with the same index in the same
234	    group then then their order is undefined.
235	    The value -1 is regarded as nil.</desc>
236	</info>
237	<value>-1</value>
238      </prop>
239    </group>
240
241    <group oor:name="OrderedNode">
242      <info>
243	<desc>Represents a reference to a Node and an optional index.
244	  Instances of this type are used in a set (see Module). The name of the
245	  set member must be the same as the one of the respective Node. The
246	  index determines the position of the node (the tree view element) in
247	  the options dialog for a particular Module.</desc>
248      </info>
249      <prop oor:name="Index" oor:type="xs:int">
250	<info>
251	  <desc>Determines the position of the node in the options dialog.
252	    The index starts with null. That is, the corresponding node
253	    appears at the first position in the tree view of the options dialog.
254	    If the value is -1 then the index is undefined. If one adds
255	    Node|s to a Module which one does not define oneself (e.g. the Module
256	    is owned by someone else), then one must not set the Index. This
257	    applies, for example, to extensions which add their Node|s to existing
258	    Module|s.
259	    The value -1 is regarded as nil.
260	  </desc>
261	</info>
262	<value>-1</value>
263      </prop>
264    </group>
265  </templates>
266
267  <component>
268    <set oor:name="OptionsDialogGroups" oor:node-type="OptionsGroup">
269      <info>
270	<desc>Contains the set of single options, options tabpages and options
271	  groups which should be hidden.</desc>
272	<label>Hidden options</label>
273      </info>
274    </set>
275
276    <set oor:name="Modules" oor:node-type="Module">
277      <info>
278	<desc>List of available application contexts</desc>
279      </info>
280    </set>
281    <set oor:name="Nodes" oor:node-type="Node">
282      <info>
283	<desc>List of available nodes.</desc>
284      </info>
285    </set>
286
287  </component>
288</oor:component-schema>
289