]> git.saurik.com Git - wxWidgets.git/blob - docs/tech/tn0014.txt
compilation fix
[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 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.
50
51 The root node of XRC document must be <resource>. The <resource> node has
52 optional "version" property. Default version (in absence of the version
53 property) is "0.0.0.0". The version consists of four integers separated by
54 periods. Version of XRC format changes only if there was an incompatible
55 change introduced (i.e. either the library cannot understand old resource
56 files or older versions of the library wouldn't understand the new format).
57 The first three integers are major, minor and release number of the wxWindows
58 release when the change was introduced, the last one is revision number and
59 is 0 for the first incompatible change in given wxWindows release, 1 for
60 the second etc.
61
62 Differences between versions are described within this document in paragraphs
63 entitled "Version Note".
64
65 The <resource> node is only allowed to have <object> and <object_ref>
66 subnodes, all of which must have the "name" property.
67
68 <object> - TODO (name, class, subclass)
69
70 <object_ref> - TODO (name, ref, subclass)
71
72
73 3. Common attributes
74 --------------------
75
76 TODO
77
78 4. Supported classes
79 --------------------
80
81 TODO
82
83 === EOF ===
84
85 Version: $Id$