]>
git.saurik.com Git - wxWidgets.git/blob - src/xrc/xh_bmp.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/xrc/xh_bmp.cpp
3 // Purpose: XRC resource for wxBitmap and wxIcon
4 // Author: Vaclav Slavik
7 // Copyright: (c) 2000 Vaclav Slavik
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 // For compilers that support precompilation, includes "wx.h".
12 #include "wx/wxprec.h"
20 #include "wx/xrc/xh_bmp.h"
23 #include "wx/bitmap.h"
26 IMPLEMENT_DYNAMIC_CLASS(wxBitmapXmlHandler
, wxXmlResourceHandler
)
28 wxBitmapXmlHandler::wxBitmapXmlHandler()
29 :wxXmlResourceHandler()
33 wxObject
*wxBitmapXmlHandler::DoCreateResource()
35 return new wxBitmap(GetBitmap(m_node
));
38 bool wxBitmapXmlHandler::CanHandle(wxXmlNode
*node
)
40 return IsOfClass(node
, wxT("wxBitmap"));
43 IMPLEMENT_DYNAMIC_CLASS(wxIconXmlHandler
, wxXmlResourceHandler
)
45 wxIconXmlHandler::wxIconXmlHandler()
46 : wxXmlResourceHandler()
50 wxObject
*wxIconXmlHandler::DoCreateResource()
52 return new wxIcon(GetIcon(m_node
));
55 bool wxIconXmlHandler::CanHandle(wxXmlNode
*node
)
57 return IsOfClass(node
, wxT("wxIcon"));