]>
Commit | Line | Data |
---|---|---|
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 | |
c575e45a | 11 | #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) |
78d14f80 VS |
12 | #pragma implementation "xh_bmp.h" |
13 | #endif | |
14 | ||
15 | // For compilers that support precompilation, includes "wx.h". | |
16 | #include "wx/wxprec.h" | |
17 | ||
18 | #ifdef __BORLANDC__ | |
19 | #pragma hdrstop | |
20 | #endif | |
21 | ||
621be1ec | 22 | #if wxUSE_XRC |
a1e4ec87 | 23 | |
78d14f80 VS |
24 | #include "wx/xrc/xh_bmp.h" |
25 | #include "wx/bitmap.h" | |
26 | ||
854e189f | 27 | IMPLEMENT_DYNAMIC_CLASS(wxBitmapXmlHandler, wxXmlResourceHandler) |
78d14f80 | 28 | |
f80ea77b WS |
29 | wxBitmapXmlHandler::wxBitmapXmlHandler() |
30 | : wxXmlResourceHandler() | |
78d14f80 VS |
31 | { |
32 | } | |
33 | ||
34 | wxObject *wxBitmapXmlHandler::DoCreateResource() | |
f80ea77b | 35 | { |
0966aee3 | 36 | return new wxBitmap(GetBitmap(wxEmptyString)); |
78d14f80 VS |
37 | } |
38 | ||
78d14f80 VS |
39 | bool wxBitmapXmlHandler::CanHandle(wxXmlNode *node) |
40 | { | |
41 | return IsOfClass(node, wxT("wxBitmap")); | |
42 | } | |
43 | ||
854e189f VS |
44 | IMPLEMENT_DYNAMIC_CLASS(wxIconXmlHandler, wxXmlResourceHandler) |
45 | ||
f80ea77b WS |
46 | wxIconXmlHandler::wxIconXmlHandler() |
47 | : wxXmlResourceHandler() | |
78d14f80 VS |
48 | { |
49 | } | |
50 | ||
51 | wxObject *wxIconXmlHandler::DoCreateResource() | |
f80ea77b | 52 | { |
0966aee3 | 53 | return new wxIcon(GetIcon(wxEmptyString)); |
78d14f80 VS |
54 | } |
55 | ||
78d14f80 VS |
56 | bool wxIconXmlHandler::CanHandle(wxXmlNode *node) |
57 | { | |
58 | return IsOfClass(node, wxT("wxIcon")); | |
59 | } | |
a1e4ec87 | 60 | |
621be1ec | 61 | #endif // wxUSE_XRC |