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 wxScrollHelperNative
: public wxScrollHelper
22 // default ctor doesn't do anything
23 wxScrollHelperNative(wxWindow
*win
) : wxScrollHelper(win
) { }
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 virtual void Scroll(int x
, int y
);
33 // this does (each) half of AdjustScrollbars() work
34 void DoAdjustScrollbar(GtkRange
* range
,
42 void DoAdjustHScrollbar(int winSize
, int virtSize
)
46 m_win
->m_scrollBar
[wxWindow::ScrollDir_Horz
],
47 m_xScrollPixelsPerLine
, winSize
, virtSize
,
48 &m_xScrollPosition
, &m_xScrollLines
, &m_xScrollLinesPerPage
52 void DoAdjustVScrollbar(int winSize
, int virtSize
)
56 m_win
->m_scrollBar
[wxWindow::ScrollDir_Vert
],
57 m_yScrollPixelsPerLine
, winSize
, virtSize
,
58 &m_yScrollPosition
, &m_yScrollLines
, &m_yScrollLinesPerPage
62 // and this does the same for Scroll()
63 void DoScroll(int orient
,
69 DECLARE_NO_COPY_CLASS(wxScrollHelperNative
)
72 #endif // _WX_GTK_SCROLLWIN_H_