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