]> git.saurik.com Git - wxWidgets.git/blob - src/xrc/xh_stbmp.cpp
first attempt at adding the minimal set needed for dead-key support, see #15345
[wxWidgets.git] / src / xrc / xh_stbmp.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/xrc/xh_stbmp.cpp
3 // Purpose: XRC resource for wxStaticBitmap
4 // Author: Vaclav Slavik
5 // Created: 2000/04/22
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 && wxUSE_STATBMP
18
19 #include "wx/xrc/xh_stbmp.h"
20
21 #ifndef WX_PRECOMP
22 #include "wx/statbmp.h"
23 #endif
24
25 IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmapXmlHandler, wxXmlResourceHandler)
26
27 wxStaticBitmapXmlHandler::wxStaticBitmapXmlHandler()
28 :wxXmlResourceHandler()
29 {
30 AddWindowStyles();
31 }
32
33 wxObject *wxStaticBitmapXmlHandler::DoCreateResource()
34 {
35 XRC_MAKE_INSTANCE(bmp, wxStaticBitmap)
36
37 bmp->Create(m_parentAsWindow,
38 GetID(),
39 GetBitmap(wxT("bitmap"), wxART_OTHER, GetSize()),
40 GetPosition(), GetSize(),
41 GetStyle(),
42 GetName());
43
44 SetupWindow(bmp);
45
46 return bmp;
47 }
48
49 bool wxStaticBitmapXmlHandler::CanHandle(wxXmlNode *node)
50 {
51 return IsOfClass(node, wxT("wxStaticBitmap"));
52 }
53
54 #endif // wxUSE_XRC && wxUSE_STATBMP