]>
Commit | Line | Data |
---|---|---|
9b6dbb09 | 1 | ///////////////////////////////////////////////////////////////////////////// |
925f7740 | 2 | // Name: wx/motif/slider.h |
9b6dbb09 JS |
3 | // Purpose: wxSlider class |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 17/09/98 | |
9b6dbb09 | 7 | // Copyright: (c) Julian Smart |
925f7740 | 8 | // Licence: wxWindows licence |
9b6dbb09 JS |
9 | ///////////////////////////////////////////////////////////////////////////// |
10 | ||
11 | #ifndef _WX_SLIDER_H_ | |
12 | #define _WX_SLIDER_H_ | |
13 | ||
9b6dbb09 JS |
14 | #include "wx/control.h" |
15 | ||
9b6dbb09 | 16 | // Slider |
53a2db12 | 17 | class WXDLLIMPEXP_CORE wxSlider: public wxSliderBase |
9b6dbb09 | 18 | { |
83df96d6 | 19 | DECLARE_DYNAMIC_CLASS(wxSlider) |
925f7740 | 20 | |
9b6dbb09 | 21 | public: |
bfc6fde4 | 22 | wxSlider(); |
925f7740 | 23 | |
bfc6fde4 | 24 | wxSlider(wxWindow *parent, wxWindowID id, |
83df96d6 JS |
25 | int value, int minValue, int maxValue, |
26 | const wxPoint& pos = wxDefaultPosition, | |
27 | const wxSize& size = wxDefaultSize, | |
28 | long style = wxSL_HORIZONTAL, | |
29 | const wxValidator& validator = wxDefaultValidator, | |
30 | const wxString& name = wxSliderNameStr) | |
bfc6fde4 VZ |
31 | { |
32 | Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name); | |
33 | } | |
925f7740 | 34 | |
d3c7fc99 | 35 | virtual ~wxSlider(); |
925f7740 | 36 | |
bfc6fde4 | 37 | bool Create(wxWindow *parent, wxWindowID id, |
83df96d6 JS |
38 | int value, int minValue, int maxValue, |
39 | const wxPoint& pos = wxDefaultPosition, | |
40 | const wxSize& size = wxDefaultSize, | |
41 | long style = wxSL_HORIZONTAL, | |
42 | const wxValidator& validator = wxDefaultValidator, | |
43 | const wxString& name = wxSliderNameStr); | |
925f7740 | 44 | |
bfc6fde4 VZ |
45 | virtual int GetValue() const ; |
46 | virtual void SetValue(int); | |
925f7740 | 47 | |
bfc6fde4 | 48 | void SetRange(int minValue, int maxValue); |
925f7740 | 49 | |
bfc6fde4 VZ |
50 | inline int GetMin() const { return m_rangeMin; } |
51 | inline int GetMax() const { return m_rangeMax; } | |
925f7740 | 52 | |
bfc6fde4 | 53 | // For trackbars only |
bfc6fde4 VZ |
54 | void SetPageSize(int pageSize); |
55 | int GetPageSize() const ; | |
bfc6fde4 VZ |
56 | void SetLineSize(int lineSize); |
57 | int GetLineSize() const ; | |
bfc6fde4 VZ |
58 | void SetThumbLength(int len) ; |
59 | int GetThumbLength() const ; | |
925f7740 | 60 | |
bfc6fde4 | 61 | void Command(wxCommandEvent& event); |
925f7740 | 62 | |
bfc6fde4 VZ |
63 | protected: |
64 | int m_rangeMin; | |
65 | int m_rangeMax; | |
66 | int m_pageSize; | |
67 | int m_lineSize; | |
925f7740 | 68 | |
bfc6fde4 | 69 | virtual void DoSetSize(int x, int y, |
83df96d6 JS |
70 | int width, int height, |
71 | int sizeFlags = wxSIZE_AUTO); | |
925f7740 | 72 | |
bfc6fde4 VZ |
73 | private: |
74 | DECLARE_EVENT_TABLE() | |
9b6dbb09 JS |
75 | }; |
76 | ||
77 | #endif | |
83df96d6 | 78 | // _WX_SLIDER_H_ |