1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2001-06-26 16:59:19 -04:00
|
|
|
// Name: wx/gtk/slider.h
|
1998-05-20 10:01:55 -04:00
|
|
|
// Purpose:
|
|
|
|
// Author: Robert Roebling
|
1998-10-29 13:03:18 -05:00
|
|
|
// Id: $Id$
|
2003-03-17 05:34:04 -05:00
|
|
|
// Copyright: (c) 1998 Robert Roebling
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2007-09-14 00:26:33 -04:00
|
|
|
#ifndef _WX_GTK_SLIDER_H_
|
|
|
|
#define _WX_GTK_SLIDER_H_
|
1998-05-20 10:01:55 -04:00
|
|
|
|
2001-06-26 16:59:19 -04:00
|
|
|
// ----------------------------------------------------------------------------
|
1998-05-20 10:01:55 -04:00
|
|
|
// wxSlider
|
2001-06-26 16:59:19 -04:00
|
|
|
// ----------------------------------------------------------------------------
|
1998-05-20 10:01:55 -04:00
|
|
|
|
2005-08-02 18:58:06 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxSlider : public wxSliderBase
|
1998-05-20 10:01:55 -04:00
|
|
|
{
|
1999-11-27 11:43:47 -05:00
|
|
|
public:
|
2006-05-19 12:57:37 -04:00
|
|
|
wxSlider();
|
2001-06-26 16:59:19 -04: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 06:07:38 -04:00
|
|
|
{
|
2001-06-26 16:59:19 -04:00
|
|
|
Create( parent, id, value, minValue, maxValue,
|
|
|
|
pos, size, style, validator, name );
|
1998-08-14 06:07:38 -04:00
|
|
|
}
|
2001-06-26 16:59:19 -04: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 11:43:47 -05:00
|
|
|
virtual int GetValue() const;
|
2001-06-26 16:59:19 -04: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 10:01:55 -04:00
|
|
|
|
2004-05-06 13:26:25 -04:00
|
|
|
static wxVisualAttributes
|
|
|
|
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
2007-10-23 14:16:06 -04:00
|
|
|
|
1999-11-27 15:28:25 -05:00
|
|
|
// implementation
|
2006-05-19 12:57:37 -04:00
|
|
|
double m_pos;
|
|
|
|
int m_scrollEventType;
|
|
|
|
bool m_needThumbRelease;
|
2007-09-14 00:26:33 -04:00
|
|
|
bool m_blockScrollEvent;
|
1999-11-27 15:28:25 -05:00
|
|
|
|
2006-08-25 08:59:28 -04:00
|
|
|
protected:
|
|
|
|
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
|
|
|
|
|
2007-10-23 14:16:06 -04:00
|
|
|
// set the slider value unconditionally
|
|
|
|
void GTKSetValue(int value);
|
|
|
|
|
1999-11-27 11:43:47 -05:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxSlider)
|
1998-05-20 10:01:55 -04:00
|
|
|
};
|
|
|
|
|
2007-09-14 00:26:33 -04:00
|
|
|
#endif // _WX_GTK_SLIDER_H_
|