]>
git.saurik.com Git - wxWidgets.git/blob - src/os2/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 #if !USE_SHARED_LIBRARY
19 IMPLEMENT_DYNAMIC_CLASS(wxScrollBar
, wxControl
)
24 bool wxScrollBar::Create(wxWindow
*parent
, wxWindowID id
,
26 const wxSize
& size
, long style
,
27 const wxValidator
& validator
,
32 parent
->AddChild(this);
34 SetValidator(validator
);
36 m_windowStyle
= style
;
39 m_windowId
= (int)NewControlId();
43 // TODO create scrollbar
47 wxScrollBar::~wxScrollBar()
51 void wxScrollBar::SetThumbPosition(int viewStart
)
56 int wxScrollBar::GetThumbPosition() const
62 void wxScrollBar::SetScrollbar(int position
, int thumbSize
, int range
, int pageSize
,
65 m_viewSize
= pageSize
;
66 m_pageSize
= thumbSize
;
73 void wxScrollBar::Command(wxCommandEvent
& event
)
75 SetThumbPosition(event
.m_commandInt
);
76 ProcessCommand(event
);