1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/os2/slider.h
3 // Purpose: wxSlider class
4 // Author: David Webster
7 // Copyright: (c) David Webster
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
14 #include "wx/control.h"
17 class WXDLLIMPEXP_CORE wxSlider
: public wxSliderBase
21 inline wxSlider( wxWindow
* pParent
26 ,const wxPoint
& rPos
= wxDefaultPosition
27 ,const wxSize
& rSize
= wxDefaultSize
28 ,long lStyle
= wxSL_HORIZONTAL
29 ,const wxValidator
& rValidator
= wxDefaultValidator
30 ,const wxString
& rsName
= wxSliderNameStr
47 bool Create( wxWindow
* pParent
52 ,const wxPoint
& rPos
= wxDefaultPosition
53 ,const wxSize
& rSize
= wxDefaultSize
54 ,long lStyle
= wxSL_HORIZONTAL
55 ,const wxValidator
& rValidator
= wxDefaultValidator
56 ,const wxString
& rsName
= wxSliderNameStr
59 virtual int GetValue(void) const ;
60 virtual void SetValue(int);
62 void GetSize( int* pnX
65 void GetPosition( int* pnX
68 bool Show(bool bShow
= TRUE
);
69 void SetRange( int nMinValue
73 inline int GetMin(void) const { return m_nRangeMin
; }
74 inline int GetMax(void) const { return m_nRangeMax
; }
80 void ClearTicks(void);
82 int GetLineSize(void) const;
83 int GetPageSize(void) const ;
84 int GetSelEnd(void) const;
85 int GetSelStart(void) const;
86 inline int GetTickFreq(void) const { return m_nTickFreq
; }
87 int GetThumbLength(void) const ;
89 void SetLineSize(int nLineSize
);
90 void SetPageSize(int nPageSize
);
91 void SetSelection( int nMinPos
94 void SetThumbLength(int nLen
) ;
95 void SetTick(int ntickPos
) ;
100 inline WXHWND
GetStaticMin(void) const { return m_hStaticMin
; }
101 inline WXHWND
GetStaticMax(void) const { return m_hStaticMax
; }
102 inline WXHWND
GetEditValue(void) const { return m_hStaticValue
; }
103 virtual bool ContainsHWND(WXHWND hWnd
) const;
104 void AdjustSubControls( int nX
110 inline int GetSizeFlags(void) { return m_nSizeFlags
; }
111 void Command(wxCommandEvent
& rEvent
);
112 virtual WXHBRUSH
OnCtlColor( WXHDC hDC
119 virtual bool OS2OnScroll( int nOrientation
128 WXHWND m_hStaticValue
;
134 double m_dPixelToRange
;
138 virtual void DoGetSize( int* pnWidth
141 virtual void DoSetSize( int nX
145 ,int nSizeFlags
= wxSIZE_AUTO
148 // Platform-specific implementation of SetTickFreq
149 virtual void DoSetTickFreq(int freq
);
152 DECLARE_DYNAMIC_CLASS(wxSlider
)
153 }; // end of CLASS wxSlider