From 2e4c3bf87ab1b19ba32424eb736114f40ed3d128 Mon Sep 17 00:00:00 2001 From: George Tasker Date: Sat, 27 Jan 2001 14:29:01 +0000 Subject: [PATCH] Added wxFrame support contributed by Aleks git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9188 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/include/wx/xml/xh_all.h | 2 ++ contrib/include/wx/xml/xmlres.h | 2 ++ contrib/src/xml/makefile.vc | 2 +- contrib/src/xml/xmlres.cpp | 5 ++++- contrib/src/xml/xmlrsall.cpp | 2 ++ 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/contrib/include/wx/xml/xh_all.h b/contrib/include/wx/xml/xh_all.h index 39e0f77324..a659665bd9 100644 --- a/contrib/include/wx/xml/xh_all.h +++ b/contrib/include/wx/xml/xh_all.h @@ -44,4 +44,6 @@ #include "wx/xml/xh_stlin.h" #include "wx/xml/xh_bmp.h" #include "wx/xml/xh_unkwn.h" +#include "wx/xml/xh_frame.h" + #endif // _WX_XMLRES_H_ diff --git a/contrib/include/wx/xml/xmlres.h b/contrib/include/wx/xml/xmlres.h index 52c7f2a9ab..0947c0634a 100644 --- a/contrib/include/wx/xml/xmlres.h +++ b/contrib/include/wx/xml/xmlres.h @@ -109,6 +109,8 @@ class WXDLLEXPORT wxXmlResource : public wxObject wxPanel *LoadPanel(wxWindow *parent, const wxString& name); bool LoadPanel(wxPanel *panel, wxWindow *parent, const wxString& name); + bool LoadFrame(wxFrame* frame, wxWindow *parent, const wxString& name); + // Loads bitmap or icon resource from file: wxBitmap LoadBitmap(const wxString& name); wxIcon LoadIcon(const wxString& name); diff --git a/contrib/src/xml/makefile.vc b/contrib/src/xml/makefile.vc index f08bc4c9da..93eb4b4be8 100644 --- a/contrib/src/xml/makefile.vc +++ b/contrib/src/xml/makefile.vc @@ -35,7 +35,7 @@ EXTRATARGETS=$(D) OBJECTS=$(D)\xml.obj $(D)\xmlbin.obj $(D)\xmlbinz.obj $(D)\xmlpars.obj $(D)\xmlres.obj $(D)\xmlrsall.obj \ $(D)\xh_bttn.obj $(D)\xh_chckb.obj $(D)\xh_chckl.obj $(D)\xh_choic.obj $(D)\xh_combo.obj $(D)\xh_dlg.obj \ - $(D)\xh_gauge.obj $(D)\xh_html.obj $(D)\xh_menu.obj $(D)\xh_notbk.obj $(D)\xh_panel.obj $(D)\xh_radbt.obj \ + $(D)\xh_frame.obj $(D)\xh_gauge.obj $(D)\xh_html.obj $(D)\xh_menu.obj $(D)\xh_notbk.obj $(D)\xh_panel.obj $(D)\xh_radbt.obj \ $(D)\xh_radbx.obj $(D)\xh_sizer.obj $(D)\xh_slidr.obj $(D)\xh_spin.obj $(D)\xh_stbmp.obj $(D)\xh_sttxt.obj \ $(D)\xh_text.obj $(D)\xh_listb.obj $(D)\xh_toolb.obj \ $(D)\xh_bmpbt.obj $(D)\xh_cald.obj $(D)\xh_listc.obj $(D)\xh_scrol.obj \ diff --git a/contrib/src/xml/xmlres.cpp b/contrib/src/xml/xmlres.cpp index c67ffc3cae..e74d13b7ee 100644 --- a/contrib/src/xml/xmlres.cpp +++ b/contrib/src/xml/xmlres.cpp @@ -175,7 +175,10 @@ bool wxXmlResource::LoadPanel(wxPanel *panel, wxWindow *parent, const wxString& return CreateResFromNode(FindResource(name, wxT("wxPanel")), parent, panel) != NULL; } - +bool wxXmlResource::LoadFrame(wxFrame* frame, wxWindow *parent, const wxString& name) +{ + return CreateResFromNode(FindResource(name, wxT("wxFrame")), parent, frame) != NULL; +} wxBitmap wxXmlResource::LoadBitmap(const wxString& name) { diff --git a/contrib/src/xml/xmlrsall.cpp b/contrib/src/xml/xmlrsall.cpp index 7c5dd8136d..7db99c52c9 100644 --- a/contrib/src/xml/xmlrsall.cpp +++ b/contrib/src/xml/xmlrsall.cpp @@ -92,4 +92,6 @@ void wxXmlResource::InitAllHandlers() AddHandler(new wxStaticLineXmlHandler); #endif AddHandler(new wxUnknownWidgetXmlHandler); + + AddHandler(new wxFrameXmlHandler); } -- 2.45.2