]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/scrolwin.h
declare future-deprecated SetStyle(int) in wxPen/Brush and not wxPen/BrushBase as...
[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
53a2db12 19class WXDLLIMPEXP_CORE wxScrollHelperNative : public wxScrollHelper
30954328
RR
20{
21public:
d32e78bd
VZ
22 // default ctor doesn't do anything
23 wxScrollHelperNative(wxWindow *win) : wxScrollHelper(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();
d32e78bd 30 virtual void Scroll(int x, int y);
5de9f492 31
30954328 32protected:
d32e78bd 33 // this does (each) half of AdjustScrollbars() work
add7cadd 34 void DoAdjustScrollbar(GtkRange* range,
d32e78bd
VZ
35 int pixelsPerLine,
36 int winSize,
37 int virtSize,
9ec927f8 38 int *pos,
d32e78bd
VZ
39 int *lines,
40 int *linesPerPage);
41
9ec927f8
VZ
42 void DoAdjustHScrollbar(int winSize, int virtSize)
43 {
44 DoAdjustScrollbar
45 (
46 m_win->m_scrollBar[wxWindow::ScrollDir_Horz],
47 m_xScrollPixelsPerLine, winSize, virtSize,
48 &m_xScrollPosition, &m_xScrollLines, &m_xScrollLinesPerPage
49 );
50 }
51
52 void DoAdjustVScrollbar(int winSize, int virtSize)
53 {
54 DoAdjustScrollbar
55 (
56 m_win->m_scrollBar[wxWindow::ScrollDir_Vert],
57 m_yScrollPixelsPerLine, winSize, virtSize,
58 &m_yScrollPosition, &m_yScrollLines, &m_yScrollLinesPerPage
59 );
60 }
61
d32e78bd
VZ
62 // and this does the same for Scroll()
63 void DoScroll(int orient,
d32e78bd
VZ
64 int pos,
65 int pixelsPerLine,
66 int *posOld);
30954328
RR
67
68private:
d32e78bd 69 DECLARE_NO_COPY_CLASS(wxScrollHelperNative)
30954328
RR
70};
71
d32e78bd 72#endif // _WX_GTK_SCROLLWIN_H_
566d84a7 73