]> git.saurik.com Git - wxWidgets.git/blame - include/wx/scrolbar.h
Fixed size problem due to wxMac window implementation difference
[wxWidgets.git] / include / wx / scrolbar.h
CommitLineData
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
8WXDLLEXPORT_DATA(extern const wxChar*) wxScrollBarNameStr;
9
10// ----------------------------------------------------------------------------
11// wxScrollBar: a scroll bar control
12// ----------------------------------------------------------------------------
13
14class WXDLLEXPORT wxScrollBarBase : public wxControl
15{
16public:
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,
40 bool refresh = TRUE) = 0;
fc7a2a60
VZ
41
42private:
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"
1777b9bb 56#elif defined(__WXPM__)
1e6feb95 57 #include "wx/os2/scrolbar.h"
c801d85f
KB
58#endif
59
1e6feb95
VZ
60#endif // wxUSE_SCROLLBAR
61
c801d85f 62#endif
34138703 63 // _WX_SCROLBAR_H_BASE_