]>
Commit | Line | Data |
---|---|---|
0e320a79 DW |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: scrollbar.h | |
3 | // Purpose: wxScrollBar class | |
409c9842 | 4 | // Author: David Webster |
0e320a79 | 5 | // Modified by: |
409c9842 | 6 | // Created: 10/15/99 |
0e320a79 | 7 | // RCS-ID: $Id$ |
409c9842 | 8 | // Copyright: (c) David Webster |
65571936 | 9 | // Licence: wxWindows licence |
0e320a79 DW |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef _WX_SCROLBAR_H_ | |
13 | #define _WX_SCROLBAR_H_ | |
14 | ||
210a651b | 15 | #include "wx/scrolbar.h" |
0e320a79 | 16 | |
0e320a79 | 17 | // Scrollbar item |
53a2db12 | 18 | class WXDLLIMPEXP_CORE wxScrollBar : public wxScrollBarBase |
0e320a79 | 19 | { |
0e320a79 | 20 | public: |
57ff8a87 DW |
21 | inline wxScrollBar() |
22 | { | |
23 | m_nPageSize = 0; | |
24 | m_nViewSize = 0; | |
25 | m_nObjectSize = 0; | |
26 | } | |
27 | inline wxScrollBar( wxWindow* pParent | |
28 | ,wxWindowID vId | |
29 | ,const wxPoint& rPos = wxDefaultPosition | |
30 | ,const wxSize& rSize = wxDefaultSize | |
31 | ,long lStyle = wxSB_HORIZONTAL | |
32 | #if wxUSE_VALIDATORS | |
33 | ,const wxValidator& rValidator = wxDefaultValidator | |
34 | #endif | |
35 | ,const wxString& rsName = wxScrollBarNameStr | |
36 | ) | |
37 | { | |
38 | Create( pParent | |
39 | ,vId | |
40 | ,rPos | |
41 | ,rSize | |
42 | ,lStyle | |
43 | #if wxUSE_VALIDATORS | |
44 | ,rValidator | |
45 | #endif | |
46 | ,rsName | |
47 | ); | |
48 | } | |
d3c7fc99 | 49 | virtual ~wxScrollBar(); |
409c9842 | 50 | |
57ff8a87 DW |
51 | bool Create( wxWindow* pParent |
52 | ,wxWindowID vId | |
53 | ,const wxPoint& rPos = wxDefaultPosition | |
54 | ,const wxSize& rSize = wxDefaultSize | |
55 | ,long lStyle = wxSB_HORIZONTAL | |
56 | #if wxUSE_VALIDATORS | |
57 | ,const wxValidator& rValidator = wxDefaultValidator | |
409c9842 | 58 | #endif |
57ff8a87 DW |
59 | ,const wxString& rsName = wxScrollBarNameStr |
60 | ); | |
409c9842 | 61 | |
57ff8a87 DW |
62 | int GetThumbPosition(void) const ; |
63 | inline int GetThumbSize(void) const { return m_nPageSize; } | |
64 | inline int GetPageSize(void) const { return m_nViewSize; } | |
65 | inline int GetRange(void) const { return m_nObjectSize; } | |
0e320a79 | 66 | |
57ff8a87 DW |
67 | virtual void SetThumbPosition(int nViewStart); |
68 | virtual void SetScrollbar( int nPosition | |
69 | ,int nThumbSize | |
70 | ,int nRange | |
71 | ,int nPageSize | |
72 | ,bool bRefresh = TRUE | |
73 | ); | |
409c9842 | 74 | |
57ff8a87 DW |
75 | void Command(wxCommandEvent& rEvent); |
76 | virtual WXHBRUSH OnCtlColor( WXHDC hDC | |
77 | ,WXHWND hWnd | |
78 | ,WXUINT uCtlColor | |
79 | ,WXUINT uMessage | |
80 | ,WXWPARAM wParam | |
81 | ,WXLPARAM lParam | |
82 | ); | |
83 | virtual bool OS2OnScroll( int nOrientation | |
84 | ,WXWORD wParam | |
85 | ,WXWORD wPos | |
86 | ,WXHWND hControl | |
87 | ); | |
409c9842 | 88 | |
0e320a79 | 89 | protected: |
57ff8a87 DW |
90 | int m_nPageSize; |
91 | int m_nViewSize; | |
92 | int m_nObjectSize; | |
0e320a79 | 93 | |
57ff8a87 DW |
94 | private: |
95 | DECLARE_DYNAMIC_CLASS(wxScrollBar) | |
96 | }; // end of CLASS wxScrollBar | |
0e320a79 DW |
97 | |
98 | #endif | |
99 | // _WX_SCROLBAR_H_ |