]>
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 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
12 #pragma implementation "xh_bmp.h"
15 // For compilers that support precompilation, includes "wx.h".
16 #include "wx/wxprec.h"
24 #include "wx/xrc/xh_bmp.h"
25 #include "wx/bitmap.h"
27 IMPLEMENT_DYNAMIC_CLASS(wxBitmapXmlHandler
, wxXmlResourceHandler
)
29 wxBitmapXmlHandler::wxBitmapXmlHandler()
30 : wxXmlResourceHandler()
34 wxObject
*wxBitmapXmlHandler::DoCreateResource()
36 return new wxBitmap(GetBitmap(wxT("")));
39 bool wxBitmapXmlHandler::CanHandle(wxXmlNode
*node
)
41 return IsOfClass(node
, wxT("wxBitmap"));
44 IMPLEMENT_DYNAMIC_CLASS(wxIconXmlHandler
, wxXmlResourceHandler
)
46 wxIconXmlHandler::wxIconXmlHandler()
47 : wxXmlResourceHandler()
51 wxObject
*wxIconXmlHandler::DoCreateResource()
53 return new wxIcon(GetIcon(wxT("")));
56 bool wxIconXmlHandler::CanHandle(wxXmlNode
*node
)
58 return IsOfClass(node
, wxT("wxIcon"));