]>
Commit | Line | Data |
---|---|---|
c801d85f | 1 | ///////////////////////////////////////////////////////////////////////////// |
8ef94bfc | 2 | // Name: wx/gtk1/slider.h |
c801d85f KB |
3 | // Purpose: |
4 | // Author: Robert Roebling | |
371a5b4e | 5 | // Copyright: (c) 1998 Robert Roebling |
65571936 | 6 | // Licence: wxWindows licence |
c801d85f KB |
7 | ///////////////////////////////////////////////////////////////////////////// |
8 | ||
c801d85f KB |
9 | #ifndef __GTKSLIDERH__ |
10 | #define __GTKSLIDERH__ | |
11 | ||
1e6feb95 | 12 | // ---------------------------------------------------------------------------- |
c801d85f | 13 | // wxSlider |
1e6feb95 | 14 | // ---------------------------------------------------------------------------- |
c801d85f | 15 | |
20123d49 | 16 | class WXDLLIMPEXP_CORE wxSlider : public wxSliderBase |
c801d85f | 17 | { |
a075e27b | 18 | public: |
1e6feb95 VZ |
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) | |
6de97a3b | 28 | { |
1e6feb95 VZ |
29 | Create( parent, id, value, minValue, maxValue, |
30 | pos, size, style, validator, name ); | |
6de97a3b | 31 | } |
1e6feb95 VZ |
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 | |
a075e27b | 43 | virtual int GetValue() const; |
1e6feb95 VZ |
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; | |
c801d85f | 57 | |
9d522606 RD |
58 | static wxVisualAttributes |
59 | GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); | |
8ef94bfc | 60 | |
aa9a4ae1 | 61 | // implementation |
b4071e91 | 62 | bool IsOwnGtkWindow( GdkWindow *window ); |
ee4ead93 RR |
63 | void GtkDisableEvents(); |
64 | void GtkEnableEvents(); | |
aa9a4ae1 | 65 | |
c801d85f KB |
66 | GtkAdjustment *m_adjust; |
67 | float m_oldPos; | |
aa9a4ae1 | 68 | |
a075e27b RR |
69 | private: |
70 | DECLARE_DYNAMIC_CLASS(wxSlider) | |
c801d85f KB |
71 | }; |
72 | ||
73 | #endif // __GTKSLIDERH__ |