]>
git.saurik.com Git - wxWidgets.git/blob - src/xrc/xh_scrol.cpp
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: XRC resource for wxScrollBar
7 // Copyright: (c) 2000 Brian Gavin
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
12 #pragma implementation "xh_scrol.h"
15 // For compilers that support precompilation, includes "wx.h".
16 #include "wx/wxprec.h"
24 #include "wx/xrc/xh_scrol.h"
25 #include "wx/scrolbar.h"
27 IMPLEMENT_DYNAMIC_CLASS(wxScrollBarXmlHandler
, wxXmlResourceHandler
)
29 wxScrollBarXmlHandler::wxScrollBarXmlHandler()
30 : wxXmlResourceHandler()
32 XRC_ADD_STYLE(wxSB_HORIZONTAL
);
33 XRC_ADD_STYLE(wxSB_VERTICAL
);
37 wxObject
*wxScrollBarXmlHandler::DoCreateResource()
39 XRC_MAKE_INSTANCE(control
, wxScrollBar
)
41 control
->Create(m_parentAsWindow
,
43 GetPosition(), GetSize(),
48 control
->SetScrollbar(GetLong( wxT("value"), 0),
49 GetLong( wxT("thumbsize"),1),
50 GetLong( wxT("range"), 10),
51 GetLong( wxT("pagesize"),1));
54 CreateChildren(control
);
59 bool wxScrollBarXmlHandler::CanHandle(wxXmlNode
*node
)
61 return IsOfClass(node
, wxT("wxScrollBar"));