]> git.saurik.com Git - wxWidgets.git/blame - include/wx/scrolbar.h
put wxUSE_DATAVIEWCTRL in alphabetical order
[wxWidgets.git] / include / wx / scrolbar.h
CommitLineData
2ecf902b
WS
1/////////////////////////////////////////////////////////////////////////////
2// Name: scrolbar.h
3// Purpose: wxScrollBar base header
99d80019 4// Author: Julian Smart
2ecf902b
WS
5// Modified by:
6// Created:
99d80019 7// Copyright: (c) Julian Smart
2ecf902b
WS
8// RCS-ID: $Id$
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
34138703
JS
12#ifndef _WX_SCROLBAR_H_BASE_
13#define _WX_SCROLBAR_H_BASE_
c801d85f 14
2ecf902b
WS
15#include "wx/defs.h"
16
1e6feb95
VZ
17#if wxUSE_SCROLLBAR
18
19#include "wx/control.h"
20
63ec432b 21extern WXDLLEXPORT_DATA(const wxChar) wxScrollBarNameStr[];
1e6feb95
VZ
22
23// ----------------------------------------------------------------------------
24// wxScrollBar: a scroll bar control
25// ----------------------------------------------------------------------------
26
27class WXDLLEXPORT wxScrollBarBase : public wxControl
28{
29public:
fc7a2a60
VZ
30 wxScrollBarBase() { }
31
1e6feb95
VZ
32 // scrollbar construction
33 bool Create(wxWindow *parent,
34 wxWindowID id,
35 const wxPoint& pos = wxDefaultPosition,
36 const wxSize& size = wxDefaultSize,
37 long style = wxSB_HORIZONTAL,
38 const wxValidator& validator = wxDefaultValidator,
39 const wxString& name = wxScrollBarNameStr);
40
41 // accessors
42 virtual int GetThumbPosition() const = 0;
43 virtual int GetThumbSize() const = 0;
44 virtual int GetPageSize() const = 0;
45 virtual int GetRange() const = 0;
46
47 bool IsVertical() const { return (m_windowStyle & wxVERTICAL) != 0; }
48
49 // operations
50 virtual void SetThumbPosition(int viewStart) = 0;
51 virtual void SetScrollbar(int position, int thumbSize,
52 int range, int pageSize,
d775fa82 53 bool refresh = true) = 0;
fc7a2a60
VZ
54
55private:
56 DECLARE_NO_COPY_CLASS(wxScrollBarBase)
1e6feb95
VZ
57};
58
59#if defined(__WXUNIVERSAL__)
60 #include "wx/univ/scrolbar.h"
61#elif defined(__WXMSW__)
62 #include "wx/msw/scrolbar.h"
2049ba38 63#elif defined(__WXMOTIF__)
1e6feb95 64 #include "wx/motif/scrolbar.h"
1be7a35c 65#elif defined(__WXGTK20__)
1e6feb95 66 #include "wx/gtk/scrolbar.h"
1be7a35c
MR
67#elif defined(__WXGTK__)
68 #include "wx/gtk1/scrolbar.h"
34138703 69#elif defined(__WXMAC__)
1e6feb95 70 #include "wx/mac/scrolbar.h"
5369a054
DE
71#elif defined(__WXCOCOA__)
72 #include "wx/cocoa/scrolbar.h"
1777b9bb 73#elif defined(__WXPM__)
1e6feb95 74 #include "wx/os2/scrolbar.h"
c801d85f
KB
75#endif
76
1e6feb95
VZ
77#endif // wxUSE_SCROLLBAR
78
c801d85f 79#endif
34138703 80 // _WX_SCROLBAR_H_BASE_