]> git.saurik.com Git - wxWidgets.git/blame - src/xrc/xh_bmp.cpp
can't pass objects through ... (please don't ever ignore this gcc warning)
[wxWidgets.git] / src / xrc / xh_bmp.cpp
CommitLineData
78d14f80
VS
1/////////////////////////////////////////////////////////////////////////////
2// Name: xh_bmp.cpp
b5d6954b 3// Purpose: XRC resource for wxBitmap and wxIcon
78d14f80
VS
4// Author: Vaclav Slavik
5// Created: 2000/09/09
6// RCS-ID: $Id$
7// Copyright: (c) 2000 Vaclav Slavik
8// Licence: wxWindows licence
9/////////////////////////////////////////////////////////////////////////////
f80ea77b 10
78d14f80
VS
11// For compilers that support precompilation, includes "wx.h".
12#include "wx/wxprec.h"
13
14#ifdef __BORLANDC__
15 #pragma hdrstop
16#endif
17
621be1ec 18#if wxUSE_XRC
a1e4ec87 19
78d14f80
VS
20#include "wx/xrc/xh_bmp.h"
21#include "wx/bitmap.h"
22
854e189f 23IMPLEMENT_DYNAMIC_CLASS(wxBitmapXmlHandler, wxXmlResourceHandler)
78d14f80 24
f80ea77b
WS
25wxBitmapXmlHandler::wxBitmapXmlHandler()
26: wxXmlResourceHandler()
78d14f80
VS
27{
28}
29
30wxObject *wxBitmapXmlHandler::DoCreateResource()
f80ea77b 31{
1e22bc92
VS
32 // NB: empty parameter name means "take directly from this node's next
33 // instead of from subnode with given name"
0966aee3 34 return new wxBitmap(GetBitmap(wxEmptyString));
78d14f80
VS
35}
36
78d14f80
VS
37bool wxBitmapXmlHandler::CanHandle(wxXmlNode *node)
38{
39 return IsOfClass(node, wxT("wxBitmap"));
40}
41
854e189f
VS
42IMPLEMENT_DYNAMIC_CLASS(wxIconXmlHandler, wxXmlResourceHandler)
43
f80ea77b
WS
44wxIconXmlHandler::wxIconXmlHandler()
45: wxXmlResourceHandler()
78d14f80
VS
46{
47}
48
49wxObject *wxIconXmlHandler::DoCreateResource()
f80ea77b 50{
1e22bc92
VS
51 // NB: empty parameter name means "take directly from this node's next
52 // instead of from subnode with given name"
0966aee3 53 return new wxIcon(GetIcon(wxEmptyString));
78d14f80
VS
54}
55
78d14f80
VS
56bool wxIconXmlHandler::CanHandle(wxXmlNode *node)
57{
58 return IsOfClass(node, wxT("wxIcon"));
59}
a1e4ec87 60
621be1ec 61#endif // wxUSE_XRC