]> git.saurik.com Git - wxWidgets.git/blame - include/wx/scrolbar.h
Use wxGetTranslation() instead of _() in the public headers.
[wxWidgets.git] / include / wx / scrolbar.h
CommitLineData
2ecf902b 1/////////////////////////////////////////////////////////////////////////////
80fdcdb9 2// Name: wx/scrolbar.h
2ecf902b 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// Licence: wxWindows licence
9/////////////////////////////////////////////////////////////////////////////
10
34138703
JS
11#ifndef _WX_SCROLBAR_H_BASE_
12#define _WX_SCROLBAR_H_BASE_
c801d85f 13
2ecf902b
WS
14#include "wx/defs.h"
15
1e6feb95
VZ
16#if wxUSE_SCROLLBAR
17
18#include "wx/control.h"
19
53a2db12 20extern WXDLLIMPEXP_DATA_CORE(const char) wxScrollBarNameStr[];
1e6feb95
VZ
21
22// ----------------------------------------------------------------------------
23// wxScrollBar: a scroll bar control
24// ----------------------------------------------------------------------------
25
53a2db12 26class WXDLLIMPEXP_CORE wxScrollBarBase : public wxControl
1e6feb95
VZ
27{
28public:
fc7a2a60
VZ
29 wxScrollBarBase() { }
30
62441159
VZ
31 /*
32 Derived classes should provide the following method and ctor with the
33 same parameters:
34
1e6feb95
VZ
35 bool Create(wxWindow *parent,
36 wxWindowID id,
37 const wxPoint& pos = wxDefaultPosition,
38 const wxSize& size = wxDefaultSize,
39 long style = wxSB_HORIZONTAL,
40 const wxValidator& validator = wxDefaultValidator,
41 const wxString& name = wxScrollBarNameStr);
62441159 42 */
1e6feb95
VZ
43
44 // accessors
45 virtual int GetThumbPosition() const = 0;
46 virtual int GetThumbSize() const = 0;
47 virtual int GetPageSize() const = 0;
48 virtual int GetRange() const = 0;
49
50 bool IsVertical() const { return (m_windowStyle & wxVERTICAL) != 0; }
51
52 // operations
53 virtual void SetThumbPosition(int viewStart) = 0;
54 virtual void SetScrollbar(int position, int thumbSize,
55 int range, int pageSize,
d775fa82 56 bool refresh = true) = 0;
fc7a2a60 57
c1142003
VZ
58 // implementation-only
59 bool IsNeeded() const { return GetRange() > GetThumbSize(); }
60
fc7a2a60 61private:
c0c133e1 62 wxDECLARE_NO_COPY_CLASS(wxScrollBarBase);
1e6feb95
VZ
63};
64
65#if defined(__WXUNIVERSAL__)
66 #include "wx/univ/scrolbar.h"
67#elif defined(__WXMSW__)
68 #include "wx/msw/scrolbar.h"
2049ba38 69#elif defined(__WXMOTIF__)
1e6feb95 70 #include "wx/motif/scrolbar.h"
1be7a35c 71#elif defined(__WXGTK20__)
1e6feb95 72 #include "wx/gtk/scrolbar.h"
1be7a35c
MR
73#elif defined(__WXGTK__)
74 #include "wx/gtk1/scrolbar.h"
34138703 75#elif defined(__WXMAC__)
ef0e9220 76 #include "wx/osx/scrolbar.h"
5369a054
DE
77#elif defined(__WXCOCOA__)
78 #include "wx/cocoa/scrolbar.h"
1777b9bb 79#elif defined(__WXPM__)
1e6feb95 80 #include "wx/os2/scrolbar.h"
c801d85f
KB
81#endif
82
1e6feb95
VZ
83#endif // wxUSE_SCROLLBAR
84
c801d85f 85#endif
34138703 86 // _WX_SCROLBAR_H_BASE_