]>
Commit | Line | Data |
---|---|---|
34138703 JS |
1 | #ifndef _WX_SCROLBAR_H_BASE_ |
2 | #define _WX_SCROLBAR_H_BASE_ | |
c801d85f | 3 | |
1e6feb95 VZ |
4 | #if wxUSE_SCROLLBAR |
5 | ||
6 | #include "wx/control.h" | |
7 | ||
16cba29d | 8 | extern WXDLLEXPORT_DATA(const wxChar*) wxScrollBarNameStr; |
1e6feb95 VZ |
9 | |
10 | // ---------------------------------------------------------------------------- | |
11 | // wxScrollBar: a scroll bar control | |
12 | // ---------------------------------------------------------------------------- | |
13 | ||
14 | class WXDLLEXPORT wxScrollBarBase : public wxControl | |
15 | { | |
16 | public: | |
fc7a2a60 VZ |
17 | wxScrollBarBase() { } |
18 | ||
1e6feb95 VZ |
19 | // scrollbar construction |
20 | bool Create(wxWindow *parent, | |
21 | wxWindowID id, | |
22 | const wxPoint& pos = wxDefaultPosition, | |
23 | const wxSize& size = wxDefaultSize, | |
24 | long style = wxSB_HORIZONTAL, | |
25 | const wxValidator& validator = wxDefaultValidator, | |
26 | const wxString& name = wxScrollBarNameStr); | |
27 | ||
28 | // accessors | |
29 | virtual int GetThumbPosition() const = 0; | |
30 | virtual int GetThumbSize() const = 0; | |
31 | virtual int GetPageSize() const = 0; | |
32 | virtual int GetRange() const = 0; | |
33 | ||
34 | bool IsVertical() const { return (m_windowStyle & wxVERTICAL) != 0; } | |
35 | ||
36 | // operations | |
37 | virtual void SetThumbPosition(int viewStart) = 0; | |
38 | virtual void SetScrollbar(int position, int thumbSize, | |
39 | int range, int pageSize, | |
d775fa82 | 40 | bool refresh = true) = 0; |
fc7a2a60 VZ |
41 | |
42 | private: | |
43 | DECLARE_NO_COPY_CLASS(wxScrollBarBase) | |
1e6feb95 VZ |
44 | }; |
45 | ||
46 | #if defined(__WXUNIVERSAL__) | |
47 | #include "wx/univ/scrolbar.h" | |
48 | #elif defined(__WXMSW__) | |
49 | #include "wx/msw/scrolbar.h" | |
2049ba38 | 50 | #elif defined(__WXMOTIF__) |
1e6feb95 | 51 | #include "wx/motif/scrolbar.h" |
2049ba38 | 52 | #elif defined(__WXGTK__) |
1e6feb95 | 53 | #include "wx/gtk/scrolbar.h" |
34138703 | 54 | #elif defined(__WXMAC__) |
1e6feb95 | 55 | #include "wx/mac/scrolbar.h" |
5369a054 DE |
56 | #elif defined(__WXCOCOA__) |
57 | #include "wx/cocoa/scrolbar.h" | |
1777b9bb | 58 | #elif defined(__WXPM__) |
1e6feb95 | 59 | #include "wx/os2/scrolbar.h" |
c801d85f KB |
60 | #endif |
61 | ||
1e6feb95 VZ |
62 | #endif // wxUSE_SCROLLBAR |
63 | ||
c801d85f | 64 | #endif |
34138703 | 65 | // _WX_SCROLBAR_H_BASE_ |