]> git.saurik.com Git - wxWidgets.git/blob - contrib/src/gizmos/xh_statpict.cpp
Avoid warnings from mgl headers if possible.
[wxWidgets.git] / contrib / src / gizmos / xh_statpict.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: xh_statpict.cpp
3 // Purpose: XRC resource handler for wxStaticPicture
4 // Author: David A. Norris
5 // Created: 2005/03/13
6 // RCS-ID: $Id$
7 // Copyright: David A. Norris
8 // Licence: wxWindows Licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
12 #pragma implementation "xh_statpict.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 #if wxUSE_XRC
23
24 #include "wx/gizmos/statpict.h"
25 #include "wx/gizmos/xh_statpict.h"
26
27 // Register with wxWindows' dynamic class subsystem.
28 IMPLEMENT_DYNAMIC_CLASS(wxStaticPictureXmlHandler, wxXmlResourceHandler)
29
30 // Constructor.
31 wxStaticPictureXmlHandler::wxStaticPictureXmlHandler()
32 {
33 AddWindowStyles();
34 }
35
36 // Creates the control and returns a pointer to it.
37 wxObject *wxStaticPictureXmlHandler::DoCreateResource()
38 {
39 XRC_MAKE_INSTANCE(control, wxStaticPicture)
40
41 control->Create(m_parentAsWindow, GetID(),
42 GetBitmap(wxT("bitmap"), wxART_OTHER, GetSize()),
43 GetPosition(), GetSize(), GetStyle(), GetName());
44
45 SetupWindow(control);
46
47 return control;
48 }
49
50 // Returns true if we know how to create a control for the given node.
51 bool wxStaticPictureXmlHandler::CanHandle(wxXmlNode *node)
52 {
53 return IsOfClass(node, wxT("wxStaticPicture"));
54 }
55
56 #endif // wxUSE_XRC