]>
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 | ///////////////////////////////////////////////////////////////////////////// | |
10 | ||
11 | #ifdef __GNUG__ | |
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 | ||
22 | #include "wx/xrc/xh_bmp.h" | |
23 | #include "wx/bitmap.h" | |
24 | ||
854e189f | 25 | IMPLEMENT_DYNAMIC_CLASS(wxBitmapXmlHandler, wxXmlResourceHandler) |
78d14f80 VS |
26 | |
27 | wxBitmapXmlHandler::wxBitmapXmlHandler() | |
28 | : wxXmlResourceHandler() | |
29 | { | |
30 | } | |
31 | ||
32 | wxObject *wxBitmapXmlHandler::DoCreateResource() | |
33 | { | |
34 | return new wxBitmap(GetBitmap(wxT(""))); | |
35 | } | |
36 | ||
78d14f80 VS |
37 | bool wxBitmapXmlHandler::CanHandle(wxXmlNode *node) |
38 | { | |
39 | return IsOfClass(node, wxT("wxBitmap")); | |
40 | } | |
41 | ||
854e189f VS |
42 | IMPLEMENT_DYNAMIC_CLASS(wxIconXmlHandler, wxXmlResourceHandler) |
43 | ||
78d14f80 VS |
44 | wxIconXmlHandler::wxIconXmlHandler() |
45 | : wxXmlResourceHandler() | |
46 | { | |
47 | } | |
48 | ||
49 | wxObject *wxIconXmlHandler::DoCreateResource() | |
50 | { | |
51 | return new wxIcon(GetIcon(wxT(""))); | |
52 | } | |
53 | ||
78d14f80 VS |
54 | bool wxIconXmlHandler::CanHandle(wxXmlNode *node) |
55 | { | |
56 | return IsOfClass(node, wxT("wxIcon")); | |
57 | } |