]> git.saurik.com Git - wxWidgets.git/blame - src/xrc/xh_bmp.cpp
wxMessageBox off the main thread lost result code.
[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
78d14f80
VS
6// Copyright: (c) 2000 Vaclav Slavik
7// Licence: wxWindows licence
8/////////////////////////////////////////////////////////////////////////////
f80ea77b 9
78d14f80
VS
10// For compilers that support precompilation, includes "wx.h".
11#include "wx/wxprec.h"
12
13#ifdef __BORLANDC__
14 #pragma hdrstop
15#endif
16
621be1ec 17#if wxUSE_XRC
a1e4ec87 18
78d14f80 19#include "wx/xrc/xh_bmp.h"
0bca0373
WS
20
21#ifndef WX_PRECOMP
22 #include "wx/bitmap.h"
23#endif
78d14f80 24
854e189f 25IMPLEMENT_DYNAMIC_CLASS(wxBitmapXmlHandler, wxXmlResourceHandler)
78d14f80 26
f80ea77b 27wxBitmapXmlHandler::wxBitmapXmlHandler()
0bca0373 28 :wxXmlResourceHandler()
78d14f80
VS
29{
30}
31
32wxObject *wxBitmapXmlHandler::DoCreateResource()
f80ea77b 33{
9c1d2aa2 34 return new wxBitmap(GetBitmap(m_node));
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{
53998e70 51 return new wxIcon(GetIcon(m_node));
78d14f80
VS
52}
53
78d14f80
VS
54bool wxIconXmlHandler::CanHandle(wxXmlNode *node)
55{
56 return IsOfClass(node, wxT("wxIcon"));
57}
a1e4ec87 58
621be1ec 59#endif // wxUSE_XRC