X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1ce70313beaca590cd954c24ca657ac921820f9c..bf7945cef10c0844a32e95695c544d829da9293a:/contrib/include/wx/xml/xmlres.h diff --git a/contrib/include/wx/xml/xmlres.h b/contrib/include/wx/xml/xmlres.h index aab2b33d30..9615242e8d 100644 --- a/contrib/include/wx/xml/xmlres.h +++ b/contrib/include/wx/xml/xmlres.h @@ -138,6 +138,11 @@ public: // Loads bitmap or icon resource from file: wxBitmap LoadBitmap(const wxString& name); wxIcon LoadIcon(const wxString& name); + + // Attaches unknown control into given panel/window/dialog: + // (unknown controls are used in conjunction with ) + bool AttachUnknownControl(const wxString& name, wxWindow *control, + wxWindow *parent = NULL); // Returns numeric ID that is equivalent to string id used in XML // resource. To be used in event tables @@ -211,9 +216,13 @@ extern wxXmlResource *wxTheXmlResource; // wxTheXmlResource->LoadDialog(&dlg, mainFrame, "my_dialog"); // XMLCTRL(dlg, "my_textctrl", wxTextCtrl)->SetValue(wxT("default value")); +#ifdef __WXDEBUG__ +#define XMLCTRL(window, id, type) \ + (wxDynamicCast((window).FindWindow(XMLID(id)), type)) +#else #define XMLCTRL(window, id, type) \ ((type*)((window).FindWindow(XMLID(id)))) - +#endif class WXDLLEXPORT wxXmlResourceHandler : public wxObject