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