]>
Commit | Line | Data |
---|---|---|
c801d85f | 1 | ///////////////////////////////////////////////////////////////////////////// |
8614c467 | 2 | // Name: wx/generic/scrolwin.h |
29e1398f VZ |
3 | // Purpose: generic wxScrollHelper |
4 | // Author: Vadim Zeitlin | |
5 | // Created: 2008-12-24 (replacing old file with the same name) | |
29e1398f | 6 | // Copyright: (c) 2008 Vadim Zeitlin <vadim@wxwidgets.org> |
65571936 | 7 | // Licence: wxWindows licence |
c801d85f KB |
8 | ///////////////////////////////////////////////////////////////////////////// |
9 | ||
8614c467 VZ |
10 | #ifndef _WX_GENERIC_SCROLLWIN_H_ |
11 | #define _WX_GENERIC_SCROLLWIN_H_ | |
c801d85f | 12 | |
8614c467 | 13 | // ---------------------------------------------------------------------------- |
29e1398f | 14 | // generic wxScrollHelper implementation |
8614c467 VZ |
15 | // ---------------------------------------------------------------------------- |
16 | ||
29e1398f VZ |
17 | class WXDLLIMPEXP_CORE wxScrollHelper : public wxScrollHelperBase |
18 | { | |
19 | public: | |
20 | wxScrollHelper(wxWindow *winToScroll); | |
c801d85f | 21 | |
29e1398f VZ |
22 | // implement base class pure virtuals |
23 | virtual void AdjustScrollbars(); | |
029a401d | 24 | virtual bool IsScrollbarShown(int orient) const; |
29e1398f | 25 | |
bc448be3 | 26 | protected: |
29e1398f VZ |
27 | virtual void DoScroll(int x, int y); |
28 | virtual void DoShowScrollbars(wxScrollbarVisibility horz, | |
29 | wxScrollbarVisibility vert); | |
30 | ||
bc448be3 | 31 | private: |
29e1398f VZ |
32 | // helper of AdjustScrollbars(): does the work for the single scrollbar |
33 | // | |
34 | // notice that the parameters passed by non-const references are modified | |
35 | // by this function | |
36 | void DoAdjustScrollbar(int orient, | |
37 | int clientSize, | |
38 | int virtSize, | |
1ddb6d28 | 39 | int pixelsPerUnit, |
29e1398f VZ |
40 | int& scrollUnits, |
41 | int& scrollPosition, | |
1ddb6d28 | 42 | int& scrollLinesPerPage, |
29e1398f VZ |
43 | wxScrollbarVisibility visibility); |
44 | ||
45 | ||
46 | wxScrollbarVisibility m_xVisibility, | |
47 | m_yVisibility; | |
48 | ||
c0c133e1 | 49 | wxDECLARE_NO_COPY_CLASS(wxScrollHelper); |
29e1398f | 50 | }; |
8614c467 | 51 | |
77df51f4 | 52 | #endif // _WX_GENERIC_SCROLLWIN_H_ |
566d84a7 | 53 |