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
This commit is contained in:
Václav Slavík 2002-01-15 23:37:55 +00:00
parent 1ad12a5699
commit 4a1b95962f
4 changed files with 12 additions and 8 deletions

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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)