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