]>
git.saurik.com Git - wxWidgets.git/blob - src/xrc/xh_scrol.cpp
3916339bd53c8c28c67768185926b9d45ab48086
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/xrc/xh_scrol.cpp
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"
23 #include "wx/scrolbar.h"
26 IMPLEMENT_DYNAMIC_CLASS(wxScrollBarXmlHandler
, wxXmlResourceHandler
)
28 wxScrollBarXmlHandler::wxScrollBarXmlHandler()
29 : wxXmlResourceHandler()
31 XRC_ADD_STYLE(wxSB_HORIZONTAL
);
32 XRC_ADD_STYLE(wxSB_VERTICAL
);
36 wxObject
*wxScrollBarXmlHandler::DoCreateResource()
38 XRC_MAKE_INSTANCE(control
, wxScrollBar
)
40 control
->Create(m_parentAsWindow
,
42 GetPosition(), GetSize(),
47 control
->SetScrollbar(GetLong( wxT("value"), 0),
48 GetLong( wxT("thumbsize"),1),
49 GetLong( wxT("range"), 10),
50 GetLong( wxT("pagesize"),1));
53 CreateChildren(control
);
58 bool wxScrollBarXmlHandler::CanHandle(wxXmlNode
*node
)
60 return IsOfClass(node
, wxT("wxScrollBar"));
63 #endif // wxUSE_XRC && wxUSE_SCROLLBAR