]>
git.saurik.com Git - wxWidgets.git/blob - src/xrc/xh_scrol.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/xrc/xh_scrol.cpp
3 // Purpose: XRC resource for wxScrollBar
6 // Copyright: (c) 2000 Brian Gavin
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 // For compilers that support precompilation, includes "wx.h".
11 #include "wx/wxprec.h"
17 #if wxUSE_XRC && wxUSE_SCROLLBAR
19 #include "wx/xrc/xh_scrol.h"
22 #include "wx/scrolbar.h"
25 IMPLEMENT_DYNAMIC_CLASS(wxScrollBarXmlHandler
, wxXmlResourceHandler
)
27 wxScrollBarXmlHandler::wxScrollBarXmlHandler()
28 : wxXmlResourceHandler()
30 XRC_ADD_STYLE(wxSB_HORIZONTAL
);
31 XRC_ADD_STYLE(wxSB_VERTICAL
);
35 wxObject
*wxScrollBarXmlHandler::DoCreateResource()
37 XRC_MAKE_INSTANCE(control
, wxScrollBar
)
39 control
->Create(m_parentAsWindow
,
41 GetPosition(), GetSize(),
46 control
->SetScrollbar(GetLong( wxT("value"), 0),
47 GetLong( wxT("thumbsize"),1),
48 GetLong( wxT("range"), 10),
49 GetLong( wxT("pagesize"),1));
52 CreateChildren(control
);
57 bool wxScrollBarXmlHandler::CanHandle(wxXmlNode
*node
)
59 return IsOfClass(node
, wxT("wxScrollBar"));
62 #endif // wxUSE_XRC && wxUSE_SCROLLBAR