]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/xrc/xmlres.h
Rearrange code to fix some problems
[wxWidgets.git] / include / wx / xrc / xmlres.h
index 159e9722f6ed60559fa5f8f76909eb43e652b015..b2a2d2f3bca8fc4cdef060ce68be09dda4cfc356 100644 (file)
@@ -44,6 +44,9 @@ class wxXmlSubclassFactories;
 class wxXmlResourceModule;
 class wxXmlResourceDataRecords;
 
+// make VC++ happy: otherwise it gives warnings when using this type for a
+// member of DLL-exported wxXmlResource class in shared builds
+template class WXDLLIMPEXP_FWD_XRC wxVector<wxXmlResourceHandler *>;
 
 // These macros indicate current version of XML resources (this information is
 // encoded in root node of XRC file as "version" property).
@@ -320,6 +323,18 @@ private:
 #define XRCCTRL(window, id, type) \
     (wxStaticCast((window).FindWindow(XRCID(id)), type))
 
+// This macro returns pointer to sizer item
+// Example:
+//
+// <object class="spacer" name="area">
+//   <size>400, 300</size>
+// </object>
+//
+// wxSizerItem* item = XRCSIZERITEM(*this, wxT("area"))
+
+#define XRCSIZERITEM(window, id) \
+    ((window).GetSizer() ? (window).GetSizer()->GetItemById(id) : NULL)    
+
 // wxXmlResourceHandler is an abstract base class for resource handlers
 // capable of creating a control from an XML node.