]>
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 /////////////////////////////////////////////////////////////////////////////
11 // For compilers that support precompilation, includes "wx.h".
12 #include "wx/wxprec.h"
18 #if wxUSE_XRC && wxUSE_SCROLLBAR
20 #include "wx/xrc/xh_scrol.h"
21 #include "wx/scrolbar.h"
23 IMPLEMENT_DYNAMIC_CLASS(wxScrollBarXmlHandler
, wxXmlResourceHandler
)
25 wxScrollBarXmlHandler::wxScrollBarXmlHandler()
26 : wxXmlResourceHandler()
28 XRC_ADD_STYLE(wxSB_HORIZONTAL
);
29 XRC_ADD_STYLE(wxSB_VERTICAL
);
33 wxObject
*wxScrollBarXmlHandler::DoCreateResource()
35 XRC_MAKE_INSTANCE(control
, wxScrollBar
)
37 control
->Create(m_parentAsWindow
,
39 GetPosition(), GetSize(),
44 control
->SetScrollbar(GetLong( wxT("value"), 0),
45 GetLong( wxT("thumbsize"),1),
46 GetLong( wxT("range"), 10),
47 GetLong( wxT("pagesize"),1));
50 CreateChildren(control
);
55 bool wxScrollBarXmlHandler::CanHandle(wxXmlNode
*node
)
57 return IsOfClass(node
, wxT("wxScrollBar"));
60 #endif // wxUSE_XRC && wxUSE_SCROLLBAR