]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/scrolwin.h
deprecate OnScroll() which existed for compatibility only even before
[wxWidgets.git] / include / wx / gtk / scrolwin.h
CommitLineData
30954328 1/////////////////////////////////////////////////////////////////////////////
566d84a7 2// Name: wx/gtk/scrolwin.h
30954328
RR
3// Purpose: wxScrolledWindow class
4// Author: Robert Roebling
d32e78bd 5// Modified by: Vadim Zeitlin (2005-10-10): wxScrolledWindow is now common
30954328
RR
6// Created: 01/02/97
7// RCS-ID: $Id$
8// Copyright: (c) Robert Roebling
65571936 9// Licence: wxWindows licence
30954328
RR
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_GTK_SCROLLWIN_H_
13#define _WX_GTK_SCROLLWIN_H_
14
30954328
RR
15// ----------------------------------------------------------------------------
16// wxScrolledWindow
17// ----------------------------------------------------------------------------
18
29e1398f 19class WXDLLIMPEXP_CORE wxScrollHelper : public wxScrollHelperBase
30954328
RR
20{
21public:
d32e78bd 22 // default ctor doesn't do anything
29e1398f 23 wxScrollHelper(wxWindow *win) : wxScrollHelperBase(win) { }
30954328 24
30954328 25 virtual void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY,
d32e78bd
VZ
26 int noUnitsX, int noUnitsY,
27 int xPos = 0, int yPos = 0,
28 bool noRefresh = false);
30954328 29 virtual void AdjustScrollbars();
5de9f492 30
30954328 31protected:
d32e78bd 32 // this does (each) half of AdjustScrollbars() work
add7cadd 33 void DoAdjustScrollbar(GtkRange* range,
d32e78bd
VZ
34 int pixelsPerLine,
35 int winSize,
36 int virtSize,
9ec927f8 37 int *pos,
d32e78bd
VZ
38 int *lines,
39 int *linesPerPage);
40
9ec927f8
VZ
41 void DoAdjustHScrollbar(int winSize, int virtSize)
42 {
43 DoAdjustScrollbar
44 (
45 m_win->m_scrollBar[wxWindow::ScrollDir_Horz],
46 m_xScrollPixelsPerLine, winSize, virtSize,
47 &m_xScrollPosition, &m_xScrollLines, &m_xScrollLinesPerPage
48 );
49 }
50
51 void DoAdjustVScrollbar(int winSize, int virtSize)
52 {
53 DoAdjustScrollbar
54 (
55 m_win->m_scrollBar[wxWindow::ScrollDir_Vert],
56 m_yScrollPixelsPerLine, winSize, virtSize,
57 &m_yScrollPosition, &m_yScrollLines, &m_yScrollLinesPerPage
58 );
59 }
60
d32e78bd 61 // and this does the same for Scroll()
0b0f6f87
VZ
62 void DoScrollOneDir(int orient,
63 int pos,
64 int pixelsPerLine,
65 int *posOld);
66
6362d82b 67 // implement the base class methods
0b0f6f87 68 virtual void DoScroll(int x, int y);
6362d82b
VZ
69 virtual void DoShowScrollbars(wxScrollbarVisibility horz,
70 wxScrollbarVisibility vert);
30954328
RR
71
72private:
29e1398f 73 DECLARE_NO_COPY_CLASS(wxScrollHelper)
30954328
RR
74};
75
d32e78bd 76#endif // _WX_GTK_SCROLLWIN_H_
566d84a7 77