/////////////////////////////////////////////////////////////////////////////
// Name: scrolbar.cpp
-// Purpose:
-// Author: Robert Roebling
-// Created: 01/02/97
-// Id:
-// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
+// Purpose: wxScrollBar
+// Author: AUTHOR
+// Modified by:
+// Created: ??/??/98
+// RCS-ID: $Id$
+// Copyright: (c) AUTHOR
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-
#ifdef __GNUG__
#pragma implementation "scrolbar.h"
#endif
#include "wx/scrolbar.h"
-#include "wx/utils.h"
-
-//-----------------------------------------------------------------------------
-// wxScrollBar
-//-----------------------------------------------------------------------------
-IMPLEMENT_DYNAMIC_CLASS(wxScrollBar,wxControl)
+#if !USE_SHARED_LIBRARY
+IMPLEMENT_DYNAMIC_CLASS(wxScrollBar, wxControl)
-wxScrollBar::wxScrollBar(wxWindow *parent, wxWindowID id,
- const wxPoint& pos, const wxSize& size,
- long style, const wxString& name )
-{
- Create( parent, id, pos, size, style, name );
-};
-
-wxScrollBar::~wxScrollBar(void)
-{
-};
+#endif
+// Scrollbar
bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
- const wxPoint& pos, const wxSize& size,
- long style, const wxString& name )
-{
- return TRUE;
-};
-
-int wxScrollBar::GetPosition(void) const
-{
-};
-
-int wxScrollBar::GetThumbSize() const
+ const wxPoint& pos,
+ const wxSize& size, long style,
+ const wxValidator& validator,
+ const wxString& name)
{
-};
+ if (!parent)
+ return FALSE;
+ parent->AddChild(this);
+ SetName(name);
+ SetValidator(validator);
+
+ m_windowStyle = style;
-int wxScrollBar::GetPageSize() const
-{
-};
-
-int wxScrollBar::GetRange() const
-{
-};
-
-void wxScrollBar::SetPosition( int viewStart )
-{
-};
+ if ( id == -1 )
+ m_windowId = (int)NewControlId();
+ else
+ m_windowId = id;
-void wxScrollBar::SetScrollbar( int position, int thumbSize, int range, int pageSize,
- bool WXUNUSED(refresh) )
-{
-};
+ // TODO create scrollbar
+ return TRUE;
+}
-// Backward compatibility
-int wxScrollBar::GetValue(void) const
+wxScrollBar::~wxScrollBar()
{
- return GetPosition();
-};
+}
-void wxScrollBar::SetValue( int viewStart )
+void wxScrollBar::SetPosition(int viewStart)
{
- SetPosition( viewStart );
-};
+ // TODO
+}
-void wxScrollBar::GetValues( int *viewStart, int *viewLength, int *objectLength, int *pageLength ) const
+int wxScrollBar::GetPosition() const
{
-};
+ // TODO
+ return 0;
+}
-int wxScrollBar::GetViewLength() const
+void wxScrollBar::SetScrollbar(int position, int thumbSize, int range, int pageSize,
+ bool refresh)
{
-};
+ m_viewSize = pageSize;
+ m_pageSize = thumbSize;
+ m_objectSize = range;
-int wxScrollBar::GetObjectLength() const
-{
-};
+ // TODO
+}
-void wxScrollBar::SetPageSize( int pageLength )
-{
-};
-
-void wxScrollBar::SetObjectLength( int objectLength )
-{
-};
-void wxScrollBar::SetViewLength( int viewLength )
+void wxScrollBar::Command(wxCommandEvent& event)
{
-};
+ SetValue(event.m_commandInt);
+ ProcessCommand(event);
+}