1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/scrolwin.h
3 // Purpose: wxScrolledWindow class
4 // Author: Robert Roebling
5 // Modified by: Vadim Zeitlin (2005-10-10): wxScrolledWindow is now common
8 // Copyright: (c) Robert Roebling
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_GTK_SCROLLWIN_H_
13 #define _WX_GTK_SCROLLWIN_H_
15 // ----------------------------------------------------------------------------
17 // ----------------------------------------------------------------------------
19 class WXDLLIMPEXP_CORE wxScrollHelper
: public wxScrollHelperBase
21 typedef wxScrollHelperBase base_type
;
23 // default ctor doesn't do anything
24 wxScrollHelper(wxWindow
*win
) : wxScrollHelperBase(win
) { }
26 // implement the base class methods
27 virtual void SetScrollbars(int pixelsPerUnitX
, int pixelsPerUnitY
,
28 int noUnitsX
, int noUnitsY
,
29 int xPos
= 0, int yPos
= 0,
30 bool noRefresh
= false);
31 virtual void AdjustScrollbars();
34 virtual void DoScroll(int x
, int y
);
35 virtual void DoShowScrollbars(wxScrollbarVisibility horz
,
36 wxScrollbarVisibility vert
);
39 // this does (each) half of AdjustScrollbars() work
40 void DoAdjustScrollbar(GtkRange
* range
,
48 void DoAdjustHScrollbar(int winSize
, int virtSize
)
52 m_win
->m_scrollBar
[wxWindow::ScrollDir_Horz
],
53 m_xScrollPixelsPerLine
, winSize
, virtSize
,
54 &m_xScrollPosition
, &m_xScrollLines
, &m_xScrollLinesPerPage
58 void DoAdjustVScrollbar(int winSize
, int virtSize
)
62 m_win
->m_scrollBar
[wxWindow::ScrollDir_Vert
],
63 m_yScrollPixelsPerLine
, winSize
, virtSize
,
64 &m_yScrollPosition
, &m_yScrollLines
, &m_yScrollLinesPerPage
68 // and this does the same for Scroll()
69 void DoScrollOneDir(int orient
,
74 wxDECLARE_NO_COPY_CLASS(wxScrollHelper
);
77 #endif // _WX_GTK_SCROLLWIN_H_