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$
|
1998-05-20 10:01:55 -04:00
|
|
|
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
2001-06-26 16:59:19 -04:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef __GTKSLIDERH__
|
|
|
|
#define __GTKSLIDERH__
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
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
|
|
|
|
2001-06-26 16:59:19 -04:00
|
|
|
class 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
|
|
|
|
1999-11-27 15:28:25 -05:00
|
|
|
// implementation
|
1998-09-07 08:29:07 -04:00
|
|
|
bool IsOwnGtkWindow( GdkWindow *window );
|
1998-10-29 13:03:18 -05:00
|
|
|
void ApplyWidgetStyle();
|
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__
|