git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29795
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
The term ATTRIBUTE is specific to XRC and refers to a subnode
of an <object> or <object_ref> node that is itself not <object> or <object_ref>.
The term ATTRIBUTE is specific to XRC and refers to a subnode
of an <object> or <object_ref> node that is itself not <object> or <object_ref>.
-In the example bellow, <pos>, <label> and <style> are attributes, while neither
+In the example below, <pos>, <label> and <style> are attributes, while neither
<resource> nor either of <object>s is:
<?xml version="1.0" encoding="utf-8">
<resource> nor either of <object>s is:
<?xml version="1.0" encoding="utf-8">
- <resource xmlns="http://www.wxwidgets.org/wxxrc" version="2.3.0.1">
+ <resource xmlns="http://www.wxwidgets.org/wxxrc" version="2.5.3.0">
<object class="wxPanel">
<style>wxSUNKEN_BORDER</style> <!-- attr -->
<object class="wxStaticText">
<object class="wxPanel">
<style>wxSUNKEN_BORDER</style> <!-- attr -->
<object class="wxStaticText">
The <resource> node contains namespace declaration, too:
The <resource> node contains namespace declaration, too:
- <resource xmlns="http://www.wxwidgets.org/wxxrc" version="2.3.0.1">
+ <resource xmlns="http://www.wxwidgets.org/wxxrc" version="2.5.3.0">
The <resource> node is only allowed to have <object> and <object_ref>
subnodes, all of which must have the "name" property.
The <resource> node is only allowed to have <object> and <object_ref>
subnodes, all of which must have the "name" property.
"\n" -> line break (C character '\n')
"\r" -> carriage return (C character '\r')
"\t" -> tabelator (C character '\t')
"\n" -> line break (C character '\n')
"\r" -> carriage return (C character '\r')
"\t" -> tabelator (C character '\t')
+ "\\" -> "\"
+ (introduced in version 2.5.3.0, not done in earlier versions)
Version Note:
'$' was used instead of '_' prior to version 2.3.0.1.
Version Note:
'$' was used instead of '_' prior to version 2.3.0.1.
XRC determines the bitmap to use according to this algorithm:
1. If there is non-empty "stock_id" property, query wxArtProvider for the
bitmap (if there is no "stock_client", use default one, which is usually
XRC determines the bitmap to use according to this algorithm:
1. If there is non-empty "stock_id" property, query wxArtProvider for the
bitmap (if there is no "stock_client", use default one, which is usually
- wxART_OTHER; exceptions are noted in class-specific sections bellow). If
+ wxART_OTHER; exceptions are noted in class-specific sections below). If
the query fails, continue to 2.
2. Load the bitmap from the file in attribute value.
the query fails, continue to 2.
2. Load the bitmap from the file in attribute value.
position Position -1,-1
size Size -1,-1
style Style[wxCheckList]
position Position -1,-1
size Size -1,-1
style Style[wxCheckList]
-content (see bellow) (empty)
+content (see below) (empty)
Optional "content" attribute does not have attribute value. Instead,
arbitrary number of <item> nodes may be rooted under it (the control
Optional "content" attribute does not have attribute value. Instead,
arbitrary number of <item> nodes may be rooted under it (the control
// - reset revision to 0 unless the first three are same as before,
// in which case you should increase revision by one
#define WX_XMLRES_CURRENT_VERSION_MAJOR 2
// - reset revision to 0 unless the first three are same as before,
// in which case you should increase revision by one
#define WX_XMLRES_CURRENT_VERSION_MAJOR 2
-#define WX_XMLRES_CURRENT_VERSION_MINOR 3
-#define WX_XMLRES_CURRENT_VERSION_RELEASE 0
-#define WX_XMLRES_CURRENT_VERSION_REVISION 1
-#define WX_XMLRES_CURRENT_VERSION_STRING _T("2.3.0.1")
+#define WX_XMLRES_CURRENT_VERSION_MINOR 5
+#define WX_XMLRES_CURRENT_VERSION_RELEASE 3
+#define WX_XMLRES_CURRENT_VERSION_REVISION 0
+#define WX_XMLRES_CURRENT_VERSION_STRING _T("2.5.3.0")
#define WX_XMLRES_CURRENT_VERSION \
(WX_XMLRES_CURRENT_VERSION_MAJOR * 256*256*256 + \
#define WX_XMLRES_CURRENT_VERSION \
(WX_XMLRES_CURRENT_VERSION_MAJOR * 256*256*256 + \
else
str2 << wxT('&') << *dt;
}
else
str2 << wxT('&') << *dt;
}
- // Remap \n to CR, \r to LF, \t to TAB:
+ // Remap \n to CR, \r to LF, \t to TAB, \\ to \:
else if (*dt == wxT('\\'))
switch (*(++dt))
{
else if (*dt == wxT('\\'))
switch (*(++dt))
{
- case wxT('n') : str2 << wxT('\n'); break;
- case wxT('t') : str2 << wxT('\t'); break;
- case wxT('r') : str2 << wxT('\r'); break;
- default : str2 << wxT('\\') << *dt; break;
+ case wxT('n'):
+ str2 << wxT('\n');
+ break;
+
+ case wxT('t'):
+ str2 << wxT('\t');
+ break;
+
+ case wxT('r'):
+ str2 << wxT('\r');
+ break;
+
+ case wxT('\\') :
+ // "\\" wasn't translated to "\" prior to 2.5.3.0:
+ if (m_resource->CompareVersion(2,5,3,0) >= 0)
+ {
+ str2 << wxT('\\');
+ break;
+ }
+ // else fall-through to default: branch below
+
+ default:
+ str2 << wxT('\\') << *dt;
+ break;