]> git.saurik.com Git - wxWidgets.git/blob - src/xrc/xh_stbox.cpp
Cope with the common case of utf-8 being specified in the .hhp file, and convert...
[wxWidgets.git] / src / xrc / xh_stbox.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/xrc/xh_stbox.cpp
3 // Purpose: XRC resource for wxStaticBox
4 // Author: Brian Gavin
5 // Created: 2000/09/09
6 // RCS-ID: $Id$
7 // Copyright: (c) 2000 Brian Gavin
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 && wxUSE_STATBOX
19
20 #include "wx/xrc/xh_stbox.h"
21
22 #ifndef WX_PRECOMP
23 #include "wx/statbox.h"
24 #endif
25
26 IMPLEMENT_DYNAMIC_CLASS(wxStaticBoxXmlHandler, wxXmlResourceHandler)
27
28 wxStaticBoxXmlHandler::wxStaticBoxXmlHandler()
29 :wxXmlResourceHandler()
30 {
31 AddWindowStyles();
32 }
33
34 wxObject *wxStaticBoxXmlHandler::DoCreateResource()
35 {
36 XRC_MAKE_INSTANCE(box, wxStaticBox)
37
38 box->Create(m_parentAsWindow,
39 GetID(),
40 GetText(wxT("label")),
41 GetPosition(), GetSize(),
42 GetStyle(),
43 GetName());
44
45 SetupWindow(box);
46
47 return box;
48 }
49
50 bool wxStaticBoxXmlHandler::CanHandle(wxXmlNode *node)
51 {
52 return IsOfClass(node, wxT("wxStaticBox"));
53 }
54
55 #endif // wxUSE_XRC && wxUSE_STATBOX