1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2001-06-26 20:59:19 +00:00
|
|
|
// Name: wx/gtk/slider.h
|
1998-05-20 14:01:55 +00:00
|
|
|
// Purpose:
|
|
|
|
// Author: Robert Roebling
|
1998-10-29 18:03:18 +00:00
|
|
|
// Id: $Id$
|
2003-03-17 10:34:04 +00:00
|
|
|
// Copyright: (c) 1998 Robert Roebling
|
2004-05-23 20:53:33 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef __GTKSLIDERH__
|
|
|
|
#define __GTKSLIDERH__
|
|
|
|
|
2001-06-26 20:59:19 +00:00
|
|
|
// ----------------------------------------------------------------------------
|
1998-05-20 14:01:55 +00:00
|
|
|
// wxSlider
|
2001-06-26 20:59:19 +00:00
|
|
|
// ----------------------------------------------------------------------------
|
1998-05-20 14:01:55 +00:00
|
|
|
|
2005-08-02 22:58:06 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxSlider : public wxSliderBase
|
1998-05-20 14:01:55 +00:00
|
|
|
{
|
1999-11-27 16:43:47 +00:00
|
|
|
public:
|
2006-05-19 16:57:37 +00:00
|
|
|
wxSlider();
|
2001-06-26 20:59:19 +00:00
|
|
|
wxSlider(wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
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)
|
1998-08-14 10:07:38 +00:00
|
|
|
{
|
2001-06-26 20:59:19 +00:00
|
|
|
Create( parent, id, value, minValue, maxValue,
|
|
|
|
pos, size, style, validator, name );
|
1998-08-14 10:07:38 +00:00
|
|
|
}
|
2001-06-26 20:59:19 +00:00
|
|
|
|
|
|
|
bool Create(wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
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);
|
|
|
|
|
|
|
|
// implement the base class pure virtuals
|
1999-11-27 16:43:47 +00:00
|
|
|
virtual int GetValue() const;
|
2001-06-26 20:59:19 +00:00
|
|
|
virtual void SetValue(int value);
|
|
|
|
|
|
|
|
virtual void SetRange(int minValue, int maxValue);
|
|
|
|
virtual int GetMin() const;
|
|
|
|
virtual int GetMax() const;
|
|
|
|
|
|
|
|
virtual void SetLineSize(int lineSize);
|
|
|
|
virtual void SetPageSize(int pageSize);
|
|
|
|
virtual int GetLineSize() const;
|
|
|
|
virtual int GetPageSize() const;
|
|
|
|
|
|
|
|
virtual void SetThumbLength(int lenPixels);
|
|
|
|
virtual int GetThumbLength() const;
|
1998-05-20 14:01:55 +00:00
|
|
|
|
2004-05-06 17:26:25 +00:00
|
|
|
static wxVisualAttributes
|
|
|
|
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
|
|
|
|
1999-11-27 20:28:25 +00:00
|
|
|
// implementation
|
2006-05-19 16:57:37 +00:00
|
|
|
double m_pos;
|
|
|
|
int m_scrollEventType;
|
|
|
|
bool m_needThumbRelease;
|
1999-11-27 20:28:25 +00:00
|
|
|
|
2006-08-25 12:59:28 +00:00
|
|
|
protected:
|
|
|
|
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
|
|
|
|
|
1999-11-27 16:43:47 +00:00
|
|
|
private:
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxSlider)
|
1998-05-20 14:01:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __GTKSLIDERH__
|