From: Václav Slavík Date: Tue, 15 Jan 2002 23:37:55 +0000 (+0000) Subject: merged another part of Alex's work (LoadMenuBar w/ parent) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/4a1b95962fd99022e3cb68cf73fe5b29fdfb2adf merged another part of Alex's work (LoadMenuBar w/ parent) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13589 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/contrib/include/wx/xrc/xmlres.h b/contrib/include/wx/xrc/xmlres.h index 62d3093b4c..7574284b4a 100644 --- a/contrib/include/wx/xrc/xmlres.h +++ b/contrib/include/wx/xrc/xmlres.h @@ -125,7 +125,8 @@ public: wxMenu *LoadMenu(const wxString& name); // Loads menubar from resource. Returns NULL on failure. - wxMenuBar *LoadMenuBar(const wxString& name); + wxMenuBar *LoadMenuBar(wxWindow *parent, const wxString& name); + wxMenuBar *LoadMenuBar(const wxString& name) { return LoadMenuBar(NULL, name); } #if wxUSE_TOOLBAR // Loads toolbar diff --git a/contrib/src/xrc/xmlres.cpp b/contrib/src/xrc/xmlres.cpp index 500bf81b69..745d4213fd 100644 --- a/contrib/src/xrc/xmlres.cpp +++ b/contrib/src/xrc/xmlres.cpp @@ -131,18 +131,19 @@ wxMenu *wxXmlResource::LoadMenu(const wxString& name) -wxMenuBar *wxXmlResource::LoadMenuBar(const wxString& name) +wxMenuBar *wxXmlResource::LoadMenuBar(wxWindow *parent, const wxString& name) { - return (wxMenuBar*)CreateResFromNode(FindResource(name, wxT("wxMenuBar")), NULL, NULL); + return (wxMenuBar*)CreateResFromNode(FindResource(name, wxT("wxMenuBar")), parent, NULL); } +#if wxUSE_TOOLBAR wxToolBar *wxXmlResource::LoadToolBar(wxWindow *parent, const wxString& name) { return (wxToolBar*)CreateResFromNode(FindResource(name, wxT("wxToolBar")), parent, NULL); } - +#endif wxDialog *wxXmlResource::LoadDialog(wxWindow *parent, const wxString& name) diff --git a/include/wx/xrc/xmlres.h b/include/wx/xrc/xmlres.h index 62d3093b4c..7574284b4a 100644 --- a/include/wx/xrc/xmlres.h +++ b/include/wx/xrc/xmlres.h @@ -125,7 +125,8 @@ public: wxMenu *LoadMenu(const wxString& name); // Loads menubar from resource. Returns NULL on failure. - wxMenuBar *LoadMenuBar(const wxString& name); + wxMenuBar *LoadMenuBar(wxWindow *parent, const wxString& name); + wxMenuBar *LoadMenuBar(const wxString& name) { return LoadMenuBar(NULL, name); } #if wxUSE_TOOLBAR // Loads toolbar diff --git a/src/xrc/xmlres.cpp b/src/xrc/xmlres.cpp index 500bf81b69..745d4213fd 100644 --- a/src/xrc/xmlres.cpp +++ b/src/xrc/xmlres.cpp @@ -131,18 +131,19 @@ wxMenu *wxXmlResource::LoadMenu(const wxString& name) -wxMenuBar *wxXmlResource::LoadMenuBar(const wxString& name) +wxMenuBar *wxXmlResource::LoadMenuBar(wxWindow *parent, const wxString& name) { - return (wxMenuBar*)CreateResFromNode(FindResource(name, wxT("wxMenuBar")), NULL, NULL); + return (wxMenuBar*)CreateResFromNode(FindResource(name, wxT("wxMenuBar")), parent, NULL); } +#if wxUSE_TOOLBAR wxToolBar *wxXmlResource::LoadToolBar(wxWindow *parent, const wxString& name) { return (wxToolBar*)CreateResFromNode(FindResource(name, wxT("wxToolBar")), parent, NULL); } - +#endif wxDialog *wxXmlResource::LoadDialog(wxWindow *parent, const wxString& name)