1998-09-18 10:19:10 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: slider.h
|
|
|
|
// Purpose: wxSlider class
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 17/09/98
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Julian Smart
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_SLIDER_H_
|
|
|
|
#define _WX_SLIDER_H_
|
|
|
|
|
2003-05-11 17:57:23 +00:00
|
|
|
#if defined(__GNUG__) && !defined(__APPLE__)
|
1998-09-18 10:19:10 +00:00
|
|
|
#pragma interface "slider.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "wx/control.h"
|
|
|
|
|
|
|
|
// Slider
|
2003-03-22 15:46:22 +00:00
|
|
|
class WXDLLEXPORT wxSlider: public wxSliderBase
|
1998-09-18 10:19:10 +00:00
|
|
|
{
|
2002-02-05 16:34:33 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxSlider)
|
|
|
|
|
1998-09-18 10:19:10 +00:00
|
|
|
public:
|
1999-02-22 11:01:13 +00:00
|
|
|
wxSlider();
|
2002-02-05 16:34:33 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
wxSlider(wxWindow *parent, wxWindowID id,
|
2002-02-05 16:34:33 +00:00
|
|
|
int value, int minValue, int maxValue,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxSL_HORIZONTAL,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxSliderNameStr)
|
1999-02-22 11:01:13 +00:00
|
|
|
{
|
|
|
|
Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name);
|
|
|
|
}
|
2002-02-05 16:34:33 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
~wxSlider();
|
2002-02-05 16:34:33 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
bool Create(wxWindow *parent, wxWindowID id,
|
2002-02-05 16:34:33 +00:00
|
|
|
int value, int minValue, int maxValue,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxSL_HORIZONTAL,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxSliderNameStr);
|
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
virtual int GetValue() const ;
|
|
|
|
virtual void SetValue(int);
|
2002-02-05 16:34:33 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
void SetRange(int minValue, int maxValue);
|
2002-02-05 16:34:33 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
inline int GetMin() const { return m_rangeMin; }
|
|
|
|
inline int GetMax() const { return m_rangeMax; }
|
2002-02-05 16:34:33 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
// For trackbars only
|
|
|
|
void SetPageSize(int pageSize);
|
|
|
|
int GetPageSize() const ;
|
|
|
|
void SetLineSize(int lineSize);
|
|
|
|
int GetLineSize() const ;
|
|
|
|
void SetThumbLength(int len) ;
|
|
|
|
int GetThumbLength() const ;
|
2002-02-05 16:34:33 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
void Command(wxCommandEvent& event);
|
2002-02-05 16:34:33 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
protected:
|
|
|
|
int m_rangeMin;
|
|
|
|
int m_rangeMax;
|
|
|
|
int m_pageSize;
|
|
|
|
int m_lineSize;
|
2002-02-05 16:34:33 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
virtual void DoSetSize(int x, int y,
|
2002-02-05 16:34:33 +00:00
|
|
|
int width, int height,
|
|
|
|
int sizeFlags = wxSIZE_AUTO);
|
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
private:
|
|
|
|
DECLARE_EVENT_TABLE()
|
1998-09-18 10:19:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
2002-02-05 16:34:33 +00:00
|
|
|
// _WX_SLIDER_H_
|