]> git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/slider.h
Remove wxDialog::OnSysColourChanged() documentation.
[wxWidgets.git] / include / wx / os2 / slider.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/os2/slider.h
3 // Purpose: wxSlider class
4 // Author: David Webster
5 // Modified by:
6 // Created: 10/15/99
7 // RCS-ID: $Id$
8 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_SLIDER_H_
13 #define _WX_SLIDER_H_
14
15 #include "wx/control.h"
16
17 // Slider
18 class WXDLLIMPEXP_CORE wxSlider: public wxSliderBase
19 {
20 public:
21 wxSlider();
22 inline wxSlider( wxWindow* pParent
23 ,wxWindowID vId
24 ,int nValue
25 ,int nMinValue
26 ,int nMaxValue
27 ,const wxPoint& rPos = wxDefaultPosition
28 ,const wxSize& rSize = wxDefaultSize
29 ,long lStyle = wxSL_HORIZONTAL
30 ,const wxValidator& rValidator = wxDefaultValidator
31 ,const wxString& rsName = wxSliderNameStr
32 )
33 {
34 Create( pParent
35 ,vId
36 ,nValue
37 ,nMinValue
38 ,nMaxValue
39 ,rPos
40 ,rSize
41 ,lStyle
42 ,rValidator
43 ,rsName
44 );
45 }
46 virtual ~wxSlider();
47
48 bool Create( wxWindow* pParent
49 ,wxWindowID vId
50 ,int nValue
51 ,int nMinValue
52 ,int nMaxValue
53 ,const wxPoint& rPos = wxDefaultPosition
54 ,const wxSize& rSize = wxDefaultSize
55 ,long lStyle = wxSL_HORIZONTAL
56 ,const wxValidator& rValidator = wxDefaultValidator
57 ,const wxString& rsName = wxSliderNameStr
58 );
59
60 virtual int GetValue(void) const ;
61 virtual void SetValue(int);
62
63 void GetSize( int* pnX
64 ,int* pnY
65 ) const;
66 void GetPosition( int* pnX
67 ,int* pnY
68 ) const ;
69 bool Show(bool bShow = TRUE);
70 void SetRange( int nMinValue
71 ,int nMaxValue
72 );
73
74 inline int GetMin(void) const { return m_nRangeMin; }
75 inline int GetMax(void) const { return m_nRangeMax; }
76
77 //
78 // For trackbars only
79 //
80 void ClearSel(void);
81 void ClearTicks(void);
82
83 int GetLineSize(void) const;
84 int GetPageSize(void) const ;
85 int GetSelEnd(void) const;
86 int GetSelStart(void) const;
87 inline int GetTickFreq(void) const { return m_nTickFreq; }
88 int GetThumbLength(void) const ;
89
90 void SetLineSize(int nLineSize);
91 void SetPageSize(int nPageSize);
92 void SetSelection( int nMinPos
93 ,int nMaxPos
94 );
95 void SetThumbLength(int nLen) ;
96 void SetTick(int ntickPos) ;
97
98 //
99 // IMPLEMENTATION
100 //
101 inline WXHWND GetStaticMin(void) const { return m_hStaticMin; }
102 inline WXHWND GetStaticMax(void) const { return m_hStaticMax; }
103 inline WXHWND GetEditValue(void) const { return m_hStaticValue; }
104 virtual bool ContainsHWND(WXHWND hWnd) const;
105 void AdjustSubControls( int nX
106 ,int nY
107 ,int nWidth
108 ,int nHeight
109 ,int nSizeFlags
110 );
111 inline int GetSizeFlags(void) { return m_nSizeFlags; }
112 void Command(wxCommandEvent& rEvent);
113 virtual WXHBRUSH OnCtlColor( WXHDC hDC
114 ,WXHWND hWnd
115 ,WXUINT uCtlColor
116 ,WXUINT uMessage
117 ,WXWPARAM wParam
118 ,WXLPARAM lParam
119 );
120 virtual bool OS2OnScroll( int nOrientation
121 ,WXWORD wParam
122 ,WXWORD wPos
123 ,WXHWND hControl
124 );
125
126 protected:
127 WXHWND m_hStaticMin;
128 WXHWND m_hStaticMax;
129 WXHWND m_hStaticValue;
130 int m_nRangeMin;
131 int m_nRangeMax;
132 int m_nPageSize;
133 int m_nLineSize;
134 int m_nTickFreq;
135 double m_dPixelToRange;
136 int m_nThumbLength;
137 int m_nSizeFlags;
138
139 virtual void DoGetSize( int* pnWidth
140 ,int* pnHeight
141 ) const;
142 virtual void DoSetSize( int nX
143 ,int nY
144 ,int nWidth
145 ,int nHeight
146 ,int nSizeFlags = wxSIZE_AUTO
147 );
148
149 // Platform-specific implementation of SetTickFreq
150 virtual void DoSetTickFreq(int freq);
151
152 private:
153 DECLARE_DYNAMIC_CLASS(wxSlider)
154 }; // end of CLASS wxSlider
155
156 #endif
157 // _WX_SLIDER_H_