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