]>
git.saurik.com Git - wxWidgets.git/blob - src/mac/carbon/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
)
21 BEGIN_EVENT_TABLE(wxScrollBar
, wxControl
)
27 bool wxScrollBar::Create(wxWindow
*parent
, wxWindowID id
,
29 const wxSize
& size
, long style
,
30 const wxValidator
& validator
,
35 parent
->AddChild(this);
37 SetValidator(validator
);
39 m_windowStyle
= style
;
42 m_windowId
= (int)NewControlId();
46 // TODO create scrollbar
50 wxScrollBar::~wxScrollBar()
54 void wxScrollBar::SetThumbPosition(int viewStart
)
59 int wxScrollBar::GetThumbPosition() const
65 void wxScrollBar::SetScrollbar(int position
, int thumbSize
, int range
, int pageSize
,
68 m_viewSize
= pageSize
;
69 m_pageSize
= thumbSize
;
76 void wxScrollBar::Command(wxCommandEvent
& event
)
78 SetThumbPosition(event
.m_commandInt
);
79 ProcessCommand(event
);