]>
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
6 // Copyright: (c) 2000 Vaclav Slavik
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 // For compilers that support precompilation, includes "wx.h".
11 #include "wx/wxprec.h"
19 #include "wx/xrc/xh_bmp.h"
22 #include "wx/bitmap.h"
25 IMPLEMENT_DYNAMIC_CLASS(wxBitmapXmlHandler
, wxXmlResourceHandler
)
27 wxBitmapXmlHandler::wxBitmapXmlHandler()
28 :wxXmlResourceHandler()
32 wxObject
*wxBitmapXmlHandler::DoCreateResource()
34 return new wxBitmap(GetBitmap(m_node
));
37 bool wxBitmapXmlHandler::CanHandle(wxXmlNode
*node
)
39 return IsOfClass(node
, wxT("wxBitmap"));
42 IMPLEMENT_DYNAMIC_CLASS(wxIconXmlHandler
, wxXmlResourceHandler
)
44 wxIconXmlHandler::wxIconXmlHandler()
45 : wxXmlResourceHandler()
49 wxObject
*wxIconXmlHandler::DoCreateResource()
51 return new wxIcon(GetIcon(m_node
));
54 bool wxIconXmlHandler::CanHandle(wxXmlNode
*node
)
56 return IsOfClass(node
, wxT("wxIcon"));