// Name: wx/gtk/slider.h
// Purpose:
// Author: Robert Roebling
-// Id: $Id$
// Copyright: (c) 1998 Robert Roebling
-// Licence: wxWidgets licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifndef __GTKSLIDERH__
-#define __GTKSLIDERH__
-
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma interface
-#endif
+#ifndef _WX_GTK_SLIDER_H_
+#define _WX_GTK_SLIDER_H_
// ----------------------------------------------------------------------------
// wxSlider
// ----------------------------------------------------------------------------
-class wxSlider : public wxSliderBase
+class WXDLLIMPEXP_CORE wxSlider : public wxSliderBase
{
public:
- wxSlider() { }
+ wxSlider();
wxSlider(wxWindow *parent,
wxWindowID id,
int value, int minValue, int maxValue,
Create( parent, id, value, minValue, maxValue,
pos, size, style, validator, name );
}
+ ~wxSlider();
bool Create(wxWindow *parent,
wxWindowID id,
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
-
+
// implementation
- bool IsOwnGtkWindow( GdkWindow *window );
- void ApplyWidgetStyle();
- void GtkDisableEvents();
- void GtkEnableEvents();
+ void GTKDisableEvents();
+ void GTKEnableEvents();
+ bool GTKEventsDisabled() const;
+
+ double m_pos;
+ int m_scrollEventType;
+ bool m_needThumbRelease;
+ GtkWidget *m_scale;
+
+protected:
+ GtkWidget *m_minLabel,*m_maxLabel;
+ bool m_blockScrollEvent;
+
+ virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
- GtkAdjustment *m_adjust;
- float m_oldPos;
+ // set the slider value unconditionally
+ void GTKSetValue(int value);
-private:
DECLARE_DYNAMIC_CLASS(wxSlider)
};
-#endif // __GTKSLIDERH__
+#endif // _WX_GTK_SLIDER_H_