1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/xrc/xh_scwin.cpp
3 // Purpose: XRC resource for wxScrolledWindow
4 // Author: Vaclav Slavik
6 // Copyright: (c) 2002 Vaclav Slavik
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 // For compilers that support precompilation, includes "wx.h".
11 #include "wx/wxprec.h"
19 #include "wx/xrc/xh_scwin.h"
23 #include "wx/scrolwin.h"
26 IMPLEMENT_DYNAMIC_CLASS(wxScrolledWindowXmlHandler
, wxXmlResourceHandler
)
28 wxScrolledWindowXmlHandler::wxScrolledWindowXmlHandler()
29 : wxXmlResourceHandler()
31 XRC_ADD_STYLE(wxHSCROLL
);
32 XRC_ADD_STYLE(wxVSCROLL
);
35 #if WXWIN_COMPATIBILITY_2_6
36 XRC_ADD_STYLE(wxNO_3D
);
37 #endif // WXWIN_COMPATIBILITY_2_6
38 XRC_ADD_STYLE(wxTAB_TRAVERSAL
);
39 XRC_ADD_STYLE(wxWS_EX_VALIDATE_RECURSIVELY
);
44 wxObject
*wxScrolledWindowXmlHandler::DoCreateResource()
46 XRC_MAKE_INSTANCE(control
, wxScrolledWindow
)
48 control
->Create(m_parentAsWindow
,
50 GetPosition(), GetSize(),
51 GetStyle(wxT("style"), wxHSCROLL
| wxVSCROLL
),
55 CreateChildren(control
);
57 if ( HasParam(wxT("scrollrate")) )
59 wxSize rate
= GetSize(wxT("scrollrate"));
60 control
->SetScrollRate(rate
.x
, rate
.y
);
66 bool wxScrolledWindowXmlHandler::CanHandle(wxXmlNode
*node
)
68 return IsOfClass(node
, wxT("wxScrolledWindow"));