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
) ;
97 void SetTickFreq( int n
104 inline WXHWND
GetStaticMin(void) const { return m_hStaticMin
; }
105 inline WXHWND
GetStaticMax(void) const { return m_hStaticMax
; }
106 inline WXHWND
GetEditValue(void) const { return m_hStaticValue
; }
107 virtual bool ContainsHWND(WXHWND hWnd
) const;
108 void AdjustSubControls( int nX
114 inline int GetSizeFlags(void) { return m_nSizeFlags
; }
115 void Command(wxCommandEvent
& rEvent
);
116 virtual WXHBRUSH
OnCtlColor( WXHDC hDC
123 virtual bool OS2OnScroll( int nOrientation
132 WXHWND m_hStaticValue
;
138 double m_dPixelToRange
;
142 virtual void DoGetSize( int* pnWidth
145 virtual void DoSetSize( int nX
149 ,int nSizeFlags
= wxSIZE_AUTO
152 DECLARE_DYNAMIC_CLASS(wxSlider
)
153 }; // end of CLASS wxSlider