]> git.saurik.com Git - wxWidgets.git/blob - include/wx/scrolbar.h
improved conditional compilation test (added wxUSE_POSTSCRIPT)
[wxWidgets.git] / include / wx / scrolbar.h
1 #ifndef _WX_SCROLBAR_H_BASE_
2 #define _WX_SCROLBAR_H_BASE_
3
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"
45 #elif defined(__WXMOTIF__)
46 #include "wx/motif/scrolbar.h"
47 #elif defined(__WXGTK__)
48 #include "wx/gtk/scrolbar.h"
49 #elif defined(__WXMAC__)
50 #include "wx/mac/scrolbar.h"
51 #elif defined(__WXPM__)
52 #include "wx/os2/scrolbar.h"
53 #elif defined(__WXSTUBS__)
54 #include "wx/stubs/scrolbar.h"
55 #endif
56
57 #endif // wxUSE_SCROLLBAR
58
59 #endif
60 // _WX_SCROLBAR_H_BASE_