]>
Commit | Line | Data |
---|---|---|
780d37ac | 1 | ///////////////////////////////////////////////////////////////////////////// |
1e6feb95 | 2 | // Name: wx/msw/slider95.h |
780d37ac JS |
3 | // Purpose: wxSlider95 class |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 01/02/97 | |
7 | // RCS-ID: $Id$ | |
bbcdf8bc | 8 | // Copyright: (c) Julian Smart |
1e6feb95 | 9 | // Licence: wxWindows licence |
780d37ac JS |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef _SLIDER95_H_ | |
13 | #define _SLIDER95_H_ | |
14 | ||
12028905 | 15 | #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) |
780d37ac JS |
16 | #pragma interface "slider95.h" |
17 | #endif | |
18 | ||
780d37ac | 19 | // Slider |
1e6feb95 | 20 | class WXDLLEXPORT wxSlider95 : public wxSliderBase |
780d37ac | 21 | { |
780d37ac | 22 | public: |
bfc6fde4 VZ |
23 | wxSlider95(); |
24 | ||
25 | wxSlider95(wxWindow *parent, wxWindowID id, | |
26 | int value, int minValue, int maxValue, | |
27 | const wxPoint& pos = wxDefaultPosition, | |
28 | const wxSize& size = wxDefaultSize, | |
29 | long style = wxSL_HORIZONTAL, | |
30 | const wxValidator& validator = wxDefaultValidator, | |
31 | const wxString& name = wxSliderNameStr) | |
32 | { | |
33 | Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name); | |
34 | } | |
35 | ||
36 | ~wxSlider95(); | |
37 | ||
38 | bool Create(wxWindow *parent, wxWindowID id, | |
39 | int value, int minValue, int maxValue, | |
40 | const wxPoint& pos = wxDefaultPosition, | |
41 | const wxSize& size = wxDefaultSize, | |
42 | long style = wxSL_HORIZONTAL, | |
43 | const wxValidator& validator = wxDefaultValidator, | |
44 | const wxString& name = wxSliderNameStr); | |
45 | ||
7f1cf28c | 46 | virtual int GetValue() const; |
bfc6fde4 VZ |
47 | virtual void SetValue(int); |
48 | ||
5f605ccf VZ |
49 | void GetSize(int *w, int *h) const; |
50 | ||
51 | void GetPosition(int *x, int *y) const; | |
bfc6fde4 | 52 | |
7f1cf28c | 53 | bool Show(bool show = TRUE); |
bfc6fde4 VZ |
54 | |
55 | void SetRange(int minValue, int maxValue); | |
56 | ||
57 | int GetMin() const { return m_rangeMin; } | |
58 | int GetMax() const { return m_rangeMax; } | |
59 | ||
60 | // For trackbars only | |
61 | void SetTickFreq(int n, int pos); | |
62 | int GetTickFreq() const { return m_tickFreq; } | |
63 | void SetPageSize(int pageSize); | |
7f1cf28c VZ |
64 | int GetPageSize() const; |
65 | void ClearSel(); | |
66 | void ClearTicks(); | |
bfc6fde4 | 67 | void SetLineSize(int lineSize); |
7f1cf28c VZ |
68 | int GetLineSize() const; |
69 | int GetSelEnd() const; | |
70 | int GetSelStart() const; | |
bfc6fde4 | 71 | void SetSelection(int minPos, int maxPos); |
7f1cf28c VZ |
72 | void SetThumbLength(int len); |
73 | int GetThumbLength() const; | |
74 | void SetTick(int tickPos); | |
bfc6fde4 VZ |
75 | |
76 | // IMPLEMENTATION | |
77 | WXHWND GetStaticMin() const { return m_staticMin; } | |
78 | WXHWND GetStaticMax() const { return m_staticMax; } | |
79 | WXHWND GetEditValue() const { return m_staticValue; } | |
80 | virtual bool ContainsHWND(WXHWND hWnd) const; | |
81 | ||
82 | void Command(wxCommandEvent& event); | |
83 | virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, | |
84 | WXUINT message, WXWPARAM wParam, WXLPARAM lParam); | |
a23fd0e1 VZ |
85 | virtual bool MSWOnScroll(int orientation, WXWORD wParam, |
86 | WXWORD pos, WXHWND control); | |
bfc6fde4 VZ |
87 | |
88 | protected: | |
89 | WXHWND m_staticMin; | |
90 | WXHWND m_staticMax; | |
91 | WXHWND m_staticValue; | |
92 | int m_rangeMin; | |
93 | int m_rangeMax; | |
94 | int m_pageSize; | |
95 | int m_lineSize; | |
96 | int m_tickFreq; | |
97 | ||
7f1cf28c VZ |
98 | virtual void DoGetSize(int *width, int *height) const; |
99 | ||
bfc6fde4 VZ |
100 | virtual void DoSetSize(int x, int y, |
101 | int width, int height, | |
102 | int sizeFlags = wxSIZE_AUTO); | |
1e6feb95 | 103 | |
fc7a2a60 | 104 | DECLARE_DYNAMIC_CLASS_NO_COPY(wxSlider95) |
780d37ac JS |
105 | }; |
106 | ||
107 | #endif | |
108 | // _SLIDER95_H_ |