1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxSlider class
4 // Author: David Webster
8 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #include "wx/control.h"
18 class WXDLLIMPEXP_CORE wxSlider
: public wxSliderBase
22 inline wxSlider( wxWindow
* pParent
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
48 bool Create( wxWindow
* pParent
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
60 virtual int GetValue(void) const ;
61 virtual void SetValue(int);
63 void GetSize( int* pnX
66 void GetPosition( int* pnX
69 bool Show(bool bShow
= TRUE
);
70 void SetRange( int nMinValue
74 inline int GetMin(void) const { return m_nRangeMin
; }
75 inline int GetMax(void) const { return m_nRangeMax
; }
81 void ClearTicks(void);
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 ;
90 void SetLineSize(int nLineSize
);
91 void SetPageSize(int nPageSize
);
92 void SetSelection( int nMinPos
95 void SetThumbLength(int nLen
) ;
96 void SetTick(int ntickPos
) ;
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
111 inline int GetSizeFlags(void) { return m_nSizeFlags
; }
112 void Command(wxCommandEvent
& rEvent
);
113 virtual WXHBRUSH
OnCtlColor( WXHDC hDC
120 virtual bool OS2OnScroll( int nOrientation
129 WXHWND m_hStaticValue
;
135 double m_dPixelToRange
;
139 virtual void DoGetSize( int* pnWidth
142 virtual void DoSetSize( int nX
146 ,int nSizeFlags
= wxSIZE_AUTO
149 // Platform-specific implementation of SetTickFreq
150 virtual void DoSetTickFreq(int freq
);
153 DECLARE_DYNAMIC_CLASS(wxSlider
)
154 }; // end of CLASS wxSlider