]> git.saurik.com Git - wxWidgets.git/blob - include/wx/generic/scrolwin.h
further untangle generic and native GTK implementations of wxScrollHelper: use the...
[wxWidgets.git] / include / wx / generic / scrolwin.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/generic/scrolwin.h
3 // Purpose: generic wxScrollHelper
4 // Author: Vadim Zeitlin
5 // Created: 2008-12-24 (replacing old file with the same name)
6 // RCS-ID: $Id$
7 // Copyright: (c) 2008 Vadim Zeitlin <vadim@wxwidgets.org>
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_GENERIC_SCROLLWIN_H_
12 #define _WX_GENERIC_SCROLLWIN_H_
13
14 // ----------------------------------------------------------------------------
15 // generic wxScrollHelper implementation
16 // ----------------------------------------------------------------------------
17
18 class WXDLLIMPEXP_CORE wxScrollHelper : public wxScrollHelperBase
19 {
20 public:
21 wxScrollHelper(wxWindow *winToScroll);
22
23 // implement base class pure virtuals
24 virtual void AdjustScrollbars();
25
26 private:
27 virtual void DoScroll(int x, int y);
28 virtual void DoShowScrollbars(wxScrollbarVisibility horz,
29 wxScrollbarVisibility vert);
30
31 // helper of AdjustScrollbars(): does the work for the single scrollbar
32 //
33 // notice that the parameters passed by non-const references are modified
34 // by this function
35 void DoAdjustScrollbar(int orient,
36 int clientSize,
37 int virtSize,
38 int& pixelsPerUnit,
39 int& scrollUnits,
40 int& scrollPosition,
41 wxScrollbarVisibility visibility);
42
43
44 wxScrollbarVisibility m_xVisibility,
45 m_yVisibility;
46
47 DECLARE_NO_COPY_CLASS(wxScrollHelper)
48 };
49
50 #endif // _WX_GENERIC_SCROLLWIN_H_
51