]> git.saurik.com Git - wxWidgets.git/blame - src/xrc/xh_bmp.cpp
Don't assume any particular default size for XRC image lists.
[wxWidgets.git] / src / xrc / xh_bmp.cpp
CommitLineData
78d14f80 1/////////////////////////////////////////////////////////////////////////////
0bca0373 2// Name: src/xrc/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 20#include "wx/xrc/xh_bmp.h"
0bca0373
WS
21
22#ifndef WX_PRECOMP
23 #include "wx/bitmap.h"
24#endif
78d14f80 25
854e189f 26IMPLEMENT_DYNAMIC_CLASS(wxBitmapXmlHandler, wxXmlResourceHandler)
78d14f80 27
f80ea77b 28wxBitmapXmlHandler::wxBitmapXmlHandler()
0bca0373 29 :wxXmlResourceHandler()
78d14f80
VS
30{
31}
32
33wxObject *wxBitmapXmlHandler::DoCreateResource()
f80ea77b 34{
9c1d2aa2 35 return new wxBitmap(GetBitmap(m_node));
78d14f80
VS
36}
37
78d14f80
VS
38bool wxBitmapXmlHandler::CanHandle(wxXmlNode *node)
39{
40 return IsOfClass(node, wxT("wxBitmap"));
41}
42
854e189f
VS
43IMPLEMENT_DYNAMIC_CLASS(wxIconXmlHandler, wxXmlResourceHandler)
44
f80ea77b
WS
45wxIconXmlHandler::wxIconXmlHandler()
46: wxXmlResourceHandler()
78d14f80
VS
47{
48}
49
50wxObject *wxIconXmlHandler::DoCreateResource()
f80ea77b 51{
53998e70 52 return new wxIcon(GetIcon(m_node));
78d14f80
VS
53}
54
78d14f80
VS
55bool wxIconXmlHandler::CanHandle(wxXmlNode *node)
56{
57 return IsOfClass(node, wxT("wxIcon"));
58}
a1e4ec87 59
621be1ec 60#endif // wxUSE_XRC