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