+// Programmer-friendly macros for writing XRC handlers:
+
+#define XRC_ADD_STYLE(style) AddStyle(wxT(#style), style)
+
+#define XRC_MAKE_INSTANCE(variable, classname) \
+ classname *variable = NULL; \
+ if (m_instance) \
+ variable = wxStaticCast(m_instance, classname); \
+ if (!variable) \
+ variable = new classname;
+
+
+// FIXME -- remove this $%^#$%#$@# as soon as Ron checks his changes in!!
+WXDLLIMPEXP_XRC void wxXmlInitResourceModule();
+
+
+// This class is used to create instances of XRC "object" nodes with "subclass"
+// property. It is _not_ supposed to be used by XRC users, you should instead
+// register your subclasses via wxWidgets' RTTI mechanism. This class is useful
+// only for language bindings developer who need a way to implement subclassing
+// in wxWidgets ports that don't support wxRTTI (e.g. wxPython).
+class WXDLLIMPEXP_XRC wxXmlSubclassFactory
+{
+public:
+ // Try to create instance of given class and return it, return NULL on
+ // failure:
+ virtual wxObject *Create(const wxString& className) = 0;
+ virtual ~wxXmlSubclassFactory() {}
+};
+
+
+/* -------------------------------------------------------------------------
+ Backward compatibility macros. Do *NOT* use, they may disappear in future
+ versions of the XRC library!
+ ------------------------------------------------------------------------- */
+#if WXWIN_COMPATIBILITY_2_4
+ #define ADD_STYLE XRC_ADD_STYLE
+ #define wxTheXmlResource wxXmlResource::Get()
+ #define XMLID XRCID
+ #define XMLCTRL XRCCTRL
+ #define GetXMLID GetXRCID
+#endif