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