]>
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 // NB: empty parameter name means "take directly from this node's next
36 // instead of from subnode with given name"
37 return new wxBitmap(GetBitmap(wxEmptyString
));
40 bool wxBitmapXmlHandler::CanHandle(wxXmlNode
*node
)
42 return IsOfClass(node
, wxT("wxBitmap"));
45 IMPLEMENT_DYNAMIC_CLASS(wxIconXmlHandler
, wxXmlResourceHandler
)
47 wxIconXmlHandler::wxIconXmlHandler()
48 : wxXmlResourceHandler()
52 wxObject
*wxIconXmlHandler::DoCreateResource()
54 // NB: empty parameter name means "take directly from this node's next
55 // instead of from subnode with given name"
56 return new wxIcon(GetIcon(wxEmptyString
));
59 bool wxIconXmlHandler::CanHandle(wxXmlNode
*node
)
61 return IsOfClass(node
, wxT("wxIcon"));