1///////////////////////////////////////////////////////////////////////////// 2// Name: xh_stbox.cpp 3// Purpose: XRC resource for wxStaticLine 4// Author: Brian Gavin 5// Created: 2000/09/09 6// RCS-ID: $Id: xh_stlin.cpp 35650 2005-09-23 12:56:45Z MR $ 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_STATLINE 19 20#include "wx/xrc/xh_stlin.h" 21#include "wx/statline.h" 22 23IMPLEMENT_DYNAMIC_CLASS(wxStaticLineXmlHandler, wxXmlResourceHandler) 24 25wxStaticLineXmlHandler::wxStaticLineXmlHandler() 26: wxXmlResourceHandler() 27{ 28 XRC_ADD_STYLE(wxLI_HORIZONTAL); 29 XRC_ADD_STYLE(wxLI_VERTICAL); 30 AddWindowStyles(); 31} 32 33wxObject *wxStaticLineXmlHandler::DoCreateResource() 34{ 35 XRC_MAKE_INSTANCE(line, wxStaticLine) 36 37 line->Create(m_parentAsWindow, 38 GetID(), 39 GetPosition(), GetSize(), 40 GetStyle(wxT("style"), wxLI_HORIZONTAL), 41 GetName()); 42 43 SetupWindow(line); 44 45 return line; 46} 47 48bool wxStaticLineXmlHandler::CanHandle(wxXmlNode *node) 49{ 50 return IsOfClass(node, wxT("wxStaticLine")); 51} 52 53#endif // wxUSE_XRC && wxUSE_STATLINE 54