]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/xml/xh_stbmp.cpp
removed libxpm dependencies from makefiles
[wxWidgets.git] / contrib / src / xml / xh_stbmp.cpp
index 903b84b92d37a73339daac122a3ba83b7ac9c6f4..2d5b3c94721a58dfde1a0036ab549d190667cb9e 100644 (file)
 
 #include "wx/xml/xh_stbmp.h"
 #include "wx/statbmp.h"
 
 #include "wx/xml/xh_stbmp.h"
 #include "wx/statbmp.h"
-#include "wx/image.h"
-#include "wx/bitmap.h"
 
 wxStaticBitmapXmlHandler::wxStaticBitmapXmlHandler() 
 : wxXmlResourceHandler() 
 {
 
 wxStaticBitmapXmlHandler::wxStaticBitmapXmlHandler() 
 : wxXmlResourceHandler() 
 {
+    AddWindowStyles();
 }
 
 wxObject *wxStaticBitmapXmlHandler::DoCreateResource()
 { 
 }
 
 wxObject *wxStaticBitmapXmlHandler::DoCreateResource()
 { 
-    wxImage img(GetParamValue(_T("bitmap")));
-    wxSize sz = GetSize();
-    
-    if (!(sz == wxDefaultSize)) img.Rescale(sz.x, sz.y);
-    
-    wxStaticBitmap *bmp = new wxStaticBitmap(m_ParentAsWindow,
+    wxStaticBitmap *bmp = new wxStaticBitmap(m_parentAsWindow,
                                     GetID(),
                                     GetID(),
-                                    img.ConvertToBitmap(),
+                                    GetBitmap(wxT("bitmap"), GetSize()),
                                     GetPosition(), GetSize(),
                                     GetStyle(),
                                     GetName()
                                     GetPosition(), GetSize(),
                                     GetStyle(),
                                     GetName()
@@ -52,7 +46,7 @@ wxObject *wxStaticBitmapXmlHandler::DoCreateResource()
 
 bool wxStaticBitmapXmlHandler::CanHandle(wxXmlNode *node)
 {
 
 bool wxStaticBitmapXmlHandler::CanHandle(wxXmlNode *node)
 {
-    return node->GetName() == _T("staticbitmap");
+    return IsOfClass(node, wxT("wxStaticBitmap"));
 }
 
 
 }