]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/slider95.h
changed DoDragDrop(bool) into DoDragDrop(int) and added support for wxDrag_DefaultMov...
[wxWidgets.git] / include / wx / msw / slider95.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/slider95.h
3 // Purpose: wxSlider95 class
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 01/02/97
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _SLIDER95_H_
13 #define _SLIDER95_H_
14
15 #ifdef __GNUG__
16 #pragma interface "slider95.h"
17 #endif
18
19 // Slider
20 class WXDLLEXPORT wxSlider95 : public wxSliderBase
21 {
22 public:
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
46 virtual int GetValue() const ;
47 virtual void SetValue(int);
48
49 virtual void DoGetSize(int *width, int *height) const;
50
51 void GetSize(int *w, int *h) const;
52
53 void GetPosition(int *x, int *y) const;
54
55 bool Show(bool show);
56
57 void SetRange(int minValue, int maxValue);
58
59 int GetMin() const { return m_rangeMin; }
60 int GetMax() const { return m_rangeMax; }
61
62 // For trackbars only
63 void SetTickFreq(int n, int pos);
64 int GetTickFreq() const { return m_tickFreq; }
65 void SetPageSize(int pageSize);
66 int GetPageSize() const ;
67 void ClearSel() ;
68 void ClearTicks() ;
69 void SetLineSize(int lineSize);
70 int GetLineSize() const ;
71 int GetSelEnd() const ;
72 int GetSelStart() const ;
73 void SetSelection(int minPos, int maxPos);
74 void SetThumbLength(int len) ;
75 int GetThumbLength() const ;
76 void SetTick(int tickPos) ;
77
78 // IMPLEMENTATION
79 WXHWND GetStaticMin() const { return m_staticMin; }
80 WXHWND GetStaticMax() const { return m_staticMax; }
81 WXHWND GetEditValue() const { return m_staticValue; }
82 virtual bool ContainsHWND(WXHWND hWnd) const;
83
84 void Command(wxCommandEvent& event);
85 virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
86 WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
87 virtual bool MSWOnScroll(int orientation, WXWORD wParam,
88 WXWORD pos, WXHWND control);
89
90 protected:
91 WXHWND m_staticMin;
92 WXHWND m_staticMax;
93 WXHWND m_staticValue;
94 int m_rangeMin;
95 int m_rangeMax;
96 int m_pageSize;
97 int m_lineSize;
98 int m_tickFreq;
99
100 virtual void DoSetSize(int x, int y,
101 int width, int height,
102 int sizeFlags = wxSIZE_AUTO);
103
104 DECLARE_DYNAMIC_CLASS(wxSlider95)
105 };
106
107 #endif
108 // _SLIDER95_H_