added XRCSIZERITEM() allowing to directly retrieve the sizer from XRC by name (patch 1782080)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48718 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-09-16 10:50:01 +00:00
parent ebc9b89d52
commit 86909f4c89
8 changed files with 94 additions and 0 deletions

View File

@@ -320,6 +320,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.