]> git.saurik.com Git - wxWidgets.git/blob - src/xrc/xh_scrol.cpp
removed unused variables
[wxWidgets.git] / src / xrc / xh_scrol.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: xh_scrol.cpp
3 // Purpose: XRC resource for wxScrollBar
4 // Author: Brian Gavin
5 // Created: 2000/09/09
6 // RCS-ID: $Id$
7 // Copyright: (c) 2000 Brian Gavin
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 #ifdef __GNUG__
12 #pragma implementation "xh_scrol.h"
13 #endif
14
15 // For compilers that support precompilation, includes "wx.h".
16 #include "wx/wxprec.h"
17
18 #ifdef __BORLANDC__
19 #pragma hdrstop
20 #endif
21
22 #include "wx/xrc/xh_scrol.h"
23 #include "wx/scrolbar.h"
24
25
26 wxScrollBarXmlHandler::wxScrollBarXmlHandler()
27 : wxXmlResourceHandler()
28 {
29 XRC_ADD_STYLE(wxSB_HORIZONTAL);
30 XRC_ADD_STYLE(wxSB_VERTICAL);
31 AddWindowStyles();
32 }
33
34 wxObject *wxScrollBarXmlHandler::DoCreateResource()
35 {
36 XRC_MAKE_INSTANCE(control, wxScrollBar)
37
38 control->Create(m_parentAsWindow,
39 GetID(),
40 GetPosition(), GetSize(),
41 GetStyle(),
42 wxDefaultValidator,
43 GetName());
44
45 control->SetScrollbar(GetLong( wxT("value"), 0),
46 GetLong( wxT("thumbsize"),1),
47 GetLong( wxT("range"), 10),
48 GetLong( wxT("pagesize"),1));
49
50 SetupWindow(control);
51
52 return control;
53 }
54
55 bool wxScrollBarXmlHandler::CanHandle(wxXmlNode *node)
56 {
57 return IsOfClass(node, wxT("wxScrollBar"));
58 }