]>
git.saurik.com Git - wxWidgets.git/blob - src/xrc/xh_bmp.cpp
1 /////////////////////////////////////////////////////////////////////////////
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"
21 #include "wx/bitmap.h"
23 IMPLEMENT_DYNAMIC_CLASS(wxBitmapXmlHandler
, wxXmlResourceHandler
)
25 wxBitmapXmlHandler::wxBitmapXmlHandler()
26 : wxXmlResourceHandler()
30 wxObject
*wxBitmapXmlHandler::DoCreateResource()
32 // NB: empty parameter name means "take directly from this node's next
33 // instead of from subnode with given name"
34 return new wxBitmap(GetBitmap(wxEmptyString
));
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 // NB: empty parameter name means "take directly from this node's next
52 // instead of from subnode with given name"
53 return new wxIcon(GetIcon(wxEmptyString
));
56 bool wxIconXmlHandler::CanHandle(wxXmlNode
*node
)
58 return IsOfClass(node
, wxT("wxIcon"));