1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2006-01-22 21:28:01 -05:00
|
|
|
// Name: wx/gtk1/slider.h
|
1998-05-20 10:01:55 -04:00
|
|
|
// Purpose:
|
|
|
|
// Author: Robert Roebling
|
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
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef __GTKSLIDERH__
|
|
|
|
#define __GTKSLIDERH__
|
|
|
|
|
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:
|
2001-06-26 16:59:19 -04:00
|
|
|
wxSlider() { }
|
|
|
|
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);
|
2006-01-22 21:28:01 -05:00
|
|
|
|
1999-11-27 15:28:25 -05:00
|
|
|
// implementation
|
1998-09-07 08:29:07 -04:00
|
|
|
bool IsOwnGtkWindow( GdkWindow *window );
|
2002-07-09 17:01:38 -04:00
|
|
|
void GtkDisableEvents();
|
|
|
|
void GtkEnableEvents();
|
1999-11-27 15:28:25 -05:00
|
|
|
|
1998-05-20 10:01:55 -04:00
|
|
|
GtkAdjustment *m_adjust;
|
|
|
|
float m_oldPos;
|
1999-11-27 15:28:25 -05:00
|
|
|
|
1999-11-27 11:43:47 -05:00
|
|
|
private:
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxSlider)
|
1998-05-20 10:01:55 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __GTKSLIDERH__
|