Warning, /frameworks/kxmlgui/src/kxmlgui.xsd is written in an unsupported language. File is not indexed.
0001 <?xml version="1.0" encoding="UTF-8" ?> 0002 <!-- kxmlgui XSD v1.0 --> 0003 <xsd:schema 0004 xmlns:xsd="http://www.w3.org/2001/XMLSchema" 0005 xmlns="https://www.kde.org/standards/kxmlgui/1.0" 0006 targetNamespace="https://www.kde.org/standards/kxmlgui/1.0" 0007 version="1.0" 0008 elementFormDefault="qualified" > 0009 0010 <xsd:annotation> 0011 <xsd:documentation> 0012 * Originally Copyright (c) 2000 Federico David Sacerdoti >tech@slinuxmachines.com< 0013 * Modifications/Extensions Simon Hausmann >hausmann@kde.org< 0014 * Minor updates Richard J. Moore >rich@kde.org< 0015 * Conversion to XSD (c) 2004 Frans Englich <frans.englich@telia.com> 0016 0017 Permission to use, copy, modify and distribute this XSD 0018 and its accompanying documentation for any purpose and without fee 0019 is hereby granted in perpetuity, provided that the above copyright 0020 notice and this paragraph appear in all copies. The copyright 0021 holders make no representation about the suitability of the XSD for 0022 any purpose. It is provided "as is" without expressed or implied 0023 warranty. 0024 0025 </xsd:documentation> 0026 </xsd:annotation> 0027 <xsd:annotation> 0028 <xsd:documentation> 0029 0030 This is the XML Schema for KDE's XMLGUI framework, a way of describing a 0031 application's Graphical User Interface in an XML file. 0032 0033 A document of this Schema should have a declaration 0034 looking like this: 0035 0036 <![CDATA[ 0037 0038 <?xml version="1.0" encoding="UTF-8" ?> 0039 <gui name="" 0040 version="" 0041 xmlns="https://www.kde.org/standards/kxmlgui/1.0" 0042 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 0043 xsi:schemaLocation="https://www.kde.org/standards/kxmlgui/1.0 0044 https://www.kde.org/standards/kxmlgui/1.0/kxmlgui.xsd" > 0045 <!-- the content --> 0046 </gui> 0047 0048 ]]> 0049 0050 Where the name and version tag is of your taste. 0051 0052 </xsd:documentation> 0053 </xsd:annotation> 0054 0055 <xsd:simpleType name="identifier"> 0056 <xsd:annotation> 0057 <xsd:documentation> 0058 0059 The name used for every name and group attribute. Maps to QObject::name() in most cases. 0060 </xsd:documentation> 0061 </xsd:annotation> 0062 <xsd:restriction base="xsd:Name"> 0063 <!-- TODO Restrict harder, perhaps? --> 0064 </xsd:restriction> 0065 </xsd:simpleType> 0066 0067 <xsd:element name="Separator"> 0068 <xsd:annotation> 0069 <xsd:documentation> 0070 0071 Inserts a separator item into a menubar or toolbar. 0072 0073 </xsd:documentation> 0074 </xsd:annotation> 0075 <xsd:complexType> 0076 <xsd:attribute name="lineSeparator" default="true" type="xsd:boolean"/> 0077 <xsd:attribute name="weakSeparator" default="true" type="xsd:boolean"/> 0078 <xsd:attribute name="append" type="identifier"/> 0079 <xsd:attribute name="group" type="identifier"/> 0080 </xsd:complexType> 0081 </xsd:element> 0082 0083 <xsd:element name="Spacer"> 0084 <xsd:annotation> 0085 <xsd:documentation> 0086 0087 Inserts a spacer item into a toolbar. 0088 0089 </xsd:documentation> 0090 </xsd:annotation> 0091 <xsd:complexType> 0092 <xsd:attribute name="append" type="identifier"/> 0093 <xsd:attribute name="group" type="identifier"/> 0094 </xsd:complexType> 0095 </xsd:element> 0096 0097 <xsd:element name="Merge"> 0098 <xsd:complexType> 0099 <xsd:attribute name="name" type="identifier" use="optional" /> 0100 </xsd:complexType> 0101 <!-- Merge, MergeLocal and other more exotic elements are everywhere. Cannot more than one(etc.) occur in the various places, such as Menu? Needs fixing then - better restriction on how many of those elements that can appear where. --> 0102 </xsd:element> 0103 0104 <xsd:element name="MergeLocal"> 0105 <xsd:annotation> 0106 <xsd:documentation> 0107 0108 Specifies an entry index for merging application defined actions into 0109 those with positions fixed by the style guide and ui_standards.rc. This 0110 tag should not be used anywhere except ui_standards.rc. 0111 0112 </xsd:documentation> 0113 </xsd:annotation> 0114 <xsd:complexType> 0115 <xsd:attribute name="name" type="identifier" use="optional" /> 0116 </xsd:complexType> 0117 </xsd:element> 0118 0119 <xsd:element name="DefineGroup"> 0120 <xsd:annotation> 0121 <xsd:documentation> 0122 0123 Specifies a entry index for merging, similar to the Merge tag, but with a 0124 global scope and accessible via the group attribute of other tags. 0125 0126 </xsd:documentation> 0127 </xsd:annotation> 0128 <xsd:complexType> 0129 <xsd:attribute name="name" type="identifier" /> 0130 </xsd:complexType> 0131 <!-- TODO: Needs to be checked if it is allowed proper amounts of times, in those places it's used. --> 0132 </xsd:element> 0133 0134 <xsd:complexType name="caption"> 0135 <xsd:simpleContent> 0136 <xsd:annotation> 0137 <xsd:documentation> 0138 0139 The user visible string shown as titles. 0140 0141 </xsd:documentation> 0142 </xsd:annotation> 0143 <xsd:extension base="xsd:string"> 0144 <xsd:attribute name="translationDomain" type="identifier" use="optional" /> 0145 <xsd:attribute name="context" type="xsd:string" use="optional" /> 0146 </xsd:extension> 0147 </xsd:simpleContent> 0148 0149 0150 </xsd:complexType> 0151 0152 <xsd:element name="Action" > 0153 <xsd:complexType > 0154 <xsd:annotation> 0155 <xsd:documentation> 0156 0157 Defines both Standard and app-specific actions. An action can appear 0158 in a menu, a toolbar or in a menubar. 0159 Attributes: 0160 - name of the action: this is matched with the KAction name. 0161 - group: this is used to control the placement of the action when 0162 merging e.g. a part, it matches the name of a DefineGroup in the 0163 mainwindow's rc file. 0164 - append: this is used to control the placement of the action during 0165 the merging with ui_standards.rc. This is mapped to MergeLocal tags 0166 there. Note that this feature is currently only available for the 0167 mainwindow, not for parts/plugins. 0168 - text, whatsThis, toolTip, iconText, shortcut, icon, priority: all those are 0169 mapped to KAction properties. 0170 0171 0172 </xsd:documentation> 0173 </xsd:annotation> 0174 0175 <xsd:attribute name="name" type="identifier"/> 0176 <xsd:attribute name="group" type="identifier" use="optional" /> 0177 <xsd:attribute name="append" type="identifier" use="optional" /> 0178 <xsd:attribute name="text" type="xsd:string" use="optional"/> 0179 <xsd:attribute name="whatsThis" type="xsd:string" use="optional"/> 0180 <xsd:attribute name="toolTip" type="xsd:string" use="optional"/> 0181 <xsd:attribute name="iconText" type="xsd:string" use="optional"/> 0182 <xsd:attribute name="shortcut" type="xsd:string" use="optional"> 0183 <!-- TODO: Restrict the possible values with enumeration, or regexp --> 0184 </xsd:attribute> 0185 <xsd:attribute name="icon" type="xsd:string" use="optional" /> 0186 <xsd:attribute name="priority" use="optional"> 0187 <xsd:simpleType> 0188 <xsd:restriction base="xsd:nonNegativeInteger"> 0189 <xsd:enumeration value="0" /> 0190 <xsd:enumeration value="128" /> 0191 <xsd:enumeration value="256" /> 0192 </xsd:restriction> 0193 </xsd:simpleType> 0194 </xsd:attribute> 0195 </xsd:complexType> 0196 </xsd:element> 0197 0198 <xsd:element name="ActionList"> 0199 <xsd:annotation> 0200 <xsd:documentation> 0201 0202 Specifies a dynamic list of actions, each of which can be changed by 0203 plugging/unplugging it 0204 0205 </xsd:documentation> 0206 </xsd:annotation> 0207 <xsd:complexType> 0208 <xsd:attribute name="name" type="identifier"/> 0209 </xsd:complexType> 0210 </xsd:element> 0211 0212 <xsd:complexType name="state"> 0213 <xsd:sequence> 0214 <xsd:element maxOccurs="unbounded" ref="Action"/> 0215 </xsd:sequence> 0216 <xsd:attribute name="name" type="identifier" /> 0217 </xsd:complexType> 0218 0219 <xsd:element name="Menu"> 0220 <xsd:complexType> 0221 <xsd:annotation> 0222 <xsd:documentation> 0223 0224 A Menu such as the "File" or "Edit" menu. Can be used to define popup 0225 menus as well. 0226 0227 </xsd:documentation> 0228 </xsd:annotation> 0229 <xsd:choice maxOccurs="unbounded" > 0230 <!-- TODO: What's the difference between text and title? Which one(s) are required? The whole Menu is a mess. Fix maxOccurs, minOccurs for all of them. --> 0231 <xsd:element minOccurs="0" name="text" type="caption" /> 0232 <xsd:element minOccurs="0" name="title" type="caption" /> 0233 0234 <xsd:element ref="Action" maxOccurs="unbounded" /> 0235 <xsd:element ref="ActionList" maxOccurs="unbounded" /> 0236 0237 <xsd:element minOccurs="0" maxOccurs="unbounded" name="TearOffHandle"> 0238 <xsd:complexType> 0239 <xsd:attribute name="group" type="identifier"/> 0240 </xsd:complexType> 0241 </xsd:element> 0242 0243 <xsd:element minOccurs="0" maxOccurs="unbounded" name="DefineGroup"> 0244 <xsd:complexType> 0245 <xsd:attribute name="name" type="identifier"/> 0246 </xsd:complexType> 0247 </xsd:element> 0248 <xsd:element minOccurs="0" maxOccurs="unbounded" name="MergeLocal"> 0249 <xsd:complexType> 0250 <xsd:attribute name="name" type="identifier" use="optional" /> 0251 </xsd:complexType> 0252 </xsd:element> 0253 <xsd:element minOccurs="0" maxOccurs="unbounded" ref="Separator" /> 0254 <xsd:element minOccurs="0" maxOccurs="unbounded" ref="Menu" /> 0255 <xsd:element minOccurs="0" maxOccurs="unbounded" name="Merge" /> 0256 0257 </xsd:choice> 0258 <xsd:attribute name="name" type="identifier"/> 0259 <xsd:attribute name="append" type="identifier" use="optional" /> 0260 <xsd:attribute name="group" type="identifier" use="optional" /> 0261 <xsd:attribute name="icon" type="xsd:string" use="optional" /> 0262 <!-- noMerge: if true, the standard menu layout from ui_standards.rc won't be used. --> 0263 <xsd:attribute name="noMerge" type="xsd:boolean" use="optional" /> 0264 <!-- deleted: if true, the menu will not be created, even if ui_standards.rc mentions it --> 0265 <xsd:attribute name="deleted" type="xsd:boolean" use="optional" /> 0266 </xsd:complexType> 0267 </xsd:element> 0268 0269 0270 <xsd:element name="gui"> 0271 <xsd:annotation> 0272 <xsd:documentation> 0273 0274 The root element that must enclose all other tags in the document. This 0275 element replaces the kpartgui element used previously. 0276 Note: do not forget to increase the version attribute for each change in 0277 your file, otherwise the changes will not be taken into account. 0278 0279 0280 </xsd:documentation> 0281 </xsd:annotation> 0282 0283 <xsd:complexType> 0284 <xsd:sequence> 0285 0286 <!-- Menu is allowed in gui, for popup menus. TODO: Probably different complexTypes be used for popup menus and regular menus, if it's possible to separate the two. Perhaps a popupMenu element in gui could be allowed, which is no where else. --> 0287 <xsd:element ref="Menu" maxOccurs="unbounded" minOccurs="0"/> 0288 <xsd:element name="MenuBar"> 0289 <xsd:complexType> 0290 0291 <xsd:sequence> 0292 <xsd:element ref="Menu" minOccurs="0" maxOccurs="unbounded"/> 0293 <xsd:element ref="Separator" minOccurs="0" maxOccurs="1" /> 0294 <xsd:element ref="Action" minOccurs="0" maxOccurs="unbounded" /> 0295 <xsd:element ref="ActionList" minOccurs="0" maxOccurs="unbounded" /> 0296 <xsd:element ref="Merge" minOccurs="0" maxOccurs="unbounded"/> 0297 <xsd:element ref="MergeLocal" minOccurs="0" maxOccurs="unbounded"/> 0298 <xsd:element ref="DefineGroup" minOccurs="0" maxOccurs="unbounded"/> 0299 <!-- TODO: 0300 - Why is ActionList and Action in MenuBar? 0301 - Check that min/maxOccurs is correct 0302 --> 0303 </xsd:sequence> 0304 0305 <xsd:attribute name="name" type="identifier" use="optional" /> 0306 <xsd:attribute name="group" type="identifier" use="optional" /> 0307 </xsd:complexType> 0308 </xsd:element> 0309 0310 0311 <xsd:element name="ToolBar" minOccurs="0" maxOccurs="unbounded" > 0312 <xsd:annotation> 0313 <xsd:documentation> 0314 0315 A tool bar. Attributes: 0316 0317 - name: a unique name for the toolbar, use mainToolBar for 0318 the main one 0319 0320 - position: the position of the toolbar in the window 0321 - iconText: whether to show icon or text or both 0322 - iconSize: the size of the icons (0 for default, or usually 0323 22 or 32) 0324 0325 - index: the index in the toolbar dock (see 0326 QMainWindow::moveToolBar) 0327 0328 - offset: the X offset in the toolbar dock (see 0329 QMainWindow::moveToolBar) 0330 0331 TODO: Those APIs are obsolete, are the attribute too? 0332 0333 - newline: if true, this toolbar will start a new line (i.e. 0334 under the ones before it). 0335 0336 - group: optional group name, for named merging (?) 0337 0338 - hidden: if true, the toolbar is initially hidden. There 0339 should be a menu entry for showing it. 0340 0341 - noEdit: if true, the toolbar won't appear in the toolbar 0342 editor 0343 0344 </xsd:documentation> 0345 </xsd:annotation> 0346 <xsd:complexType> 0347 <xsd:choice maxOccurs="unbounded" > 0348 <xsd:element name="text" type="caption" /> 0349 <xsd:element ref="Action" minOccurs="0" maxOccurs="unbounded" /> 0350 <!-- Should 0 ActionS really be allowed? konqueror.rc does it.. --> 0351 <xsd:element ref="Separator" minOccurs="0" maxOccurs="unbounded" /> 0352 <xsd:element ref="Spacer" minOccurs="0" maxOccurs="unbounded" /> 0353 <xsd:element ref="ActionList" minOccurs="0" maxOccurs="unbounded" /> 0354 <xsd:element ref="Merge" minOccurs="0" /> 0355 <xsd:element ref="MergeLocal" minOccurs="0" /> 0356 <xsd:element ref="DefineGroup" minOccurs="0" /> 0357 </xsd:choice> 0358 0359 <xsd:attribute name="name" type="identifier" /> 0360 <xsd:attribute name="position" use="optional" > 0361 <xsd:simpleType> 0362 <xsd:restriction base="xsd:string"> 0363 <xsd:enumeration value="top" /> 0364 <xsd:enumeration value="bottom" /> 0365 <xsd:enumeration value="left" /> 0366 <xsd:enumeration value="right" /> 0367 </xsd:restriction> 0368 </xsd:simpleType> 0369 </xsd:attribute> 0370 <xsd:attribute name="iconText" use="optional" > 0371 <xsd:simpleType> 0372 <xsd:restriction base="xsd:string"> 0373 <xsd:enumeration value="icontextright" /> 0374 <xsd:enumeration value="icontextbottom" /> 0375 <xsd:enumeration value="textonly" /> 0376 <xsd:enumeration value="icononly" /> 0377 </xsd:restriction> 0378 </xsd:simpleType> 0379 </xsd:attribute> 0380 <xsd:attribute name="iconSize" use="optional" > 0381 <xsd:simpleType> 0382 <xsd:restriction base="xsd:nonNegativeInteger"> 0383 <!-- TODO: This restriction is correct, right? --> 0384 <xsd:enumeration value="0" /><!-- Implies default --> 0385 <xsd:enumeration value="16" /> 0386 <xsd:enumeration value="22" /> 0387 <xsd:enumeration value="32" /> 0388 <xsd:enumeration value="48" /> 0389 <xsd:enumeration value="64" /> 0390 <xsd:enumeration value="128" /> 0391 </xsd:restriction> 0392 </xsd:simpleType> 0393 </xsd:attribute> 0394 0395 <!-- TODO: Since these are positiveInteger, and not nonNegativeInteger, they can't be 0 --> 0396 <xsd:attribute name="index" use="optional" type="xsd:positiveInteger"/> 0397 <xsd:attribute name="offset" use="optional" type="xsd:positiveInteger"/> 0398 <xsd:attribute name="newline" use="optional" default="false" type="xsd:boolean" /> 0399 <xsd:attribute name="hidden" use="optional" default="false" type="xsd:boolean"/> 0400 <xsd:attribute name="noEdit" use="optional" default="false" type="xsd:boolean"/> 0401 <!-- noMerge: if true, the standard toolbar layout from ui_standards.rc won't be used. --> 0402 <xsd:attribute name="noMerge" type="xsd:boolean" use="optional" /> 0403 <!-- deleted: if true, the toolbar will not be created, even if ui_standards.rc mentions it --> 0404 <xsd:attribute name="deleted" type="xsd:boolean" use="optional" /> 0405 </xsd:complexType> 0406 </xsd:element> 0407 <xsd:element minOccurs="0" maxOccurs="unbounded" name="State"> 0408 <!-- Where should this be? --> 0409 <xsd:annotation> 0410 <xsd:documentation> 0411 0412 Defines a GUI state, esp. which actions to enable and which 0413 ones to disable on entering this state (see 0414 KXMLGUIClient::stateChanged()). 0415 0416 Actions listed in "disable" are disabled, and vice 0417 versa for "enable". 0418 0419 </xsd:documentation> 0420 </xsd:annotation> 0421 <xsd:complexType> 0422 <xsd:choice> 0423 <!-- ( enable, disable? ) | ( disable, enable? ) --> 0424 <xsd:sequence> 0425 <xsd:element name="enable" type="state" /> 0426 <xsd:element minOccurs="0" name="disable" type="state" /> 0427 </xsd:sequence> 0428 <xsd:sequence> 0429 <xsd:element name="disable" type="state" /> 0430 <xsd:element minOccurs="0" name="enable" type="state" /> 0431 </xsd:sequence> 0432 </xsd:choice> 0433 <xsd:attribute name="name" type="identifier"/> 0434 </xsd:complexType> 0435 </xsd:element> 0436 0437 <xsd:element name="ActionProperties" minOccurs="0" > 0438 <xsd:annotation> 0439 <xsd:documentation> 0440 0441 Allows standard actions to be customized. 0442 0443 </xsd:documentation> 0444 </xsd:annotation> 0445 <xsd:complexType> 0446 <xsd:sequence> 0447 <xsd:element ref="Action" maxOccurs="unbounded" /> 0448 </xsd:sequence> 0449 </xsd:complexType> 0450 </xsd:element> 0451 0452 </xsd:sequence> 0453 0454 <!-- Not used nor referenced. Yet. 0455 <xsd:element name="MainWindow"/> 0456 <xsd:element name="StatusBar" /> 0457 --> 0458 0459 <xsd:attribute name="name" type="identifier"/> 0460 <xsd:attribute name="version" type="xsd:positiveInteger" /> 0461 <xsd:attribute name="library" type="identifier" use="optional" /> 0462 <xsd:attribute name="translationDomain" type="identifier" use="optional" /> 0463 </xsd:complexType> 0464 </xsd:element> 0465 </xsd:schema>