]> git.saurik.com Git - wxWidgets.git/blame_incremental - src/xrc/xh_stbox.cpp
Fail for assert(0,...).
[wxWidgets.git] / src / xrc / xh_stbox.cpp
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: 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
19
20#include "wx/xrc/xh_stbox.h"
21#include "wx/statbox.h"
22
23IMPLEMENT_DYNAMIC_CLASS(wxStaticBoxXmlHandler, wxXmlResourceHandler)
24
25wxStaticBoxXmlHandler::wxStaticBoxXmlHandler()
26: wxXmlResourceHandler()
27{
28 AddWindowStyles();
29}
30
31wxObject *wxStaticBoxXmlHandler::DoCreateResource()
32{
33 XRC_MAKE_INSTANCE(box, wxStaticBox)
34
35 box->Create(m_parentAsWindow,
36 GetID(),
37 GetText(wxT("label")),
38 GetPosition(), GetSize(),
39 GetStyle(),
40 GetName());
41
42 SetupWindow(box);
43
44 return box;
45}
46
47bool wxStaticBoxXmlHandler::CanHandle(wxXmlNode *node)
48{
49 return IsOfClass(node, wxT("wxStaticBox"));
50}
51
52#endif // wxUSE_XRC