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