]> git.saurik.com Git - wxWidgets.git/blob - src/xrc/xh_bmp.cpp
Don't follow symlinks in wxFileName::Rmdir(wxPATH_RMDIR_RECURSIVE).
[wxWidgets.git] / 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
5 // Created: 2000/09/09
6 // RCS-ID: $Id$
7 // Copyright: (c) 2000 Vaclav Slavik
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 // For compilers that support precompilation, includes "wx.h".
12 #include "wx/wxprec.h"
13
14 #ifdef __BORLANDC__
15 #pragma hdrstop
16 #endif
17
18 #if wxUSE_XRC
19
20 #include "wx/xrc/xh_bmp.h"
21
22 #ifndef WX_PRECOMP
23 #include "wx/bitmap.h"
24 #endif
25
26 IMPLEMENT_DYNAMIC_CLASS(wxBitmapXmlHandler, wxXmlResourceHandler)
27
28 wxBitmapXmlHandler::wxBitmapXmlHandler()
29 :wxXmlResourceHandler()
30 {
31 }
32
33 wxObject *wxBitmapXmlHandler::DoCreateResource()
34 {
35 return new wxBitmap(GetBitmap(m_node));
36 }
37
38 bool wxBitmapXmlHandler::CanHandle(wxXmlNode *node)
39 {
40 return IsOfClass(node, wxT("wxBitmap"));
41 }
42
43 IMPLEMENT_DYNAMIC_CLASS(wxIconXmlHandler, wxXmlResourceHandler)
44
45 wxIconXmlHandler::wxIconXmlHandler()
46 : wxXmlResourceHandler()
47 {
48 }
49
50 wxObject *wxIconXmlHandler::DoCreateResource()
51 {
52 return new wxIcon(GetIcon(m_node));
53 }
54
55 bool wxIconXmlHandler::CanHandle(wxXmlNode *node)
56 {
57 return IsOfClass(node, wxT("wxIcon"));
58 }
59
60 #endif // wxUSE_XRC