| 1 | ///////////////////////////////////////////////////////////////////////////// |
| 2 | // Name: wx/gtk1/scrolwin.h |
| 3 | // Purpose: wxScrolledWindow class |
| 4 | // Author: Robert Roebling |
| 5 | // Modified by: Vadim Zeitlin (2005-10-10): wxScrolledWindow is now common |
| 6 | // Created: 01/02/97 |
| 7 | // RCS-ID: $Id$ |
| 8 | // Copyright: (c) Robert Roebling |
| 9 | // Licence: wxWindows licence |
| 10 | ///////////////////////////////////////////////////////////////////////////// |
| 11 | |
| 12 | #ifndef _WX_GTK_SCROLLWIN_H_ |
| 13 | #define _WX_GTK_SCROLLWIN_H_ |
| 14 | |
| 15 | // ---------------------------------------------------------------------------- |
| 16 | // wxScrolledWindow |
| 17 | // ---------------------------------------------------------------------------- |
| 18 | |
| 19 | class WXDLLIMPEXP_CORE wxScrollHelper : public wxScrollHelperBase |
| 20 | { |
| 21 | public: |
| 22 | wxScrollHelper(wxWindow *win) : wxScrollHelperBase(win) { } |
| 23 | |
| 24 | // implement base class pure virtuals |
| 25 | virtual void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY, |
| 26 | int noUnitsX, int noUnitsY, |
| 27 | int xPos = 0, int yPos = 0, |
| 28 | bool noRefresh = false); |
| 29 | virtual void AdjustScrollbars(); |
| 30 | |
| 31 | protected: |
| 32 | virtual void DoScroll(int x, int y); |
| 33 | virtual void DoShowScrollbars(wxScrollbarVisibility horz, |
| 34 | wxScrollbarVisibility vert); |
| 35 | |
| 36 | // this does (each) half of AdjustScrollbars() work |
| 37 | void DoAdjustScrollbar(GtkAdjustment *adj, |
| 38 | int pixelsPerLine, |
| 39 | int winSize, |
| 40 | int virtSize, |
| 41 | int *pos, |
| 42 | int *lines, |
| 43 | int *linesPerPage); |
| 44 | |
| 45 | // and this does the same for Scroll() |
| 46 | void DoScrollOneDir(int orient, |
| 47 | GtkAdjustment *adj, |
| 48 | int pos, |
| 49 | int pixelsPerLine, |
| 50 | int *posOld); |
| 51 | |
| 52 | private: |
| 53 | wxDECLARE_NO_COPY_CLASS(wxScrollHelper); |
| 54 | }; |
| 55 | |
| 56 | #endif // _WX_GTK_SCROLLWIN_H_ |
| 57 | |