]>
Commit | Line | Data |
---|---|---|
9b6dbb09 | 1 | ///////////////////////////////////////////////////////////////////////////// |
80fdcdb9 | 2 | // Name: wx/motif/scrolbar.h |
9b6dbb09 JS |
3 | // Purpose: wxScrollBar class |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 17/09/98 | |
9b6dbb09 | 7 | // Copyright: (c) Julian Smart |
925f7740 | 8 | // Licence: wxWindows licence |
9b6dbb09 JS |
9 | ///////////////////////////////////////////////////////////////////////////// |
10 | ||
11 | #ifndef _WX_SCROLBAR_H_ | |
12 | #define _WX_SCROLBAR_H_ | |
13 | ||
9b6dbb09 | 14 | // Scrollbar item |
53a2db12 | 15 | class WXDLLIMPEXP_CORE wxScrollBar: public wxScrollBarBase |
9b6dbb09 | 16 | { |
83df96d6 | 17 | DECLARE_DYNAMIC_CLASS(wxScrollBar) |
925f7740 | 18 | |
9b6dbb09 | 19 | public: |
83df96d6 | 20 | inline wxScrollBar() { m_pageSize = 0; m_viewSize = 0; m_objectSize = 0; } |
d3c7fc99 | 21 | virtual ~wxScrollBar(); |
925f7740 | 22 | |
83df96d6 JS |
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); | |
925f7740 | 38 | |
83df96d6 JS |
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; } | |
b54459c4 | 43 | |
83df96d6 JS |
44 | virtual void SetThumbPosition(int viewStart); |
45 | virtual void SetScrollbar(int position, int thumbSize, int range, int pageSize, | |
96be256b | 46 | bool refresh = true); |
925f7740 | 47 | |
83df96d6 | 48 | void Command(wxCommandEvent& event); |
925f7740 | 49 | |
83df96d6 | 50 | // Implementation |
96be256b | 51 | virtual void ChangeFont(bool keepOriginalSize = true); |
83df96d6 | 52 | virtual void ChangeBackgroundColour(); |
925f7740 | 53 | |
9b6dbb09 JS |
54 | protected: |
55 | int m_pageSize; | |
56 | int m_viewSize; | |
57 | int m_objectSize; | |
9b6dbb09 JS |
58 | }; |
59 | ||
60 | #endif | |
83df96d6 | 61 | // _WX_SCROLBAR_H_ |