]> git.saurik.com Git - wxWidgets.git/blob - src/stubs/scrolbar.cpp
Included filefn.h for non-precompiled headers to
[wxWidgets.git] / src / stubs / 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 IMPLEMENT_DYNAMIC_CLASS(wxScrollBar, wxControl)
19
20
21 // Scrollbar
22 bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
23 const wxPoint& pos,
24 const wxSize& size, long style,
25 const wxValidator& validator,
26 const wxString& name)
27 {
28 if (!parent)
29 return FALSE;
30 parent->AddChild(this);
31 SetName(name);
32 SetValidator(validator);
33
34 m_windowStyle = style;
35
36 if ( id == -1 )
37 m_windowId = (int)NewControlId();
38 else
39 m_windowId = id;
40
41 // TODO create scrollbar
42 return TRUE;
43 }
44
45 wxScrollBar::~wxScrollBar()
46 {
47 }
48
49 void wxScrollBar::SetThumbPosition(int viewStart)
50 {
51 // TODO
52 }
53
54 int wxScrollBar::GetThumbPosition() const
55 {
56 // TODO
57 return 0;
58 }
59
60 void wxScrollBar::SetScrollbar(int position, int thumbSize, int range, int pageSize,
61 bool refresh)
62 {
63 m_viewSize = pageSize;
64 m_pageSize = thumbSize;
65 m_objectSize = range;
66
67 // TODO
68 }
69
70
71 void wxScrollBar::Command(wxCommandEvent& event)
72 {
73 SetThumbPosition(event.m_commandInt);
74 ProcessCommand(event);
75 }
76