]> git.saurik.com Git - wxWidgets.git/blob - docs/tech/tn0014.txt
- applied patch that adds more i18n support to XRC handlers
[wxWidgets.git] / docs / tech / tn0014.txt
1 XRC resources format specification
2 ==================================
3
4 !!!!! NOT YET FINISHED !!!!!
5
6 0. Introduction
7 ---------------
8
9 This note describes the file format used for storing XRC resources that are
10 used by wxXmlResource class. It is probably only useful for those implementing
11 dialog editors with XRC support.
12
13 If you only want to use the resources, you can choose from a number of editors:
14 a) wxDesigner (http://www.roebling.de)
15 b) XRCed (wxPython/tools)
16 c) wxWorkshop (http://wxworkshop.sf.net)
17 b) wxrcedit (contrib/utils/wxrcedit)
18
19 The XRC format is based on XML 1.0 (please consult W3C's specification). There
20 is no DTD available since it is not possible to fully describe the format with
21 the limited expressive power of DTDs.
22
23 1. Terminology
24 --------------
25
26 The usual XML terminology applies. In particular, we shall use the terms
27 "node", "property" and "value" in the XML sense:
28
29 <node property1="value1" property2="value2">...</node>
30
31 The term "attribute" is specific to XRC and refers to a property-less subnode
32 of an <object> or <object_ref> node. In the example bellow, <pos>, <label> and
33 <style> are attributes, while neither <resource> nor either of <object>s is:
34
35 <?xml version="1.0" encoding="utf-8">
36 <resource xmlns="http://www.wxwindows.org/wxxrc" version="2.3.0.1">
37 <object class="wxPanel">
38 <style>wxSUNKEN_BORDER</style>
39 <object class="wxStaticText">
40 <label>A label</label>
41 <pos>10,10</pos>
42 </object>
43 </object>
44 </resource>
45
46 2. Elementary description
47 -------------------------
48
49 XRC resource file is a well-formed XML 1.0 document. All elements of XRC file are
50 from the http://www.wxwindows.org/wxxrc namespace.
51
52 The root node of XRC document must be <resource>. The <resource> node has
53 optional "version" property. Default version (in absence of the version
54 property) is "0.0.0.0". The version consists of four integers separated by
55 periods. Version of XRC format changes only if there was an incompatible
56 change introduced (i.e. either the library cannot understand old resource
57 files or older versions of the library wouldn't understand the new format).
58 The first three integers are major, minor and release number of the wxWindows
59 release when the change was introduced, the last one is revision number and
60 is 0 for the first incompatible change in given wxWindows release, 1 for
61 the second etc.
62
63 Differences between versions are described within this document in paragraphs
64 entitled "Version Note".
65
66 The <resource> node contains namespace declaration, too:
67
68 <resource xmlns="http://www.wxwindows.org/wxxrc" version="2.3.0.1">
69
70 The <resource> node is only allowed to have <object> and <object_ref>
71 subnodes, all of which must have the "name" property.
72
73 <object> - TODO (name, class, subclass)
74
75 <object_ref> - TODO (name, ref, subclass)
76
77
78 3. Common attributes
79 --------------------
80
81 TODO
82
83 4. Supported classes
84 --------------------
85
86 TODO
87
88 === EOF ===
89
90 Version: $Id$