]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/slider.h
Add wxActivateEvent::GetActivationReason().
[wxWidgets.git] / include / wx / gtk1 / slider.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk1/slider.h
3 // Purpose:
4 // Author: Robert Roebling
5 // Copyright: (c) 1998 Robert Roebling
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
8
9 #ifndef __GTKSLIDERH__
10 #define __GTKSLIDERH__
11
12 // ----------------------------------------------------------------------------
13 // wxSlider
14 // ----------------------------------------------------------------------------
15
16 class WXDLLIMPEXP_CORE wxSlider : public wxSliderBase
17 {
18 public:
19 wxSlider() { }
20 wxSlider(wxWindow *parent,
21 wxWindowID id,
22 int value, int minValue, int maxValue,
23 const wxPoint& pos = wxDefaultPosition,
24 const wxSize& size = wxDefaultSize,
25 long style = wxSL_HORIZONTAL,
26 const wxValidator& validator = wxDefaultValidator,
27 const wxString& name = wxSliderNameStr)
28 {
29 Create( parent, id, value, minValue, maxValue,
30 pos, size, style, validator, name );
31 }
32
33 bool Create(wxWindow *parent,
34 wxWindowID id,
35 int value, int minValue, int maxValue,
36 const wxPoint& pos = wxDefaultPosition,
37 const wxSize& size = wxDefaultSize,
38 long style = wxSL_HORIZONTAL,
39 const wxValidator& validator = wxDefaultValidator,
40 const wxString& name = wxSliderNameStr);
41
42 // implement the base class pure virtuals
43 virtual int GetValue() const;
44 virtual void SetValue(int value);
45
46 virtual void SetRange(int minValue, int maxValue);
47 virtual int GetMin() const;
48 virtual int GetMax() const;
49
50 virtual void SetLineSize(int lineSize);
51 virtual void SetPageSize(int pageSize);
52 virtual int GetLineSize() const;
53 virtual int GetPageSize() const;
54
55 virtual void SetThumbLength(int lenPixels);
56 virtual int GetThumbLength() const;
57
58 static wxVisualAttributes
59 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
60
61 // implementation
62 bool IsOwnGtkWindow( GdkWindow *window );
63 void GtkDisableEvents();
64 void GtkEnableEvents();
65
66 GtkAdjustment *m_adjust;
67 float m_oldPos;
68
69 private:
70 DECLARE_DYNAMIC_CLASS(wxSlider)
71 };
72
73 #endif // __GTKSLIDERH__