]> git.saurik.com Git - wxWidgets.git/blame - docs/tech/tn0014.txt
compilation fix
[wxWidgets.git] / docs / tech / tn0014.txt
CommitLineData
50ccbaaa
VS
1 XRC resources format specification
2 ==================================
3
4 !!!!! NOT YET FINISHED !!!!!
5
60. Introduction
7---------------
8
9This note describes the file format used for storing XRC resources that are
10used by wxXmlResource class. It is probably only useful for those implementing
11dialog editors with XRC support.
12
13If 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
19The XRC format is based on XML 1.0 (please consult W3C's specification). There
20is no DTD available since it is not possible to fully describe the format with
21the limited expressive power of DTDs.
22
231. Terminology
24--------------
25
26The 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
31The term "attribute" is specific to XRC and refers to a property-less subnode
32of 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
462. Elementary description
47-------------------------
48
49XRC resource file is a well-formed XML 1.0 document.
50
51The root node of XRC document must be <resource>. The <resource> node has
52optional "version" property. Default version (in absence of the version
53property) is "0.0.0.0". The version consists of four integers separated by
54periods. Version of XRC format changes only if there was an incompatible
55change introduced (i.e. either the library cannot understand old resource
56files or older versions of the library wouldn't understand the new format).
57The first three integers are major, minor and release number of the wxWindows
58release when the change was introduced, the last one is revision number and
59is 0 for the first incompatible change in given wxWindows release, 1 for
60the second etc.
61
62Differences between versions are described within this document in paragraphs
63entitled "Version Note".
64
65The <resource> node is only allowed to have <object> and <object_ref>
66subnodes, 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
733. Common attributes
74--------------------
75
76TODO
77
784. Supported classes
79--------------------
80
81TODO
82
83=== EOF ===
84
85Version: $Id$