]> git.saurik.com Git - wxWidgets.git/blob - src/mac/carbon/scrolbar.cpp
Trying to repair what CVS can do to source code
[wxWidgets.git] / src / mac / carbon / scrolbar.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: scrolbar.cpp
3 // Purpose: wxScrollBar
4 // Author: AUTHOR
5 // Modified by:
6 // Created: ??/??/98
7 // RCS-ID: $Id$
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifdef __GNUG__
13 #pragma implementation "scrolbar.h"
14 #endif
15
16 #include "wx/scrolbar.h"
17
18 #if !USE_SHARED_LIBRARY
19 IMPLEMENT_DYNAMIC_CLASS(wxScrollBar, wxControl)
20
21 BEGIN_EVENT_TABLE(wxScrollBar, wxControl)
22 END_EVENT_TABLE()
23
24 #endif
25
26 // Scrollbar
27 bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
28 const wxPoint& pos,
29 const wxSize& size, long style,
30 const wxValidator& validator,
31 const wxString& name)
32 {
33 if (!parent)
34 return FALSE;
35 parent->AddChild(this);
36 SetName(name);
37 SetValidator(validator);
38
39 m_windowStyle = style;
40
41 if ( id == -1 )
42 m_windowId = (int)NewControlId();
43 else
44 m_windowId = id;
45
46 // TODO create scrollbar
47 return TRUE;
48 }
49
50 wxScrollBar::~wxScrollBar()
51 {
52 }
53
54 void wxScrollBar::SetThumbPosition(int viewStart)
55 {
56 // TODO
57 }
58
59 int wxScrollBar::GetThumbPosition() const
60 {
61 // TODO
62 return 0;
63 }
64
65 void wxScrollBar::SetScrollbar(int position, int thumbSize, int range, int pageSize,
66 bool refresh)
67 {
68 m_viewSize = pageSize;
69 m_pageSize = thumbSize;
70 m_objectSize = range;
71
72 // TODO
73 }
74
75
76 void wxScrollBar::Command(wxCommandEvent& event)
77 {
78 SetThumbPosition(event.m_commandInt);
79 ProcessCommand(event);
80 }
81