]> git.saurik.com Git - wxWidgets.git/blame - include/wx/os2/scrolbar.h
Fix wxPropertyGrid::GetPropertyRect when the last item is collapsed.
[wxWidgets.git] / include / wx / os2 / scrolbar.h
CommitLineData
0e320a79 1/////////////////////////////////////////////////////////////////////////////
80fdcdb9 2// Name: wx/os2/scrolbar.h
0e320a79 3// Purpose: wxScrollBar class
409c9842 4// Author: David Webster
0e320a79 5// Modified by:
409c9842 6// Created: 10/15/99
409c9842 7// Copyright: (c) David Webster
65571936 8// Licence: wxWindows licence
0e320a79
DW
9/////////////////////////////////////////////////////////////////////////////
10
11#ifndef _WX_SCROLBAR_H_
12#define _WX_SCROLBAR_H_
13
210a651b 14#include "wx/scrolbar.h"
0e320a79 15
0e320a79 16// Scrollbar item
53a2db12 17class WXDLLIMPEXP_CORE wxScrollBar : public wxScrollBarBase
0e320a79 18{
0e320a79 19public:
57ff8a87
DW
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 }
d3c7fc99 48 virtual ~wxScrollBar();
409c9842 49
57ff8a87
DW
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
409c9842 57#endif
57ff8a87
DW
58 ,const wxString& rsName = wxScrollBarNameStr
59 );
409c9842 60
57ff8a87
DW
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; }
0e320a79 65
57ff8a87
DW
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 );
409c9842 73
57ff8a87
DW
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 );
409c9842 87
0e320a79 88protected:
57ff8a87
DW
89 int m_nPageSize;
90 int m_nViewSize;
91 int m_nObjectSize;
0e320a79 92
57ff8a87
DW
93private:
94 DECLARE_DYNAMIC_CLASS(wxScrollBar)
95}; // end of CLASS wxScrollBar
0e320a79
DW
96
97#endif
98 // _WX_SCROLBAR_H_