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
|
2001-06-26 20:59:19 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef __GTKSLIDERH__
|
|
|
|
#define __GTKSLIDERH__
|
|
|
|
|
2003-08-09 12:38:21 +00:00
|
|
|
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
1998-05-20 14:01:55 +00:00
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
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
|
|
|
|
2001-06-26 20:59:19 +00:00
|
|
|
class wxSlider : public wxSliderBase
|
1998-05-20 14:01:55 +00:00
|
|
|
{
|
1999-11-27 16:43:47 +00:00
|
|
|
public:
|
2001-06-26 20:59:19 +00: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 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
|
|
|
|
1999-11-27 20:28:25 +00:00
|
|
|
// implementation
|
1998-09-07 12:29:07 +00:00
|
|
|
bool IsOwnGtkWindow( GdkWindow *window );
|
1998-10-29 18:03:18 +00:00
|
|
|
void ApplyWidgetStyle();
|
2002-07-09 21:01:38 +00:00
|
|
|
void GtkDisableEvents();
|
|
|
|
void GtkEnableEvents();
|
1999-11-27 20:28:25 +00:00
|
|
|
|
1998-05-20 14:01:55 +00:00
|
|
|
GtkAdjustment *m_adjust;
|
|
|
|
float m_oldPos;
|
1999-11-27 20:28:25 +00:00
|
|
|
|
1999-11-27 16:43:47 +00:00
|
|
|
private:
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxSlider)
|
1998-05-20 14:01:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __GTKSLIDERH__
|