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