]> git.saurik.com Git - wxWidgets.git/blame - docs/tech/tn0014.txt
SWIGged updates for wxMac
[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">
40e2d134 36 <resource xmlns="http://www.wxwindows.org/wxxrc" version="2.3.0.1">
50ccbaaa
VS
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
40e2d134
VS
49XRC resource file is a well-formed XML 1.0 document. All elements of XRC file are
50from the http://www.wxwindows.org/wxxrc namespace.
50ccbaaa
VS
51
52The root node of XRC document must be <resource>. The <resource> node has
53optional "version" property. Default version (in absence of the version
54property) is "0.0.0.0". The version consists of four integers separated by
55periods. Version of XRC format changes only if there was an incompatible
56change introduced (i.e. either the library cannot understand old resource
57files or older versions of the library wouldn't understand the new format).
58The first three integers are major, minor and release number of the wxWindows
59release when the change was introduced, the last one is revision number and
60is 0 for the first incompatible change in given wxWindows release, 1 for
61the second etc.
62
63Differences between versions are described within this document in paragraphs
64entitled "Version Note".
65
40e2d134
VS
66The <resource> node contains namespace declaration, too:
67
68 <resource xmlns="http://www.wxwindows.org/wxxrc" version="2.3.0.1">
69
50ccbaaa
VS
70The <resource> node is only allowed to have <object> and <object_ref>
71subnodes, 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
783. Common attributes
79--------------------
80
81TODO
82
834. Supported classes
84--------------------
85
86TODO
87
88=== EOF ===
89
90Version: $Id$