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 WXDLLEXPORT wxSlider
: public wxSliderBase
22 inline wxSlider( wxWindow
* pParent
27 ,const wxPoint
& rPos
= wxDefaultPosition
28 ,const wxSize
& rSize
= wxDefaultSize
29 ,long lStyle
= wxSL_HORIZONTAL
31 ,const wxValidator
& rValidator
= wxDefaultValidator
33 ,const wxString
& rsName
= wxSliderNameStr
52 bool Create( wxWindow
* pParent
57 ,const wxPoint
& rPos
= wxDefaultPosition
58 ,const wxSize
& rSize
= wxDefaultSize
59 ,long lStyle
= wxSL_HORIZONTAL
61 ,const wxValidator
& rValidator
= wxDefaultValidator
63 ,const wxString
& rsName
= wxSliderNameStr
66 virtual int GetValue(void) const ;
67 virtual void SetValue(int);
69 void GetSize( int* pnX
72 void GetPosition( int* pnX
75 bool Show(bool bShow
);
76 void SetRange( int nMinValue
80 inline int GetMin(void) const { return m_nRangeMin
; }
81 inline int GetMax(void) const { return m_nRangeMax
; }
87 void ClearTicks(void);
89 int GetLineSize(void) const;
90 int GetPageSize(void) const ;
91 int GetSelEnd(void) const;
92 int GetSelStart(void) const;
93 inline int GetTickFreq(void) const { return m_nTickFreq
; }
94 int GetThumbLength(void) const ;
96 void SetLineSize(int nLineSize
);
97 void SetPageSize(int nPageSize
);
98 void SetSelection( int nMinPos
101 void SetThumbLength(int nLen
) ;
102 void SetTick(int ntickPos
) ;
103 void SetTickFreq( int n
110 inline WXHWND
GetStaticMin(void) const { return m_hStaticMin
; }
111 inline WXHWND
GetStaticMax(void) const { return m_hStaticMax
; }
112 inline WXHWND
GetEditValue(void) const { return m_hStaticValue
; }
113 virtual bool ContainsHWND(WXHWND hWnd
) const;
114 void AdjustSubControls( int nX
120 inline int GetSizeFlags(void) { return m_nSizeFlags
; }
121 void Command(wxCommandEvent
& rEvent
);
122 virtual WXHBRUSH
OnCtlColor( WXHDC hDC
129 virtual bool OS2OnScroll( int nOrientation
138 WXHWND m_hStaticValue
;
144 double m_dPixelToRange
;
148 virtual void DoSetSize( int nX
152 ,int nSizeFlags
= wxSIZE_AUTO
155 DECLARE_DYNAMIC_CLASS(wxSlider
)
156 }; // end of CLASS wxSlider