Remove all lines containing cvs/svn "$Id$" keyword.
[wxWidgets.git] / include / wx / motif / scrolbar.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/motif/scrolbar.h
3 // Purpose: wxScrollBar class
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 17/09/98
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_SCROLBAR_H_
12 #define _WX_SCROLBAR_H_
13
14 // Scrollbar item
15 class WXDLLIMPEXP_CORE wxScrollBar: public wxScrollBarBase
16 {
17 DECLARE_DYNAMIC_CLASS(wxScrollBar)
18
19 public:
20 inline wxScrollBar() { m_pageSize = 0; m_viewSize = 0; m_objectSize = 0; }
21 virtual ~wxScrollBar();
22
23 inline wxScrollBar(wxWindow *parent, wxWindowID id,
24 const wxPoint& pos = wxDefaultPosition,
25 const wxSize& size = wxDefaultSize,
26 long style = wxSB_HORIZONTAL,
27 const wxValidator& validator = wxDefaultValidator,
28 const wxString& name = wxScrollBarNameStr)
29 {
30 Create(parent, id, pos, size, style, validator, name);
31 }
32 bool Create(wxWindow *parent, wxWindowID id,
33 const wxPoint& pos = wxDefaultPosition,
34 const wxSize& size = wxDefaultSize,
35 long style = wxSB_HORIZONTAL,
36 const wxValidator& validator = wxDefaultValidator,
37 const wxString& name = wxScrollBarNameStr);
38
39 int GetThumbPosition() const ;
40 inline int GetThumbSize() const { return m_pageSize; }
41 inline int GetPageSize() const { return m_viewSize; }
42 inline int GetRange() const { return m_objectSize; }
43
44 virtual void SetThumbPosition(int viewStart);
45 virtual void SetScrollbar(int position, int thumbSize, int range, int pageSize,
46 bool refresh = true);
47
48 void Command(wxCommandEvent& event);
49
50 // Implementation
51 virtual void ChangeFont(bool keepOriginalSize = true);
52 virtual void ChangeBackgroundColour();
53
54 protected:
55 int m_pageSize;
56 int m_viewSize;
57 int m_objectSize;
58 };
59
60 #endif
61 // _WX_SCROLBAR_H_