]> git.saurik.com Git - wxWidgets.git/blame - contrib/src/xrc/xh_scrol.cpp
use Windows standard icons instead of our own (patch 443856)
[wxWidgets.git] / contrib / src / xrc / xh_scrol.cpp
CommitLineData
78d14f80
VS
1/////////////////////////////////////////////////////////////////////////////
2// Name: xh_scrol.cpp
3// Purpose: XML 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
26wxScrollBarXmlHandler::wxScrollBarXmlHandler()
27: wxXmlResourceHandler()
28{
29 ADD_STYLE( wxSB_HORIZONTAL );
30 ADD_STYLE( wxSB_VERTICAL );
31 AddWindowStyles();
32}
33
34wxObject *wxScrollBarXmlHandler::DoCreateResource()
35{
36 wxScrollBar *control = new wxScrollBar(m_parentAsWindow,
37 GetID(),
38 GetPosition(), GetSize(),
39 GetStyle(),
40 wxDefaultValidator,
41 GetName()
42 );
43 control->SetScrollbar(GetLong( wxT("value"), 0),
44 GetLong( wxT("thumbsize"),1),
45 GetLong( wxT("range"), 10),
46 GetLong( wxT("pagesize"),1)
47 );
48
49
50 SetupWindow(control);
51
52 return control;
53}
54
55
56
57bool wxScrollBarXmlHandler::CanHandle(wxXmlNode *node)
58{
59 return IsOfClass(node, wxT("wxScrollBar"));
60}
61
62
63