]> git.saurik.com Git - wxWidgets.git/blob - src/xrc/xh_stbmp.cpp
Committing in .
[wxWidgets.git] / src / xrc / xh_stbmp.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: xh_stbmp.cpp
3 // Purpose: XRC resource for wxStaticBitmap
4 // Author: Vaclav Slavik
5 // Created: 2000/04/22
6 // RCS-ID: $Id$
7 // Copyright: (c) 2000 Vaclav Slavik
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 // For compilers that support precompilation, includes "wx.h".
12 #include "wx/wxprec.h"
13
14 #ifdef __BORLANDC__
15 #pragma hdrstop
16 #endif
17
18 #if wxUSE_XRC
19
20 #include "wx/xrc/xh_stbmp.h"
21 #include "wx/statbmp.h"
22
23 IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmapXmlHandler, wxXmlResourceHandler)
24
25 wxStaticBitmapXmlHandler::wxStaticBitmapXmlHandler()
26 : wxXmlResourceHandler()
27 {
28 AddWindowStyles();
29 }
30
31 wxObject *wxStaticBitmapXmlHandler::DoCreateResource()
32 {
33 XRC_MAKE_INSTANCE(bmp, wxStaticBitmap)
34
35 bmp->Create(m_parentAsWindow,
36 GetID(),
37 GetBitmap(wxT("bitmap"), wxART_OTHER, GetSize()),
38 GetPosition(), GetSize(),
39 GetStyle(),
40 GetName());
41
42 SetupWindow(bmp);
43
44 return bmp;
45 }
46
47 bool wxStaticBitmapXmlHandler::CanHandle(wxXmlNode *node)
48 {
49 return IsOfClass(node, wxT("wxStaticBitmap"));
50 }
51
52 #endif // wxUSE_XRC