]> git.saurik.com Git - wxWidgets.git/blame_incremental - src/xrc/xh_scwin.cpp
don't overwrite the existing local file if we failed to open it but it does exist
[wxWidgets.git] / src / xrc / xh_scwin.cpp
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: src/xrc/xh_scwin.cpp
3// Purpose: XRC resource for wxScrolledWindow
4// Author: Vaclav Slavik
5// Created: 2002/10/18
6// RCS-ID: $Id$
7// Copyright: (c) 2002 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_scwin.h"
21
22#ifndef WX_PRECOMP
23 #include "wx/frame.h"
24 #include "wx/scrolwin.h"
25#endif
26
27IMPLEMENT_DYNAMIC_CLASS(wxScrolledWindowXmlHandler, wxXmlResourceHandler)
28
29wxScrolledWindowXmlHandler::wxScrolledWindowXmlHandler()
30: wxXmlResourceHandler()
31{
32 XRC_ADD_STYLE(wxHSCROLL);
33 XRC_ADD_STYLE(wxVSCROLL);
34
35 // wxPanel styles
36#if WXWIN_COMPATIBILITY_2_6
37 XRC_ADD_STYLE(wxNO_3D);
38#endif // WXWIN_COMPATIBILITY_2_6
39 XRC_ADD_STYLE(wxTAB_TRAVERSAL);
40 XRC_ADD_STYLE(wxWS_EX_VALIDATE_RECURSIVELY);
41
42 AddWindowStyles();
43}
44
45wxObject *wxScrolledWindowXmlHandler::DoCreateResource()
46{
47 XRC_MAKE_INSTANCE(control, wxScrolledWindow)
48
49 control->Create(m_parentAsWindow,
50 GetID(),
51 GetPosition(), GetSize(),
52 GetStyle(wxT("style"), wxHSCROLL | wxVSCROLL),
53 GetName());
54
55 SetupWindow(control);
56 CreateChildren(control);
57
58 return control;
59}
60
61bool wxScrolledWindowXmlHandler::CanHandle(wxXmlNode *node)
62{
63 return IsOfClass(node, wxT("wxScrolledWindow"));
64}
65
66#endif // wxUSE_XRC