/////////////////////////////////////////////////////////////////////////////
// Name: slider.cpp
-// Purpose:
-// Author: Robert Roebling
-// Created: 01/02/97
-// Id:
-// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
+// Purpose: wxSlider
+// Author: AUTHOR
+// Modified by:
+// Created: ??/??/98
+// RCS-ID: $Id$
+// Copyright: (c) AUTHOR
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-
#ifdef __GNUG__
#pragma implementation "slider.h"
#endif
-#include "wx/slider.h"
-#include "wx/utils.h"
-
-//-----------------------------------------------------------------------------
-// wxSlider
-//-----------------------------------------------------------------------------
+#include "wx/msw/slider.h"
-IMPLEMENT_DYNAMIC_CLASS(wxSlider,wxControl)
+IMPLEMENT_DYNAMIC_CLASS(wxSlider, wxControl)
-wxSlider::wxSlider(void)
+// Slider
+wxSlider::wxSlider()
{
-};
+ m_pageSize = 1;
+ m_lineSize = 1;
+ m_rangeMax = 0;
+ m_rangeMin = 0;
+ m_tickFreq = 0;
+}
-wxSlider::wxSlider( wxWindow *parent, wxWindowID id,
- int value, int minValue, int maxValue,
- const wxPoint& pos, const wxSize& size,
- long style,
-/* const wxValidator& validator = wxDefaultValidator, */
- const wxString& name )
+bool wxSlider::Create(wxWindow *parent, wxWindowID id,
+ int value, int minValue, int maxValue,
+ const wxPoint& pos,
+ const wxSize& size, long style,
+ const wxValidator& validator,
+ const wxString& name)
{
- Create( parent, id, value, minValue, maxValue,
- pos, size, style, name );
-};
+ SetName(name);
+ SetValidator(validator);
-wxSlider::~wxSlider(void)
-{
-};
+ if (parent) parent->AddChild(this);
-bool wxSlider::Create(wxWindow *parent, wxWindowID id,
- int value, int minValue, int maxValue,
- const wxPoint& pos, const wxSize& size,
- long style,
-/* const wxValidator& validator = wxDefaultValidator, */
- const wxString& name )
-{
- return TRUE;
-};
+ m_lineSize = 1;
+ m_windowStyle = style;
+ m_tickFreq = 0;
-int wxSlider::GetValue(void) const
+ if ( id == -1 )
+ m_windowId = (int)NewControlId();
+ else
+ m_windowId = id;
+
+ m_rangeMax = maxValue;
+ m_rangeMin = minValue;
+
+ m_pageSize = (int)((maxValue-minValue)/10);
+
+ // TODO create slider
+
+ return FALSE;
+}
+
+wxSlider::~wxSlider()
{
-};
+}
-void wxSlider::SetValue( int value )
+int wxSlider::GetValue() const
{
-};
+ // TODO
+ return 0;
+}
-void wxSlider::SetRange( int minValue, int maxValue )
+void wxSlider::SetValue(int value)
{
-};
+ // TODO
+}
-int wxSlider::GetMin(void) const
+void wxSlider::GetSize(int *width, int *height) const
{
-};
+ // TODO
+}
-int wxSlider::GetMax(void) const
+void wxSlider::GetPosition(int *x, int *y) const
{
-};
+ // TODO
+}
-void wxSlider::SetPageSize( int pageSize )
+void wxSlider::SetSize(int x, int y, int width, int height, int sizeFlags)
{
-};
+ // TODO
+}
-int wxSlider::GetPageSize(void) const
+void wxSlider::SetRange(int minValue, int maxValue)
{
-};
+ m_rangeMin = minValue;
+ m_rangeMax = maxValue;
+
+ // TODO
+}
-void wxSlider::SetThumbLength( int len )
+// For trackbars only
+void wxSlider::SetTickFreq(int n, int pos)
{
-};
+ // TODO
+ m_tickFreq = n;
+}
-int wxSlider::GetThumbLength(void) const
+void wxSlider::SetPageSize(int pageSize)
{
-};
+ // TODO
+ m_pageSize = pageSize;
+}
-void wxSlider::SetLineSize( int WXUNUSED(lineSize) )
+int wxSlider::GetPageSize() const
{
-};
+ return m_pageSize;
+}
-int wxSlider::GetLineSize(void) const
+void wxSlider::ClearSel()
{
-};
+ // TODO
+}
-void wxSlider::GetSize( int *x, int *y ) const
+void wxSlider::ClearTicks()
{
- wxWindow::GetSize( x, y );
-};
+ // TODO
+}
-void wxSlider::SetSize( int x, int y, int width, int height, int sizeFlags )
+void wxSlider::SetLineSize(int lineSize)
{
- wxWindow::SetSize( x, y, width, height, sizeFlags );
-};
+ m_lineSize = lineSize;
+ // TODO
+}
-void wxSlider::GetPosition( int *x, int *y ) const
+int wxSlider::GetLineSize() const
{
- wxWindow::GetPosition( x, y );
-};
+ // TODO
+ return 0;
+}
-void wxSlider::SetTick( int WXUNUSED(tickPos) )
+int wxSlider::GetSelEnd() const
{
-};
+ // TODO
+ return 0;
+}
-void wxSlider::SetTickFreq( int WXUNUSED(n), int WXUNUSED(pos) )
+int wxSlider::GetSelStart() const
{
-};
+ // TODO
+ return 0;
+}
-int wxSlider::GetTickFreq(void) const
+void wxSlider::SetSelection(int minPos, int maxPos)
{
- return 0;
-};
+ // TODO
+}
-void wxSlider::ClearTicks(void)
+void wxSlider::SetThumbLength(int len)
{
-};
+ // TODO
+}
-void wxSlider::SetSelection( int WXUNUSED(minPos), int WXUNUSED(maxPos) )
+int wxSlider::GetThumbLength() const
{
-};
+ // TODO
+ return 0;
+}
-int wxSlider::GetSelEnd(void) const
+void wxSlider::SetTick(int tickPos)
{
- return 0;
-};
+ // TODO
+}
-int wxSlider::GetSelStart(void) const
+void wxSlider::Command (wxCommandEvent & event)
{
- return 0;
-};
+ SetValue (event.GetInt());
+ ProcessCommand (event);
+}
-void wxSlider::ClearSel(void)
+bool wxSlider::Show(bool show)
{
-};
+ // TODO
+ return TRUE;
+}