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