]> git.saurik.com Git - wxWidgets.git/blame - src/xrc/xh_bmp.cpp
document On{Open,Save}Document()
[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{
1e22bc92
VS
35 // NB: empty parameter name means "take directly from this node's next
36 // instead of from subnode with given name"
0966aee3 37 return new wxBitmap(GetBitmap(wxEmptyString));
78d14f80
VS
38}
39
78d14f80
VS
40bool wxBitmapXmlHandler::CanHandle(wxXmlNode *node)
41{
42 return IsOfClass(node, wxT("wxBitmap"));
43}
44
854e189f
VS
45IMPLEMENT_DYNAMIC_CLASS(wxIconXmlHandler, wxXmlResourceHandler)
46
f80ea77b
WS
47wxIconXmlHandler::wxIconXmlHandler()
48: wxXmlResourceHandler()
78d14f80
VS
49{
50}
51
52wxObject *wxIconXmlHandler::DoCreateResource()
f80ea77b 53{
1e22bc92
VS
54 // NB: empty parameter name means "take directly from this node's next
55 // instead of from subnode with given name"
0966aee3 56 return new wxIcon(GetIcon(wxEmptyString));
78d14f80
VS
57}
58
78d14f80
VS
59bool wxIconXmlHandler::CanHandle(wxXmlNode *node)
60{
61 return IsOfClass(node, wxT("wxIcon"));
62}
a1e4ec87 63
621be1ec 64#endif // wxUSE_XRC