]>
git.saurik.com Git - wxWidgets.git/blob - src/qt/scrolbar.cpp
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxScrollBar
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
13 #pragma implementation "scrolbar.h"
16 #include "wx/scrolbar.h"
18 IMPLEMENT_DYNAMIC_CLASS(wxScrollBar
, wxControl
)
22 bool wxScrollBar::Create(wxWindow
*parent
, wxWindowID id
,
24 const wxSize
& size
, long style
,
25 const wxValidator
& validator
,
30 parent
->AddChild(this);
32 SetValidator(validator
);
34 m_windowStyle
= style
;
37 m_windowId
= (int)NewControlId();
41 // TODO create scrollbar
45 wxScrollBar::~wxScrollBar()
49 void wxScrollBar::SetPosition(int viewStart
)
54 int wxScrollBar::GetPosition() const
60 void wxScrollBar::SetScrollbar(int position
, int thumbSize
, int range
, int pageSize
,
63 m_viewSize
= pageSize
;
64 m_pageSize
= thumbSize
;
71 void wxScrollBar::Command(wxCommandEvent
& event
)
73 SetValue(event
.m_commandInt
);
74 ProcessCommand(event
);