2001-04-29 11:27:57 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2002-04-19 18:12:38 -04:00
|
|
|
// Name: wx/gtk/scrolwin.h
|
2001-04-29 11:27:57 -04:00
|
|
|
// Purpose: wxScrolledWindow class
|
|
|
|
// Author: Robert Roebling
|
2005-10-10 14:24:27 -04:00
|
|
|
// Modified by: Vadim Zeitlin (2005-10-10): wxScrolledWindow is now common
|
2001-04-29 11:27:57 -04:00
|
|
|
// Created: 01/02/97
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Robert Roebling
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
2001-04-29 11:27:57 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_GTK_SCROLLWIN_H_
|
|
|
|
#define _WX_GTK_SCROLLWIN_H_
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxScrolledWindow
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
2008-03-26 11:06:00 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxScrollHelperNative : public wxScrollHelper
|
2001-04-29 11:27:57 -04:00
|
|
|
{
|
|
|
|
public:
|
2005-10-10 14:24:27 -04:00
|
|
|
// default ctor doesn't do anything
|
|
|
|
wxScrollHelperNative(wxWindow *win) : wxScrollHelper(win) { }
|
2001-04-29 11:27:57 -04:00
|
|
|
|
|
|
|
virtual void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY,
|
2005-10-10 14:24:27 -04:00
|
|
|
int noUnitsX, int noUnitsY,
|
|
|
|
int xPos = 0, int yPos = 0,
|
|
|
|
bool noRefresh = false);
|
2001-04-29 11:27:57 -04:00
|
|
|
virtual void AdjustScrollbars();
|
2005-10-10 14:24:27 -04:00
|
|
|
virtual void Scroll(int x, int y);
|
2004-07-20 12:30:22 -04:00
|
|
|
|
2001-04-29 11:27:57 -04:00
|
|
|
protected:
|
2005-10-10 14:24:27 -04:00
|
|
|
// this does (each) half of AdjustScrollbars() work
|
2006-05-17 00:54:13 -04:00
|
|
|
void DoAdjustScrollbar(GtkRange* range,
|
2005-10-10 14:24:27 -04:00
|
|
|
int pixelsPerLine,
|
|
|
|
int winSize,
|
|
|
|
int virtSize,
|
2006-12-04 06:05:59 -05:00
|
|
|
int *pos,
|
2005-10-10 14:24:27 -04:00
|
|
|
int *lines,
|
|
|
|
int *linesPerPage);
|
|
|
|
|
2006-12-04 06:05:59 -05:00
|
|
|
void DoAdjustHScrollbar(int winSize, int virtSize)
|
|
|
|
{
|
|
|
|
DoAdjustScrollbar
|
|
|
|
(
|
|
|
|
m_win->m_scrollBar[wxWindow::ScrollDir_Horz],
|
|
|
|
m_xScrollPixelsPerLine, winSize, virtSize,
|
|
|
|
&m_xScrollPosition, &m_xScrollLines, &m_xScrollLinesPerPage
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
void DoAdjustVScrollbar(int winSize, int virtSize)
|
|
|
|
{
|
|
|
|
DoAdjustScrollbar
|
|
|
|
(
|
|
|
|
m_win->m_scrollBar[wxWindow::ScrollDir_Vert],
|
|
|
|
m_yScrollPixelsPerLine, winSize, virtSize,
|
|
|
|
&m_yScrollPosition, &m_yScrollLines, &m_yScrollLinesPerPage
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2005-10-10 14:24:27 -04:00
|
|
|
// and this does the same for Scroll()
|
|
|
|
void DoScroll(int orient,
|
|
|
|
int pos,
|
|
|
|
int pixelsPerLine,
|
|
|
|
int *posOld);
|
2001-04-29 11:27:57 -04:00
|
|
|
|
|
|
|
private:
|
2005-10-10 14:24:27 -04:00
|
|
|
DECLARE_NO_COPY_CLASS(wxScrollHelperNative)
|
2001-04-29 11:27:57 -04:00
|
|
|
};
|
|
|
|
|
2005-10-10 14:24:27 -04:00
|
|
|
#endif // _WX_GTK_SCROLLWIN_H_
|
2002-04-19 18:12:38 -04:00
|
|
|
|